summaryrefslogtreecommitdiff
path: root/Toolchain
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-07-28 20:46:52 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-28 21:28:31 +0200
commit5df8c274bb32235cd5adaa0cbb6ffddfb1d041e0 (patch)
tree82f80b0ff3ca7899740163267aecd0d79501dd0e /Toolchain
parenta11070ab151c8c9330d4ff14c5a7bf152048c97f (diff)
downloadserenity-5df8c274bb32235cd5adaa0cbb6ffddfb1d041e0.zip
Toolchain+Ports: Fix building ports on x86_64
Fixes #8377.
Diffstat (limited to 'Toolchain')
-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 65a148bd02..93a0e85de7 100644
--- a/Toolchain/Patches/gcc.patch
+++ b/Toolchain/Patches/gcc.patch
@@ -145,11 +145,11 @@ diff -Naur gcc-11.2.0/gcc/config/serenity.h gcc-11.2.0.serenity/gcc/config/seren
+/* Files that are linked before user code.
+ The %s tells GCC to look for these files in the library directory. */
+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC "%{!shared:crt0.o%s} crti.o%s %{shared: %{!fbuilding-libgcc:crt0_shared.o%s}} %{shared|pie:crtbeginS.o%s; :crtbegin.o%s}"
++#define STARTFILE_SPEC "%{!shared:crt0.o%s} crti.o%s %{shared: %{!fbuilding-libgcc:crt0_shared.o%s}} %{shared|static-pie|!no-pie:crtbeginS.o%s; :crtbegin.o%s}"
+
+/* Files that are linked after user code. */
+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC "%{shared|pie:crtendS.o%s; :crtend.o%s} crtn.o%s"
++#define ENDFILE_SPEC "%{shared|static-pie|!no-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:%{!nodefaultlibs:-lgcc_s} -dynamic-linker /usr/lib/Loader.so}}"