1 |
commit: 495348e424123f0de3c5d6ce98a9b674cf9cc673 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 29 12:26:40 2022 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 29 12:26:40 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=495348e4 |
7 |
|
8 |
13.1.0: update patches + add 2 more, cut patchset 3 |
9 |
|
10 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
11 |
|
12 |
13.1.0/gentoo/26_all_enable-cet.patch | 32 +++++++++---------- |
13 |
13.1.0/gentoo/28_all_drop_CFLAGS_sed.patch | 35 +++++++++++++++++++++ |
14 |
13.1.0/gentoo/29_all_msgfmt-libstdc++-link.patch | 39 ++++++++++++++++++++++++ |
15 |
13.1.0/gentoo/README.history | 4 +++ |
16 |
4 files changed, 94 insertions(+), 16 deletions(-) |
17 |
|
18 |
diff --git a/13.1.0/gentoo/26_all_enable-cet.patch b/13.1.0/gentoo/26_all_enable-cet.patch |
19 |
index ecdc64f..a6976c4 100644 |
20 |
--- a/13.1.0/gentoo/26_all_enable-cet.patch |
21 |
+++ b/13.1.0/gentoo/26_all_enable-cet.patch |
22 |
@@ -11,7 +11,7 @@ Needs: |
23 |
Only supported on amd64. |
24 |
--- a/gcc/cp/lang-specs.h |
25 |
+++ b/gcc/cp/lang-specs.h |
26 |
-@@ -51,7 +51,7 @@ along with GCC; see the file COPYING3. If not see |
27 |
+@@ -51,7 +51,7 @@ |
28 |
" %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}" |
29 |
" %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}" |
30 |
" %{fmodules-ts:-fmodule-header %{fpreprocessed:-fdirectives-only}}" |
31 |
@@ -20,7 +20,7 @@ Only supported on amd64. |
32 |
" %{!fsyntax-only:" |
33 |
" %{!S:-o %g.s%V}" |
34 |
" %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:" |
35 |
-@@ -72,7 +72,7 @@ along with GCC; see the file COPYING3. If not see |
36 |
+@@ -72,7 +72,7 @@ |
37 |
" %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}" |
38 |
" %{fmodules-ts:-fmodule-header=system" |
39 |
" %{fpreprocessed:-fdirectives-only}}" |
40 |
@@ -29,7 +29,7 @@ Only supported on amd64. |
41 |
" %{!fsyntax-only:" |
42 |
" %{!S:-o %g.s%V}" |
43 |
" %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:" |
44 |
-@@ -92,7 +92,7 @@ along with GCC; see the file COPYING3. If not see |
45 |
+@@ -92,7 +92,7 @@ |
46 |
" %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}" |
47 |
" %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}" |
48 |
" %{fmodules-ts:-fmodule-header=user %{fpreprocessed:-fdirectives-only}}" |
49 |
@@ -38,7 +38,7 @@ Only supported on amd64. |
50 |
" %{!fsyntax-only:" |
51 |
" %{!S:-o %g.s%V}" |
52 |
" %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:" |
53 |
-@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see |
54 |
+@@ -107,7 +107,7 @@ |
55 |
" cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed" |
56 |
" %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}" |
57 |
" %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}" |
58 |
@@ -47,7 +47,7 @@ Only supported on amd64. |
59 |
" %{!fsyntax-only:" |
60 |
" %{fmodule-only:%{!S:-o %g.s%V}}" |
61 |
" %{!fmodule-only:%(invoke_as)}}" |
62 |
-@@ -116,7 +116,7 @@ along with GCC; see the file COPYING3. If not see |
63 |
+@@ -116,7 +116,7 @@ |
64 |
{".ii", "@c++-cpp-output", 0, 0, 0}, |
65 |
{"@c++-cpp-output", |
66 |
"%{!E:%{!M:%{!MM:" |
67 |
@@ -58,8 +58,8 @@ Only supported on amd64. |
68 |
" %{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}" |
69 |
--- a/gcc/gcc.cc |
70 |
+++ b/gcc/gcc.cc |
71 |
-@@ -995,6 +995,18 @@ proper position among the other output files. */ |
72 |
- #endif |
73 |
+@@ -987,6 +987,18 @@ |
74 |
+ #define LINK_NOW_SPEC "" |
75 |
#endif |
76 |
|
77 |
+/* Default value for flag_cf_protection when flag_cf_protection is |
78 |
@@ -77,7 +77,7 @@ Only supported on amd64. |
79 |
#ifdef ENABLE_DEFAULT_PIE |
80 |
#define PIE_SPEC "!no-pie" |
81 |
#define NO_FPIE1_SPEC "fno-pie" |
82 |
-@@ -1197,6 +1209,7 @@ static const char *cpp_spec = CPP_SPEC; |
83 |
+@@ -1189,6 +1201,7 @@ |
84 |
static const char *cc1_spec = CC1_SPEC; |
85 |
static const char *cc1plus_spec = CC1PLUS_SPEC; |
86 |
static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; |
87 |
@@ -85,7 +85,7 @@ Only supported on amd64. |
88 |
static const char *link_ssp_spec = LINK_SSP_SPEC; |
89 |
static const char *asm_spec = ASM_SPEC; |
90 |
static const char *asm_final_spec = ASM_FINAL_SPEC; |
91 |
-@@ -1255,7 +1268,7 @@ static const char *cpp_options = |
92 |
+@@ -1247,7 +1260,7 @@ |
93 |
"%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ |
94 |
%{f*} %{g*:%{%:debug-level-gt(0):%{g*}\ |
95 |
%{!fno-working-directory:-fworking-directory}}} %{O*}\ |
96 |
@@ -94,7 +94,7 @@ Only supported on amd64. |
97 |
|
98 |
/* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al. |
99 |
|
100 |
-@@ -1444,9 +1457,9 @@ static const struct compiler default_compilers[] = |
101 |
+@@ -1440,9 +1453,9 @@ |
102 |
%{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ |
103 |
%(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ |
104 |
cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ |
105 |
@@ -106,7 +106,7 @@ Only supported on amd64. |
106 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, |
107 |
{"-", |
108 |
"%{!E:%e-E or -x required when input is from standard input}\ |
109 |
-@@ -1471,7 +1484,7 @@ static const struct compiler default_compilers[] = |
110 |
+@@ -1467,7 +1480,7 @@ |
111 |
%W{o*:--output-pch %*}}%V}}}}}}}", 0, 0, 0}, |
112 |
{".i", "@cpp-output", 0, 0, 0}, |
113 |
{"@cpp-output", |
114 |
@@ -115,7 +115,7 @@ Only supported on amd64. |
115 |
{".s", "@assembler", 0, 0, 0}, |
116 |
{"@assembler", |
117 |
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, |
118 |
-@@ -1703,6 +1716,7 @@ static struct spec_list static_specs[] = |
119 |
+@@ -1699,6 +1712,7 @@ |
120 |
INIT_STATIC_SPEC ("cc1_options", &cc1_options), |
121 |
INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec), |
122 |
INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec), |
123 |
@@ -125,7 +125,7 @@ Only supported on amd64. |
124 |
INIT_STATIC_SPEC ("link", &link_spec), |
125 |
--- a/gcc/objc/lang-specs.h |
126 |
+++ b/gcc/objc/lang-specs.h |
127 |
-@@ -29,9 +29,9 @@ along with GCC; see the file COPYING3. If not see |
128 |
+@@ -29,9 +29,9 @@ |
129 |
%{traditional|traditional-cpp:\ |
130 |
%eGNU Objective C no longer supports traditional compilation}\ |
131 |
%{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ |
132 |
@@ -137,7 +137,7 @@ Only supported on amd64. |
133 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
134 |
{"@objective-c-header", |
135 |
"%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ |
136 |
-@@ -40,18 +40,18 @@ along with GCC; see the file COPYING3. If not see |
137 |
+@@ -40,18 +40,18 @@ |
138 |
%{traditional|traditional-cpp:\ |
139 |
%eGNU Objective C no longer supports traditional compilation}\ |
140 |
%{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ |
141 |
@@ -162,7 +162,7 @@ Only supported on amd64. |
142 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
143 |
--- a/gcc/objcp/lang-specs.h |
144 |
+++ b/gcc/objcp/lang-specs.h |
145 |
-@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see |
146 |
+@@ -36,7 +36,7 @@ |
147 |
%(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ |
148 |
cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ |
149 |
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
150 |
@@ -171,7 +171,7 @@ Only supported on amd64. |
151 |
-o %g.s %{!o*:--output-pch %i.gch} %W{o*:--output-pch %*}%V}}}", |
152 |
CPLUSPLUS_CPP_SPEC, 0, 0}, |
153 |
{"@objective-c++", |
154 |
-@@ -46,16 +46,16 @@ along with GCC; see the file COPYING3. If not see |
155 |
+@@ -46,16 +46,16 @@ |
156 |
%(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ |
157 |
cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ |
158 |
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
159 |
|
160 |
diff --git a/13.1.0/gentoo/28_all_drop_CFLAGS_sed.patch b/13.1.0/gentoo/28_all_drop_CFLAGS_sed.patch |
161 |
new file mode 100644 |
162 |
index 0000000..764f34c |
163 |
--- /dev/null |
164 |
+++ b/13.1.0/gentoo/28_all_drop_CFLAGS_sed.patch |
165 |
@@ -0,0 +1,35 @@ |
166 |
+https://bugs.gentoo.org/849722 |
167 |
+https://github.com/InBetweenNames/gentooLTO/issues/846 |
168 |
+https://github.com/vaeth/portage-bashrc-mv/issues/11 |
169 |
+--- a/gcc/configure |
170 |
++++ b/gcc/configure |
171 |
+@@ -5388,13 +5388,6 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex |
172 |
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
173 |
+ |
174 |
+ |
175 |
+-# Remove the -O2: for historical reasons, unless bootstrapping we prefer |
176 |
+-# optimizations to be activated explicitly by the toplevel. |
177 |
+-case "$CC" in |
178 |
+- */prev-gcc/xgcc*) ;; |
179 |
+- *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" ` |
180 |
+- CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" ` ;; |
181 |
+-esac |
182 |
+ |
183 |
+ |
184 |
+ |
185 |
+--- a/gcc/configure.ac |
186 |
++++ b/gcc/configure.ac |
187 |
+@@ -440,13 +440,6 @@ ACX_PROG_GDC([-I"$srcdir"/d]) |
188 |
+ # Do configure tests with the C++ compiler, since that's what we build with. |
189 |
+ AC_LANG(C++) |
190 |
+ |
191 |
+-# Remove the -O2: for historical reasons, unless bootstrapping we prefer |
192 |
+-# optimizations to be activated explicitly by the toplevel. |
193 |
+-case "$CC" in |
194 |
+- */prev-gcc/xgcc*) ;; |
195 |
+- *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" ` |
196 |
+- CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" ` ;; |
197 |
+-esac |
198 |
+ AC_SUBST(CFLAGS) |
199 |
+ AC_SUBST(CXXFLAGS) |
200 |
+ AC_SUBST(GDCFLAGS) |
201 |
|
202 |
diff --git a/13.1.0/gentoo/29_all_msgfmt-libstdc++-link.patch b/13.1.0/gentoo/29_all_msgfmt-libstdc++-link.patch |
203 |
new file mode 100644 |
204 |
index 0000000..0d2f113 |
205 |
--- /dev/null |
206 |
+++ b/13.1.0/gentoo/29_all_msgfmt-libstdc++-link.patch |
207 |
@@ -0,0 +1,39 @@ |
208 |
+Ensure that msgfmt doesn't encounter problems during gcc bootstrapping. |
209 |
+ |
210 |
+Solves error messages like the following: |
211 |
+ |
212 |
+msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6) |
213 |
+ |
214 |
+The libgcc_s.so used during build doesn't satisfy the needs of the |
215 |
+libstdc++.so that msgfmt is linked against. On the other hand, msgfmt |
216 |
+is used as a stand-alone application here, and what library it uses |
217 |
+behind the scenes is of no concern to the gcc build process. |
218 |
+Therefore, simply invoking it "as usual", i.e. without any special |
219 |
+library path, will make it work as expected here. |
220 |
+ |
221 |
+2011-09-19 Martin von Gagern |
222 |
+ |
223 |
+References: |
224 |
+https://bugs.gentoo.org/372377 |
225 |
+https://bugs.gentoo.org/295480 |
226 |
+https://bugs.gentoo.org/843119 |
227 |
+--- a/libstdc++-v3/po/Makefile.am |
228 |
++++ b/libstdc++-v3/po/Makefile.am |
229 |
+@@ -39,6 +39,7 @@ MSGFMT = msgfmt |
230 |
+ EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN) |
231 |
+ |
232 |
+ .po.mo: |
233 |
++ env --unset=LD_LIBRARY_PATH \ |
234 |
+ $(MSGFMT) -o $@ $< |
235 |
+ |
236 |
+ all-local: all-local-$(USE_NLS) |
237 |
+--- a/libstdc++-v3/po/Makefile.in |
238 |
++++ b/libstdc++-v3/po/Makefile.in |
239 |
+@@ -419,6 +419,7 @@ uninstall-am: uninstall-info-am |
240 |
+ |
241 |
+ |
242 |
+ .po.mo: |
243 |
++ env --unset=LD_LIBRARY_PATH \ |
244 |
+ $(MSGFMT) -o $@ $< |
245 |
+ |
246 |
+ all-local: all-local-$(USE_NLS) |
247 |
|
248 |
diff --git a/13.1.0/gentoo/README.history b/13.1.0/gentoo/README.history |
249 |
index 3d797d2..fcd7f8b 100644 |
250 |
--- a/13.1.0/gentoo/README.history |
251 |
+++ b/13.1.0/gentoo/README.history |
252 |
@@ -1,7 +1,11 @@ |
253 |
+3 29 November 2022 |
254 |
+ |
255 |
- 23_all_EXTRA_OPTIONS-z-now.patch |
256 |
+ 23_all_DEF_GENTOO_ZNOW-z-now.patch |
257 |
- 24_all_EXTRA_OPTIONS-fstack-clash-protection.patch |
258 |
+ 24_all_DEF_GENTOO_SCP-fstack-clash-protection.patch |
259 |
+ + 28_all_drop_CFLAGS_sed.patch |
260 |
+ + 29_all_msgfmt-libstdc++-link.patch |
261 |
|
262 |
2 8 November 2022 |
263 |
- 12_all_disable-systemtap-switch.patch |