From 0168c920949be54587a92e86626e18a049d04f54 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Aug 30 2022 21:19:56 +0000 Subject: Merge branch 'rawhide' into f35 --- diff --git a/.gitignore b/.gitignore index 91c6f13..e92566b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ /gcc-10.2.0.tar.xz /gcc-11.1.0.tar.xz /gcc-11.3.0.tar.xz +/gcc-12.1.0.tar.xz +/gcc-12.2.0.tar.xz diff --git a/arm-none-eabi-gcc-cs.spec b/arm-none-eabi-gcc-cs.spec index 7648527..eda3549 100644 --- a/arm-none-eabi-gcc-cs.spec +++ b/arm-none-eabi-gcc-cs.spec @@ -1,7 +1,7 @@ %global processor_arch arm %global target %{processor_arch}-none-eabi -%global gcc_ver 11.3.0 -%global gcc_short_ver 11.3 +%global gcc_ver 12.2.0 +%global gcc_short_ver 12.2 # we need newlib to compile complete gcc, but we need gcc to compile newlib, # so compile minimal gcc first @@ -9,7 +9,7 @@ Name: %{target}-gcc-cs Epoch: 1 -Version: 11.3.0 +Version: 12.2.0 Release: 1%{?dist} Summary: GNU GCC for cross-compilation for %{target} target @@ -30,7 +30,9 @@ Source0: http://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.xz Source1: README.fedora Source2: bootstrapexplain -Patch1: gcc-config.patch + +Patch1: gcc12-hack.patch +Patch2: gcc12-Wno-format-security.patch #BuildRequires: autoconf = 2.69 BuildRequires: gcc-c++ @@ -60,7 +62,8 @@ compile c++ code for the %{target} platform, instead of for the native %prep %setup -q -c pushd gcc-%{gcc_ver} -%patch1 -p2 -b .gccconfig +%patch1 -p0 -b .hack +%patch2 -p0 -b .wnosecerr popd pushd gcc-%{gcc_ver}/libiberty #autoconf -f @@ -106,8 +109,10 @@ mkdir -p gcc-%{target} gcc-nano-%{target} #### normal version pushd gcc-%{target} - -CC="%{__cc} ${RPM_OPT_FLAGS} -fno-stack-protector" \ +FILTERED_RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}" | sed 's/Werror=format-security/Wno-format-security/g') +export CFLAGS=$FILTERED_RPM_OPT_FLAGS +export CXXFLAGS=$FILTERED_RPM_OPT_FLAGS +CC="%{__cc} ${FILTERED_RPM_OPT_FLAGS} -fno-stack-protector" \ ../gcc-%{gcc_ver}/configure --prefix=%{_prefix} --mandir=%{_mandir} \ --with-pkgversion="Fedora %{version}-%{release}" \ --with-bugurl="https://bugzilla.redhat.com/" \ @@ -298,6 +303,18 @@ popd %endif %changelog +* Tue Aug 23 2022 Michal Hlavinka - 1:12.2.0-1 +- updated to 12.2.0 + +* Tue Aug 02 2022 Michal Hlavinka - 1:12.1.0-2 +- fix FTBFS (#2113112) + +* Wed Jul 27 2022 Michal Hlavinka - 1:12.1.0-1 +- updated to 12.1.0 + +* Wed Jul 20 2022 Fedora Release Engineering - 1:11.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jun 01 2022 Michal Hlavinka - 1:11.3.0-1 - updated to 11.3.0 diff --git a/gcc-config.patch b/gcc-config.patch deleted file mode 100644 index 0d71d93..0000000 --- a/gcc-config.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -Nrup a/gcc-9.2.0/libiberty/acinclude.m4 b/libiberty/acinclude.m4 ---- a/gcc-9.2.0/libiberty/acinclude.m4 2019-01-19 09:01:34.000000000 -0700 -+++ b/gcc-9.2.0/libiberty/acinclude.m4 2020-01-09 22:00:27.183312982 -0700 -@@ -147,7 +147,7 @@ if test $ac_cv_os_cray = yes; then - fi - - AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, --[AC_TRY_RUN([find_stack_direction () -+[AC_TRY_RUN([__attribute__ ((noclone,noinline)) find_stack_direction () - { - static char *addr = 0; - auto char dummy; -diff --git a/config/intdiv0.m4 b/gcc-9.2.0/config/intdiv0.m4 -index 55dddcf1..ba906efc 100644 ---- a/gcc-9.2.0/config/intdiv0.m4 -+++ b/gcc-9.2.0/config/intdiv0.m4 -@@ -31,10 +31,10 @@ sigfpe_handler (sig) int sig; - exit (sig != SIGFPE); - } - --int x = 1; --int y = 0; --int z; --int nan; -+volatile int x = 1; -+volatile int y = 0; -+volatile int z; -+volatile int nan; - - int main () - { -diff --git a/gcc-9.2.0/libiberty/configure.ac b/gcc-9.2.0/libiberty/configure.ac -index f1ce7601..fc20d228 100644 ---- a/gcc-9.2.0/libiberty/configure.ac -+++ b/gcc-9.2.0/libiberty/configure.ac -@@ -661,7 +661,7 @@ if test -z "${setobjs}"; then - for v in $vars; do - AC_MSG_CHECKING([for $v]) - AC_CACHE_VAL(libiberty_cv_var_$v, -- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])], -+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((used)) int *p;]],[[extern int $v []; p = $v;]])], - [eval "libiberty_cv_var_$v=yes"], - [eval "libiberty_cv_var_$v=no"])]) - if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then diff --git a/gcc12-Wno-format-security.patch b/gcc12-Wno-format-security.patch new file mode 100644 index 0000000..43e482a --- /dev/null +++ b/gcc12-Wno-format-security.patch @@ -0,0 +1,58 @@ +2022-01-07 Jakub Jelinek + + * Makefile.tpl (GOCFLAGS, GDCFLAGS): Filter out -Wformat-security. + * Makefile.in: Regenerated. + +2017-02-25 Jakub Jelinek + + * configure.ac: When adding -Wno-format, also add -Wno-format-security. + * configure: Regenerated. + +--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100 ++++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100 +@@ -570,7 +570,7 @@ AC_ARG_ENABLE(build-format-warnings, + AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]), + [],[enable_build_format_warnings=yes]) + AS_IF([test $enable_build_format_warnings = no], +- [wf_opt=-Wno-format],[wf_opt=]) ++ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=]) + ACX_PROG_CXX_WARNING_OPTS( + m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ], + [-Wcast-qual $wf_opt])), +--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100 ++++ gcc/configure 2017-02-25 12:42:50.041946391 +0100 +@@ -7077,7 +7077,7 @@ else + fi + + if test $enable_build_format_warnings = no; then : +- wf_opt=-Wno-format ++ wf_opt="-Wno-format -Wno-format-security" + else + wf_opt= + fi +--- Makefile.tpl.jj 2021-12-30 15:12:42.188164847 +0100 ++++ Makefile.tpl 2022-01-07 12:06:12.115550714 +0100 +@@ -447,8 +447,8 @@ LDFLAGS = @LDFLAGS@ + LIBCFLAGS = $(CFLAGS) + CXXFLAGS = @CXXFLAGS@ + LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates +-GOCFLAGS = $(CFLAGS) +-GDCFLAGS = $(CFLAGS) ++GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS)) ++GDCFLAGS = $(filter-out -Wformat-security,$(CFLAGS)) + + # Pass additional PGO and LTO compiler options to the PGO build. + BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS) +--- Makefile.in.jj 2021-12-30 15:12:42.188164847 +0100 ++++ Makefile.in 2022-01-07 12:06:27.335334561 +0100 +@@ -444,8 +444,8 @@ LDFLAGS = @LDFLAGS@ + LIBCFLAGS = $(CFLAGS) + CXXFLAGS = @CXXFLAGS@ + LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates +-GOCFLAGS = $(CFLAGS) +-GDCFLAGS = $(CFLAGS) ++GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS)) ++GDCFLAGS = $(filter-out -Wformat-security,$(CFLAGS)) + + # Pass additional PGO and LTO compiler options to the PGO build. + BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS) diff --git a/gcc12-hack.patch b/gcc12-hack.patch new file mode 100644 index 0000000..e98649e --- /dev/null +++ b/gcc12-hack.patch @@ -0,0 +1,126 @@ +--- libada/Makefile.in.jj 2019-01-09 13:01:18.015608205 +0100 ++++ libada/Makefile.in 2019-01-11 18:16:23.441726931 +0100 +@@ -71,18 +71,40 @@ version := $(shell @get_gcc_base_ver@ $( + libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR) + ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR)) + ++DEFAULTMULTIFLAGS := ++ifeq ($(MULTISUBDIR),) ++targ:=$(subst -, ,$(target)) ++arch:=$(word 1,$(targ)) ++ifeq ($(words $(targ)),2) ++osys:=$(word 2,$(targ)) ++else ++osys:=$(word 3,$(targ)) ++endif ++ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),) ++ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64) ++DEFAULTMULTIFLAGS := -m64 ++else ++ifeq ($(strip $(filter-out s390%, $(arch))),) ++DEFAULTMULTIFLAGS := -m31 ++else ++DEFAULTMULTIFLAGS := -m32 ++endif ++endif ++endif ++endif ++ + # exeext should not be used because it's the *host* exeext. We're building + # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus + # definitions just in case something slips through the safety net provided + # by recursive make invocations in gcc/ada/Makefile.in + LIBADA_FLAGS_TO_PASS = \ + "MAKEOVERRIDES=" \ +- "LDFLAGS=$(LDFLAGS)" \ ++ "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \ + "LN_S=$(LN_S)" \ + "SHELL=$(SHELL)" \ +- "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \ +- "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \ +- "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \ ++ "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \ ++ "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \ ++ "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \ + "PICFLAG_FOR_TARGET=$(PICFLAG)" \ + "THREAD_KIND=$(THREAD_KIND)" \ + "TRACE=$(TRACE)" \ +@@ -93,7 +115,7 @@ LIBADA_FLAGS_TO_PASS = \ + "exeext=.exeext.should.not.be.used " \ + 'CC=the.host.compiler.should.not.be.needed' \ + "GCC_FOR_TARGET=$(CC)" \ +- "CFLAGS=$(CFLAGS)" ++ "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)" + + .PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool + +--- config-ml.in.jj 2019-01-09 12:50:16.646501448 +0100 ++++ config-ml.in 2019-01-11 18:16:23.442726914 +0100 +@@ -511,6 +511,8 @@ multi-do: + ADAFLAGS="$(ADAFLAGS) $${flags}" \ + prefix="$(prefix)" \ + exec_prefix="$(exec_prefix)" \ ++ mandir="$(mandir)" \ ++ infodir="$(infodir)" \ + GOCFLAGS="$(GOCFLAGS) $${flags}" \ + GDCFLAGS="$(GDCFLAGS) $${flags}" \ + CXXFLAGS="$(CXXFLAGS) $${flags}" \ +--- libcpp/macro.cc.jj 2019-01-09 13:01:21.420552123 +0100 ++++ libcpp/macro.cc 2019-01-11 18:18:17.736876285 +0100 +@@ -3256,8 +3256,6 @@ static cpp_macro * + create_iso_definition (cpp_reader *pfile) + { + bool following_paste_op = false; +- const char *paste_op_error_msg = +- N_("'##' cannot appear at either end of a macro expansion"); + unsigned int num_extra_tokens = 0; + unsigned nparms = 0; + cpp_hashnode **params = NULL; +@@ -3382,7 +3380,9 @@ create_iso_definition (cpp_reader *pfile + function-like macros, but not at the end. */ + if (following_paste_op) + { +- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg); ++ cpp_error (pfile, CPP_DL_ERROR, ++ "'##' cannot appear at either end of a macro " ++ "expansion"); + goto out; + } + if (!vaopt_tracker.completed ()) +@@ -3397,7 +3397,9 @@ create_iso_definition (cpp_reader *pfile + function-like macros, but not at the beginning. */ + if (macro->count == 1) + { +- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg); ++ cpp_error (pfile, CPP_DL_ERROR, ++ "'##' cannot appear at either end of a macro " ++ "expansion"); + goto out; + } + +--- libcpp/expr.cc.jj 2019-01-09 13:01:22.415535734 +0100 ++++ libcpp/expr.cc 2019-01-11 18:16:23.444726882 +0100 +@@ -803,16 +803,17 @@ cpp_classify_number (cpp_reader *pfile, + if ((result & CPP_N_WIDTH) == CPP_N_LARGE + && CPP_OPTION (pfile, cpp_warn_long_long)) + { +- const char *message = CPP_OPTION (pfile, cplusplus) +- ? N_("use of C++11 long long integer constant") +- : N_("use of C99 long long integer constant"); +- + if (CPP_OPTION (pfile, c99)) + cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location, +- 0, message); ++ 0, CPP_OPTION (pfile, cplusplus) ++ ? N_("use of C++11 long long integer constant") ++ : N_("use of C99 long long integer constant")); + else + cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG, +- virtual_location, 0, message); ++ virtual_location, 0, ++ CPP_OPTION (pfile, cplusplus) ++ ? N_("use of C++11 long long integer constant") ++ : N_("use of C99 long long integer constant")); + } + + if ((result & CPP_N_SIZE_T) == CPP_N_SIZE_T diff --git a/sources b/sources index 086e786..9a340e4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gcc-11.3.0.tar.xz) = f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7 +SHA512 (gcc-12.2.0.tar.xz) = e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173