From 70e2cd1c58b401ae882e55a8a45e0466f148e6b5 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Mon, 16 Jun 2025 15:41:31 -0400 Subject: [PATCH] Ship libstdc++.modules.json Resolves: RHEL-97043 --- gcc-toolset-15-gcc.spec | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gcc-toolset-15-gcc.spec b/gcc-toolset-15-gcc.spec index b2f20c6..a02ffee 100644 --- a/gcc-toolset-15-gcc.spec +++ b/gcc-toolset-15-gcc.spec @@ -171,7 +171,7 @@ BuildRequires: gcc-toolset-%{gts_ver}-devel Summary: GCC version %{gcc_major} Name: %{?scl_prefix}gcc Version: %{gcc_version} -Release: %{gcc_release}.2%{?dist} +Release: %{gcc_release}.3%{?dist} # License notes for some of the less obvious ones: # gcc/doc/cppinternals.texi: Linux-man-pages-copyleft-2-para # isl: MIT, BSD-2-Clause @@ -694,6 +694,9 @@ to NVidia PTX capable devices if available. %package -n %{?scl_prefix}gcc-plugin-annobin Summary: The annobin plugin for gcc, built by the installed version of gcc Requires: %{?scl_prefix}gcc = %{version}-%{release} +%if 0%{?rhel} <= 8 +BuildRequires: %{?scl_prefix}annobin-plugin-gcc +%endif BuildRequires: rpm-devel, binutils-devel, xz %description -n %{?scl_prefix}gcc-plugin-annobin @@ -986,7 +989,11 @@ CONFIGURE_OPTS="\ --with-long-double-128 \ %endif %ifarch ppc64le +%if 0%{?rhel} < 10 --with-long-double-format=ibm \ +%else + --with-long-double-format=ieee \ +%endif %endif %ifarch sparc --disable-linux-futex \ @@ -1181,7 +1188,11 @@ find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9 %if %{build_annobin_plugin} mkdir annobin-plugin cd annobin-plugin +%if 0%{?rhel} <= 8 +tar xf %{_scl_root}/%{_usrsrc}/annobin/latest-annobin.tar.xz +%else tar xf %{_usrsrc}/annobin/latest-annobin.tar.xz +%endif cd annobin* touch aclocal.m4 configure Makefile.in */configure */config.h.in */Makefile.in ANNOBIN_FLAGS=../../obj-%{gcc_target_platform}/%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags @@ -1480,6 +1491,15 @@ cp -a ../gcc/jit/libgccjit*.h $FULLPATH/include/ /usr/bin/install -c -m 644 objlibgccjit/gcc/doc/libgccjit.info %{buildroot}/%{_infodir}/ gzip -9 %{buildroot}/%{_infodir}/libgccjit.info +rm -f $FULLEPATH/libgdiagnostics.so +cp -a objlibgccjit/gcc/libgdiagnostics.so* %{buildroot}%{_prefix}/%{_lib}/ +cp -a ../gcc/libgdiagnostics*.h %{buildroot}%{_prefix}/include/ +cp -a objlibgccjit/gcc/sarif-replay %{buildroot}%{_prefix}/bin/ + +sed -e 's,\.\./include/,../../../../include/,' \ + %{buildroot}%{_prefix}/%{_lib}/libstdc++.modules.json \ + > $FULLPATH/libstdc++.modules.json + pushd $FULLPATH echo '/* GNU ld script */ %{oformat} @@ -2508,11 +2528,13 @@ fi %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gts-gcc-annobin.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gts-gcc-annobin.so.0 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gts-gcc-annobin.so.0.0.0 +%if 0%{?rhel} > 8 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so.0.0.0 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so.0.0.0 %endif +%endif %files c++ %{_prefix}/bin/%{gcc_target_platform}-g++ @@ -2564,6 +2586,7 @@ fi %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++.modules.json %ifarch sparcv9 ppc %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libstdc++.a @@ -2889,6 +2912,10 @@ fi %endif %changelog +* Mon Jun 16 2025 Marek Polacek 15.1.1-2.3 +- ship libstdc++.modules.json (RHEL-97043) +- configure with --with-long-double-format=ieee (RHEL-97055) + * Thu Jun 12 2025 Siddhesh Poyarekar 15.1.1-2.2 - Tune for z16 on s390x by default on RHEL10 and later (RHEL-94282) - Add AS_NEEDED libstdc++.so.6 when only needed through libstdc++_nonshared