From 7ad3ac886d384f4221d47606a1e4b228ecd72631 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Fri, 9 Jun 2023 18:15:59 -0400 Subject: [PATCH] Compat patches for GTS 13 Resolves: #2188499 --- gcc.spec | 16 ++++++---------- gcc13-libstdc++-compat.patch | 35 ++++++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/gcc.spec b/gcc.spec index d517693..aaf3c4f 100644 --- a/gcc.spec +++ b/gcc.spec @@ -195,10 +195,8 @@ URL: http://gcc.gnu.org # Need binutils which support -plugin # Need binutils which support .loc view >= 2.30 # Need binutils which support --generate-missing-build-notes=yes >= 2.31 -%if 0%{?scl:1} BuildRequires: %{?scl_prefix}binutils >= 2.31 BuildRequires: %{?scl_prefix}gdb >= 7.4.50 -%endif # While gcc doesn't include statically linked binaries, during testing # -static is used several times. BuildRequires: glibc-static @@ -1075,10 +1073,12 @@ echo '/* GNU ld script INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libstdc++.so.6 -lstdc++_nonshared%{nonsharedver} )' \ > %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++_system.so +%if 0 # Relink libcc1 against -lstdc++_nonshared: sed -i -e '/^postdeps/s/-lstdc++/-lstdc++_system/' libcc1/libtool rm -f libcc1/libcc1.la make -C libcc1 libcc1.la +%endif CC="`%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cc`" CXX="`%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cxx` `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-includes`" @@ -1129,9 +1129,9 @@ cd ../.. # Copy various doc files here and there cd .. mkdir -p rpm.doc/gfortran rpm.doc/libquadmath rpm.doc/libitm -mkdir -p rpm.doc/changelogs/{gcc/cp,gcc/jit,libstdc++-v3,libgomp,libcc1,libatomic,libsanitizer} +mkdir -p rpm.doc/changelogs/{gcc/cp,gcc/jit,libstdc++-v3,libgomp,libatomic,libsanitizer} -for i in {gcc,gcc/cp,gcc/jit,libstdc++-v3,libgomp,libcc1,libatomic,libsanitizer}/ChangeLog*; do +for i in {gcc,gcc/cp,gcc/jit,libstdc++-v3,libgomp,libatomic,libsanitizer}/ChangeLog*; do cp -p $i rpm.doc/changelogs/$i done @@ -1817,7 +1817,6 @@ for f in `find $adirs -maxdepth 1 -a \ -o -name libatomic.a -o -name libasan.a \ -o -name libtsan.a -o -name libubsan.a \ -o -name liblsan.a \ - -o -name libcc1.a \ -o -name libstdc++_nonshared.a \ -o -name libgomp_nonshared.a \ -o -name libgfortran_nonshared.a \ @@ -1834,12 +1833,10 @@ strip -g `find . \( -name libgfortran.a -o -name libgomp.a \ -o -name libquadmath.a -o -name libitm.a \ -o -name libatomic.a -o -name libasan.a \ -o -name libtsan.a -o -name libubsan.a \ - -o -name liblsan.a \ - -o -name libcc1.a \) -a -type f` + -o -name liblsan.a \) -a -type f` popd chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgfortran.so.5.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.* -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* %if %{build_libquadmath} %if 0%{!?scl:1} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.* @@ -1978,8 +1975,6 @@ popd %endif %check -# TODO -exit 0 cd obj-%{gcc_target_platform} %{?scl:PATH=%{_bindir}${PATH:+:${PATH}}} @@ -2860,6 +2855,7 @@ fi - update from releases/gcc-13 branch (#2188499) - GCC 13.1 release - PRs c/107041, target/109566 +- remove libcc1 * Fri Feb 10 2023 Marek Polacek 12.2.1-7.4 - avoid fma_chain for -march=alderlake and sapphirerapids (#2168919) diff --git a/gcc13-libstdc++-compat.patch b/gcc13-libstdc++-compat.patch index e49e0b5..1525a2b 100644 --- a/gcc13-libstdc++-compat.patch +++ b/gcc13-libstdc++-compat.patch @@ -8795,7 +8795,7 @@ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ --- libstdc++-v3/src/nonshared20/tzdb80.cc.jj 2023-05-19 20:25:50.447297532 +0200 +++ libstdc++-v3/src/nonshared20/tzdb80.cc 2023-05-19 19:51:19.200552634 +0200 -@@ -0,0 +1,101 @@ +@@ -0,0 +1,105 @@ +// Copyright The GNU Toolchain Authors. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -8853,7 +8853,9 @@ +asm (".hidden _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPNSt6chrono9time_zoneESt6vectorIS3_SaIS3_EEEENS0_5__ops15_Iter_comp_iterIZNSt6ranges8__detail16__make_comp_projINSB_4lessESt8identityEEDaRT_RT0_EUlOSG_OSI_E_EEEvSG_SG_SI_"); +asm (".hidden _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPNSt6chrono14time_zone_linkESt6vectorIS3_SaIS3_EEEENS0_5__ops15_Iter_comp_iterIZNSt6ranges8__detail16__make_comp_projINSB_4lessESt8identityEEDaRT_RT0_EUlOSG_OSI_E_EEEvSG_SG_SI_"); +asm (".hidden _ZZNSt6ranges8__detail16__make_comp_projINS_4lessEMNSt6chrono9time_zoneEKDoFSt17basic_string_viewIcSt11char_traitsIcEEvEEEDaRT_RT0_ENKUlOSB_OSD_E_clIRS4_SJ_EEbSF_SG_"); -+//asm (".hidden _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPNSt6chrono9time_zoneESt6vectorIS3_SaIS3_EEEENS0_5__ops14_Val_comp_iterIZNSt6ranges8__detail16__make_comp_projINSB_4lessEMS3_KDoFSt17basic_string_viewIcSt11char_traitsIcEEvEEEDaRT_RT0_EUlOSL_OSN_E_EEEvSL_SN_"); ++#if defined(__x86_64__) || defined(__aarch64__) ++asm (".hidden _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPNSt6chrono9time_zoneESt6vectorIS3_SaIS3_EEEENS0_5__ops14_Val_comp_iterIZNSt6ranges8__detail16__make_comp_projINSB_4lessEMS3_KDoFSt17basic_string_viewIcSt11char_traitsIcEEvEEEDaRT_RT0_EUlOSL_OSN_E_EEEvSL_SN_"); ++#endif +asm (".hidden _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPNSt6chrono9time_zoneESt6vectorIS3_SaIS3_EEEENS0_5__ops15_Iter_comp_iterIZNSt6ranges8__detail16__make_comp_projINSB_4lessEMS3_KDoFSt17basic_string_viewIcSt11char_traitsIcEEvEEEDaRT_RT0_EUlOSL_OSN_E_EEEvSL_SL_SN_"); +asm (".hidden _ZZNSt6ranges8__detail16__make_comp_projINS_4lessEMNSt6chrono14time_zone_linkEKDoFSt17basic_string_viewIcSt11char_traitsIcEEvEEEDaRT_RT0_ENKUlOSB_OSD_E_clIRS4_SJ_EEbSF_SG_"); +asm (".hidden _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPNSt6chrono14time_zone_linkESt6vectorIS3_SaIS3_EEEENS0_5__ops15_Iter_comp_iterIZNSt6ranges8__detail16__make_comp_projINSB_4lessEMS3_KDoFSt17basic_string_viewIcSt11char_traitsIcEEvEEEDaRT_RT0_EUlOSL_OSN_E_EEEvSL_SL_SN_"); @@ -8897,6 +8899,8 @@ +asm (".hidden _ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE"); +asm (".hidden _ZZNSt19_Sp_make_shared_tag5_S_tiEvE5__tag"); +asm (".hidden _ZZNSt8__detail18__waiter_pool_base6_S_forEPKvE3__w"); ++asm (".hidden _ZSt23__atomic_wait_address_vIiZNKSt13__atomic_baseIiE4waitEiSt12memory_orderEUlvE_EvPKT_S4_T0_"); ++asm (".hidden _ZNKSt10filesystem7__cxx114path8iteratordeEv"); --- libstdc++-v3/src/nonshared20/Makefile.in.jj 2023-05-19 12:22:56.773881666 +0200 +++ libstdc++-v3/src/nonshared20/Makefile.in 2023-05-19 20:27:53.348560551 +0200 @@ -0,0 +1,791 @@ @@ -9815,7 +9819,7 @@ } // namespace std --- libstdc++-v3/src/nonshared17/floating_from_chars.cc.jj 2023-05-19 12:22:56.798881312 +0200 +++ libstdc++-v3/src/nonshared17/floating_from_chars.cc 2023-05-19 19:52:38.332436134 +0200 -@@ -0,0 +1,46 @@ +@@ -0,0 +1,43 @@ +// Copyright (C) 2019-2023 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -9839,10 +9843,7 @@ +// . + +#include "../c++17/floating_from_chars.cc" -+#if defined(__i386__) || (defined(__powerpc__) && !defined(__powerpc64__)) -+//asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_createERjj"); -+//asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_mutateEjjPKcj"); -+#else ++#if !defined(__i386__) && !defined(__aarch64__) +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_createERmm"); +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_mutateEmmPKcm"); +#endif @@ -9864,7 +9865,7 @@ +asm (".hidden _ZNSt8__detail31__from_chars_alnum_to_val_tableILb0EE5valueE"); --- libstdc++-v3/src/nonshared17/floating_from_chars110.cc.jj 2023-05-19 18:08:44.662186963 +0200 +++ libstdc++-v3/src/nonshared17/floating_from_chars110.cc 2023-05-19 19:46:37.242530879 +0200 -@@ -0,0 +1,32 @@ +@@ -0,0 +1,42 @@ +// Copyright (C) 2019-2023 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -9892,11 +9893,21 @@ +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"); +#ifndef __s390x__ ++#ifndef __aarch64__ +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_createERmm"); ++asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_mutateEmmPKcm"); ++#endif ++#endif ++asm (".hidden _ZNSt8__detail31__from_chars_alnum_to_val_tableILb0EE5valueE"); ++#if defined(__powerpc64__) || defined(__x86_64__) +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE15_M_replace_coldEPcmPKcmm"); +#endif -+asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_mutateEmmPKcm"); -+asm (".hidden _ZNSt8__detail31__from_chars_alnum_to_val_tableILb0EE5valueE"); ++#if defined(__powerpc64__) ++asm (".hidden _ZSt8to_charsPcS_u9__ieee128"); ++asm (".hidden _ZSt8to_charsPcS_u9__ieee128St12chars_format"); ++asm (".hidden _ZSt8to_charsPcS_u9__ieee128St12chars_formati"); ++asm (".hidden _ZSt10from_charsPKcS0_Ru9__ieee128St12chars_format"); ++#endif --- libstdc++-v3/src/nonshared17/cow-fs_ops.cc.jj 2023-05-19 12:22:56.799881298 +0200 +++ libstdc++-v3/src/nonshared17/cow-fs_ops.cc 2023-05-19 19:21:04.451145483 +0200 @@ -0,0 +1,82 @@ @@ -11994,7 +12005,7 @@ +#include "../c++17/string-inst.cc" --- libstdc++-v3/src/nonshared17/floating_to_chars110.cc.jj 2023-05-19 18:08:54.897043256 +0200 +++ libstdc++-v3/src/nonshared17/floating_to_chars110.cc 2023-05-19 19:39:17.219738117 +0200 -@@ -0,0 +1,27 @@ +@@ -0,0 +1,29 @@ +// Copyright (C) 2019-2023 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -12021,7 +12032,9 @@ +#include "../c++17/floating_to_chars.cc" +asm (".hidden _ZSt12__to_chars_iIoENSt9enable_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_EEE5valueESt15to_chars_resultE4typeEPcSQ_S4_i"); +asm (".hidden _ZSt12__to_chars_iIoENSt9enable_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_EEE5valueESt15to_chars_resultE4typeEPcSQ_S4_i"); ++#if !defined(__s390x__) && !defined(__aarch64__) +asm (".hidden _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_"); ++#endif --- libstdc++-v3/src/nonshared17/string-inst110.cc.jj 2023-05-19 20:14:44.341711057 +0200 +++ libstdc++-v3/src/nonshared17/string-inst110.cc 2023-05-19 19:41:57.743474432 +0200 @@ -0,0 +1,37 @@