diff --git a/Toolchain/Patches/gcc.patch b/Toolchain/Patches/gcc.patch index 6d4f2840ed..39f5eefd91 100644 --- a/Toolchain/Patches/gcc.patch +++ b/Toolchain/Patches/gcc.patch @@ -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"