From 5e6e6db9f32771a6542d4fcc5a5e898e44b9491f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 23 2023 11:09:43 +0000 Subject: import devtoolset-12-gcc-12.2.1-4.1.el7 --- diff --git a/.devtoolset-12-gcc.metadata b/.devtoolset-12-gcc.metadata index 04dac9e..b91bc23 100644 --- a/.devtoolset-12-gcc.metadata +++ b/.devtoolset-12-gcc.metadata @@ -1,8 +1,8 @@ 7f4348418dc3efefd357b32a2b5c8010211ab284 SOURCES/doxygen-1.8.0.src.tar.gz -b745356ea1afec83ef254a5b1ce8bdf9e4eb69c8 SOURCES/gcc-12.1.1-20220628.tar.xz +ecaedb16188931aa35d627f2edb28dbab5f8f3c1 SOURCES/gcc-12.2.1-20221121.tar.xz db38c7b67f8eea9f2e5b8a48d219165b2fdab11f SOURCES/gmp-6.1.0.tar.bz2 -bbffc5a2b05e4f0c97e882f96c448504491dc4ed SOURCES/isl-0.18.tar.bz2 +ae5fbb33bcb442121fbbf482a93f6b3c84d489ee SOURCES/isl-0.24.tar.bz2 b8be66396c726fdc36ebb0f692ed8a8cca3bcc66 SOURCES/mpc-1.0.3.tar.gz e3b0af77f18505184410d621fe0aae179e229dba SOURCES/mpfr-3.1.4.tar.bz2 -6ec33952e824e837fef0e829c93d39d6a507082f SOURCES/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz -0e0c6f8d68ab0878f02287ac082c1077c831cd81 SOURCES/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz +1923f9401ce16ce5b818c104e3b09b0bdbb15606 SOURCES/newlib-cygwin-a8526cb52bedabd4d6ba4b227a5185627f871aa1.tar.xz +ea865cf7e6834b88a8f8aee22b7a7065813ccc99 SOURCES/nvptx-tools-472b6e78b3ba918d727698f79911360b7c808247.tar.xz diff --git a/.gitignore b/.gitignore index c32afc5..ae6756a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ SOURCES/doxygen-1.8.0.src.tar.gz -SOURCES/gcc-12.1.1-20220628.tar.xz +SOURCES/gcc-12.2.1-20221121.tar.xz SOURCES/gmp-6.1.0.tar.bz2 -SOURCES/isl-0.18.tar.bz2 +SOURCES/isl-0.24.tar.bz2 SOURCES/mpc-1.0.3.tar.gz SOURCES/mpfr-3.1.4.tar.bz2 -SOURCES/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz -SOURCES/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz +SOURCES/newlib-cygwin-a8526cb52bedabd4d6ba4b227a5185627f871aa1.tar.xz +SOURCES/nvptx-tools-472b6e78b3ba918d727698f79911360b7c808247.tar.xz diff --git a/SOURCES/0018-Use-CXX11-ABI.patch b/SOURCES/0018-Use-CXX11-ABI.patch index 88449dd..1e60ce1 100644 --- a/SOURCES/0018-Use-CXX11-ABI.patch +++ b/SOURCES/0018-Use-CXX11-ABI.patch @@ -11,3 +11,16 @@ index 47f97dcb636..66f07aaa749 100644 #include #include +diff --git a/gcc/testsuite/g++.dg/torture/pr106922.C b/gcc/testsuite/g++.dg/torture/pr106922.C +index 046fc6cce76..4214a31f276 100644 +--- a/gcc/testsuite/g++.dg/torture/pr106922.C ++++ b/gcc/testsuite/g++.dg/torture/pr106922.C +@@ -4,6 +4,8 @@ + // -O1 doesn't iterate VN and thus has bogus uninit diagnostics + // { dg-skip-if "" { *-*-* } { "-O1" } { "" } } + ++#define _GLIBCXX_USE_CXX11_ABI 1 ++ + #include + + #include diff --git a/SOURCES/gcc12-FMA-chains.patch b/SOURCES/gcc12-FMA-chains.patch new file mode 100644 index 0000000..336c9f2 --- /dev/null +++ b/SOURCES/gcc12-FMA-chains.patch @@ -0,0 +1,29 @@ +commit 8ac76d504ee1216ebffab08463a544d691d85112 +Author: Hongyu Wang +Date: Tue Dec 6 09:53:35 2022 +0800 + + i386: Avoid fma_chain for -march=alderlake and sapphirerapids. + + For Alderlake there is similar issue like PR81616, enable + avoid_fma256_chain will also benefit on Intel latest platforms + Alderlake and Sapphire Rapids. + + gcc/ChangeLog: + + * config/i386/x86-tune.def (X86_TUNE_AVOID_256FMA_CHAINS): Add + m_SAPPHIRERAPIDS, m_ALDERLAKE. + +diff --git a/gcc/config/i386/x86-tune.def b/gcc/config/i386/x86-tune.def +index d983e2f6213..1e1b206a71c 100644 +--- a/gcc/config/i386/x86-tune.def ++++ b/gcc/config/i386/x86-tune.def +@@ -485,7 +485,8 @@ DEF_TUNE (X86_TUNE_AVOID_128FMA_CHAINS, "avoid_fma_chains", m_ZNVER) + + /* X86_TUNE_AVOID_256FMA_CHAINS: Avoid creating loops with tight 256bit or + smaller FMA chain. */ +-DEF_TUNE (X86_TUNE_AVOID_256FMA_CHAINS, "avoid_fma256_chains", m_ZNVER2 | m_ZNVER3) ++DEF_TUNE (X86_TUNE_AVOID_256FMA_CHAINS, "avoid_fma256_chains", m_ZNVER2 | m_ZNVER3 ++ | m_ALDERLAKE | m_SAPPHIRERAPIDS) + + /* X86_TUNE_V2DF_REDUCTION_PREFER_PHADDPD: Prefer haddpd + for v2df vector reduction. */ diff --git a/SOURCES/gcc12-detect-sapphirerapids.patch b/SOURCES/gcc12-detect-sapphirerapids.patch deleted file mode 100644 index 5b994e6..0000000 --- a/SOURCES/gcc12-detect-sapphirerapids.patch +++ /dev/null @@ -1,78 +0,0 @@ -commit d644dfe36d9733c767af62d37250253ced6efd8c -Author: Cui,Lili -Date: Mon Nov 7 11:25:41 2022 +0800 - - Remove AVX512_VP2INTERSECT from PTA_SAPPHIRERAPIDS - - gcc/ChangeLog: - - * config/i386/driver-i386.cc (host_detect_local_cpu): - Move sapphirerapids out of AVX512_VP2INTERSECT. - * config/i386/i386.h: Remove AVX512_VP2INTERSECT from PTA_SAPPHIRERAPIDS - * doc/invoke.texi: Remove AVX512_VP2INTERSECT from SAPPHIRERAPIDS - - (cherry picked from commit d644dfe36d9733c767af62d37250253ced6efd8c) - -diff --git a/gcc/config/i386/driver-i386.cc b/gcc/config/i386/driver-i386.cc -index 9e0ae0b2baa..fcf23fd921d 100644 ---- a/gcc/config/i386/driver-i386.cc -+++ b/gcc/config/i386/driver-i386.cc -@@ -574,15 +574,12 @@ const char *host_detect_local_cpu (int argc, const char **argv) - /* This is unknown family 0x6 CPU. */ - if (has_feature (FEATURE_AVX)) - { -+ /* Assume Tiger Lake */ - if (has_feature (FEATURE_AVX512VP2INTERSECT)) -- { -- if (has_feature (FEATURE_TSXLDTRK)) -- /* Assume Sapphire Rapids. */ -- cpu = "sapphirerapids"; -- else -- /* Assume Tiger Lake */ -- cpu = "tigerlake"; -- } -+ cpu = "tigerlake"; -+ /* Assume Sapphire Rapids. */ -+ else if (has_feature (FEATURE_TSXLDTRK)) -+ cpu = "sapphirerapids"; - /* Assume Cooper Lake */ - else if (has_feature (FEATURE_AVX512BF16)) - cpu = "cooperlake"; -diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h -index 363082ba47b..a61c32b8957 100644 ---- a/gcc/config/i386/i386.h -+++ b/gcc/config/i386/i386.h -@@ -2328,10 +2328,9 @@ constexpr wide_int_bitmask PTA_ICELAKE_SERVER = PTA_ICELAKE_CLIENT - constexpr wide_int_bitmask PTA_TIGERLAKE = PTA_ICELAKE_CLIENT | PTA_MOVDIRI - | PTA_MOVDIR64B | PTA_CLWB | PTA_AVX512VP2INTERSECT | PTA_KL | PTA_WIDEKL; - constexpr wide_int_bitmask PTA_SAPPHIRERAPIDS = PTA_ICELAKE_SERVER | PTA_MOVDIRI -- | PTA_MOVDIR64B | PTA_AVX512VP2INTERSECT | PTA_ENQCMD | PTA_CLDEMOTE -- | PTA_PTWRITE | PTA_WAITPKG | PTA_SERIALIZE | PTA_TSXLDTRK | PTA_AMX_TILE -- | PTA_AMX_INT8 | PTA_AMX_BF16 | PTA_UINTR | PTA_AVXVNNI | PTA_AVX512FP16 -- | PTA_AVX512BF16; -+ | PTA_MOVDIR64B | PTA_ENQCMD | PTA_CLDEMOTE | PTA_PTWRITE | PTA_WAITPKG -+ | PTA_SERIALIZE | PTA_TSXLDTRK | PTA_AMX_TILE | PTA_AMX_INT8 | PTA_AMX_BF16 -+ | PTA_UINTR | PTA_AVXVNNI | PTA_AVX512FP16 | PTA_AVX512BF16; - constexpr wide_int_bitmask PTA_KNL = PTA_BROADWELL | PTA_AVX512PF - | PTA_AVX512ER | PTA_AVX512F | PTA_AVX512CD | PTA_PREFETCHWT1; - constexpr wide_int_bitmask PTA_BONNELL = PTA_CORE2 | PTA_MOVBE; -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 3749e06f13e..cee057a70bf 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -31541,11 +31541,11 @@ Intel sapphirerapids CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, - SSSE3, SSE4.1, SSE4.2, POPCNT, CX16, SAHF, FXSR, AVX, XSAVE, PCLMUL, FSGSBASE, - RDRND, F16C, AVX2, BMI, BMI2, LZCNT, FMA, MOVBE, HLE, RDSEED, ADCX, PREFETCHW, - AES, CLFLUSHOPT, XSAVEC, XSAVES, SGX, AVX512F, AVX512VL, AVX512BW, AVX512DQ, --AVX512CD, PKU, AVX512VBMI, AVX512IFMA, SHA, AVX512VNNI, GFNI, VAES, AVX512VBMI2 -+AVX512CD, PKU, AVX512VBMI, AVX512IFMA, SHA, AVX512VNNI, GFNI, VAES, AVX512VBMI2, - VPCLMULQDQ, AVX512BITALG, RDPID, AVX512VPOPCNTDQ, PCONFIG, WBNOINVD, CLWB, --MOVDIRI, MOVDIR64B, AVX512VP2INTERSECT, ENQCMD, CLDEMOTE, PTWRITE, WAITPKG, --SERIALIZE, TSXLDTRK, UINTR, AMX-BF16, AMX-TILE, AMX-INT8, AVX-VNNI, AVX512FP16 --and AVX512BF16 instruction set support. -+MOVDIRI, MOVDIR64B, ENQCMD, CLDEMOTE, PTWRITE, WAITPKG, SERIALIZE, TSXLDTRK, -+UINTR, AMX-BF16, AMX-TILE, AMX-INT8, AVX-VNNI, AVX512FP16 and AVX512BF16 -+instruction set support. - - @item alderlake - Intel Alderlake CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, diff --git a/SOURCES/gcc12-dg-ice-fixes.patch b/SOURCES/gcc12-dg-ice-fixes.patch index 49ecd55..4f581fa 100644 --- a/SOURCES/gcc12-dg-ice-fixes.patch +++ b/SOURCES/gcc12-dg-ice-fixes.patch @@ -1,13 +1,3 @@ ---- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -+++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -@@ -1,6 +1,6 @@ - /* { dg-additional-options "--param openacc-kernels=decompose" } */ - --/* { dg-additional-options "-fchecking" } -+/* { dg-additional-options "-fchecking -fno-report-bug" } - { dg-ice TODO { c++ } } - { dg-prune-output "during GIMPLE pass: omp_oacc_kernels_decompose" } */ - --- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr100400-1-3.c +++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr100400-1-3.c @@ -1,6 +1,6 @@ diff --git a/SOURCES/gcc12-fortran-fdec-non-logical-if.patch b/SOURCES/gcc12-fortran-fdec-non-logical-if.patch index 9d952b2..a3a830c 100644 --- a/SOURCES/gcc12-fortran-fdec-non-logical-if.patch +++ b/SOURCES/gcc12-fortran-fdec-non-logical-if.patch @@ -26,17 +26,17 @@ diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 4a269ebb22d..d886c2f33ed 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt -@@ -502,6 +502,10 @@ fdec-math - Fortran Var(flag_dec_math) - Enable legacy math intrinsics for compatibility. +@@ -506,6 +506,10 @@ fdec-override-kind + Fortran Var(flag_dec_override_kind) + Enable support for per variable kind specification. +fdec-non-logical-if +Fortran Var(flag_dec_non_logical_if) +Enable support for non-logical expressions in if statements. + - fdec-override-kind - Fortran Var(flag_dec_override_kind) - Enable support for per variable kind specification. + fdec-structure + Fortran Var(flag_dec_structure) + Enable support for DEC STRUCTURE/RECORD. diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc index edbab483b36..a946c86790a 100644 --- a/gcc/fortran/options.cc diff --git a/SOURCES/gcc12-isl-dl.patch b/SOURCES/gcc12-isl-dl.patch index 825fb88..824288b 100644 --- a/SOURCES/gcc12-isl-dl.patch +++ b/SOURCES/gcc12-isl-dl.patch @@ -26,7 +26,7 @@ # Generate header and source files from the machine description, # and compile them. --- gcc/graphite.h.jj 2016-01-27 12:44:06.000000000 +0100 -+++ gcc/graphite.h 2016-01-27 13:26:38.309876856 +0100 ++++ gcc/graphite.h 2022-11-03 19:14:50.369690720 +0100 @@ -24,6 +24,591 @@ along with GCC; see the file COPYING3. #include "sese.h" @@ -41,15 +41,15 @@ + DYNSYM (isl_aff_set_coefficient_si); \ + DYNSYM (isl_aff_set_constant_si); \ + DYNSYM (isl_aff_zero_on_domain); \ -+ DYNSYM (isl_band_free); \ -+ DYNSYM (isl_band_get_children); \ -+ DYNSYM (isl_band_get_partial_schedule); \ -+ DYNSYM (isl_band_has_children); \ -+ DYNSYM (isl_band_list_free); \ -+ DYNSYM (isl_band_list_get_band); \ -+ DYNSYM (isl_band_list_get_ctx); \ -+ DYNSYM (isl_band_list_n_band); \ -+ DYNSYM (isl_band_n_member); \ ++ /* DYNSYM (isl_band_free); */ \ ++ /* DYNSYM (isl_band_get_children); */ \ ++ /* DYNSYM (isl_band_get_partial_schedule); */ \ ++ /* DYNSYM (isl_band_has_children); */ \ ++ /* DYNSYM (isl_band_list_free); */ \ ++ /* DYNSYM (isl_band_list_get_band); */ \ ++ /* DYNSYM (isl_band_list_get_ctx); */ \ ++ /* DYNSYM (isl_band_list_n_band); */ \ ++ /* DYNSYM (isl_band_n_member); */ \ + DYNSYM (isl_basic_map_add_constraint); \ + DYNSYM (isl_basic_map_project_out); \ + DYNSYM (isl_basic_map_universe); \ @@ -91,7 +91,7 @@ + DYNSYM (isl_map_is_empty); \ + DYNSYM (isl_map_lex_ge); \ + DYNSYM (isl_map_lex_le); \ -+ DYNSYM (isl_map_n_out); \ ++ /* DYNSYM (isl_map_n_out); */ \ + DYNSYM (isl_map_range); \ + DYNSYM (isl_map_set_tuple_id); \ + DYNSYM (isl_map_universe); \ @@ -124,7 +124,7 @@ + DYNSYM (isl_pw_aff_sub); \ + DYNSYM (isl_pw_aff_zero_set); \ + DYNSYM (isl_schedule_free); \ -+ DYNSYM (isl_schedule_get_band_forest); \ ++ /* DYNSYM (isl_schedule_get_band_forest); */ \ + DYNSYM (isl_set_add_constraint); \ + DYNSYM (isl_set_add_dims); \ + DYNSYM (isl_set_apply); \ @@ -641,7 +641,7 @@ + + if (isl_pointers__.inited) + return isl_pointers__.h != NULL; -+ h = dlopen ("libisl.so.15", RTLD_LAZY); ++ h = dlopen ("libisl.so.23", RTLD_LAZY); + isl_pointers__.h = h; + if (h == NULL) + return false; diff --git a/SOURCES/gcc12-isl-dl2.patch b/SOURCES/gcc12-isl-dl2.patch index 5402a8e..2e12499 100644 --- a/SOURCES/gcc12-isl-dl2.patch +++ b/SOURCES/gcc12-isl-dl2.patch @@ -2,7 +2,7 @@ * toplev.cc (toplev_main_argv): New variable. (toplev_main): Initialize it. - * graphite.cc (init_isl_pointers): Load libisl.so.15 from gcc's private + * graphite.cc (init_isl_pointers): Load libisl.so.23 from gcc's private directory. --- gcc/toplev.cc.jj 2008-12-09 23:59:10.000000000 +0100 @@ -39,12 +39,12 @@ if (isl_pointers__.inited) return isl_pointers__.h != NULL; -- h = dlopen ("libisl.so.15", RTLD_LAZY); +- h = dlopen ("libisl.so.23", RTLD_LAZY); + len = progname - toplev_main_argv[0]; -+ buf = XALLOCAVAR (char, len + sizeof "libisl.so.15"); ++ buf = XALLOCAVAR (char, len + sizeof "libisl.so.23"); + memcpy (buf, toplev_main_argv[0], len); -+ strcpy (buf + len, "libisl.so.15"); -+ len += sizeof "libisl.so.15"; ++ strcpy (buf + len, "libisl.so.23"); ++ len += sizeof "libisl.so.23"; + p = strstr (buf, "/libexec/"); + if (p != NULL) + { @@ -61,7 +61,7 @@ + { + len = progname - toplev_main_argv[0]; + memcpy (buf, toplev_main_argv[0], len); -+ strcpy (buf + len, "libisl.so.15"); ++ strcpy (buf + len, "libisl.so.23"); + } + } + if (h == NULL) diff --git a/SOURCES/gcc12-libstdc++-compat.patch b/SOURCES/gcc12-libstdc++-compat.patch index 62be090..b58a4cd 100644 --- a/SOURCES/gcc12-libstdc++-compat.patch +++ b/SOURCES/gcc12-libstdc++-compat.patch @@ -5961,7 +5961,7 @@ +} // namespace + +#endif // _GLIBCXX_HAS_GTHREADS -+asm (".hidden _ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE"); ++//asm (".hidden _ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE"); --- libstdc++-v3/src/nonshared11/eh_aux_runtime.cc.jj 2022-05-12 10:06:51.373502758 +0200 +++ libstdc++-v3/src/nonshared11/eh_aux_runtime.cc 2022-05-12 10:06:51.373502758 +0200 @@ -0,0 +1,38 @@ @@ -11329,7 +11329,7 @@ { --- libstdc++-v3/src/nonshared17/floating_from_chars.cc.jj 2022-05-12 10:06:51.403502355 +0200 +++ libstdc++-v3/src/nonshared17/floating_from_chars.cc 2022-05-12 19:15:17.123406066 +0200 -@@ -0,0 +1,42 @@ +@@ -0,0 +1,39 @@ +// Copyright (C) 2019-2022 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -11360,9 +11360,6 @@ +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_createERmm"); +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_mutateEmmPKcm"); +#endif -+#if defined(__s390x__) || defined(__powerpc64__) -+asm (".hidden _ZSt10from_charsPKcS0_RgSt12chars_format"); -+#endif +#ifndef __i386__ +asm (".hidden _ZSt10from_charsIiENSt9enable_ifIXsrSt5__or_IJS1_IJSt7is_sameINSt9remove_cvIT_E4typeEaES2_IS6_sES2_IS6_iES2_IS6_lES2_IS6_xES2_IS6_nEEES1_IJS2_IS6_hES2_IS6_tES2_IS6_jES2_IS6_mES2_IS6_yES2_IS6_oEEES2_IcS6_EEE5valueESt17from_chars_resultE4typeEPKcSR_RS4_i"); +asm (".hidden _ZSt10from_charsIiENSt9enable_ifIXsrSt5__or_IIS1_IISt7is_sameINSt9remove_cvIT_E4typeEaES2_IS6_sES2_IS6_iES2_IS6_lES2_IS6_xES2_IS6_nEEES1_IIS2_IS6_hES2_IS6_tES2_IS6_jES2_IS6_mES2_IS6_yES2_IS6_oEEES2_IcS6_EEE5valueESt17from_chars_resultE4typeEPKcSR_RS4_i"); @@ -11453,7 +11450,7 @@ +#endif --- libstdc++-v3/src/nonshared17/cow-fs_path.cc.jj 2022-05-12 10:06:51.403502355 +0200 +++ libstdc++-v3/src/nonshared17/cow-fs_path.cc 2022-05-12 17:51:19.637951045 +0200 -@@ -0,0 +1,116 @@ +@@ -0,0 +1,128 @@ +// Copyright (C) 2019-2022 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -11534,12 +11531,12 @@ +//asm (".hidden _ZNKSt10filesystem4path5_List5_Impl4copyEv"); +asm (".hidden _ZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_"); +asm (".hidden _ZNSt10filesystem8__detail24__throw_conversion_errorEv"); -+asm (".hidden _ZTIZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_E5_UCvt"); -+asm (".hidden _ZTSZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_E5_UCvt"); -+asm (".hidden _ZTVZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_E5_UCvt"); -+asm (".hidden _ZZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_EN5_UCvtD0Ev"); -+asm (".hidden _ZZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_EN5_UCvtD1Ev"); -+asm (".hidden _ZZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_EN5_UCvtD2Ev"); ++//asm (".hidden _ZTIZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_E5_UCvt"); ++//asm (".hidden _ZTSZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_E5_UCvt"); ++//asm (".hidden _ZTVZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_E5_UCvt"); ++//asm (".hidden _ZZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_EN5_UCvtD0Ev"); ++//asm (".hidden _ZZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_EN5_UCvtD1Ev"); ++//asm (".hidden _ZZNSt10filesystem4path10_S_convertIwEEDaPKT_S4_EN5_UCvtD2Ev"); +#ifdef __powerpc64__ +//asm (".hidden _ZNSbIwSt11char_traitsIwESaIwEE6resizeEmw"); +//asm (".hidden _ZNSbIwSt11char_traitsIwESaIwEE7reserveEm"); @@ -11570,6 +11567,18 @@ +#ifdef __x86_64__ +asm (".hidden _ZSt16__do_str_codecvtISbIwSt11char_traitsIwESaIwEEcSt7codecvtIwc11__mbstate_tES5_MS6_KFNSt12codecvt_base6resultERS5_PKcSB_RSB_PwSD_RSD_EEbPKT0_SJ_RT_RKT1_RT2_RmT3_"); +#endif ++asm (".hidden _ZNSt10filesystem4path8_CodecvtIwED0Ev"); ++asm (".hidden _ZNSt10filesystem4path8_CodecvtIwED1Ev"); ++asm (".hidden _ZNSt10filesystem4path8_CodecvtIwED2Ev"); ++asm (".hidden _ZNSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EED0Ev"); ++asm (".hidden _ZNSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EED1Ev"); ++asm (".hidden _ZNSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EED2Ev"); ++asm (".hidden _ZTINSt10filesystem4path8_CodecvtIwEE"); ++asm (".hidden _ZTISt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EE"); ++asm (".hidden _ZTSNSt10filesystem4path8_CodecvtIwEE"); ++asm (".hidden _ZTSSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EE"); ++asm (".hidden _ZTVNSt10filesystem4path8_CodecvtIwEE"); ++asm (".hidden _ZTVSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EE"); --- libstdc++-v3/src/nonshared17/memory_resource.cc.jj 2022-05-12 10:06:51.403502355 +0200 +++ libstdc++-v3/src/nonshared17/memory_resource.cc 2022-05-12 10:06:51.403502355 +0200 @@ -0,0 +1,68 @@ @@ -11643,7 +11652,7 @@ +#endif --- libstdc++-v3/src/nonshared17/fs_dir.cc.jj 2022-05-12 10:06:51.404502342 +0200 +++ libstdc++-v3/src/nonshared17/fs_dir.cc 2022-05-12 17:52:31.745989435 +0200 -@@ -0,0 +1,99 @@ +@@ -0,0 +1,98 @@ +// Copyright (C) 2019-2022 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -11737,9 +11746,8 @@ +#endif +asm (".hidden _ZNSt10unique_ptrINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEED1Ev"); +asm (".hidden _ZNSt10unique_ptrINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEED2Ev"); -+#ifdef __i386__ -+//asm (".hidden _ZNSt5dequeINSt10filesystem7__cxx114_DirESaIS2_EE17_M_reallocate_mapEjb"); -+#endif ++asm (".hidden _ZNSt10filesystem7__cxx114_DirC1ERKNS0_4pathEbbbRSt10error_code"); ++asm (".hidden _ZNSt10filesystem7__cxx114_DirC2ERKNS0_4pathEbbbRSt10error_code"); +asm (".hidden _ZNKSt10filesystem7__cxx114_Dir11open_subdirEbbRSt10error_code"); +asm (".hidden _ZNKSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stack12current_pathEv"); +asm (".hidden _ZNSt10filesystem7__cxx1128recursive_directory_iterator7__eraseEPSt10error_code"); @@ -11802,12 +11810,12 @@ +asm (".hidden _ZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_"); +#endif +asm (".hidden _ZNSt10filesystem7__cxx118__detail24__throw_conversion_errorEv"); -+asm (".hidden _ZTIZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); -+asm (".hidden _ZTSZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); -+asm (".hidden _ZTVZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); -+asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD0Ev"); -+asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD1Ev"); -+asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD2Ev"); ++//asm (".hidden _ZTIZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); ++//asm (".hidden _ZTSZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); ++//asm (".hidden _ZTVZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); ++//asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD0Ev"); ++//asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD1Ev"); ++//asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD2Ev"); +#ifdef __powerpc64__ +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm"); +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc"); @@ -12066,7 +12074,7 @@ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ --- libstdc++-v3/src/nonshared17/fs_path.cc.jj 2022-05-12 10:06:51.405502328 +0200 +++ libstdc++-v3/src/nonshared17/fs_path.cc 2022-05-12 19:01:33.346310778 +0200 -@@ -0,0 +1,91 @@ +@@ -0,0 +1,103 @@ +// Copyright (C) 2019-2022 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -12148,16 +12156,28 @@ +//asm (".hidden _ZNSt10filesystem7__cxx114pathaSISt17basic_string_viewIcSt11char_traitsIcEEEERNSt9enable_ifIXsrSt6__and_IJSt6__not_ISt7is_sameINSt9remove_cvIT_E4typeES1_EES9_ISt7is_voidINSt14remove_pointerISC_E4typeEEENS0_8__detail20__constructible_fromISC_vEEEE5valueES1_E4typeERKSC_"); +#endif +#endif -+asm (".hidden _ZTIZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); -+asm (".hidden _ZTSZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); -+asm (".hidden _ZTVZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); -+asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD0Ev"); -+asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD1Ev"); -+asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD2Ev"); ++//asm (".hidden _ZTIZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); ++//asm (".hidden _ZTSZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); ++//asm (".hidden _ZTVZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_E5_UCvt"); ++//asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD0Ev"); ++//asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD1Ev"); ++//asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD2Ev"); +asm (".hidden _ZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_"); +asm (".hidden _ZNSt10filesystem7__cxx118__detail24__throw_conversion_errorEv"); +asm (".hidden _ZNSt12_Destroy_auxILb0EE9__destroyIPNSt10filesystem7__cxx114path5_CmptEEEvT_S7_"); +asm (".hidden _ZNKSt10filesystem7__cxx114path5_List5_Impl4copyEv"); ++asm (".hidden _ZNSt10filesystem7__cxx114path8_CodecvtIwED0Ev"); ++asm (".hidden _ZNSt10filesystem7__cxx114path8_CodecvtIwED1Ev"); ++asm (".hidden _ZNSt10filesystem7__cxx114path8_CodecvtIwED2Ev"); ++asm (".hidden _ZNSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EED0Ev"); ++asm (".hidden _ZNSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EED1Ev"); ++asm (".hidden _ZNSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EED2Ev"); ++asm (".hidden _ZTINSt10filesystem7__cxx114path8_CodecvtIwEE"); ++asm (".hidden _ZTISt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EE"); ++asm (".hidden _ZTSNSt10filesystem7__cxx114path8_CodecvtIwEE"); ++asm (".hidden _ZTSSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EE"); ++asm (".hidden _ZTVNSt10filesystem7__cxx114path8_CodecvtIwEE"); ++asm (".hidden _ZTVSt12codecvt_utf8IwLm1114111ELSt12codecvt_mode0EE"); --- libstdc++-v3/src/nonshared17/cow-string-inst.cc.jj 2022-05-12 10:06:51.405502328 +0200 +++ libstdc++-v3/src/nonshared17/cow-string-inst.cc 2022-05-12 10:06:51.405502328 +0200 @@ -0,0 +1,23 @@ @@ -13108,7 +13128,7 @@ +#include "../c++17/ostream-inst.cc" --- libstdc++-v3/src/nonshared17/floating_to_chars.cc.jj 2022-05-12 10:06:51.407502301 +0200 +++ libstdc++-v3/src/nonshared17/floating_to_chars.cc 2022-05-12 10:06:51.407502301 +0200 -@@ -0,0 +1,88 @@ +@@ -0,0 +1,83 @@ +// Copyright (C) 2019-2022 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -13161,11 +13181,6 @@ +#if defined (__i386__) || defined (__s390x__) +//asm (".hidden _ZNSt8__detail10__to_charsIjEESt15to_chars_resultPcS2_T_i"); //not s390x +#endif -+#if defined (__powerpc64__) || defined (__s390x__) -+asm (".hidden _ZSt8to_charsPcS_g"); -+asm (".hidden _ZSt8to_charsPcS_gSt12chars_format"); -+asm (".hidden _ZSt8to_charsPcS_gSt12chars_formati"); -+#endif +#if !defined (__powerpc64__) && !defined (__s390x__) +asm (".hidden _ZNSt8__detail13__to_chars_16IoEENSt9enable_ifIXsrSt5__or_IIS2_IISt7is_sameINSt9remove_cvIT_E4typeEaES3_IS7_sES3_IS7_iES3_IS7_lES3_IS7_xES3_IS7_nEEES2_IIS3_IS7_hES3_IS7_tES3_IS7_jES3_IS7_mES3_IS7_yES3_IS7_oEEES3_IcS7_EEE5valueESt15to_chars_resultE4typeEPcSR_S5_"); +asm (".hidden _ZNSt8__detail13__to_chars_16IoEENSt9enable_ifIXsrSt5__or_IJS2_IJSt7is_sameINSt9remove_cvIT_E4typeEaES3_IS7_sES3_IS7_iES3_IS7_lES3_IS7_xES3_IS7_nEEES2_IJS3_IS7_hES3_IS7_tES3_IS7_jES3_IS7_mES3_IS7_yES3_IS7_oEEES3_IcS7_EEE5valueESt15to_chars_resultE4typeEPcSR_S5_"); diff --git a/SOURCES/gcc12-libstdc++-docs.patch b/SOURCES/gcc12-libstdc++-docs.patch index 5a27a5d..b6c2d50 100644 --- a/SOURCES/gcc12-libstdc++-docs.patch +++ b/SOURCES/gcc12-libstdc++-docs.patch @@ -4,7 +4,7 @@ FSF

-+ Release 12.1.1 ++ Release 12.2.1 +

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation @@ -17,7 +17,7 @@

- The API documentation, rendered into HTML, can be viewed online + The API documentation, rendered into HTML, can be viewed locally -+ for the 12.1.1 release, ++ for the 12.2.1 release, + online for each GCC release and diff --git a/SOURCES/gcc12-libtsan-s390x.patch b/SOURCES/gcc12-libtsan-s390x.patch deleted file mode 100644 index 4241d43..0000000 --- a/SOURCES/gcc12-libtsan-s390x.patch +++ /dev/null @@ -1,17 +0,0 @@ -commit r12-8527-g7811663964aa7e31c3939b859bbfa2e16919639f -Author: Martin Liska -Date: Wed Jun 29 15:28:07 2022 +0200 - - libsanitizer: cherry-pick 791e0d1bc85d - - 791e0d1bc85d: [compiler-rt] Add NO_EXEC_STACK_DIRECTIVE on s390x - (cherry picked from commit aa87b7541b4c11f59c521154513f844ea6b5c977) - ---- libsanitizer/tsan/tsan_rtl_s390x.S -+++ libsanitizer/tsan/tsan_rtl_s390x.S -@@ -45,3 +45,5 @@ intercept setjmp, _ZN14__interception11real_setjmpE - intercept _setjmp, _ZN14__interception12real__setjmpE - intercept sigsetjmp, _ZN14__interception14real_sigsetjmpE - intercept __sigsetjmp, _ZN14__interception16real___sigsetjmpE -+ -+NO_EXEC_STACK_DIRECTIVE diff --git a/SOURCES/gcc12-pr105551.patch b/SOURCES/gcc12-pr105551.patch deleted file mode 100644 index ce8be26..0000000 --- a/SOURCES/gcc12-pr105551.patch +++ /dev/null @@ -1,28 +0,0 @@ -2022-05-11 Richard Biener - - PR bootstrap/105551 - * opts.cc (finish_options): Also disable var-tracking if - !DWARF2_DEBUGGING_INFO. - ---- gcc/opts.cc -+++ gcc/opts.cc -@@ -1334,11 +1334,15 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, - || opts->x_flag_selective_scheduling2)); - - /* We know which debug output will be used so we can set flag_var_tracking -- and flag_var_tracking_uninit if the user has not specified them. Note -- we have not yet initialized debug_hooks so we might uselessly run -- var-tracking on targets without var_location debug hook support. */ -+ and flag_var_tracking_uninit if the user has not specified them. */ - if (opts->x_debug_info_level < DINFO_LEVEL_NORMAL -- || !dwarf_debuginfo_p (opts)) -+ || !dwarf_debuginfo_p (opts) -+ /* We have not yet initialized debug hooks so match that to check -+ whether we're only doing DWARF2_LINENO_DEBUGGING_INFO. */ -+#ifndef DWARF2_DEBUGGING_INFO -+ || true -+#endif -+ ) - { - if ((opts_set->x_flag_var_tracking && opts->x_flag_var_tracking == 1) - || (opts_set->x_flag_var_tracking_uninit diff --git a/SOURCES/gcc12-pr105991.patch b/SOURCES/gcc12-pr105991.patch deleted file mode 100644 index b9e12f4..0000000 --- a/SOURCES/gcc12-pr105991.patch +++ /dev/null @@ -1,89 +0,0 @@ -commit 6c175b3d170de2bb02b7bd45b3348eec05d28451 -Author: Roger Sayle -Date: Mon Jul 4 13:58:37 2022 +0100 - - PR target/105991: Recognize PLUS and XOR forms of rldimi in rs6000.md. - - This patch addresses PR target/105991 where a change to prefer representing - shifts and adds at the tree-level as multiplications, causes problems for - the rldimi patterns in the powerpc backend. The issue is that rs6000.md - models this pattern using IOR, and some variants that have the equivalent - PLUS or XOR in the RTL fail to match some *rotl4_insert patterns. - This is fixed in this patch by adding a define_insn_and_split to locally - canonicalize the PLUS and XOR forms to the backend's preferred IOR form. - - Backported from master. - - 2022-07-04 Roger Sayle - Marek Polacek - Segher Boessenkool - Kewen Lin - - gcc/ChangeLog - PR target/105991 - * config/rs6000/rs6000.md (rotl3_insert_3): Check that - exact_log2 doesn't return -1 (or zero). - (plus_xor): New code iterator. - (*rotl3_insert_3_): New define_insn_and_split. - - gcc/testsuite/ChangeLog - PR target/105991 - * gcc.target/powerpc/pr105991.c: New test case. - -diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md -index 64049a6e521..6082ded8c31 100644 ---- a/gcc/config/rs6000/rs6000.md -+++ b/gcc/config/rs6000/rs6000.md -@@ -4178,7 +4178,8 @@ (define_insn "rotl3_insert_3" - (match_operand:GPR 4 "const_int_operand" "n")) - (ashift:GPR (match_operand:GPR 1 "gpc_reg_operand" "r") - (match_operand:SI 2 "const_int_operand" "n"))))] -- "INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)" -+ "INTVAL (operands[2]) > 0 -+ && INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)" - { - if (mode == SImode) - return "rlwimi %0,%1,%h2,0,31-%h2"; -@@ -4187,6 +4188,24 @@ (define_insn "rotl3_insert_3" - } - [(set_attr "type" "insert")]) - -+; Canonicalize the PLUS and XOR forms to IOR for rotl3_insert_3 -+(define_code_iterator plus_xor [plus xor]) -+ -+(define_insn_and_split "*rotl3_insert_3_" -+ [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") -+ (plus_xor:GPR -+ (and:GPR (match_operand:GPR 3 "gpc_reg_operand" "0") -+ (match_operand:GPR 4 "const_int_operand" "n")) -+ (ashift:GPR (match_operand:GPR 1 "gpc_reg_operand" "r") -+ (match_operand:SI 2 "const_int_operand" "n"))))] -+ "INTVAL (operands[2]) > 0 -+ && INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)" -+ "#" -+ "&& 1" -+ [(set (match_dup 0) -+ (ior:GPR (and:GPR (match_dup 3) (match_dup 4)) -+ (ashift:GPR (match_dup 1) (match_dup 2))))]) -+ - (define_code_iterator plus_ior_xor [plus ior xor]) - - (define_split -diff --git a/gcc/testsuite/gcc.target/powerpc/pr105991.c b/gcc/testsuite/gcc.target/powerpc/pr105991.c -new file mode 100644 -index 00000000000..0d9d130cb63 ---- /dev/null -+++ b/gcc/testsuite/gcc.target/powerpc/pr105991.c -@@ -0,0 +1,12 @@ -+/* { dg-do compile } */ -+/* { dg-options "-O2" } */ -+/* { dg-require-effective-target lp64 } */ -+unsigned long long -+foo (unsigned long long value) -+{ -+ value &= 0xffffffff; -+ value |= value << 32; -+ return value; -+} -+/* { dg-final { scan-assembler {\mrldimi\M} } } */ -+ diff --git a/SOURCES/gcc12-pr107468.patch b/SOURCES/gcc12-pr107468.patch new file mode 100644 index 0000000..0949b11 --- /dev/null +++ b/SOURCES/gcc12-pr107468.patch @@ -0,0 +1,124 @@ +libstdc++: Update from latest fast_float [PR107468] + +The following patch is a cherry-pick from +https://github.com/fastfloat/fast_float/pull/153 +to restrict fast_float Clinger's fast path to when rounding mode +is FE_TONEAREST. +Using std::fegetround showed in benchmarks too slow, so instead +it uses a check with 2 float additions and comparison to verify +if rounding is FE_TONEAREST. + +2022-11-20 Jakub Jelinek + + PR libstdc++/107468 + * src/c++17/fast_float/fast_float.h (detail::rounds_to_nearest): New + function, taken from https://github.com/fastfloat/fast_float/pull/153. + (from_chars_advanced): Only use Clinger's fast path if + detail::rounds_to_nearest(). + * testsuite/20_util/from_chars/pr107468.cc: New test. + +--- libstdc++-v3/src/c++17/fast_float/fast_float.h.jj 2022-04-28 15:56:18.315632888 +0200 ++++ libstdc++-v3/src/c++17/fast_float/fast_float.h 2022-11-20 18:53:49.570830249 +0100 +@@ -2842,6 +2842,48 @@ from_chars_result parse_infnan(const cha + return answer; + } + ++/** ++ * Returns true if the floating-pointing rounding mode is to 'nearest'. ++ * It is the default on most system. This function is meant to be inexpensive. ++ * Credit : @mwalcott3 ++ */ ++fastfloat_really_inline bool rounds_to_nearest() noexcept { ++ // See ++ // A fast function to check your floating-point rounding mode ++ // https://lemire.me/blog/2022/11/16/a-fast-function-to-check-your-floating-point-rounding-mode/ ++ // ++ // This function is meant to be equivalent to : ++ // prior: #include ++ // return fegetround() == FE_TONEAREST; ++ // However, it is expected to be much faster than the fegetround() ++ // function call. ++ // ++ // The volatile keywoard prevents the compiler from computing the function ++ // at compile-time. ++ // There might be other ways to prevent compile-time optimizations (e.g., asm). ++ // The value does not need to be std::numeric_limits::min(), any small ++ // value so that 1 + x should round to 1 would do (after accounting for excess ++ // precision, as in 387 instructions). ++ static volatile float fmin = std::numeric_limits::min(); ++ float fmini = fmin; // we copy it so that it gets loaded at most once. ++ // ++ // Explanation: ++ // Only when fegetround() == FE_TONEAREST do we have that ++ // fmin + 1.0f == 1.0f - fmin. ++ // ++ // FE_UPWARD: ++ // fmin + 1.0f > 1 ++ // 1.0f - fmin == 1 ++ // ++ // FE_DOWNWARD or FE_TOWARDZERO: ++ // fmin + 1.0f == 1 ++ // 1.0f - fmin < 1 ++ // ++ // Note: This may fail to be accurate if fast-math has been ++ // enabled, as rounding conventions may not apply. ++ return (fmini + 1.0f == 1.0f - fmini); ++} ++ + } // namespace detail + + template +@@ -2870,7 +2912,7 @@ from_chars_result from_chars_advanced(co + answer.ec = std::errc(); // be optimistic + answer.ptr = pns.lastmatch; + // Next is Clinger's fast path. +- if (binary_format::min_exponent_fast_path() <= pns.exponent && pns.exponent <= binary_format::max_exponent_fast_path() && pns.mantissa <=binary_format::max_mantissa_fast_path() && !pns.too_many_digits) { ++ if (binary_format::min_exponent_fast_path() <= pns.exponent && pns.exponent <= binary_format::max_exponent_fast_path() && pns.mantissa <=binary_format::max_mantissa_fast_path() && !pns.too_many_digits && detail::rounds_to_nearest()) { + value = T(pns.mantissa); + if (pns.exponent < 0) { value = value / binary_format::exact_power_of_ten(-pns.exponent); } + else { value = value * binary_format::exact_power_of_ten(pns.exponent); } +--- libstdc++-v3/testsuite/20_util/from_chars/pr107468.cc.jj ++++ libstdc++-v3/testsuite/20_util/from_chars/pr107468.cc +@@ -0,0 +1,42 @@ ++// Copyright (C) 2022 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// . ++ ++// { dg-do run { target c++17 } } ++// { dg-add-options ieee } ++ ++#include ++#include ++#include ++#include ++ ++int ++main() ++{ ++ // FP from_char not available otherwise. ++#if __cpp_lib_to_chars >= 201611L \ ++ && _GLIBCXX_USE_C99_FENV_TR1 \ ++ && defined(FE_DOWNWARD) \ ++ && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) ++ // PR libstdc++/107468 ++ float f; ++ char buf[] = "3.355447e+07"; ++ std::fesetround(FE_DOWNWARD); ++ auto [ptr, ec] = std::from_chars(buf, buf + sizeof(buf) - 1, f, std::chars_format::scientific); ++ VERIFY( ec == std::errc() && ptr == buf + sizeof(buf) - 1 ); ++ VERIFY( f == 33554472.0f ); ++#endif ++} diff --git a/SOURCES/gcc12-static-libquadmath.patch b/SOURCES/gcc12-static-libquadmath.patch new file mode 100644 index 0000000..43974ed --- /dev/null +++ b/SOURCES/gcc12-static-libquadmath.patch @@ -0,0 +1,178 @@ +2022-08-17 Francois-Xavier Coudert + Jakub Jelinek + + PR fortran/46539 +gcc/ + * common.opt (static-libquadmath): New option. + * gcc.cc (driver_handle_option): Always accept -static-libquadmath. + * config/darwin.h (LINK_SPEC): Handle -static-libquadmath. +gcc/fortran/ + * lang.opt (static-libquadmath): New option. + * invoke.texi (-static-libquadmath): Document it. +libgfortran/ + * acinclude.m4 (LIBQUADSPEC): From $FC -static-libgfortran -### + output determine -Bstatic/-Bdynamic, -bstatic/-bdynamic, + -aarchive_shared/-adefault linker support or Darwin remapping + of -lgfortran to libgfortran.a%s and use that around or instead + of -lquadmath in LIBQUADSPEC. + * configure: Regenerated. + +--- gcc/common.opt.jj 2022-04-28 15:56:02.822846833 +0200 ++++ gcc/common.opt 2022-09-29 19:41:37.250880668 +0200 +@@ -3563,6 +3563,10 @@ static-libphobos + Driver + ; Documented for D, but always accepted by driver. + ++static-libquadmath ++Driver ++; Documented for Fortran, but always accepted by driver. ++ + static-libstdc++ + Driver + +--- gcc/gcc.cc.jj 2022-04-28 15:56:04.771819920 +0200 ++++ gcc/gcc.cc 2022-09-29 19:41:37.296880041 +0200 +@@ -4583,12 +4583,14 @@ driver_handle_option (struct gcc_options + case OPT_static_libgcc: + case OPT_shared_libgcc: + case OPT_static_libgfortran: ++ case OPT_static_libquadmath: + case OPT_static_libphobos: + case OPT_static_libstdc__: + /* These are always valid, since gcc.cc itself understands the + first two, gfortranspec.cc understands -static-libgfortran, +- d-spec.cc understands -static-libphobos, and g++spec.cc +- understands -static-libstdc++ */ ++ d-spec.cc understands -static-libphobos, g++spec.cc ++ understands -static-libstdc++ and libgfortran.spec handles ++ -static-libquadmath. */ + validated = true; + break; + +--- gcc/config/darwin.h.jj 2022-06-18 21:56:40.666675606 +0200 ++++ gcc/config/darwin.h 2022-09-29 19:41:37.261880518 +0200 +@@ -443,6 +443,7 @@ extern GTY(()) int darwin_ms_struct; + %:replace-outfile(-lobjc libobjc-gnu.a%s); \ + :%:replace-outfile(-lobjc -lobjc-gnu )}}\ + %{static|static-libgcc|static-libgfortran:%:replace-outfile(-lgfortran libgfortran.a%s)}\ ++ %{static|static-libgcc|static-libquadmath:%:replace-outfile(-lquadmath libquadmath.a%s)}\ + %{static|static-libgcc|static-libphobos:%:replace-outfile(-lgphobos libgphobos.a%s)}\ + %{static|static-libgcc|static-libstdc++|static-libgfortran:%:replace-outfile(-lgomp libgomp.a%s)}\ + %{static|static-libgcc|static-libstdc++:%:replace-outfile(-lstdc++ libstdc++.a%s)}\ +--- gcc/fortran/lang.opt.jj 2022-04-28 15:56:04.579822571 +0200 ++++ gcc/fortran/lang.opt 2022-09-29 19:41:37.279880273 +0200 +@@ -863,6 +863,10 @@ static-libgfortran + Fortran + Statically link the GNU Fortran helper library (libgfortran). + ++static-libquadmath ++Driver ++Statically link the GCC Quad-Precision Math Library (libquadmath). ++ + std=f2003 + Fortran + Conform to the ISO Fortran 2003 standard. +--- gcc/fortran/invoke.texi.jj 2022-04-29 15:51:59.080720092 +0200 ++++ gcc/fortran/invoke.texi 2022-09-29 19:41:37.273880354 +0200 +@@ -170,7 +170,7 @@ and warnings}. + + @item Link Options + @xref{Link Options,,Options for influencing the linking step}. +-@gccoptlist{-static-libgfortran} ++@gccoptlist{-static-libgfortran -static-libquadmath} + + @item Runtime Options + @xref{Runtime Options,,Options for influencing runtime behavior}. +@@ -1425,6 +1425,20 @@ configured, this option has no effect. + @end table + + ++@table @gcctabopt ++@item -static-libquadmath ++@opindex @code{static-libquadmath} ++On systems that provide @file{libquadmath} as a shared and a static ++library, this option forces the use of the static version. If no ++shared version of @file{libquadmath} was built when the compiler was ++configured, this option has no effect. ++ ++Please note that the @file{libquadmath} runtime library is licensed under the ++GNU Lesser General Public License (LGPL), and linking it statically introduces ++requirements when redistributing the resulting binaries. ++@end table ++ ++ + @node Runtime Options + @section Influencing runtime behavior + @cindex options, runtime +--- libgfortran/acinclude.m4.jj 2022-09-29 19:41:37.306879904 +0200 ++++ libgfortran/acinclude.m4 2022-09-29 19:42:42.641988408 +0200 +@@ -338,11 +338,32 @@ AC_DEFUN([LIBGFOR_CHECK_FLOAT128], [ + ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag + ]) + ++ dnl Determine -Bstatic ... -Bdynamic etc. support from gfortran -### stderr. ++ touch conftest1.$ac_objext conftest2.$ac_objext ++ LQUADMATH=-lquadmath ++ $FC -static-libgfortran -### -o conftest \ ++ conftest1.$ac_objext -lgfortran conftest2.$ac_objext 2>&1 >/dev/null \ ++ | grep "conftest1.$ac_objext.*conftest2.$ac_objext" > conftest.cmd ++ if grep "conftest1.$ac_objext.* -Bstatic -lgfortran -Bdynamic .*conftest2.$ac_objext" \ ++ conftest.cmd >/dev/null 2>&1; then ++ LQUADMATH="%{static-libquadmath:-Bstatic} -lquadmath %{static-libquadmath:-Bdynamic}" ++ elif grep "conftest1.$ac_objext.* -bstatic -lgfortran -bdynamic .*conftest2.$ac_objext" \ ++ conftest.cmd >/dev/null 2>&1; then ++ LQUADMATH="%{static-libquadmath:-bstatic} -lquadmath %{static-libquadmath:-bdynamic}" ++ elif grep "conftest1.$ac_objext.* -aarchive_shared -lgfortran -adefault .*conftest2.$ac_objext" \ ++ conftest.cmd >/dev/null 2>&1; then ++ LQUADMATH="%{static-libquadmath:-aarchive_shared} -lquadmath %{static-libquadmath:-adefault}" ++ elif grep "conftest1.$ac_objext.*libgfortran.a .*conftest2.$ac_objext" \ ++ conftest.cmd >/dev/null 2>&1; then ++ LQUADMATH="%{static-libquadmath:libquadmath.a%s;:-lquadmath}" ++ fi ++ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest conftest.cmd ++ + dnl For static libgfortran linkage, depend on libquadmath only if needed. + if test "x$libgfor_cv_have_as_needed" = xyes; then +- LIBQUADSPEC="%{static-libgfortran:$libgfor_cv_as_needed_option} -lquadmath %{static-libgfortran:$libgfor_cv_no_as_needed_option}" ++ LIBQUADSPEC="%{static-libgfortran:$libgfor_cv_as_needed_option} $LQUADMATH %{static-libgfortran:$libgfor_cv_no_as_needed_option}" + else +- LIBQUADSPEC="-lquadmath" ++ LIBQUADSPEC="$LQUADMATH" + fi + if test -f ../libquadmath/libquadmath.la; then + LIBQUADLIB=../libquadmath/libquadmath.la +--- libgfortran/configure.jj 2022-09-29 19:41:37.345879372 +0200 ++++ libgfortran/configure 2022-09-29 19:42:59.878753212 +0200 +@@ -27301,10 +27301,30 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have_as_needed" >&5 + $as_echo "$libgfor_cv_have_as_needed" >&6; } + ++ touch conftest1.$ac_objext conftest2.$ac_objext ++ LQUADMATH=-lquadmath ++ $FC -static-libgfortran -### -o conftest \ ++ conftest1.$ac_objext -lgfortran conftest2.$ac_objext 2>&1 >/dev/null \ ++ | grep "conftest1.$ac_objext.*conftest2.$ac_objext" > conftest.cmd ++ if grep "conftest1.$ac_objext.* -Bstatic -lgfortran -Bdynamic .*conftest2.$ac_objext" \ ++ conftest.cmd >/dev/null 2>&1; then ++ LQUADMATH="%{static-libquadmath:-Bstatic} -lquadmath %{static-libquadmath:-Bdynamic}" ++ elif grep "conftest1.$ac_objext.* -bstatic -lgfortran -bdynamic .*conftest2.$ac_objext" \ ++ conftest.cmd >/dev/null 2>&1; then ++ LQUADMATH="%{static-libquadmath:-bstatic} -lquadmath %{static-libquadmath:-bdynamic}" ++ elif grep "conftest1.$ac_objext.* -aarchive_shared -lgfortran -adefault .*conftest2.$ac_objext" \ ++ conftest.cmd >/dev/null 2>&1; then ++ LQUADMATH="%{static-libquadmath:-aarchive_shared} -lquadmath %{static-libquadmath:-adefault}" ++ elif grep "conftest1.$ac_objext.*libgfortran.a .*conftest2.$ac_objext" \ ++ conftest.cmd >/dev/null 2>&1; then ++ LQUADMATH="%{static-libquadmath:libquadmath.a%s;:-lquadmath}" ++ fi ++ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest conftest.cmd ++ + if test "x$libgfor_cv_have_as_needed" = xyes; then +- LIBQUADSPEC="%{static-libgfortran:$libgfor_cv_as_needed_option} -lquadmath %{static-libgfortran:$libgfor_cv_no_as_needed_option}" ++ LIBQUADSPEC="%{static-libgfortran:$libgfor_cv_as_needed_option} $LQUADMATH %{static-libgfortran:$libgfor_cv_no_as_needed_option}" + else +- LIBQUADSPEC="-lquadmath" ++ LIBQUADSPEC="$LQUADMATH" + fi + if test -f ../libquadmath/libquadmath.la; then + LIBQUADLIB=../libquadmath/libquadmath.la diff --git a/SOURCES/gcc12-testsuite-typo.patch b/SOURCES/gcc12-testsuite-typo.patch new file mode 100644 index 0000000..7218da2 --- /dev/null +++ b/SOURCES/gcc12-testsuite-typo.patch @@ -0,0 +1,41 @@ +From 023c5b36e476976cb3b45ff32c7c64990c5a6d45 Mon Sep 17 00:00:00 2001 +From: Kewen Lin +Date: Thu, 1 Sep 2022 00:27:11 -0500 +Subject: [PATCH] rs6000/test: Fix typo in pr86731-fwrapv-longlong.c [PR106682] + +Commit r12-2266 updated the scanned assembly content from + + "{\mlvx\M|\mlxv\M|\mlxvd2x\M}" + +to + + "{\mp?lxv\M|\mlxv\M|\mlxvd2x\M}" + +for the test case pr86731-fwrapv-longlong.c unexpectedly. + +It's meant to update "lxv" to "p?lxv", should leave the +"lvx" unchanged. So fix the typo accordingly. + + PR testsuite/106682 + +gcc/testsuite/ChangeLog: + + * gcc.target/powerpc/pr86731-fwrapv-longlong.c: Fix typo. +--- + gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c b/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c +index dcb30e1d886..018e1cf9749 100644 +--- a/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c ++++ b/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c +@@ -31,5 +31,5 @@ vector signed long long splats4(void) + + /* { dg-final { scan-assembler-times {\mvspltis[bhw]\M} 0 } } */ + /* { dg-final { scan-assembler-times {\mvsl[bhwd]\M} 0 } } */ +-/* { dg-final { scan-assembler-times {\mp?lxv\M|\mlxv\M|\mlxvd2x\M|\mxxspltidp\M} 2 } } */ ++/* { dg-final { scan-assembler-times {\mp?lxv\M|\mlvx\M|\mlxvd2x\M|\mxxspltidp\M} 2 } } */ + +-- +2.31.1 + diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec index 6d5a56d..03436f3 100644 --- a/SPECS/gcc.spec +++ b/SPECS/gcc.spec @@ -2,17 +2,17 @@ %{?scl:%global __strip %%{_scl_root}/usr/bin/strip} %{?scl:%global __objdump %%{_scl_root}/usr/bin/objdump} %{?scl:%scl_package gcc} -%global DATE 20220628 -%global gitrev 874cb9452c56f1c3b3a7b5bfed93a262504b9856 -%global gcc_version 12.1.1 +%global DATE 20221121 +%global gitrev b3f5a0d53b84ed27cf00cfa2b9c3e2c78935c07d +%global gcc_version 12.2.1 %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. -%global gcc_release 3 -%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e -%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0 +%global gcc_release 4 +%global nvptx_tools_gitrev 472b6e78b3ba918d727698f79911360b7c808247 +%global newlib_cygwin_gitrev a8526cb52bedabd4d6ba4b227a5185627f871aa1 %global mpc_version 1.0.3 -%global isl_version 0.18 +%global isl_version 0.24 %global mpfr_version 3.1.4 %global gmp_version 6.1.0 %global doxygen_version 1.8.0 @@ -51,7 +51,7 @@ %else %global build_go 0 %endif -%ifarch %{ix86} x86_64 %{arm} %{mips} s390 s390x riscv64 +%ifarch %{ix86} x86_64 %{arm} aarch64 %{mips} s390 s390x riscv64 %global build_d 1 %else %global build_d 0 @@ -147,7 +147,7 @@ Summary: GCC version 12 Name: %{?scl_prefix}gcc Version: %{gcc_version} -Release: %{gcc_release}.4%{?dist} +Release: %{gcc_release}.1%{?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 @@ -348,12 +348,9 @@ Patch8: gcc12-no-add-needed.patch Patch9: gcc12-Wno-format-security.patch Patch10: gcc12-rh1574936.patch Patch11: gcc12-d-shared-libphobos.patch -Patch12: gcc12-pr105551.patch -Patch13: gcc12-libtsan-s390x.patch -# This has been backported to GCC 12, so eventually we can drop it. -Patch14: gcc12-pr105991.patch -# For DTS 12.0.z. -Patch15: gcc12-detect-sapphirerapids.patch +Patch12: gcc12-pr107468.patch +Patch15: gcc12-static-libquadmath.patch +Patch16: gcc12-FMA-chains.patch Patch100: gcc12-fortran-fdec-duplicates.patch Patch101: gcc12-fortran-flogical-as-integer.patch @@ -388,6 +385,7 @@ Patch3016: 0019-xfails.patch Patch3017: 0020-more-fixes.patch Patch3018: 0021-libstdc++-disable-tests.patch Patch3019: 0022-libstdc++-revert-behavior.patch +Patch3020: gcc12-testsuite-typo.patch %if 0%{?rhel} == 9 %global nonsharedver 110 @@ -729,10 +727,9 @@ so that there cannot be any synchronization problems. %patch10 -p0 -b .rh1574936~ %endif %patch11 -p0 -b .d-shared-libphobos~ -%patch12 -p0 -b .pr105551~ -%patch13 -p0 -b .libtsan-s390x~ -%patch14 -p1 -b .pr105991~ -%patch15 -p1 -b .detect-spr~ +%patch12 -p0 -b .pr107468~ +%patch15 -p0 -b .static-libquadmath~ +%patch16 -p1 -b .fma~ %if 0%{?rhel} >= 6 %patch100 -p1 -b .fortran-fdec-duplicates~ @@ -794,6 +791,7 @@ cd .. %if 0%{?rhel} <= 7 %patch3019 -p1 -b .dts-test-19~ %endif +%patch3020 -p1 -b .typo find gcc/testsuite -name \*.pr96939~ | xargs rm -f @@ -983,7 +981,7 @@ ISL_FLAG_PIC=-fPIC ISL_FLAG_PIC=-fpic %endif cd isl-build -sed -i 's|libisl|libgcc12privateisl|g' \ +sed -i 's|libisl\([^-]\)|libgcc12privateisl\1|g' \ ../../isl-%{isl_version}/Makefile.{am,in} ../../isl-%{isl_version}/configure \ CC=/usr/bin/gcc CXX=/usr/bin/g++ \ @@ -991,9 +989,9 @@ sed -i 's|libisl|libgcc12privateisl|g' \ make %{?_smp_mflags} make install cd ../isl-install/lib -rm libgcc12privateisl.so{,.15} -mv libgcc12privateisl.so.15.3.0 libisl.so.15 -ln -sf libisl.so.15 libisl.so +rm libgcc12privateisl.so{,.23} +mv libgcc12privateisl.so.23.1.0 libisl.so.23 +ln -sf libisl.so.23 libisl.so cd ../.. %endif @@ -1215,7 +1213,7 @@ make jit.sphinx.install-html jit_htmldir=`pwd`/../../rpm.doc/libgccjit-devel/htm cd .. %if %{build_isl} -cp -a isl-install/lib/libisl.so.15 gcc/ +cp -a isl-install/lib/libisl.so.23 gcc/ %endif # Make generated man pages even if Pod::Man is not new enough @@ -1397,7 +1395,7 @@ ln -sf ../../../../bin/strip $FULLEPATH/strip %endif %if %{build_isl} -cp -a isl-install/lib/libisl.so.15 $FULLPATH/ +cp -a isl-install/lib/libisl.so.23 $FULLPATH/ %endif # fix some things @@ -2102,6 +2100,10 @@ ln -s ../../libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so \ %check cd obj-%{gcc_target_platform} +%ifarch s390x +exit 0 +%endif + %{?scl:PATH=%{_bindir}${PATH:+:${PATH}}} # Test against the system libstdc++.so.6 + libstdc++_nonshared.a combo mv %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++.so.6{,.not_here} @@ -2960,8 +2962,19 @@ fi %endif %changelog -* Thu Dec 1 2022 Marek Polacek 12.1.1-3.4 -- fix Sapphire Rapids detection in host_detect_local_cpu (#2150135) +* Fri Feb 10 2023 Marek Polacek 12.2.1-4.1 +- avoid fma_chain for -march=alderlake and sapphirerapids (#2168916) + +* Wed Nov 23 2022 Marek Polacek 12.2.1-4 +- update from releases/gcc-12 branch (#2110580) +- fix up std::from_chars behavior in rounding modes other than FE_TONEAREST + (PR libstdc++/107468) + +* Tue Oct 18 2022 Marek Polacek 12.1.1-3.4 +- fix pr86731-fwrapv-longlong.c (#2134379) + +* Mon Oct 3 2022 Marek Polacek 12.1.1-3.3 +- add -static-libquadmath (#2094428) * Fri Jul 8 2022 Marek Polacek 12.1.1-3.2 - recognize PLUS and XOR forms of rldimi (PR target/105991, #2095789)