1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:47:45 +00:00

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
This commit is contained in:
Itamar 2021-02-19 15:54:40 +02:00 committed by Andreas Kling
parent 4f80bb6ce3
commit 7df61e2c9b
3 changed files with 12 additions and 6 deletions

View file

@ -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