From e648d817a5bd84b313262ada2a152d8b901745f6 Mon Sep 17 00:00:00 2001 From: zhaoshujian Date: Sat, 14 Sep 2024 14:37:14 +0800 Subject: [PATCH] [bugfix] change libstdc++_nonshared.a version from 80 to 110. Signed-off-by: zhaoshujian --- GCC14-1001-libstdc++-compat.patch | 44 +++++++++++++------------------ gcc-14.spec | 2 +- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/GCC14-1001-libstdc++-compat.patch b/GCC14-1001-libstdc++-compat.patch index 1bbdae5..04e209b 100644 --- a/GCC14-1001-libstdc++-compat.patch +++ b/GCC14-1001-libstdc++-compat.patch @@ -1,9 +1,3 @@ -From 7ec360435ae547b830feeb49c0a0346649f1cf75 Mon Sep 17 00:00:00 2001 -From: zhaoshujian -Date: Tue, 27 Aug 2024 15:56:36 +0800 -Subject: [PATCH] add libstdc++_nonshared patch - - diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 51a08bcc8..c75dda506 100644 --- a/libstdc++-v3/acinclude.m4 @@ -4497,7 +4491,7 @@ index 000000000..3c5ce4aaa +.NOEXPORT: diff --git a/libstdc++-v3/src/nonshared17/cow-fs_dir.cc b/libstdc++-v3/src/nonshared17/cow-fs_dir.cc new file mode 100644 -index 000000000..1af9c4b97 +index 000000000..59538ebfa --- /dev/null +++ b/libstdc++-v3/src/nonshared17/cow-fs_dir.cc @@ -0,0 +1,103 @@ @@ -5070,7 +5064,7 @@ index 000000000..b82540753 +asm (".hidden _ZSt10from_charsIiLi0EESt17from_chars_resultPKcS2_RT_i"); diff --git a/libstdc++-v3/src/nonshared17/floating_from_chars110.cc b/libstdc++-v3/src/nonshared17/floating_from_chars110.cc new file mode 100644 -index 000000000..c687e0e3e +index 000000000..cd788edd6 --- /dev/null +++ b/libstdc++-v3/src/nonshared17/floating_from_chars110.cc @@ -0,0 +1,36 @@ @@ -5105,8 +5099,8 @@ index 000000000..c687e0e3e +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE15_M_replace_coldEPcjPKcjj"); +asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_mutateEjjPKcj"); +#else -+asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE15_M_replace_coldEPcmPKcmm"); -+asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_mutateEmmPKcm"); ++//asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE15_M_replace_coldEPcmPKcmm"); ++//asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE9_M_mutateEmmPKcm"); +#endif +asm (".hidden _ZNSt8__detail31__from_chars_alnum_to_val_tableILb0EE5valueE"); +asm (".hidden _ZSt10from_charsIiLi0EESt17from_chars_resultPKcS2_RT_i"); @@ -5218,7 +5212,7 @@ index 000000000..bcac9787a +#endif diff --git a/libstdc++-v3/src/nonshared17/floating_to_chars110.cc b/libstdc++-v3/src/nonshared17/floating_to_chars110.cc new file mode 100644 -index 000000000..ff2c57c5c +index 000000000..cc196f03c --- /dev/null +++ b/libstdc++-v3/src/nonshared17/floating_to_chars110.cc @@ -0,0 +1,30 @@ @@ -5248,13 +5242,13 @@ index 000000000..ff2c57c5c +#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"); -+asm (".hidden _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_"); ++//asm (".hidden _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_"); +#if !defined(__i386__) +asm (".hidden _ZSt12__to_chars_iIoESt15to_chars_resultPcS1_T_i"); +#endif diff --git a/libstdc++-v3/src/nonshared17/fs_dir.cc b/libstdc++-v3/src/nonshared17/fs_dir.cc new file mode 100644 -index 000000000..616b849c8 +index 000000000..e73ae6bee --- /dev/null +++ b/libstdc++-v3/src/nonshared17/fs_dir.cc @@ -0,0 +1,105 @@ @@ -5521,7 +5515,7 @@ index 000000000..eed139f91 +#endif diff --git a/libstdc++-v3/src/nonshared17/fs_path80.cc b/libstdc++-v3/src/nonshared17/fs_path80.cc new file mode 100644 -index 000000000..6ea0bac35 +index 000000000..e2c0c4305 --- /dev/null +++ b/libstdc++-v3/src/nonshared17/fs_path80.cc @@ -0,0 +1,157 @@ @@ -5636,7 +5630,7 @@ index 000000000..6ea0bac35 +//asm (".hidden _ZZNSt10filesystem7__cxx114path10_S_convertIwEEDaPKT_S5_EN5_UCvtD2Ev"); +asm (".hidden _ZNSt12system_errorC1ESt10error_codeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"); +asm (".hidden _ZNSt12system_errorC2ESt10error_codeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"); -+//asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_"); ++asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_"); +asm (".hidden _ZNSt10filesystem7__cxx114path5_List5beginEv"); +#ifndef __i386__ +//asm (".hidden _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6resizeEmw"); @@ -6810,7 +6804,7 @@ index 000000000..5bec80814 +.NOEXPORT: diff --git a/libstdc++-v3/src/nonshared20/sstream-inst80.cc b/libstdc++-v3/src/nonshared20/sstream-inst80.cc new file mode 100644 -index 000000000..b0b8f19e5 +index 000000000..2cf0a6fe2 --- /dev/null +++ b/libstdc++-v3/src/nonshared20/sstream-inst80.cc @@ -0,0 +1,34 @@ @@ -6838,7 +6832,7 @@ index 000000000..b0b8f19e5 + +#include "../c++20/sstream-inst.cc" +//asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv"); -+//asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_"); ++asm (".hidden _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_"); +//asm (".hidden _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_disposeEv"); +//asm (".hidden _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9_M_assignERKS4_"); +#if defined(__powerpc__) && !defined(__powerpc64__) @@ -6883,7 +6877,7 @@ index 000000000..4be193df7 +asm (".hidden _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED2Ev"); diff --git a/libstdc++-v3/src/nonshared20/tzdb80.cc b/libstdc++-v3/src/nonshared20/tzdb80.cc new file mode 100644 -index 000000000..dc123a2ae +index 000000000..2ad22c55c --- /dev/null +++ b/libstdc++-v3/src/nonshared20/tzdb80.cc @@ -0,0 +1,127 @@ @@ -6926,6 +6920,7 @@ index 000000000..dc123a2ae +asm (".hidden _ZNSt6atomicISt10shared_ptrINSt6chrono9tzdb_list5_NodeEEED1Ev"); +asm (".hidden _ZNSt6chrono9tzdb_list5_Node13_S_head_ownerE"); +asm (".hidden _ZNSt6chrono9tzdb_list5_Node15_S_replace_headESt10shared_ptrIS1_ES3_"); ++//asm (".hidden _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc"); +//asm (".hidden _ZNSt6vectorISt4pairINSt6chrono8sys_infoESt17basic_string_viewIcSt11char_traitsIcEEESaIS7_EE17_M_realloc_insertIJRS2_RS6_EEEvN9__gnu_cxx17__normal_iteratorIPS7_S9_EEDpOT_"); +//asm (".hidden _ZNSt6vectorISt4pairINSt6chrono8sys_infoESt17basic_string_viewIcSt11char_traitsIcEEESaIS7_EE17_M_realloc_insertIIRS2_RS6_EEEvN9__gnu_cxx17__normal_iteratorIPS7_S9_EEDpOT_"); +asm (".hidden _ZNSt6chrono9time_zoneD2Ev"); @@ -7013,7 +7008,6 @@ index 000000000..dc123a2ae +asm (".hidden _ZZNSt19_Sp_make_shared_tag5_S_tiEvE5__tag"); +asm (".hidden _ZZNSt8__detail18__waiter_pool_base6_S_forEPKvE3__w"); +asm (".hidden _ZNSt6vectorISt4pairINSt6chrono8sys_infoESt17basic_string_viewIcSt11char_traitsIcEEESaIS7_EE17_M_realloc_appendIJRS2_RS6_EEEvDpOT_"); -+asm (".hidden _ZNSt6vectorISt4pairINSt6chrono8sys_infoESt17basic_string_viewIcSt11char_traitsIcEEESaIS7_EE17_M_realloc_appendIIRS2_RS6_EEEvDpOT_"); diff --git a/libstdc++-v3/src/nonshared23/Makefile.am b/libstdc++-v3/src/nonshared23/Makefile.am new file mode 100644 index 000000000..0100d53e7 @@ -8873,10 +8867,10 @@ index 000000000..bdda684a1 +#include "../c++26/text_encoding.cc" diff --git a/libstdc++-v3/src/nonshared98/Makefile.am b/libstdc++-v3/src/nonshared98/Makefile.am new file mode 100644 -index 000000000..3d9bcdf28 +index 000000000..b7521fd82 --- /dev/null +++ b/libstdc++-v3/src/nonshared98/Makefile.am -@@ -0,0 +1,102 @@ +@@ -0,0 +1,101 @@ +## Makefile for the C++03 sources of the GNU C++ Standard library. +## +## Copyright (C) 1997-2024 Free Software Foundation, Inc. @@ -8916,7 +8910,6 @@ index 000000000..3d9bcdf28 +# Sources present in the src directory, always present. +sources = \ + extfloat.S \ -+ ios_init.cc \ + locale_facets.cc +sources80 = \ + char8_t-rtti.S \ @@ -8981,10 +8974,10 @@ index 000000000..3d9bcdf28 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ diff --git a/libstdc++-v3/src/nonshared98/Makefile.in b/libstdc++-v3/src/nonshared98/Makefile.in new file mode 100644 -index 000000000..df98a485a +index 000000000..7851ffb80 --- /dev/null +++ b/libstdc++-v3/src/nonshared98/Makefile.in -@@ -0,0 +1,802 @@ +@@ -0,0 +1,801 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + @@ -9108,7 +9101,7 @@ index 000000000..df98a485a +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libnonshared98convenience110_la_LIBADD = -+am__objects_1 = extfloat.lo ios_init.lo locale_facets.lo ++am__objects_1 = extfloat.lo locale_facets.lo +am__objects_2 = +am_libnonshared98convenience110_la_OBJECTS = $(am__objects_1) \ + $(am__objects_2) @@ -9463,7 +9456,6 @@ index 000000000..df98a485a +# Sources present in the src directory, always present. +sources = \ + extfloat.S \ -+ ios_init.cc \ + locale_facets.cc + +sources80 = \ diff --git a/gcc-14.spec b/gcc-14.spec index da2064a..f5701f3 100644 --- a/gcc-14.spec +++ b/gcc-14.spec @@ -174,7 +174,7 @@ Patch1002: GCC14-1002-change-gcc-version.patch Patch1003: GCC14-1003-i386-Add-non-optimize-prefetchi-intrins.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. -%global nonsharedver 80 +%global nonsharedver 110 %ifnarch %{arm} %global _gnu %{nil} %else -- Gitee