summaryrefslogtreecommitdiff
path: root/Toolchain/Patches
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-02-19 15:54:40 +0200
committerAndreas Kling <kling@serenityos.org>2021-02-19 15:21:24 +0100
commit7df61e2c9b45ab2939b2abb1e1fac55e410679e5 (patch)
tree83808b1699b38e8e9a6af0ba32ddb91230741fa7 /Toolchain/Patches
parent4f80bb6ce35ec3e3f86b11f3934d95409578bcc4 (diff)
downloadserenity-7df61e2c9b45ab2939b2abb1e1fac55e410679e5.zip
Toolchain: Use -ftls-model=initial-exec by default
Our TLS implementation relies on the TLS model being "initial-exec". We previously enforced this by adding the '-ftls-model=initial-exec' flag in the root CmakeLists file, but that did not affect ports - So now we put that flag in the gcc spec files. Closes #5366
Diffstat (limited to 'Toolchain/Patches')
-rw-r--r--Toolchain/Patches/gcc.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/Toolchain/Patches/gcc.patch b/Toolchain/Patches/gcc.patch
index b063f9ef6d..70b08a6dd6 100644
--- a/Toolchain/Patches/gcc.patch
+++ b/Toolchain/Patches/gcc.patch
@@ -125,10 +125,10 @@ diff -ruN a/gcc/config/serenity.h b/gcc/config/serenity.h
+#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!static: %{rdynamic:-export-dynamic} %{!fbuilding-libgcc:-lgcc_s -dynamic-linker /usr/lib/Loader.so}}"
+
+#undef CC1_SPEC
-+#define CC1_SPEC "-fno-exceptions"
++#define CC1_SPEC "-fno-exceptions -ftls-model=initial-exec"
+
+#undef CC1PLUS_SPEC
-+#define CC1PLUS_SPEC "-fno-exceptions"
++#define CC1PLUS_SPEC "-fno-exceptions -ftls-model=initial-exec"
+
+/* Additional predefined macros. */
+#undef TARGET_OS_CPP_BUILTINS