]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
gcc: Update to 12.2.0
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Nov 2022 17:24:26 +0000 (17:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Nov 2022 17:24:26 +0000 (17:24 +0000)
This disables bootstrapping GCC, because for some reason this won't
work.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
gcc/gcc.nm
gcc/patches/40_all_gcc49_config_esp.patch0 [deleted file]
gcc/patches/gcc-6.1-compile-compiler-with-pic.patch [deleted file]
gcc/patches/gcc49-aarch64-async-unw-tables.patch0 [deleted file]
gcc/patches/gcc49-libtool-no-rpath.patch0 [deleted file]

index 64831ef3a197fa7e1532dce0a61aadd98c011357..485abbe1204f19497c5d7ea84fceb4144c9b14e6 100644 (file)
@@ -7,7 +7,7 @@
 build_graphite = 1
 
 name       = gcc
-version    = 9.1.0
+version    = 12.2.0
 release    = 1
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
@@ -22,7 +22,7 @@ description
 end
 
 # This is the at least required version of binutils.
-binutils_version = 2.24
+binutils_version = 2.35
 
 source_dl  = http://ftp.gnu.org/gnu/gcc/%{thisapp}/
 source_dl += ftp://gcc.gnu.org/pub/gcc/infrastructure/
@@ -38,13 +38,15 @@ build
                filesystem >= 002
                flex
                glibc-devel >= 2.16
-               gmp-devel
+               gmp-devel >= 4.3.2
+               isl-devel >= 0.15
                libffi-devel
-               libmpc-devel >= 0.8.1
-               mpfr-devel
+               libmpc-devel >= 1.0.1
+               mpfr-devel >= 3.1.0
                perl
                texinfo
                zlib-devel
+               zstd-devel
        end
 
        # If graphite support is enabled, we require the devel packages for build.
@@ -68,7 +70,7 @@ build
        # configuration.
        configure_options =
 
-       make_bootstrap = profiledbootstrap
+       #make_bootstrap = profiledbootstrap
 
        if "%{DISTRO_ARCH}" == "x86_64"
                configure_options = --disable-multilib
@@ -79,41 +81,10 @@ build
                build_libubsan = 1
        end
 
-       if "%{DISTRO_ARCH}" == "i686"
-               configure_options = --with-arch=%{DISTRO_ARCH} --with-tune=generic
-
-               build_libquadmath = 1
-               build_libubsan = 1
-       end
-
        if "%{DISTRO_ARCH}" == "aarch64"
                build_libubsan = 1
        end
 
-       if "%{DISTRO_ARCH}" == "armv7hl"
-               make_bootstrap = bootstrap
-
-               configure_options += --disable-sjlj-exceptions
-
-               configure_options += \
-                       --with-tune=cortex-a8 \
-                       --with-arch=armv7-a \
-                       --with-float=hard \
-                       --with-fpu=vfpv3-d16 \
-                       --with-abi=aapcs-linux
-
-               build_libubsan = 1
-       end
-
-       if "%{DISTRO_ARCH}" == "armv5tel"
-               make_bootstrap = bootstrap
-
-               configure_options += --disable-sjlj-exceptions
-               configure_options += --with-float=soft
-
-               build_libubsan = 1
-       end
-
        if "%{build_graphite}" == "1"
                configure_options += \
                        --with-isl
@@ -192,13 +163,13 @@ build
                        --enable-__cxa_atexit \
                        --enable-clocale=gnu \
                        --enable-languages=c,c++,lto \
-                       --enable-bootstrap \
+                       --disable-bootstrap \
                        --enable-checking=release \
                        --enable-default-pie \
                        --disable-werror \
                        --disable-libssp \
                        --with-system-zlib \
-                       --with-bugurl=http://bugtracker.ipfire.org \
+                       --with-bugurl=https://bugzilla.ipfire.org/ \
                        --disable-libunwind-exceptions \
                        --enable-gnu-unique-object \
                        --enable-linker-build-id \
@@ -213,7 +184,7 @@ build
                # XXX disabled flags: --disable-static
 
                # GCC does not support a parallel build.
-               make %{make_bootstrap} BOOT_CFLAGS="${CFLAGS}"
+               make %{make_bootstrap} BOOT_CFLAGS="${CFLAGS}" %{PARALLELISMFLAGS}
 
                # Generate man pages.
                perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl
@@ -243,42 +214,19 @@ build
 
                # Fix libgcc_s symlinks.
                rm -f ${FULLPATH}/libgcc_s.so %{BUILDROOT}%{libdir}/libgcc_s.so
-               case "%{DISTRO_ARCH}" in
-                       arm*)
-                               cat <<EOF >${FULLPATH}/libgcc_s.so
-               /* GNU ld script
-                  Use the shared library, but some functions are only in
-                  the static library, so try that secondarily.  */
-               OUTPUT_FORMAT(elf32-littlearm)
-               GROUP ( %{libdir}/libgcc_s.so.1 libgcc.a )
-               EOF
-                               ;;
-                       *)
-                               ln -svf ../../../../..%{libdir}/libgcc_s.so.1 ${FULLPATH}/libgcc_s.so
-                               ;;
-               esac
+               ln -svf ../../../../..%{libdir}/libgcc_s.so.1 ${FULLPATH}/libgcc_s.so
                chmod 755 %{BUILDROOT}%{libdir}/libgcc_s.so.1
 
                # Remove some GNU debugger stuff.
                rm -vf %{BUILDROOT}%{libdir}/lib*.py
 
-               # Install missing header file(s) on ARM.
-               case "%{DISTRO_ARCH}" in
-                       arm*)
-                               cp -vf %{DIR_APP}/gcc/config/vxworks-dummy.h \
-                                       ${FULLPATH}/plugin/include/config/
-                               cp -vf %{DIR_APP}/gcc/config/arm/arm-cores.def \
-                                       ${FULLPATH}/plugin/include/config/arm/
-                               ;;
-               esac
-
                # libgomp
                mv -vf %{BUILDROOT}%{libdir}/libgomp.spec ${FULLPATH}/
                ln -svf ../../../libgomp.so.1.0.0 ${FULLPATH}/libgomp.so
                chmod 755 %{BUILDROOT}%{libdir}/libgomp.so.1.*
 
                # libstdc++
-               ln -svf ../../../libstdc++.so.6.0.26 ${FULLPATH}/libstdc++.so
+               ln -svf ../../../libstdc++.so.6.0.30 ${FULLPATH}/libstdc++.so
                mv -vf %{BUILDROOT}%{libdir}/lib{std,sup}c++.a ${FULLPATH}
 
                # libquadmath
@@ -300,7 +248,7 @@ build
 
                # libtsan
                if [ "%{build_libtsan}" = "1" ]; then
-                       ln -svf ../../../libtsan.so.0.0.0 ${FULLPATH}/libtsan.so
+                       ln -svf ../../../libtsan.so.2.0.0 ${FULLPATH}/libtsan.so
                        chmod 755 %{BUILDROOT}%{libdir}/libtsan.so.*
                fi
 
diff --git a/gcc/patches/40_all_gcc49_config_esp.patch0 b/gcc/patches/40_all_gcc49_config_esp.patch0
deleted file mode 100644 (file)
index 16cc2b4..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-2014-05-12  Magnus Granberg  <zorry@gentoo.org>
-
-       * gcc/esp.h     New file to support --enable-esp
-       Version 20140512.1
-
---- gcc/config/esp.h   2010-04-09 16:14:00.000000000 +0200
-+++ gcc/config/esp.h   2012-06-23 01:00:31.248348491 +0200
-@@ -0,0 +1,132 @@
-+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3.
-+ * Version 20140512.1
-+ * Magnus Granberg (Zorry) <zorry@gentoo.org>  */
-+#ifndef GCC_ESP_H
-+#define GCC_ESP_H
-+
-+/*    This file will add -fstack-protector-all, -fstack-check, -fPIE, -pie and -z now 
-+      as default if the defines and the spec allow it.
-+      Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass
-+      to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened.
-+      This will add some unsupported upstream commands options as -nopie and -nonow.
-+      -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protector-all and -fstack-check when building kernels.
-+      ESP_CC1_SPEC is added to CC1_SPEC.
-+      ESP_CC1_STRICT_OVERFLOW_SPEC is added so we don't disable the strict-overflow check.
-+      ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static.
-+      ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE or -fpie.
-+*/
-+#ifdef ENABLE_ESP
-+      
-+      /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass  */
-+      #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict_overflow)"
-+      #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
-+              #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: %{!fno-stack-check: }}}"
-+      #else
-+              #define ESP_CC1_SSP_SPEC ""
-+      #endif
-+      #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
-+              #define ESP_CC1_PIE_SPEC "%{!nopie: }"
-+      #else
-+              #define ESP_CC1_PIE_SPEC ""
-+      #endif
-+      #define ESP_CC1_STRICT_OVERFLOW_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}"
-+
-+      /*      ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable
-+              -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check
-+              Don't remove the specs in the end  */
-+      #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) "
-+      #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}"
-+
-+      /*      We use ESP_DRIVER_SELF_SPEC to add pie and ssp command-line options.  */
-+      #define ESP_DRIVER_SELF_SPEC "%{D__KERNEL__:;:%{!nopie:%(esp_options_pie) \
-+              %(esp_link_pie)} %(esp_options_ssp) }"
-+      
-+      /*  This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector
-+              -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined.  */
-+      #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
-+              #ifdef ESP_NO_STACK_CHECK
-+                      #define ESP_OPTIONS_STACK_CHECK_SPEC
-+              #else
-+                      #define ESP_OPTIONS_STACK_CHECK_SPEC "%{fstack-check|fstack-check=*:;: -fstack-check}"
-+              #endif
-+              #define ESP_OPTIONS_SSP_SPEC \
-+                      "%{nostdlib|ffreestanding|fno-stack-protector|fstack-protector| \
-+                      fstack-protector-all|fstack-protector-strong:;:-fstack-protector-all} " \
-+                      ESP_OPTIONS_STACK_CHECK_SPEC
-+      #else
-+              #define ESP_OPTIONS_SSP_SPEC ""
-+      #endif
-+
-+      /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie  */
-+      #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
-+
-+              /*  This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static
-+                      -nostdlib -nostartfiles.  */
-+              /*  With ENABLE_CRTBEGINP we don't need to check for -static  */
-+              #ifdef ENABLE_CRTBEGINP
-+                      #define ESP_OPTIONS_PIE_SPEC \
-+                              "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \
-+                              %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }"
-+              #else
-+                      #define ESP_OPTIONS_PIE_SPEC \
-+                              "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \
-+                              %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}"
-+              #endif
-+
-+              /*  This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib 
-+                      -nostartfiles  */
-+              /*  With ENABLE_CRTBEGINP we don't need to check for -static
-+                      and we add -pie only to get the start and endfiles. -pie will not go to the linker. */
-+              #ifdef ENABLE_CRTBEGINP
-+                      #define ESP_LINK_PIE_SPEC \
-+                              "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \
-+                              %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}"
-+              #else
-+                      #define ESP_LINK_PIE_SPEC \
-+                              "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \
-+                              %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}"
-+              #endif
-+              
-+              /*  This will check if -pie is set when (-static) -pg -p -profile. If set it will make gcc print out
-+                      "-pie and (static)|pg|p|profile are incompatible when linking"  */
-+              /*  With ENABLE_CRTBEGINP we don't need to check for -static  */
-+              #ifdef ENABLE_CRTBEGINP
-+                      #define ESP_LINK_PIE_CHECK_SPEC \
-+                              "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}"
-+              #else
-+                      #define ESP_LINK_PIE_CHECK_SPEC \
-+                              "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible when linking}}"
-+              #endif
-+
-+              /*  We don't pass -pie to the linker when -static.  */
-+              #ifdef ENABLE_CRTBEGINP
-+                      #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)"
-+              #else
-+                      #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
-+              #endif
-+
-+      #else
-+              #define ESP_OPTIONS_PIE_SPEC ""
-+              #define ESP_LINK_PIE_CHECK_SPEC ""
-+              #define ESP_LINK_PIE_SPEC ""
-+              #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
-+      #endif
-+
-+      /*  We add extra spec name's to the EXTRA_SPECS list  */
-+      #define ESP_EXTRA_SPECS \
-+              { "esp_cc1",                                                            ESP_CC1_SPEC },                                 \
-+              { "esp_cc1_pie",                                                        ESP_CC1_PIE_SPEC },                             \
-+              { "esp_cc1_ssp",                                                        ESP_CC1_SSP_SPEC },                             \
-+              { "esp_cc1_strict_overflow",                                    ESP_CC1_STRICT_OVERFLOW_SPEC }, \
-+              { "esp_link",                                                           ESP_LINK_SPEC },                                \
-+              { "esp_link_now",                                                       ESP_LINK_NOW_SPEC },                    \
-+              { "esp_link_pie",                                                       ESP_LINK_PIE_SPEC },                    \
-+              { "esp_link_pie_check",                                         ESP_LINK_PIE_CHECK_SPEC },              \
-+              { "esp_driver_self",                                                    ESP_DRIVER_SELF_SPEC },         \
-+              { "esp_options_pie",                                            ESP_OPTIONS_PIE_SPEC },                 \
-+              { "esp_options_ssp",                                            ESP_OPTIONS_SSP_SPEC }
-+
-+      static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC;
-+
-+#endif
-+#endif /* End GCC_ESP_H */
diff --git a/gcc/patches/gcc-6.1-compile-compiler-with-pic.patch b/gcc/patches/gcc-6.1-compile-compiler-with-pic.patch
deleted file mode 100644 (file)
index cb59c3d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 6c5adc0..73d817d 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -261,12 +261,6 @@ endif
- NO_PIE_CFLAGS = @NO_PIE_CFLAGS@
- NO_PIE_FLAG = @NO_PIE_FLAG@
--# We don't want to compile the compilers with -fPIE, it make PCH fail.
--COMPILER += $(NO_PIE_CFLAGS)
--
--# Link with -no-pie since we compile the compiler with -fno-PIE.
--LINKER += $(NO_PIE_FLAG)
--
- # Like LINKER, but use a mutex for serializing front end links.
- ifeq (@DO_LINK_MUTEX@,true)
- LLINKER = $(SHELL) $(srcdir)/lock-and-run.sh linkfe.lck $(LINKER)
diff --git a/gcc/patches/gcc49-aarch64-async-unw-tables.patch0 b/gcc/patches/gcc49-aarch64-async-unw-tables.patch0
deleted file mode 100644 (file)
index feec149..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-2014-04-07  Richard Henderson  <rth@redhat.com>
-
-       * common/config/aarch64/aarch64-common.c (TARGET_OPTION_INIT_STRUCT):
-       Define.
-       (aarch64_option_init_struct): New function.
-
---- gcc/common/config/aarch64/aarch64-common.c
-+++ gcc/common/config/aarch64/aarch64-common.c
-@@ -39,6 +39,9 @@
- #undef        TARGET_OPTION_OPTIMIZATION_TABLE
- #define TARGET_OPTION_OPTIMIZATION_TABLE aarch_option_optimization_table
-+#undef TARGET_OPTION_INIT_STRUCT
-+#define TARGET_OPTION_INIT_STRUCT aarch64_option_init_struct
-+
- /* Set default optimization options.  */
- static const struct default_options aarch_option_optimization_table[] =
-   {
-@@ -47,6 +50,16 @@ static const struct default_options aarch_option_optimization_table[] =
-     { OPT_LEVELS_NONE, 0, NULL, 0 }
-   };
-+/* Implement TARGET_OPTION_INIT_STRUCT.  */
-+
-+static void
-+aarch64_option_init_struct (struct gcc_options *opts)
-+{
-+  /* By default, always emit DWARF-2 unwind info.  This allows debugging
-+     without maintaining a stack frame back-chain.  */
-+  opts->x_flag_asynchronous_unwind_tables = 1;
-+}
-+
- /* Implement TARGET_HANDLE_OPTION.
-    This function handles the target specific options for CPU/target selection.
diff --git a/gcc/patches/gcc49-libtool-no-rpath.patch0 b/gcc/patches/gcc49-libtool-no-rpath.patch0
deleted file mode 100644 (file)
index 466c661..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-libtool sucks.
---- ltmain.sh.jj       2007-12-07 14:53:21.000000000 +0100
-+++ ltmain.sh  2008-09-05 21:51:48.000000000 +0200
-@@ -5394,6 +5394,7 @@ EOF
-         rpath="$finalize_rpath"
-         test "$mode" != relink && rpath="$compile_rpath$rpath"
-         for libdir in $rpath; do
-+          case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
-           if test -n "$hardcode_libdir_flag_spec"; then
-             if test -n "$hardcode_libdir_separator"; then
-               if test -z "$hardcode_libdirs"; then
-@@ -6071,6 +6072,7 @@ EOF
-       rpath=
-       hardcode_libdirs=
-       for libdir in $compile_rpath $finalize_rpath; do
-+      case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-@@ -6120,6 +6122,7 @@ EOF
-       rpath=
-       hardcode_libdirs=
-       for libdir in $finalize_rpath; do
-+      case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then