2040d52
2040d52
# Note - this is an rpm spec file, but it has been renamed in order to avoid
2040d52
# conflict with the real binutils.spec file.
2040d52
#
4b3b7c0
# Its only use is to build a set of cross-binutils rpms by putting it into
4b3b7c0
# the SPECS directory of an rpmbuild tree, installing the binutils source
4b3b7c0
# rpm into the SOURCES directory and then running:
2040d52
#
c9f1c0e
#    rpmbuild -bb spec.binutils.cross
2040d52
c9f1c0e
Summary: A meta collection of GNU binutils executables for cross builds
2040d52
Name: cross-binutils
2040d52
License: GPLv3+
2040d52
URL: https://sourceware.org/binutils
2040d52
4b3b7c0
#----------------------------------------------------------------------------
4b3b7c0
#
4b3b7c0
# Configurable settings - adjust to match your needs:
4b3b7c0
#
4b3b7c0
4b3b7c0
Version: 2.30
4b3b7c0
Release: 89.el8
4b3b7c0
4b3b7c0
# The list of cross architectures to build.
4b3b7c0
# Note: this list assumes that we are building on an x86_64-linux-gnu host.
4b3b7c0
4b3b7c0
%define arch_list  aarch64-linux-gnu  ppc64le-linux-gnu  s390x-linux-gnu
4b3b7c0
4b3b7c0
#----------------------------------------------------------------------------
4b3b7c0
4b3b7c0
%define binutils_source_rpm   binutils-%{version}-%{release}.src.rpm
4b3b7c0
4b3b7c0
Source: %{binutils_source_rpm}
2040d52
c9f1c0e
# Provides: bundled(libiberty)
2040d52
2040d52
BuildRequires: autoconf automake
2040d52
BuildRequires: perl, sed, coreutils
4b3b7c0
BuildRequires: gcc, bison
2040d52
BuildRequires: gettext, flex, zlib-devel
4b3b7c0
BuildRequires: findutils, texinfo
2040d52
BuildRequires: dejagnu, zlib-static, glibc-static, sharutils, bc
4b3b7c0
# BuildRequires: elfutils-debuginfod-client-devel
2040d52
BuildRequires: rpm-build
2040d52
2040d52
#----------------------------------------------------------------------------
2040d52
2040d52
%description
2040d52
Provides a collection of cross built binutils for the targets
4b3b7c0
supported by RHEL (aarch64, ppc64le, s390x).
2040d52
2040d52
#----------------------------------------------------------------------------
2040d52
2040d52
%build
2040d52
4b3b7c0
# Install the binutils sources.
4b3b7c0
rpm -ivh %{_sourcedir}/%{binutils_source_rpm}
2040d52
4b3b7c0
# Build each set of cross binutils individually.
c9f1c0e
for f in %{arch_list}; do
4b3b7c0
  rpmbuild -bb --define "binutils_target $f" %{_specdir}/binutils.spec --without testsuite --without gold
c9f1c0e
done
2040d52
2040d52
#----------------------------------------------------------------------------
2040d52
%changelog
2040d52
* Wed Nov 11 2020 Nick Clifton  <nickc@redhat.com> - 2.35.1-14
2040d52
- First release of cross binutils rpm.