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