From 91c1cab7f32122bb83c2e114a96df23b5b544ffd Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 29 Jun 2023 12:32:06 +0100 Subject: [PATCH] Spec File: Enable building with GTS-13 gcc. Resolves: #2217819 --- binutils.spec | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/binutils.spec b/binutils.spec index fa8323d..1e2bd2d 100644 --- a/binutils.spec +++ b/binutils.spec @@ -9,7 +9,7 @@ BuildRequires: scl-utils-build Summary: A GNU collection of binary utilities Name: %{?scl_prefix}binutils Version: 2.40 -Release: 9%{?dist} +Release: 12%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -299,10 +299,10 @@ BuildRequires: clang compiler-rt # (libfd.a, libopcodes.a libiberty.a libsframe.a) use the same LTO version as the one # that will be used by consumers of GTS binutils. # Note - during GTS bootstrap these have to be changed to the systemOS versions. -# BuildRequires: %%{?scl_prefix}gcc -# BuildRequires: %%{?scl_prefix}gcc-c++ -# %%define gcc_for_libraries %%{?_scl_root}/usr/bin/gcc -# %%define gxx_for_libraries %%{?_scl_root}/usr/bin/g++ +BuildRequires: %{?scl_prefix}gcc +BuildRequires: %{?scl_prefix}gcc-c++ +%define gcc_for_libraries %{?_scl_root}/usr/bin/gcc +%define gxx_for_libraries %{?_scl_root}/usr/bin/g++ BuildRequires: gcc BuildRequires: gcc-c++ @@ -961,25 +961,27 @@ install_binutils() %make_install DESTDIR=%{buildroot} MAKEINFO=true %endif - # Rebuild libiberty.a with -fPIC. - # Future: Remove it together with its header file, projects should bundle it. + # Rebuild the static libiaries with -fPIC. + # It would be nice to build the static libraries with -fno-lto so that + # they can be used by programs that are built with a different version + # of GCC from the one used to build the libraries, but this will trigger + # warnings from annocheck. + + # Future: Remove libiberty together with its header file, projects should bundle it. %make_build -s -C libiberty clean %set_build_flags %make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libiberty - # Rebuild libbfd.a with -fPIC. # Without the hidden visibility the 3rd party shared libraries would export # the bfd non-stable ABI. %make_build -s -C bfd clean %set_build_flags %make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS -fvisibility=hidden" LD=%gcc_for_libraries -C bfd - # Rebuild libopcodes.a with -fPIC. %make_build -s -C opcodes clean %set_build_flags %make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C opcodes - # Rebuild libsframe.a with -fPIC. %make_build -s -C libsframe clean %set_build_flags %make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libsframe @@ -1107,7 +1109,6 @@ export QA_RPATHS=0x0003 #---------------------------------------------------------------------------- - %if %{with gold} %post gold @@ -1279,6 +1280,10 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Mon Jun 26 2023 Nick Clifton - 2.40-12 +- Spec File: Enable building with GTS-13 gcc. (#2217819) +- Spec File: Sync version number with c8s. + * Mon Jun 12 2023 Nick Clifton - 2.40-9 - Spec File: Use the correct alternatives. (#2209148 and #2213913)