From 69b0093bda91b5a1399c17336014205a6f9fa699 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 20 Mar 2024 13:41:39 +0000 Subject: [PATCH] Enable cross builds on x86_64 host. Resolves: RHEL-27750 --- binutils.spec | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/binutils.spec b/binutils.spec index 9da6fc6..f41c5a1 100644 --- a/binutils.spec +++ b/binutils.spec @@ -2,7 +2,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?_with_debug:-debug} Version: 2.41 -Release: 34%{?dist} +Release: 35%{?dist} License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later URL: https://sourceware.org/binutils @@ -13,7 +13,7 @@ URL: https://sourceware.org/binutils # --with bootstrap Build with minimal dependencies. # --with clang Force building with CLANG instead of GCC. -# --with crossbuilds Build cross targeted versions of the binutils as well as natives. +# --without crossbuilds Do not build cross targeted versions of the binutils as well as natives. # --with debug Build without optimizations and without splitting the debuginfo into a separate file. # --without debuginfod Disable support for debuginfod. # --without docs Skip building documentation. Default is with docs, except when building a cross binutils. @@ -119,9 +119,13 @@ URL: https://sourceware.org/binutils %global toolchain gcc %endif -# (Do not) create cross targeted versions of the binutils. +# Create cross targeted versions of the binutils. +# For now we only do this for x86_64 hosts. +%ifarch x86_64 +%bcond_without crossbuilds +%else %bcond_with crossbuilds -# %%bcond_without crossbuilds +%endif %if %{with bootstrap} %undefine with_docs @@ -134,7 +138,7 @@ URL: https://sourceware.org/binutils %define enable_shared 0 %endif -# GprofNG currenly onlly supports the x86 and AArch64 architectures. +# GprofNG currenly only supports the x86 and AArch64 architectures. %ifnarch x86_64 aarch64 %undefine with_gprofng %endif @@ -1281,8 +1285,11 @@ exit 0 %if %{with docs} %{_mandir}/man1/ +%if %{with gprofng} %exclude %{_mandir}/man1/gp-* %exclude %{_mandir}/man1/gprofng* +%exclude %{_infodir}/gprofng* +%endif %{_infodir}/as.info.* %{_infodir}/binutils.info.* %{_infodir}/ld.info.* @@ -1291,10 +1298,6 @@ exit 0 %{_infodir}/ctf-spec.info.* %{_infodir}/gprof.info.* %{_infodir}/sframe-spec.info.* - -%if %{with gprofng} -%exclude %{_infodir}/gprofng* -%endif %endif %if %{enable_shared} @@ -1307,11 +1310,7 @@ exit 0 %dir %{_libdir}/bfd-plugins %{_libdir}/bfd-plugins/libdep.so -%endif - -%if %{with debug} -%dir %{_libdir}/bfd-plugins -%{_libdir}/bfd-plugins/libdep.a +%exclude %{_libdir}/bfd-plugins/libdep.a %endif %files devel @@ -1370,6 +1369,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Mon Mar 18 2024 Nick Clifton - 2.41-35 +- Enable cross builds. (RHEL-27750) + * Mon Feb 12 2024 Nick Clifton - 2.41-34 - Backport commits 5a635f1f59ad and 41e115853eef to fix some APX issues. - Add top-level multilib.am file.