From 16a467056b79b101e6a034db0dcde3b74fa060db Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Mon, 8 Sep 2025 21:19:29 -0400 Subject: [PATCH] Fix glibc32 build dependency Harmonize with Fedora and RHEL9 system gcc to make sure it always picks the correct glibc32 from buildroot. Also sync with the c10s spec file. Resolves: RHEL-113182 --- gcc-toolset-15-gcc.spec | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/gcc-toolset-15-gcc.spec b/gcc-toolset-15-gcc.spec index 8eed3af..9e1daed 100644 --- a/gcc-toolset-15-gcc.spec +++ b/gcc-toolset-15-gcc.spec @@ -4,6 +4,7 @@ %global have_scl_utils 0 %endif %global gts_ver 15 +%global gts_next %(v="%{gts_ver}"; echo $((++v))) %{?scl_package:%global scl gcc-toolset-%{gts_ver}} %global scl_prefix gcc-toolset-%{gts_ver}- %if %have_scl_utils @@ -171,7 +172,7 @@ BuildRequires: gcc-toolset-%{gts_ver}-devel Summary: GCC version %{gcc_major} Name: %{?scl_prefix}gcc Version: %{gcc_version} -Release: %{gcc_release}.4%{?dist} +Release: %{gcc_release}.5%{?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 @@ -251,12 +252,10 @@ BuildRequires: libzstd-devel BuildRequires: glibc >= 2.3.90-35 %endif %ifarch %{multilib_64_archs} -# Ensure glibc{,-devel} is installed for both multilib arches -%if 0%{?rhel} < 10 -BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so -%else -BuildRequires: /usr/lib/libc.so /usr/lib64/libc.so +BuildRequires: (glibc32 or glibc-devel(%{__isa_name}-32)) %endif +%ifarch sparcv9 ppc +BuildRequires: (glibc64 or glibc-devel(%{__isa_name}-64)) %endif %ifarch ia64 BuildRequires: libunwind >= 0.98 @@ -300,9 +299,7 @@ Requires: libgcc >= 4.1.2-43 Requires: libgomp >= 4.4.4-13 # lto-wrapper invokes make Requires: make -%if %have_scl_utils -%{?scl:Requires:%scl_runtime} -%endif +Requires: (%{?scl_prefix}runtime >= %{gts_ver} with %{?scl_prefix}runtime < %{gts_next}) AutoReq: true # Various libraries are imported. #1859893 asks us to list them all. Provides: bundled(libiberty) @@ -826,13 +823,6 @@ sed -i '/^GENERATE_TREEVIEW/s/YES/NO/' libstdc++-v3/doc/doxygen/user.cfg.in # Undo the broken autoconf change in recent Fedora versions export CONFIG_SITE=NONE -%if 0%{?rhel} == 10 -# Work around https://issues.redhat.com/browse/RHEL-49348 -%ifarch ppc64le -export GLIBC_TUNABLES=glibc.cpu.hwcaps=-arch_3_1 -%endif -%endif - CC=gcc CXX=g++ OPT_FLAGS="%{optflags}" @@ -2912,6 +2902,9 @@ fi %endif %changelog +* Tue Sep 9 2025 Siddhesh Poyarekar 15.1.1-2.5 +- Fix glibc32 build dependency (RHEL-113182) + * Mon Jun 16 2025 Marek Polacek 15.1.1-2.4 - ship libstdc++.modules.json (RHEL-97095)