summaryrefslogtreecommitdiff
path: root/Toolchain
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-07 11:06:29 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-07 15:35:50 +0200
commit1889006b9045fd5750436c412c0836dab7c388d4 (patch)
treea6e0517a5f917431065af645832ce30e8d1fbd43 /Toolchain
parente3ee539fea7e7d2672377c52dd344c45fed44f50 (diff)
downloadserenity-1889006b9045fd5750436c412c0836dab7c388d4.zip
Toolchain: Make -nodefaultlibs not link against libgcc_s
This fixes the -nodefaultlibs flag for gcc which previously linked against libgcc_s anyway. Even though this is a toolchain patch we don't need to rebuild the toolchain right away.
Diffstat (limited to 'Toolchain')
-rw-r--r--Toolchain/Patches/gcc.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/Toolchain/Patches/gcc.patch b/Toolchain/Patches/gcc.patch
index 39f5eefd91..205c459056 100644
--- a/Toolchain/Patches/gcc.patch
+++ b/Toolchain/Patches/gcc.patch
@@ -126,7 +126,7 @@ diff -Naur gcc-11.1.0-RC-20210420/gcc/config/serenity.h gcc-11.1.0-RC-20210420.s
+#define ENDFILE_SPEC "%{shared|pie:crtendS.o%s; :crtend.o%s} crtn.o%s"
+
+#undef LINK_SPEC
-+#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!static: %{rdynamic:-export-dynamic} %{!fbuilding-libgcc:-lgcc_s -dynamic-linker /usr/lib/Loader.so}}"
++#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!static: %{rdynamic:-export-dynamic} %{!fbuilding-libgcc:%{!nodefaultlibs:-lgcc_s} -dynamic-linker /usr/lib/Loader.so}}"
+
+#undef CC1_SPEC
+#define CC1_SPEC "-fno-exceptions -ftls-model=initial-exec %{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}} -fno-semantic-interposition"