From bc012879e8628af92e5a9deb1c4798e3ca133374 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 25 Aug 2022 09:52:22 +0200 Subject: [PATCH 1/3] [PATCH] libstdc++: Mark non-exported function always_inline --- ...8492bee6243a9d10e78fea1a3e423bd5f9cd.patch | 41 +++++++++++++++++++ gcc.spec | 2 + 2 files changed, 43 insertions(+) create mode 100644 gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch diff --git a/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch new file mode 100644 index 00000000000..46c5ba47231 --- /dev/null +++ b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch @@ -0,0 +1,41 @@ +From 03af8492bee6243a9d10e78fea1a3e423bd5f9cd Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Fri, 27 May 2022 12:43:18 +0100 +Subject: [PATCH] libstdc++: Mark non-exported function always_inline + [PR105671] + +This new function was added for gcc 11.1 but is not exported from the +shared library. Depending on inlining decisions, its callers might get +inlined but an external definition be needed for this function. That +then fails to link. + +Since we can't add the export to the gcc-11 release branch now, mark it +always_inline. We can consider exporting it for gcc-13 if/when we bump +the shared library version (and maybe also for gcc-12 which is currently +at the same version as trunk). For now, the attribute will solve the +problem on all affected branches. The function is small enough that +force-inlining it shouldn't cause problems. + +libstdc++-v3/ChangeLog: + + PR libstdc++/105671 + * include/std/sstream (basic_stringbuf::_M_high_mark): Add + always_inline attribute. + +(cherry picked from commit de57440858591a88e8fd7ba2505ca54546c86021) +--- + libstdc++-v3/include/std/sstream | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream +index f21664100ab8..56555ecd98a1 100644 +--- a/libstdc++-v3/include/std/sstream ++++ b/libstdc++-v3/include/std/sstream +@@ -425,6 +425,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 + // This might not be the same character as _M_string.end() because + // basic_stringbuf::overflow might have written to unused capacity + // in _M_string without updating its length. ++ __attribute__((__always_inline__)) + char_type* + _M_high_mark() const _GLIBCXX_NOEXCEPT + { diff --git a/gcc.spec b/gcc.spec index 667240b16b0..99710f1f5a1 100644 --- a/gcc.spec +++ b/gcc.spec @@ -38,10 +38,12 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc +Patch2: gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd %prep %setup -T -b 0 -n %{moduleName} +%patch2 -p1 # Filter out private stuff from RPM requires headers. cat << \EOF > %{name}-req From 87d08bb80c3e87b00daa54263887dc8b0e97d424 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 25 Aug 2022 11:51:28 +0200 Subject: [PATCH 2/3] Update fakesystem.spec --- fakesystem.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/fakesystem.spec b/fakesystem.spec index b0e9063df07..2e254ba6477 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -81,6 +81,7 @@ Provides: perl(Memoize) Provides: perl(Net::Domain) Provides: perl(Net::SMTP) Provides: perl(Term::ANSIColor) +Provides: perl(IO::File) ################################# # Needed by git on CS9 From 87aee09fb2bd310603dfc7652b9a34e5054e4cc1 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 25 Aug 2022 11:51:41 +0200 Subject: [PATCH 3/3] Update fakesystem.spec --- fakesystem.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fakesystem.spec b/fakesystem.spec index 2e254ba6477..e1aace6b93b 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,5 +1,5 @@ ### RPM cms fakesystem 1.0 -## REVISION 1008 +## REVISION 1009 ## NOCOMPILER ## NO_VERSION_SUFFIX