From 57b3454125ff268fb900c0d60b267535857bcd93 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 2 Jul 2022 18:51:15 -0500 Subject: legacy/gcc6: add buildable patches --- legacy/gcc6/fix-rs6000-pie.patch | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 legacy/gcc6/fix-rs6000-pie.patch (limited to 'legacy/gcc6/fix-rs6000-pie.patch') diff --git a/legacy/gcc6/fix-rs6000-pie.patch b/legacy/gcc6/fix-rs6000-pie.patch new file mode 100644 index 000000000..1fbc31a56 --- /dev/null +++ b/legacy/gcc6/fix-rs6000-pie.patch @@ -0,0 +1,59 @@ +--- gcc-6.3.0.orig/gcc/config/rs6000/sysv4.h ++++ gcc-6.3.0/gcc/config/rs6000/sysv4.h +@@ -753,23 +753,42 @@ + #endif + + #ifdef HAVE_LD_PIE +-#define STARTFILE_LINUX_SPEC "\ +-%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ +-%{mnewlib:ecrti.o%s;:crti.o%s} \ +-%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ +-" CRTOFFLOADBEGIN ++#define STARTFILE_LINUX_SPEC \ ++ "%{!shared: %{pg|p|profile:gcrt1.o%s;: \ ++ %{" PIE_SPEC ":%{static:rcrt1.o%s;:Scrt1.o%s}} %{" NO_PIE_SPEC ":crt1.o%s}}} \ ++ crti.o%s %{shared:crtbeginS.o%s;: \ ++ %{" PIE_SPEC ":crtbeginS.o%s} \ ++ %{" NO_PIE_SPEC ":%{static:crtbeginT.o%s;:crtbegin.o%s}}} \ ++ %{fvtable-verify=none:%s; \ ++ fvtable-verify=preinit:vtv_start_preinit.o%s; \ ++ fvtable-verify=std:vtv_start.o%s} \ ++ " CRTOFFLOADBEGIN + #else +-#define STARTFILE_LINUX_SPEC "\ +-%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ +-%{mnewlib:ecrti.o%s;:crti.o%s} \ +-%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ +-" CRTOFFLOADBEGIN ++#define STARTFILE_LINUX_SPEC \ ++ "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ ++ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ ++ %{fvtable-verify=none:%s; \ ++ fvtable-verify=preinit:vtv_start_preinit.o%s; \ ++ fvtable-verify=std:vtv_start.o%s} \ ++ " CRTOFFLOADBEGIN + #endif + +-#define ENDFILE_LINUX_SPEC "\ +-%{shared|pie:crtendS.o%s;:crtend.o%s} \ +-%{mnewlib:ecrtn.o%s;:crtn.o%s} \ +-" CRTOFFLOADEND ++#ifdef HAVE_LD_PIE ++#define ENDFILE_LINUX_SPEC \ ++ "%{fvtable-verify=none:%s; \ ++ fvtable-verify=preinit:vtv_end_preinit.o%s; \ ++ fvtable-verify=std:vtv_end.o%s} \ ++ %{shared:crtendS.o%s;: %{" PIE_SPEC ":crtendS.o%s} \ ++ %{" NO_PIE_SPEC ":crtend.o%s}} crtn.o%s \ ++ " CRTOFFLOADEND ++#else ++#define ENDFILE_LINUX_SPEC \ ++ "%{fvtable-verify=none:%s; \ ++ fvtable-verify=preinit:vtv_end_preinit.o%s; \ ++ fvtable-verify=std:vtv_end.o%s} \ ++ %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s \ ++ " CRTOFFLOADEND ++#endif + + #define LINK_START_LINUX_SPEC "" + -- cgit v1.2.3-60-g2f50