Set clang bconf default based on %%toolchain.

Diable LTO when using clang.
Disable check-rpath's test for standard runpaths.
Make the existing tests have the gating effect.
This commit is contained in:
Nick Clifton 2021-06-03 15:01:45 +01:00
parent c82e600f3f
commit fb7c644d99
2 changed files with 32 additions and 3 deletions

View File

@ -39,7 +39,7 @@
Summary: A GNU collection of binary utilities Summary: A GNU collection of binary utilities
Name: binutils%{?name_cross}%{?_with_debug:-debug} Name: binutils%{?name_cross}%{?_with_debug:-debug}
Version: 2.36.1 Version: 2.36.1
Release: 13%{?dist} Release: 14%{?dist}
License: GPLv3+ License: GPLv3+
URL: https://sourceware.org/binutils URL: https://sourceware.org/binutils
@ -114,8 +114,6 @@ URL: https://sourceware.org/binutils
%bcond_without docs %bcond_without docs
# Default: Always run the testsuite. # Default: Always run the testsuite.
%bcond_without testsuite %bcond_without testsuite
# Use clang as the build time compiler. Default: gcc
%bcond_with clang
# Default: support debuginfod. # Default: support debuginfod.
%bcond_without debuginfod %bcond_without debuginfod
@ -123,6 +121,14 @@ URL: https://sourceware.org/binutils
# Change this to use the binutils builtin version instead. # Change this to use the binutils builtin version instead.
%bcond_without systemzlib %bcond_without systemzlib
# Allow the user to override the compiler used to build the binutils.
# The default build compiler is gcc if %%toolchain is not clang.
%if "%toolchain" == "clang"
%bcond_without clang
%else
%bcond_with clang
%endif
%if %{with bootstrap} %if %{with bootstrap}
%undefine with_docs %undefine with_docs
%undefine with_testsuite %undefine with_testsuite
@ -475,6 +481,14 @@ touch */configure
%build %build
echo target is %{binutils_target} echo target is %{binutils_target}
# There is a problem with the clang+libtool+lto combination.
# The LDFLAGS containing -flto are not being passed when linking the
# libbfd.so, so the build fails. Solution: disable LTO.
%if %{with clang}
%global _lto_cflags %{nil}
%define enable_lto 0
%endif
%set_build_flags %set_build_flags
%ifarch %{power64} %ifarch %{power64}
@ -651,6 +665,7 @@ fi
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%install %install
%if %{with docs} %if %{with docs}
%make_install %make_install
%else %else
@ -668,6 +683,10 @@ make prefix=%{buildroot}%{_prefix} infodir=%{buildroot}%{_infodir} install-info
%set_build_flags %set_build_flags
%make_build CFLAGS="-g -fPIC $CFLAGS" -C libiberty %make_build CFLAGS="-g -fPIC $CFLAGS" -C libiberty
%if %{enable_new_dtags}
export LDFLAGS="$RPM_LD_FLAGS -Wl,--enable-new-dtags"
%endif
# Rebuild libbfd.a with -fPIC. # Rebuild libbfd.a with -fPIC.
# Without the hidden visibility the 3rd party shared libraries would export # Without the hidden visibility the 3rd party shared libraries would export
# the bfd non-stable ABI. # the bfd non-stable ABI.
@ -780,6 +799,9 @@ if [ -x gold/ld-new ]; then
cat %{?cross}gold.lang >> %{?cross}binutils.lang cat %{?cross}gold.lang >> %{?cross}binutils.lang
fi fi
# Stop check-rpaths from complaining about standard runpaths.
export QA_RPATHS=0x0001
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%post %post
@ -872,6 +894,12 @@ exit 0
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%changelog %changelog
* Thu Jun 03 2021 Timm Bäder <tabeder@redhat.com> - 2.36.1-14
- Set clang bconf default based on %%toolchain.
- Diable LTO when using clang.
- Disable check-rpath's test for standard runpaths.
- Make the existing tests have the gating effect.
* Tue May 18 2021 Nick Clifton <nickc@redhat.com> - 2.36.1-13 * Tue May 18 2021 Nick Clifton <nickc@redhat.com> - 2.36.1-13
- Increase number of file descriptors available to plugins. (#1918924) - Increase number of file descriptors available to plugins. (#1918924)
- Remove uses of RPATH. - Remove uses of RPATH.

View File

@ -5,6 +5,7 @@ decision_context: bodhi_update_push_stable
subject_type: koji_build subject_type: koji_build
rules: rules:
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation} - !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy --- !Policy
product_versions: product_versions:
- rhel-9 - rhel-9