# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # Force special prefix for Vespa %define _prefix /opt/vespa-deps # Only strip debug info %global _find_debuginfo_opts -g # Version %define ver_major 2 %define ver_minor 35 %define ver_patch 1 %define ver_release 2 Summary : binutils compiled for vespa Name : vespa-binutils Version : %{ver_major}.%{ver_minor}.%{ver_patch} Release : %{ver_release}%{?dist} Group : Development/Tools License : GPLv3+ URL : https://sourceware.org/binutils Source0 : https://ftp.gnu.org/gnu/binutils/binutils-2.35.1.tar.gz %if 0%{?el7} %define _devtoolset_enable /opt/rh/devtoolset-9/enable BuildRequires: devtoolset-9-gcc %endif %if 0%{?el8} %define _devtoolset_enable /opt/rh/gcc-toolset-9/enable BuildRequires: gcc-toolset-9-gcc %endif %if 0%{?fedora} BuildRequires: gcc %endif BuildRequires: bison BuildRequires: flex BuildRequires: gawk BuildRequires: gettext BuildRequires: m4 BuildRequires: make BuildRequires: texinfo BuildRequires: vespa-dwz %description binutils compiled for vespa Binutils is a collection of binary utilities, including ar (for creating, modifying and extracting from archives), as (a family of GNU assemblers), gprof (for displaying call graph profile data), ld (the GNU linker), nm (for listing symbols from object files), objcopy (for copying and translating object files), objdump (for displaying information from object files), ranlib (for generating an index for the contents of an archive), readelf (for displaying detailed information about binary files), size (for listing the section sizes of an object or archive file), strings (for listing printable strings from files), strip (for discarding symbols), and addr2line (for converting addresses to file and line). %prep %setup -n binutils-%{version} %build %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif export PATH=%{_prefix}/bin:$PATH export LD_RUN_PATH=%{_libdir} export LDFLAGS='-Wl,--build-id' CFLAGS='-O2 -g' ./configure --prefix=%{_prefix} --libdir=%{_libdir} make %{?_smp_mflags} %install %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif export PATH=%{_prefix}/bin:$PATH export LD_RUN_PATH=%{_libdir} make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_infodir}/dir %files %{_prefix} %changelog