Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-patches:master commit in: 10.4.0/gentoo/
Date: Thu, 02 Dec 2021 15:03:06
Message-Id: 1638047662.28ba3bac32109520950963c91edbd49a7b6a6458.soap@gentoo
1 commit: 28ba3bac32109520950963c91edbd49a7b6a6458
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 27 21:14:22 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 27 21:14:22 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=28ba3bac
7
8 10.4.0: rebase patches to avoid fuzz
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 10.4.0/gentoo/02_all_default-warn-format-security.patch | 12 ++++++------
13 10.4.0/gentoo/04_all_nossp-on-nostdlib.patch | 12 ++++++------
14 10.4.0/gentoo/08_all_libiberty-asprintf.patch | 6 +++---
15 10.4.0/gentoo/16_all_libgfortran-Werror.patch | 12 ++++++++++--
16 10.4.0/gentoo/17_all_libgomp-Werror.patch | 10 ++++++++--
17 10.4.0/gentoo/18_all_libitm-Werror.patch | 10 ++++++++--
18 10.4.0/gentoo/19_all_libatomic-Werror.patch | 10 ++++++++--
19 10.4.0/gentoo/27_all_EXTRA_OPTIONS-z-now.patch | 14 +++++++-------
20 8 files changed, 56 insertions(+), 30 deletions(-)
21
22 diff --git a/10.4.0/gentoo/02_all_default-warn-format-security.patch b/10.4.0/gentoo/02_all_default-warn-format-security.patch
23 index f809abd..36201dc 100644
24 --- a/10.4.0/gentoo/02_all_default-warn-format-security.patch
25 +++ b/10.4.0/gentoo/02_all_default-warn-format-security.patch
26 @@ -1,9 +1,9 @@
27 Enable -Wformat and -Wformat-security by default.
28
29 ---- a/gcc/c-family/c.opt 2016-03-23 18:51:56.000000000 +0100
30 -+++ b/gcc/c-family/c.opt 2016-04-28 23:45:54.063351272 +0200
31 -@@ -459,7 +459,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonlit
32 - Warn about format strings that are not literals.
33 +--- a/gcc/c-family/c.opt
34 ++++ b/gcc/c-family/c.opt
35 +@@ -599,7 +599,7 @@
36 + of the destination region. Same as -Wformat-overflow=1.
37
38 Wformat-security
39 -C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
40 @@ -11,7 +11,7 @@ Enable -Wformat and -Wformat-security by default.
41 Warn about possible security problems with format functions.
42
43 Wformat-signedness
44 -@@ -475,7 +475,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_l
45 +@@ -620,7 +620,7 @@
46 Warn about zero-length formats.
47
48 Wformat=
49 @@ -19,4 +19,4 @@ Enable -Wformat and -Wformat-security by default.
50 +C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
51 Warn about printf/scanf/strftime/strfmon format string anomalies.
52
53 - Wignored-qualifiers
54 + Wformat-overflow=
55
56 diff --git a/10.4.0/gentoo/04_all_nossp-on-nostdlib.patch b/10.4.0/gentoo/04_all_nossp-on-nostdlib.patch
57 index 648d712..6d9f00a 100644
58 --- a/10.4.0/gentoo/04_all_nossp-on-nostdlib.patch
59 +++ b/10.4.0/gentoo/04_all_nossp-on-nostdlib.patch
60 @@ -1,10 +1,10 @@
61 Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
62
63 https://bugs.gentoo.org/484714
64 ---- a/gcc/gcc.c 2017-07-04 09:15:57.740793000 +0200
65 -+++ b/gcc/gcc.c 2018-03-02 13:58:44.387741114 +0100
66 -@@ -857,6 +857,12 @@ proper position among the other output f
67 - #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G"
68 +--- a/gcc/gcc.c
69 ++++ b/gcc/gcc.c
70 +@@ -874,6 +874,12 @@
71 + #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
72 #endif
73
74 +#ifdef ENABLE_DEFAULT_SSP
75 @@ -16,7 +16,7 @@ https://bugs.gentoo.org/484714
76 #ifndef LINK_SSP_SPEC
77 #ifdef TARGET_LIBC_PROVIDES_SSP
78 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
79 -@@ -1131,7 +1148,7 @@ static const char *cc1_options =
80 +@@ -1155,7 +1161,7 @@
81 %{-version:--version}\
82 %{-help=*:--help=%*}\
83 %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
84 @@ -24,4 +24,4 @@ https://bugs.gentoo.org/484714
85 + %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
86 %{coverage:-fprofile-arcs -ftest-coverage}\
87 %{fprofile-arcs|fprofile-generate*|coverage:\
88 - %{!fprofile-update=singel:\
89 + %{!fprofile-update=single:\
90
91 diff --git a/10.4.0/gentoo/08_all_libiberty-asprintf.patch b/10.4.0/gentoo/08_all_libiberty-asprintf.patch
92 index bee0c4c..83ae56e 100644
93 --- a/10.4.0/gentoo/08_all_libiberty-asprintf.patch
94 +++ b/10.4.0/gentoo/08_all_libiberty-asprintf.patch
95 @@ -4,7 +4,7 @@
96
97 --- a/include/libiberty.h
98 +++ b/include/libiberty.h
99 -@@ -609,8 +609,11 @@ extern int pwait (int, int *, int);
100 +@@ -645,8 +645,11 @@
101 /* Like sprintf but provides a pointer to malloc'd storage, which must
102 be freed by the caller. */
103
104 @@ -14,5 +14,5 @@
105 #endif
106 +#endif
107
108 - #if !HAVE_DECL_VASPRINTF
109 - /* Like vsprintf but provides a pointer to malloc'd storage, which
110 + /* Like asprintf but allocates memory without fail. This works like
111 + xmalloc. */
112
113 diff --git a/10.4.0/gentoo/16_all_libgfortran-Werror.patch b/10.4.0/gentoo/16_all_libgfortran-Werror.patch
114 index f6c26bf..1501057 100644
115 --- a/10.4.0/gentoo/16_all_libgfortran-Werror.patch
116 +++ b/10.4.0/gentoo/16_all_libgfortran-Werror.patch
117 @@ -6,15 +6,23 @@ http://gcc.gnu.org/PR54724
118
119 --- a/libgfortran/configure.ac
120 +++ b/libgfortran/configure.ac
121 -@@ -140,3 +140,3 @@ AM_PROG_CC_C_O
122 +@@ -146,7 +146,7 @@
123 +
124 + # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC.
125 if test "x$GCC" = "xyes"; then
126 - AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring"
127 + AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring"
128 ## We like to use C11 and C99 routines when available. This makes
129 + ## sure that
130 + ## __STDC_VERSION__ is set such that libc includes make them available.
131 --- a/libgfortran/configure
132 +++ b/libgfortran/configure
133 -@@ -5764,3 +5764,3 @@ fi
134 +@@ -5981,7 +5981,7 @@
135 +
136 # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC.
137 if test "x$GCC" = "xyes"; then
138 - AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring"
139 + AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring"
140 + ## We like to use C11 and C99 routines when available. This makes
141 + ## sure that
142 + ## __STDC_VERSION__ is set such that libc includes make them available.
143
144 diff --git a/10.4.0/gentoo/17_all_libgomp-Werror.patch b/10.4.0/gentoo/17_all_libgomp-Werror.patch
145 index 416808a..ffcb076 100644
146 --- a/10.4.0/gentoo/17_all_libgomp-Werror.patch
147 +++ b/10.4.0/gentoo/17_all_libgomp-Werror.patch
148 @@ -4,17 +4,23 @@ https://bugs.gentoo.org/229059
149 http://gcc.gnu.org/PR38436
150 --- a/libgomp/configure.ac
151 +++ b/libgomp/configure.ac
152 -@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
153 +@@ -123,7 +123,7 @@
154 +
155 # Add -Wall -Werror if we are using GCC.
156 if test "x$GCC" = "xyes"; then
157 - XCFLAGS="$XCFLAGS -Wall -Werror"
158 + XCFLAGS="$XCFLAGS -Wall"
159 fi
160 +
161 + # Find other programs we need.
162 --- a/libgomp/configure
163 +++ b/libgomp/configure
164 -@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
165 +@@ -4616,7 +4616,7 @@
166 +
167 # Add -Wall -Werror if we are using GCC.
168 if test "x$GCC" = "xyes"; then
169 - XCFLAGS="$XCFLAGS -Wall -Werror"
170 + XCFLAGS="$XCFLAGS -Wall"
171 fi
172 +
173 + # Find other programs we need.
174
175 diff --git a/10.4.0/gentoo/18_all_libitm-Werror.patch b/10.4.0/gentoo/18_all_libitm-Werror.patch
176 index 27181e0..c2b9164 100644
177 --- a/10.4.0/gentoo/18_all_libitm-Werror.patch
178 +++ b/10.4.0/gentoo/18_all_libitm-Werror.patch
179 @@ -3,17 +3,23 @@ libitm does not respect --disable-werror
180 https://bugs.gentoo.org/475350
181 --- a/libitm/configure.ac
182 +++ b/libitm/configure.ac
183 -@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
184 +@@ -263,7 +263,7 @@
185 +
186 # Add -Wall -Werror if we are using GCC.
187 if test "x$GCC" = "xyes"; then
188 - XCFLAGS="$XCFLAGS -Wall -Werror"
189 + XCFLAGS="$XCFLAGS -Wall"
190 fi
191 +
192 + XCFLAGS="$XCFLAGS $XPCFLAGS"
193 --- a/libitm/configure
194 +++ b/libitm/configure
195 -@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
196 +@@ -17864,7 +17864,7 @@
197 +
198 # Add -Wall -Werror if we are using GCC.
199 if test "x$GCC" = "xyes"; then
200 - XCFLAGS="$XCFLAGS -Wall -Werror"
201 + XCFLAGS="$XCFLAGS -Wall"
202 fi
203 +
204 + XCFLAGS="$XCFLAGS $XPCFLAGS"
205
206 diff --git a/10.4.0/gentoo/19_all_libatomic-Werror.patch b/10.4.0/gentoo/19_all_libatomic-Werror.patch
207 index 0550722..c39ca37 100644
208 --- a/10.4.0/gentoo/19_all_libatomic-Werror.patch
209 +++ b/10.4.0/gentoo/19_all_libatomic-Werror.patch
210 @@ -3,17 +3,23 @@ libatomic does not respect --disable-werror
211 https://bugs.gentoo.org/475350
212 --- a/libatomic/configure.ac
213 +++ b/libatomic/configure.ac
214 -@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
215 +@@ -253,7 +253,7 @@
216 +
217 # Add -Wall -Werror if we are using GCC.
218 if test "x$GCC" = "xyes"; then
219 - XCFLAGS="$XCFLAGS -Wall -Werror"
220 + XCFLAGS="$XCFLAGS -Wall"
221 fi
222 +
223 + # Add CET specific flags if CET is enabled
224 --- a/libatomic/configure
225 +++ b/libatomic/configure
226 -@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
227 +@@ -15571,7 +15571,7 @@
228 +
229 # Add -Wall -Werror if we are using GCC.
230 if test "x$GCC" = "xyes"; then
231 - XCFLAGS="$XCFLAGS -Wall -Werror"
232 + XCFLAGS="$XCFLAGS -Wall"
233 fi
234 +
235 + # Add CET specific flags if CET is enabled
236
237 diff --git a/10.4.0/gentoo/27_all_EXTRA_OPTIONS-z-now.patch b/10.4.0/gentoo/27_all_EXTRA_OPTIONS-z-now.patch
238 index 121dec4..93d31f2 100644
239 --- a/10.4.0/gentoo/27_all_EXTRA_OPTIONS-z-now.patch
240 +++ b/10.4.0/gentoo/27_all_EXTRA_OPTIONS-z-now.patch
241 @@ -1,8 +1,8 @@
242 On Hardened we add some options like -z now
243
244 ---- a/gcc/gcc.c 2016-02-19 23:18:38.000000000 +0100
245 -+++ b/gcc/gcc.c 2016-05-02 22:56:10.185721270 +0200
246 -@@ -868,6 +868,12 @@ proper position among the other output f
247 +--- a/gcc/gcc.c
248 ++++ b/gcc/gcc.c
249 +@@ -891,6 +891,12 @@
250 #endif
251 #endif
252
253 @@ -13,9 +13,9 @@ On Hardened we add some options like -z now
254 +#endif
255 +
256 #ifdef ENABLE_DEFAULT_PIE
257 - #define NO_PIE_SPEC "no-pie|static"
258 - #define PIE_SPEC NO_PIE_SPEC "|r|shared:;"
259 -@@ -1013,7 +1020,7 @@ proper position among the other output f
260 + #define PIE_SPEC "!no-pie"
261 + #define NO_FPIE1_SPEC "fno-pie"
262 +@@ -1043,7 +1049,7 @@
263 %(linker) " \
264 LINK_PLUGIN_SPEC \
265 "%{flto|flto=*:%<fcompare-debug*} \
266 @@ -23,4 +23,4 @@ On Hardened we add some options like -z now
267 + %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC LINK_NOW_SPEC \
268 "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
269 "%X %{o*} %{e*} %{N} %{n} %{r}\
270 - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
271 + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \