mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
Toolchain: Enable building all code with -fPIC
Ordinarily this would force the compiler to not inline certain symbols and call them via the PLT instead. To counteract this I've also added -fno-semantic-interposition which disables ELF symbol interposition. Our dynamic loader doesn't support this anyway and we might even consider not implementing this at all. Even though this is a toolchain change this doesn't require rebuilding the toolchain unless you're planning to build for the x86_64 arch.
This commit is contained in:
parent
a050b43290
commit
d685db6eb6
Notes:
sideshowbarker
2024-07-18 18:45:25 +09:00
Author: https://github.com/gunnarbeutner
Commit: d685db6eb6
Pull-request: https://github.com/SerenityOS/serenity/pull/6803
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ diff -Naur gcc-11.1.0-RC-20210420/gcc/config/serenity.h gcc-11.1.0-RC-20210420.s
|
|||
+#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 -ftls-model=initial-exec"
|
||||
+#define CC1_SPEC "-fno-exceptions -ftls-model=initial-exec %{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}} -fno-semantic-interposition"
|
||||
+
|
||||
+#undef CC1PLUS_SPEC
|
||||
+#define CC1PLUS_SPEC "-fno-exceptions -ftls-model=initial-exec"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue