summaryrefslogtreecommitdiff
path: root/system/gcc/0012-static-pie.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-05-23 23:40:10 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-06-11 14:03:55 -0500
commitfea61b9e1973a6ca7efe6cdf91e87c7604d54dd6 (patch)
treedfbe2ea0114eaf6c9fa04043def5f921a29efaec /system/gcc/0012-static-pie.patch
parentaec78470ff4b2c671c4a522920681947c0209e11 (diff)
downloadpackages-fea61b9e1973a6ca7efe6cdf91e87c7604d54dd6.tar.gz
packages-fea61b9e1973a6ca7efe6cdf91e87c7604d54dd6.tar.bz2
packages-fea61b9e1973a6ca7efe6cdf91e87c7604d54dd6.tar.xz
packages-fea61b9e1973a6ca7efe6cdf91e87c7604d54dd6.zip
system/gcc: Update to 13.3.0
0012-static-pie and 201-ada were forward-ported by my own paws. Three digit 0xx underscore patches are from Gentoo. This is also the source of the insn-split and match-split patches, which significantly increase performance on build. They are also the source of the new configure option --with-matchpd-partitions. On systems with very many cores/threads, a number higher than 32 would probably perform even better, but 32 should give decent perf on 8+ threads, and runs quite nicely on the 64-thread Talos II I ran the testbuild on. 202 is from Void. The 300s are originally written by me. The Ada patch now includes an improvement to use posix_openpt instead of getpt, which fixes link errors later on. We also now use STAGE1_CFLAGS and BOOT_CFLAGS to improve build times. Improvement was clocked from 40m to 32m (-8m, or 20%) on gwyn. The patch for Go name mangling is needed to build packages that use reflect2, which includes user/gitlab-runner.
Diffstat (limited to 'system/gcc/0012-static-pie.patch')
-rw-r--r--system/gcc/0012-static-pie.patch62
1 files changed, 15 insertions, 47 deletions
diff --git a/system/gcc/0012-static-pie.patch b/system/gcc/0012-static-pie.patch
index 0600c791e..5c7a1b519 100644
--- a/system/gcc/0012-static-pie.patch
+++ b/system/gcc/0012-static-pie.patch
@@ -13,14 +13,14 @@ an alias to -static -pie.
gcc/common.opt | 4 ++--
gcc/config/gnu-user.h | 12 +++++-------
gcc/config/rs6000/sysv4.h | 11 +++++------
- gcc/gcc.c | 6 +++---
+ gcc/gcc.cc | 6 +++---
4 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index b52ef0b38c8..0ce5857e01d 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
-@@ -3197,11 +3197,11 @@ Driver
+@@ -3669,11 +3669,11 @@ Driver
no-pie
Driver RejectNegative Negative(shared)
@@ -38,7 +38,7 @@ diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index 8620de3e42d..235328a2642 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
-@@ -52,13 +52,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -51,13 +51,12 @@
#define GNU_USER_TARGET_STARTFILE_SPEC \
"%{shared:; \
pg|p|profile:%{static-pie:grcrt1.o%s;:gcrt1.o%s}; \
@@ -46,8 +46,8 @@ index 8620de3e42d..235328a2642 100644
- static-pie:rcrt1.o%s; \
+ static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \
" PIE_SPEC ":Scrt1.o%s; \
- :crt1.o%s} \
- crti.o%s \
+ :crt1.o%s} " \
+ GNU_USER_TARGET_CRTI " \
- %{static:crtbeginT.o%s; \
- shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \
+ %{shared|" PIE_SPEC ":crtbeginS.o%s; \
@@ -55,7 +55,7 @@ index 8620de3e42d..235328a2642 100644
:crtbegin.o%s} \
%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_start_preinit.o%s; \
-@@ -92,8 +91,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -76,8 +75,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
"%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_end_preinit.o%s; \
fvtable-verify=std:vtv_end.o%s} \
@@ -63,9 +63,9 @@ index 8620de3e42d..235328a2642 100644
- shared|static-pie|" PIE_SPEC ":crtendS.o%s; \
+ %{shared|" PIE_SPEC ":crtendS.o%s; \
:crtend.o%s} \
- crtn.o%s \
- " CRTOFFLOADEND
-@@ -133,7 +131,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ GNU_USER_TARGET_CRTN " " \
+ CRTOFFLOADEND
+@@ -106,7 +104,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
#if defined(HAVE_LD_EH_FRAME_HDR)
@@ -73,43 +73,12 @@ index 8620de3e42d..235328a2642 100644
+#define LINK_EH_SPEC "%{!static|" PIE_SPEC ":--eh-frame-hdr} "
#endif
- #undef LINK_GCC_C_SEQUENCE_SPEC
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index bb19d0dcd41..bb2a2324eb0 100644
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -763,12 +763,12 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
- #define STARTFILE_LINUX_SPEC \
- "%{shared:; \
- pg|p|profile:gcrt1.o%s; \
-- static:crt1.o%s; \
-- static-pie|" PIE_SPEC ":Scrt1.o%s; \
-+ static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \
-+ " PIE_SPEC ":Scrt1.o%s; \
- :crt1.o%s} \
- %{mnewlib:ecrti.o%s;:crti.o%s} \
-- %{static:crtbeginT.o%s; \
-- shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \
-+ %{shared|" PIE_SPEC ":crtbeginS.o%s; \
-+ static:crtbeginT.o%s; \
- :crtbegin.o%s} \
- %{fvtable-verify=none:%s; \
- fvtable-verify=preinit:vtv_start_preinit.o%s; \
-@@ -781,8 +781,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
- "%{fvtable-verify=none:%s; \
- fvtable-verify=preinit:vtv_end_preinit.o%s; \
- fvtable-verify=std:vtv_end.o%s} \
-- %{static:crtend.o%s; \
-- shared|static-pie|" PIE_SPEC ":crtendS.o%s; \
-+ %{shared|" PIE_SPEC ":crtendS.o%s; \
- :crtend.o%s} \
- %{mnewlib:ecrtn.o%s;:crtn.o%s} \
- " CRTOFFLOADEND
-diff --git a/gcc/gcc.c b/gcc/gcc.c
+ #define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \
+diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index eb1610ba8b0..87560afb03c 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -900,7 +900,7 @@ proper position among the other output files. */
+--- a/gcc/gcc.cc
++++ b/gcc/gcc.cc
+@@ -1003,7 +1003,7 @@ proper position among the other output files. */
#define NO_FPIE_AND_FPIC_SPEC NO_FPIE_SPEC "|" NO_FPIC_SPEC
#define FPIE_OR_FPIC_SPEC NO_FPIE_AND_FPIC_SPEC ":;"
#else
@@ -118,7 +87,7 @@ index eb1610ba8b0..87560afb03c 100644
#define FPIE1_SPEC "fpie"
#define NO_FPIE1_SPEC FPIE1_SPEC ":;"
#define FPIE2_SPEC "fPIE"
-@@ -924,12 +924,12 @@ proper position among the other output files. */
+@@ -1027,12 +1027,12 @@ proper position among the other output files. */
#ifndef LINK_PIE_SPEC
#ifdef HAVE_LD_PIE
#ifndef LD_PIE_SPEC
@@ -135,4 +104,3 @@ index eb1610ba8b0..87560afb03c 100644
#ifndef LINK_BUILDID_SPEC
--
2.17.1
-