Skip to content

Commit 8acb21b

Browse files
nmeumkaniini
authored andcommitted
main/gcc: upgrade to 12.1.1_git20220630
1 parent 297a19c commit 8acb21b

File tree

63 files changed

+853
-1780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+853
-1780
lines changed

main/gcc/0001-posix_memalign.patch

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From feb04e50d907683385cc4dc0163cf1d82258073a Mon Sep 17 00:00:00 2001
1+
From 74c7b0df9971b6bc75d7d172c2819ffd21d51050 Mon Sep 17 00:00:00 2001
22
From: Szabolcs Nagy <nsz@port70.net>
33
Date: Fri, 26 Jan 2018 20:32:50 +0000
44
Subject: [PATCH] posix_memalign
@@ -8,7 +8,7 @@ Subject: [PATCH] posix_memalign
88
1 file changed, 5 insertions(+), 4 deletions(-)
99

1010
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
11-
index 1b0bfe37852..d7b2b19bb3c 100644
11+
index 3b2e4f47915..20f790904a2 100644
1212
--- a/gcc/config/i386/pmm_malloc.h
1313
+++ b/gcc/config/i386/pmm_malloc.h
1414
@@ -27,12 +27,13 @@
@@ -37,6 +37,3 @@ index 1b0bfe37852..d7b2b19bb3c 100644
3737
return __ptr;
3838
else
3939
return NULL;
40-
--
41-
2.35.1
42-

main/gcc/0002-gcc-poison-system-directories.patch

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From d64825212f807435a4b2f8e068c0f65195c8e2e6 Mon Sep 17 00:00:00 2001
1+
From dd1e75ff4ecda96957465b34681f245e818928bd Mon Sep 17 00:00:00 2001
22
From: Khem Raj <raj.khem@gmail.com>
33
Date: Fri, 29 Mar 2013 08:59:00 +0400
44
Subject: [PATCH] gcc: poison-system-directories
@@ -21,15 +21,15 @@ Upstream-Status: Pending
2121
gcc/configure | 16 ++++++++++++++++
2222
gcc/configure.ac | 10 ++++++++++
2323
gcc/doc/invoke.texi | 9 +++++++++
24-
gcc/gcc.c | 2 ++
25-
gcc/incpath.c | 21 +++++++++++++++++++++
24+
gcc/gcc.cc | 2 ++
25+
gcc/incpath.cc | 21 +++++++++++++++++++++
2626
7 files changed, 68 insertions(+)
2727

2828
diff --git a/gcc/common.opt b/gcc/common.opt
29-
index a75b44ee47e..d15105a73f3 100644
29+
index 8a0dafc522d..0357868e22c 100644
3030
--- a/gcc/common.opt
3131
+++ b/gcc/common.opt
32-
@@ -683,6 +683,10 @@ Wreturn-local-addr
32+
@@ -710,6 +710,10 @@ Wreturn-local-addr
3333
Common Var(warn_return_local_addr) Init(1) Warning
3434
Warn about returning a pointer/reference to a local or temporary variable.
3535

@@ -41,10 +41,10 @@ index a75b44ee47e..d15105a73f3 100644
4141
Common Var(warn_shadow) Warning
4242
Warn when one variable shadows another. Same as -Wshadow=global.
4343
diff --git a/gcc/config.in b/gcc/config.in
44-
index 2de5a463315..059c818c895 100644
44+
index 64c27c9cfac..f0fbf123aa8 100644
4545
--- a/gcc/config.in
4646
+++ b/gcc/config.in
47-
@@ -218,6 +218,12 @@
47+
@@ -230,6 +230,12 @@
4848
#endif
4949

5050

@@ -58,18 +58,18 @@ index 2de5a463315..059c818c895 100644
5858
optimizer and back end) to be checked for dynamic type safety at runtime.
5959
This is quite expensive. */
6060
diff --git a/gcc/configure b/gcc/configure
61-
index 708328e1670..4b977e313b5 100755
61+
index 5ce0557719a..e9060112384 100755
6262
--- a/gcc/configure
6363
+++ b/gcc/configure
64-
@@ -1020,6 +1020,7 @@ enable_maintainer_mode
64+
@@ -1023,6 +1023,7 @@ enable_maintainer_mode
6565
enable_link_mutex
6666
enable_link_serialization
6767
enable_version_specific_runtime_libs
6868
+enable_poison_system_directories
6969
enable_plugin
7070
enable_host_shared
7171
enable_libquadmath_support
72-
@@ -1782,6 +1783,8 @@ Optional Features:
72+
@@ -1785,6 +1786,8 @@ Optional Features:
7373
--enable-version-specific-runtime-libs
7474
specify that runtime libraries should be installed
7575
in a compiler-specific directory
@@ -78,7 +78,7 @@ index 708328e1670..4b977e313b5 100755
7878
--enable-plugin enable plugin support
7979
--enable-host-shared build host code as shared libraries
8080
--disable-libquadmath-support
81-
@@ -31790,6 +31793,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
81+
@@ -31982,6 +31985,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
8282
fi
8383

8484

@@ -99,10 +99,10 @@ index 708328e1670..4b977e313b5 100755
9999

100100

101101
diff --git a/gcc/configure.ac b/gcc/configure.ac
102-
index df1c9cc3200..5461bab88a9 100644
102+
index 23bee7010a3..75a7048045c 100644
103103
--- a/gcc/configure.ac
104104
+++ b/gcc/configure.ac
105-
@@ -7311,6 +7311,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
105+
@@ -7421,6 +7421,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
106106
[specify that runtime libraries should be
107107
installed in a compiler-specific directory])])
108108

@@ -120,18 +120,18 @@ index df1c9cc3200..5461bab88a9 100644
120120
AC_SUBST(subdirs)
121121
AC_SUBST(srcdir)
122122
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
123-
index cf536a15116..7d3f1ccddf3 100644
123+
index 07b440190c3..b2de464798a 100644
124124
--- a/gcc/doc/invoke.texi
125125
+++ b/gcc/doc/invoke.texi
126-
@@ -369,6 +369,7 @@ Objective-C and Objective-C++ Dialects}.
126+
@@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}.
127127
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
128128
-Wparentheses -Wno-pedantic-ms-format @gol
129129
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol
130130
+-Wno-poison-system-directories @gol
131131
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
132132
-Wrestrict -Wno-return-local-addr -Wreturn-type @gol
133133
-Wno-scalar-storage-order -Wsequence-point @gol
134-
@@ -7728,6 +7729,14 @@ made up of data only and thus requires no special treatment. But, for
134+
@@ -8029,6 +8030,14 @@ made up of data only and thus requires no special treatment. But, for
135135
most targets, it is made up of code and thus requires the stack to be
136136
made executable in order for the program to work properly.
137137

@@ -146,11 +146,11 @@ index cf536a15116..7d3f1ccddf3 100644
146146
@item -Wfloat-equal
147147
@opindex Wfloat-equal
148148
@opindex Wno-float-equal
149-
diff --git a/gcc/gcc.c b/gcc/gcc.c
150-
index 8ba410c9e17..a83ba34ac4b 100644
151-
--- a/gcc/gcc.c
152-
+++ b/gcc/gcc.c
153-
@@ -1152,6 +1152,8 @@ proper position among the other output files. */
149+
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
150+
index bb07cc244e3..47fb5802194 100644
151+
--- a/gcc/gcc.cc
152+
+++ b/gcc/gcc.cc
153+
@@ -1159,6 +1159,8 @@ proper position among the other output files. */
154154
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
155155
"%X %{o*} %{e*} %{N} %{n} %{r}\
156156
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
@@ -159,10 +159,10 @@ index 8ba410c9e17..a83ba34ac4b 100644
159159
%{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \
160160
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
161161
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
162-
diff --git a/gcc/incpath.c b/gcc/incpath.c
163-
index 446d280321d..fbfc0ce03b8 100644
164-
--- a/gcc/incpath.c
165-
+++ b/gcc/incpath.c
162+
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
163+
index bd2a97938eb..c80f100f476 100644
164+
--- a/gcc/incpath.cc
165+
+++ b/gcc/incpath.cc
166166
@@ -26,6 +26,7 @@
167167
#include "intl.h"
168168
#include "incpath.h"
@@ -171,7 +171,7 @@ index 446d280321d..fbfc0ce03b8 100644
171171

172172
/* Microsoft Windows does not natively support inodes.
173173
VMS has non-numeric inodes. */
174-
@@ -395,6 +396,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
174+
@@ -399,6 +400,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
175175
}
176176
fprintf (stderr, _("End of search list.\n"));
177177
}
@@ -198,6 +198,3 @@ index 446d280321d..fbfc0ce03b8 100644
198198
}
199199

200200
/* Use given -I paths for #include "..." but not #include <...>, and
201-
--
202-
2.35.1
203-
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 9675297b3a46b65a54e9df97f26ea445d53c67c6 Mon Sep 17 00:00:00 2001
1+
From 40e45739e7d3787acd13b5b9a4c27d843de0ffe2 Mon Sep 17 00:00:00 2001
22
From: Ariadne Conill <ariadne@dereferenced.org>
33
Date: Fri, 21 Aug 2020 06:45:49 +0000
44
Subject: [PATCH] specs: turn on -Wl,-z,now by default
@@ -10,14 +10,14 @@ Binutils does not appear to have a similar option for enabling -z
1010
now by default.
1111
---
1212
gcc/doc/invoke.texi | 3 +++
13-
gcc/gcc.c | 1 +
13+
gcc/gcc.cc | 1 +
1414
2 files changed, 4 insertions(+)
1515

1616
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
17-
index 7d3f1ccddf3..485d2d6b742 100644
17+
index b2de464798a..83bd1bde433 100644
1818
--- a/gcc/doc/invoke.texi
1919
+++ b/gcc/doc/invoke.texi
20-
@@ -15921,6 +15921,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
20+
@@ -16872,6 +16872,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
2121
linker. When using the GNU linker, you can also get the same effect with
2222
@option{-Wl,-Map=output.map}.
2323

@@ -27,18 +27,15 @@ index 7d3f1ccddf3..485d2d6b742 100644
2727
@item -u @var{symbol}
2828
@opindex u
2929
Pretend the symbol @var{symbol} is undefined, to force linking of
30-
diff --git a/gcc/gcc.c b/gcc/gcc.c
31-
index a83ba34ac4b..faf9ce76b3d 100644
32-
--- a/gcc/gcc.c
33-
+++ b/gcc/gcc.c
34-
@@ -1150,6 +1150,7 @@ proper position among the other output files. */
30+
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
31+
index 47fb5802194..d18b5d7b59a 100644
32+
--- a/gcc/gcc.cc
33+
+++ b/gcc/gcc.cc
34+
@@ -1157,6 +1157,7 @@ proper position among the other output files. */
3535
"%{flto|flto=*:%<fcompare-debug*} \
3636
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
3737
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
3838
+ "-z now " \
3939
"%X %{o*} %{e*} %{N} %{n} %{r}\
4040
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
4141
%{Wno-poison-system-directories:--no-poison-system-directories} \
42-
--
43-
2.35.1
44-
Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
From 4eb1b3849325b77c4cb66b675119299de35125bb Mon Sep 17 00:00:00 2001
1+
From 666d0aeb808ac9c10d065ae7b196695c81a25a20 Mon Sep 17 00:00:00 2001
22
From: Ariadne Conill <ariadne@dereferenced.org>
33
Date: Fri, 21 Aug 2020 06:46:22 +0000
44
Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
55
ObjC++, if the optimization level is > 0
66

77
---
8-
gcc/c-family/c-cppbuiltin.c | 4 ++++
9-
gcc/doc/invoke.texi | 6 ++++++
8+
gcc/c-family/c-cppbuiltin.cc | 4 ++++
9+
gcc/doc/invoke.texi | 6 ++++++
1010
2 files changed, 10 insertions(+)
1111

12-
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
13-
index 11e015bdb87..de8b7bf246f 100644
14-
--- a/gcc/c-family/c-cppbuiltin.c
15-
+++ b/gcc/c-family/c-cppbuiltin.c
16-
@@ -1427,6 +1427,10 @@ c_cpp_builtins (cpp_reader *pfile)
12+
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
13+
index 4672ae8486a..573c021e1e8 100644
14+
--- a/gcc/c-family/c-cppbuiltin.cc
15+
+++ b/gcc/c-family/c-cppbuiltin.cc
16+
@@ -1510,6 +1510,10 @@ c_cpp_builtins (cpp_reader *pfile)
1717
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
1818
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
1919

@@ -25,10 +25,10 @@ index 11e015bdb87..de8b7bf246f 100644
2525
if (flag_gnu89_inline)
2626
cpp_define (pfile, "__GNUC_GNU_INLINE__");
2727
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
28-
index 485d2d6b742..164929f7583 100644
28+
index 83bd1bde433..dda299a9987 100644
2929
--- a/gcc/doc/invoke.texi
3030
+++ b/gcc/doc/invoke.texi
31-
@@ -10225,6 +10225,12 @@ also turns on the following optimization flags:
31+
@@ -10896,6 +10896,12 @@ also turns on the following optimization flags:
3232
Please note the warning under @option{-fgcse} about
3333
invoking @option{-O2} on programs that use computed gotos.
3434

@@ -41,6 +41,3 @@ index 485d2d6b742..164929f7583 100644
4141
@item -O3
4242
@opindex O3
4343
Optimize yet more. @option{-O3} turns on all optimizations specified
44-
--
45-
2.35.1
46-

0 commit comments

Comments
 (0)