diff --git a/gcc-12.0.1-20220214.tar.xz b/gcc-12.1.0.tar.gz similarity index 56% rename from gcc-12.0.1-20220214.tar.xz rename to gcc-12.1.0.tar.gz index 622feb5eeeea6cb33f17d5e114eb617e6e88f41a..316de66254f8846138440ed7a2a5fe1a5b72268c 100644 Binary files a/gcc-12.0.1-20220214.tar.xz and b/gcc-12.1.0.tar.gz differ diff --git a/gcc.spec b/gcc.spec index f88dab533715a66253b162df706b647eb049dc3d..e80e572ec2035c7ef74ac198def95987df330bf1 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,8 +1,8 @@ %define anolis_release 1 -%global DATE 20220214 +%global DATE 20220506 %global gitrev 7222fb983d798306a83666324a92fce5e5881eb7 -%global gcc_version 12.0.1 +%global gcc_version 12.1.0 %global gcc_major 12 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. @@ -53,19 +53,12 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}.8.%{anolis_release}%{?dist} +Release: %{anolis_release}%{?dist} # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have # GCC Runtime Exception. License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD -# The source for this package was pulled from upstream's vcs. -# %%{gitrev} is some commit from the -# https://gcc.gnu.org/git/?p=gcc.git;h=refs/vendors/redhat/heads/gcc-%%{gcc_major}-branch -# branch. Use the following commands to generate the tarball: -# git clone --depth 1 git://gcc.gnu.org/git/gcc.git gcc-dir.tmp -# git --git-dir=gcc-dir.tmp/.git fetch --depth 1 origin %%{gitrev} -# git --git-dir=gcc-dir.tmp/.git archive --prefix=%%{name}-%%{version}-%%{DATE}/ %%{gitrev} | xz -9e > %%{name}-%%{version}-%%{DATE}.tar.xz -# rm -rf gcc-dir.tmp -Source0: gcc-%{version}-%{DATE}.tar.xz +Source0: https://github.com/gcc-mirror/gcc/archive/refs/tags/releases/gcc-%{version}.tar.gz +# Source0: gcc-%{version}-%{DATE}.tar.xz # The source for nvptx-tools package was pulled from upstream's vcs. Use the # following commands to generate the tarball: # git clone --depth 1 git://github.com/MentorEmbedded/nvptx-tools.git nvptx-tools-dir.tmp @@ -140,19 +133,17 @@ Provides: bundled(libffi) Provides: gcc(major) = %{gcc_major} Patch0: gcc12-hack.patch -Patch2: gcc12-sparc-config-detection.patch -Patch3: gcc12-libgomp-omp_h-multilib.patch -Patch4: gcc12-libtool-no-rpath.patch -Patch5: gcc12-isl-dl.patch -Patch6: gcc12-isl-dl2.patch -Patch7: gcc12-libstdc++-docs.patch -Patch8: gcc12-no-add-needed.patch -Patch9: gcc12-Wno-format-security.patch -Patch10: gcc12-rh1574936.patch -Patch11: gcc12-d-shared-libphobos.patch -Patch12: gcc12-ifcvt-revert.patch -Patch13: gcc12-pr104253.patch - +Patch1: gcc12-libtool-no-rpath.patch +Patch2: gcc12-isl-dl.patch +Patch3: gcc12-isl-dl2.patch +Patch4: gcc12-libstdc++-docs.patch +Patch5: gcc12-no-add-needed.patch +Patch6: gcc12-Wno-format-security.patch +Patch7: gcc12-rh1574936.patch +Patch8: gcc12-d-shared-libphobos.patch +Patch9: gcc12-ifcvt-revert.patch + +# patches for fortran Patch100: gcc12-fortran-fdec-duplicates.patch Patch101: gcc12-fortran-flogical-as-integer.patch Patch102: gcc12-fortran-fdec-ichar.patch @@ -638,24 +629,21 @@ by default add PTX code into the binaries, which can be offloaded to NVidia PTX capable devices if available. %prep -%setup -q -n gcc-%{version}-%{DATE} -a 1 -a 2 -a 3 +%setup -q -n gcc-releases-gcc-%{version} -a 1 -a 2 -a 3 %patch0 -p0 -b .hack~ -%patch2 -p0 -b .sparc-config-detection~ -%patch3 -p0 -b .libgomp-omp_h-multilib~ -%patch4 -p0 -b .libtool-no-rpath~ +%patch1 -p0 -b .libtool-no-rpath~ %if %{build_isl} -%patch5 -p0 -b .isl-dl~ -%patch6 -p0 -b .isl-dl2~ +%patch2 -p0 -b .isl-dl~ +%patch3 -p0 -b .isl-dl2~ %endif %if %{build_libstdcxx_docs} -%patch7 -p0 -b .libstdc++-docs~ +%patch4 -p0 -b .libstdc++-docs~ %endif -%patch8 -p0 -b .no-add-needed~ -%patch9 -p0 -b .Wno-format-security~ -%patch10 -p0 -b .rh1574936~ -%patch11 -p0 -b .d-shared-libphobos~ -%patch12 -p0 -b .ifcvt-revert~ -%patch13 -p0 -b .pr104253~ +%patch5 -p0 -b .no-add-needed~ +%patch6 -p0 -b .Wno-format-security~ +%patch7 -p0 -b .rh1574936~ +%patch8 -p0 -b .d-shared-libphobos~ +%patch9 -p0 -b .ifcvt-revert~ %patch100 -p1 -b .fortran-fdec-duplicates~ %patch101 -p1 -b .fortran-flogical-as-integer~ @@ -2331,5 +2319,8 @@ end %endif %changelog +* Sat May 7 2022 Chunmei Xu - 12.1.0-1 +- update to release 12.1 + * Mon Feb 21 2022 Chunmei Xu - 12.0.1-0.8.1 - upstream from gcc trunk, after gcc12 release, will transfer to gcc12 release diff --git a/gcc12-libgomp-omp_h-multilib.patch b/gcc12-libgomp-omp_h-multilib.patch deleted file mode 100644 index d0e98d19833d7093347ccf6a44a127e0d67f1b1a..0000000000000000000000000000000000000000 --- a/gcc12-libgomp-omp_h-multilib.patch +++ /dev/null @@ -1,17 +0,0 @@ -2008-06-09 Jakub Jelinek - - * omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs. - ---- libgomp/omp.h.in.jj 2008-06-09 13:34:05.000000000 +0200 -+++ libgomp/omp.h.in 2008-06-09 13:34:48.000000000 +0200 -@@ -42,8 +42,8 @@ typedef struct - - typedef struct - { -- unsigned char _x[@OMP_NEST_LOCK_SIZE@] -- __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@))); -+ unsigned char _x[8 + sizeof (void *)] -+ __attribute__((__aligned__(sizeof (void *)))); - } omp_nest_lock_t; - #endif - diff --git a/gcc12-pr104253.patch b/gcc12-pr104253.patch deleted file mode 100644 index 55605242da021161d9859d2cff7fd67055d9df25..0000000000000000000000000000000000000000 --- a/gcc12-pr104253.patch +++ /dev/null @@ -1,200 +0,0 @@ -If you are on a PowerPC system where the default long double is IEEE -128-bit, GCC will use the wrong names for some of the conversion functions -for the __ibm128 type. - -What is happening is when the defult long double is IEEE 128-bit, the -various convert, truncation, and extend functions did not specify a -default name for the conversion. The machine indepentent portions of the -compiler would construct a call with an 'if' name (IFmode being the mode -for IBM 128-bit floating point). This patch specifies to use the -tradiational 'tf' name for these conversion functions. - -2022-01-28 Michael Meissner - -gcc/ - PR target/104253 - * config/rs6000/rs6000.cc (init_float128_ibm): Use the TF names - for builtin conversions between __ibm128 and DImode when long - double uses the IEEE 128-bit format. - -gcc/testsuite/ - PR target/104253 - * gcc.target/powerpc/pr104253.c: New test. ---- - gcc/config/rs6000/rs6000.cc | 6 + - gcc/testsuite/gcc.target/powerpc/pr104253.c | 154 ++++++++++++++++++++ - 2 files changed, 160 insertions(+) - create mode 100644 gcc/testsuite/gcc.target/powerpc/pr104253.c - ---- gcc/config/rs6000/rs6000.cc -+++ gcc/config/rs6000/rs6000.cc -@@ -11113,6 +11113,12 @@ init_float128_ibm (machine_mode mode) - set_conv_libfunc (trunc_optab, DDmode, mode, "__dpd_trunctfdd"); - set_conv_libfunc (sext_optab, TDmode, mode, "__dpd_extendtftd"); - -+ set_conv_libfunc (sfix_optab, DImode, mode, "__fixtfdi"); -+ set_conv_libfunc (ufix_optab, DImode, mode, "__fixunstfdi"); -+ -+ set_conv_libfunc (sfloat_optab, mode, DImode, "__floatditf"); -+ set_conv_libfunc (ufloat_optab, mode, DImode, "__floatunditf"); -+ - if (TARGET_POWERPC64) - { - set_conv_libfunc (sfix_optab, TImode, mode, "__fixtfti"); ---- gcc/testsuite/gcc.target/powerpc/pr104253.c -+++ gcc/testsuite/gcc.target/powerpc/pr104253.c -@@ -0,0 +1,154 @@ -+/* -+ * Require float128 support because __ibm128 currently is not enabled unless we -+ * also have __float128 support. -+ */ -+ -+/* { dg-do run } */ -+/* { require-effective-target ppc_float128_sw } */ -+/* { dg-options "-O2 -mvsx -mfloat128" } */ -+ -+/* -+ * PR target/104253 -+ * -+ * Verify that the various conversions to and from __ibm128 work. When the -+ * default for long double is changed to IEEE 128-bit, originally GCC would -+ * call the functions using an 'if' name instead of 'tf. -+ */ -+ -+#include -+ -+extern float ibm128_to_sf (__ibm128) __attribute__((noinline)); -+extern double ibm128_to_df (__ibm128) __attribute__((noinline)); -+extern int ibm128_to_si (__ibm128) __attribute__((noinline)); -+extern long long ibm128_to_di (__ibm128) __attribute__((noinline)); -+extern unsigned int ibm128_to_usi (__ibm128) __attribute__((noinline)); -+extern unsigned long long ibm128_to_udi (__ibm128) __attribute__((noinline)); -+ -+extern __ibm128 sf_to_ibm128 (float) __attribute__((noinline)); -+extern __ibm128 df_to_ibm128 (double) __attribute__((noinline)); -+extern __ibm128 si_to_ibm128 (int) __attribute__((noinline)); -+extern __ibm128 di_to_ibm128 (long long) __attribute__((noinline)); -+extern __ibm128 usi_to_ibm128 (unsigned int) __attribute__((noinline)); -+extern __ibm128 udi_to_ibm128 (unsigned long long) __attribute__((noinline)); -+ -+float -+ibm128_to_sf (__ibm128 x) -+{ -+ return x; -+} -+ -+double -+ibm128_to_df (__ibm128 x) -+{ -+ return x; -+} -+ -+int -+ibm128_to_si (__ibm128 x) -+{ -+ return x; -+} -+ -+long long -+ibm128_to_di (__ibm128 x) -+{ -+ return x; -+} -+ -+unsigned int -+ibm128_to_usi (__ibm128 x) -+{ -+ return x; -+} -+ -+unsigned long long -+ibm128_to_udi (__ibm128 x) -+{ -+ return x; -+} -+ -+__ibm128 -+sf_to_ibm128 (float x) -+{ -+ return x; -+} -+ -+__ibm128 -+df_to_ibm128 (double x) -+{ -+ return x; -+} -+ -+__ibm128 -+si_to_ibm128 (int x) -+{ -+ return x; -+} -+ -+__ibm128 -+di_to_ibm128 (long long x) -+{ -+ return x; -+} -+ -+__ibm128 -+usi_to_ibm128 (unsigned int x) -+{ -+ return x; -+} -+ -+__ibm128 -+udi_to_ibm128 (unsigned long long x) -+{ -+ return x; -+} -+ -+volatile float seven_sf = 7.0f; -+volatile double seven_df = 7.0; -+volatile int seven_si = 7; -+volatile long long seven_di = 7LL; -+volatile unsigned int seven_usi = 7U; -+volatile unsigned long long seven_udi = 7ULL; -+volatile __ibm128 seven_ibm128 = 7.0; -+ -+int -+main (void) -+{ -+ if (seven_ibm128 != sf_to_ibm128 (seven_sf)) -+ abort (); -+ -+ if (seven_ibm128 != df_to_ibm128 (seven_df)) -+ abort (); -+ -+ if (seven_ibm128 != si_to_ibm128 (seven_si)) -+ abort (); -+ -+ if (seven_ibm128 != di_to_ibm128 (seven_di)) -+ abort (); -+ -+ if (seven_ibm128 != usi_to_ibm128 (seven_usi)) -+ abort (); -+ -+ if (seven_ibm128 != udi_to_ibm128 (seven_udi)) -+ abort (); -+ -+ if (seven_sf != ibm128_to_sf (seven_ibm128)) -+ abort (); -+ -+ if (seven_df != ibm128_to_df (seven_ibm128)) -+ abort (); -+ -+ if (seven_si != ibm128_to_si (seven_ibm128)) -+ abort (); -+ -+ if (seven_di != ibm128_to_di (seven_ibm128)) -+ abort (); -+ -+ if (seven_usi != ibm128_to_usi (seven_ibm128)) -+ abort (); -+ -+ if (seven_udi != ibm128_to_udi (seven_ibm128)) -+ abort (); -+ -+ return 0; -+} diff --git a/gcc12-sparc-config-detection.patch b/gcc12-sparc-config-detection.patch deleted file mode 100644 index bb06b35d02b537cc34de9ab7865d81beb58d37e4..0000000000000000000000000000000000000000 --- a/gcc12-sparc-config-detection.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- gcc/config.gcc.jj 2008-04-24 15:42:46.000000000 -0500 -+++ gcc/config.gcc 2008-04-24 15:44:51.000000000 -0500 -@@ -2790,7 +2790,7 @@ sparc-*-rtems*) - tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h" - tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems" - ;; --sparc-*-linux*) -+sparc-*-linux* | sparcv9-*-linux*) - tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h" - extra_options="${extra_options} sparc/long-double-switch.opt" - case ${target} in -@@ -2844,7 +2844,7 @@ sparc64-*-rtems*) - extra_options="${extra_options}" - tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64" - ;; --sparc64-*-linux*) -+sparc64*-*-linux*) - tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h" - extra_options="${extra_options} sparc/long-double-switch.opt" - tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64" ---- libgcc/config.host.jj 2008-04-24 15:46:19.000000000 -0500 -+++ libgcc/config.host 2008-04-24 15:46:49.000000000 -0500 -@@ -1002,7 +1002,7 @@ sparc-*-elf*) - tmake_file="${tmake_file} t-fdpbit t-crtfm" - extra_parts="$extra_parts crti.o crtn.o crtfastmath.o" - ;; --sparc-*-linux*) # SPARC's running GNU/Linux, libc6 -+sparc-*-linux* | sparcv9-*-linux*) # SPARC's running GNU/Linux, libc6 - tmake_file="${tmake_file} t-crtfm" - if test "${host_address}" = 64; then - tmake_file="$tmake_file sparc/t-linux64" -@@ -1050,7 +1050,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd* - tmake_file="$tmake_file t-crtfm" - extra_parts="$extra_parts crtfastmath.o" - ;; --sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux -+sparc64*-*-linux*) # 64-bit SPARC's running GNU/Linux - extra_parts="$extra_parts crtfastmath.o" - tmake_file="${tmake_file} t-crtfm sparc/t-linux" - if test "${host_address}" = 64; then