commit: 495348e424123f0de3c5d6ce98a9b674cf9cc673
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 29 12:26:40 2022 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Nov 29 12:26:40 2022 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=495348e4
13.1.0: update patches + add 2 more, cut patchset 3
Signed-off-by: David Seifert <soap <AT> gentoo.org>
13.1.0/gentoo/26_all_enable-cet.patch | 32 +++++++++----------
13.1.0/gentoo/28_all_drop_CFLAGS_sed.patch | 35 +++++++++++++++++++++
13.1.0/gentoo/29_all_msgfmt-libstdc++-link.patch | 39 ++++++++++++++++++++++++
13.1.0/gentoo/README.history | 4 +++
4 files changed, 94 insertions(+), 16 deletions(-)
diff --git a/13.1.0/gentoo/26_all_enable-cet.patch
b/13.1.0/gentoo/26_all_enable-cet.patch
index ecdc64f..a6976c4 100644
--- a/13.1.0/gentoo/26_all_enable-cet.patch
+++ b/13.1.0/gentoo/26_all_enable-cet.patch
@@ -11,7 +11,7 @@ Needs:
Only supported on amd64.
--- a/gcc/cp/lang-specs.h
+++ b/gcc/cp/lang-specs.h
-@@ -51,7 +51,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -51,7 +51,7 @@
" %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
" %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
" %{fmodules-ts:-fmodule-header %{fpreprocessed:-fdirectives-only}}"
@@ -20,7 +20,7 @@ Only supported on amd64.
" %{!fsyntax-only:"
" %{!S:-o %g.s%V}"
" %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
-@@ -72,7 +72,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -72,7 +72,7 @@
" %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
" %{fmodules-ts:-fmodule-header=system"
" %{fpreprocessed:-fdirectives-only}}"
@@ -29,7 +29,7 @@ Only supported on amd64.
" %{!fsyntax-only:"
" %{!S:-o %g.s%V}"
" %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
-@@ -92,7 +92,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -92,7 +92,7 @@
" %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
" %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
" %{fmodules-ts:-fmodule-header=user
%{fpreprocessed:-fdirectives-only}}"
@@ -38,7 +38,7 @@ Only supported on amd64.
" %{!fsyntax-only:"
" %{!S:-o %g.s%V}"
" %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
-@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -107,7 +107,7 @@
" cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed"
" %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
" %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
@@ -47,7 +47,7 @@ Only supported on amd64.
" %{!fsyntax-only:"
" %{fmodule-only:%{!S:-o %g.s%V}}"
" %{!fmodule-only:%(invoke_as)}}"
-@@ -116,7 +116,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -116,7 +116,7 @@
{".ii", "@c++-cpp-output", 0, 0, 0},
{"@c++-cpp-output",
"%{!E:%{!M:%{!MM:"
@@ -58,8 +58,8 @@ Only supported on amd64.
" %{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}"
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
-@@ -995,6 +995,18 @@ proper position among the other output files. */
- #endif
+@@ -987,6 +987,18 @@
+ #define LINK_NOW_SPEC ""
#endif
+/* Default value for flag_cf_protection when flag_cf_protection is
@@ -77,7 +77,7 @@ Only supported on amd64.
#ifdef ENABLE_DEFAULT_PIE
#define PIE_SPEC "!no-pie"
#define NO_FPIE1_SPEC "fno-pie"
-@@ -1197,6 +1209,7 @@ static const char *cpp_spec = CPP_SPEC;
+@@ -1189,6 +1201,7 @@
static const char *cc1_spec = CC1_SPEC;
static const char *cc1plus_spec = CC1PLUS_SPEC;
static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC;
@@ -85,7 +85,7 @@ Only supported on amd64.
static const char *link_ssp_spec = LINK_SSP_SPEC;
static const char *asm_spec = ASM_SPEC;
static const char *asm_final_spec = ASM_FINAL_SPEC;
-@@ -1255,7 +1268,7 @@ static const char *cpp_options =
+@@ -1247,7 +1260,7 @@
"%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
%{f*} %{g*:%{%:debug-level-gt(0):%{g*}\
%{!fno-working-directory:-fworking-directory}}} %{O*}\
@@ -94,7 +94,7 @@ Only supported on amd64.
/* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
-@@ -1444,9 +1457,9 @@ static const struct compiler default_compilers[] =
+@@ -1440,9 +1453,9 @@
%{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
%(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \
@@ -106,7 +106,7 @@ Only supported on amd64.
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1},
{"-",
"%{!E:%e-E or -x required when input is from standard input}\
-@@ -1471,7 +1484,7 @@ static const struct compiler default_compilers[] =
+@@ -1467,7 +1480,7 @@
%W{o*:--output-pch %*}}%V}}}}}}}",
0, 0, 0},
{".i", "@cpp-output", 0, 0, 0},
{"@cpp-output",
@@ -115,7 +115,7 @@ Only supported on amd64.
{".s", "@assembler", 0, 0, 0},
{"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
-@@ -1703,6 +1716,7 @@ static struct spec_list static_specs[] =
+@@ -1699,6 +1712,7 @@
INIT_STATIC_SPEC ("cc1_options", &cc1_options),
INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec),
INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec),
@@ -125,7 +125,7 @@ Only supported on amd64.
INIT_STATIC_SPEC ("link", &link_spec),
--- a/gcc/objc/lang-specs.h
+++ b/gcc/objc/lang-specs.h
-@@ -29,9 +29,9 @@ along with GCC; see the file COPYING3. If not see
+@@ -29,9 +29,9 @@
%{traditional|traditional-cpp:\
%eGNU Objective C no longer supports traditional compilation}\
%{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o
%{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\
@@ -137,7 +137,7 @@ Only supported on amd64.
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
{"@objective-c-header",
"%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\
-@@ -40,18 +40,18 @@ along with GCC; see the file COPYING3. If not see
+@@ -40,18 +40,18 @@
%{traditional|traditional-cpp:\
%eGNU Objective C no longer supports traditional compilation}\
%{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o
%{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\
@@ -162,7 +162,7 @@ Only supported on amd64.
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
--- a/gcc/objcp/lang-specs.h
+++ b/gcc/objcp/lang-specs.h
-@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -36,7 +36,7 @@
%(cpp_options) %2 -o %{save-temps*:%b.mii}
%{!save-temps*:%g.mii} \n}\
cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed
%{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\
@@ -171,7 +171,7 @@ Only supported on amd64.
-o %g.s %{!o*:--output-pch %i.gch} %W{o*:--output-pch %*}%V}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{"@objective-c++",
-@@ -46,16 +46,16 @@ along with GCC; see the file COPYING3. If not see
+@@ -46,16 +46,16 @@
%(cpp_options) %2 -o %{save-temps*:%b.mii}
%{!save-temps*:%g.mii} \n}\
cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed
%{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\
diff --git a/13.1.0/gentoo/28_all_drop_CFLAGS_sed.patch
b/13.1.0/gentoo/28_all_drop_CFLAGS_sed.patch
new file mode 100644
index 0000000..764f34c
--- /dev/null
+++ b/13.1.0/gentoo/28_all_drop_CFLAGS_sed.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/849722
+https://github.com/InBetweenNames/gentooLTO/issues/846
+https://github.com/vaeth/portage-bashrc-mv/issues/11
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -5388,13 +5388,6 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS
$LDFLAGS conftest.$ac_ex
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+-# Remove the -O2: for historical reasons, unless bootstrapping we prefer
+-# optimizations to be activated explicitly by the toplevel.
+-case "$CC" in
+- */prev-gcc/xgcc*) ;;
+- *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][
]//" -e "s/-O[0-9]*[ ]//" `
+- CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][
]//" -e "s/-O[0-9]*[ ]//" ` ;;
+-esac
+
+
+
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -440,13 +440,6 @@ ACX_PROG_GDC([-I"$srcdir"/d])
+ # Do configure tests with the C++ compiler, since that's what we build with.
+ AC_LANG(C++)
+
+-# Remove the -O2: for historical reasons, unless bootstrapping we prefer
+-# optimizations to be activated explicitly by the toplevel.
+-case "$CC" in
+- */prev-gcc/xgcc*) ;;
+- *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[
]]//" -e "s/-O[[0-9]]*[[ ]]//" `
+- CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[[ ]]//" -e
"s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" ` ;;
+-esac
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CXXFLAGS)
+ AC_SUBST(GDCFLAGS)
diff --git a/13.1.0/gentoo/29_all_msgfmt-libstdc++-link.patch
b/13.1.0/gentoo/29_all_msgfmt-libstdc++-link.patch
new file mode 100644
index 0000000..0d2f113
--- /dev/null
+++ b/13.1.0/gentoo/29_all_msgfmt-libstdc++-link.patch
@@ -0,0 +1,39 @@
+Ensure that msgfmt doesn't encounter problems during gcc bootstrapping.
+
+Solves error messages like the following:
+
+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)
+
+The libgcc_s.so used during build doesn't satisfy the needs of the
+libstdc++.so that msgfmt is linked against. On the other hand, msgfmt
+is used as a stand-alone application here, and what library it uses
+behind the scenes is of no concern to the gcc build process.
+Therefore, simply invoking it "as usual", i.e. without any special
+library path, will make it work as expected here.
+
+2011-09-19 Martin von Gagern
+
+References:
+https://bugs.gentoo.org/372377
+https://bugs.gentoo.org/295480
+https://bugs.gentoo.org/843119
+--- a/libstdc++-v3/po/Makefile.am
++++ b/libstdc++-v3/po/Makefile.am
+@@ -39,6 +39,7 @@ MSGFMT = msgfmt
+ EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN)
+
+ .po.mo:
++ env --unset=LD_LIBRARY_PATH \
+ $(MSGFMT) -o $@ $<
+
+ all-local: all-local-$(USE_NLS)
+--- a/libstdc++-v3/po/Makefile.in
++++ b/libstdc++-v3/po/Makefile.in
+@@ -419,6 +419,7 @@ uninstall-am: uninstall-info-am
+
+
+ .po.mo:
++ env --unset=LD_LIBRARY_PATH \
+ $(MSGFMT) -o $@ $<
+
+ all-local: all-local-$(USE_NLS)
diff --git a/13.1.0/gentoo/README.history b/13.1.0/gentoo/README.history
index 3d797d2..fcd7f8b 100644
--- a/13.1.0/gentoo/README.history
+++ b/13.1.0/gentoo/README.history
@@ -1,7 +1,11 @@
+3 29 November 2022
+
- 23_all_EXTRA_OPTIONS-z-now.patch
+ 23_all_DEF_GENTOO_ZNOW-z-now.patch
- 24_all_EXTRA_OPTIONS-fstack-clash-protection.patch
+ 24_all_DEF_GENTOO_SCP-fstack-clash-protection.patch
+ + 28_all_drop_CFLAGS_sed.patch
+ + 29_all_msgfmt-libstdc++-link.patch
2 8 November 2022
- 12_all_disable-systemtap-switch.patch