-Name: cross-i386-binutils
-ExcludeArch: %ix86
+Name: cross-i386-binutils
+ExclusiveArch: %{ix86} x86_64
%define cross 1
%define TARGET i586
BuildRequires: bison
BuildRequires: makeinfo
BuildRequires: zlib-devel-static
Requires(pre): update-alternatives
-Version: 2.24.51
+Version: 2.24.90
Release: 0
#
# RUN_TESTS
#%define binutils_version %(echo %version | sed 's/\\.[0-9]\\{8\\}$//')
Summary: GNU Binutils
License: GFDL-1.3 and GPL-3.0+
-Group: Development/Tools/Building
+Group: Development/Building
Source: binutils-%{version}.tar.bz2
Source1: pre_checkin.sh
Source3: baselibs.conf
%package gold
Summary: The gold linker
License: GPL-3.0+
-Group: Development/Tools/Building
-Requires: binutils = %{version}-%{release}
-%if 0%{!?cross:1}
+Group: Development/Building
+Requires: %{name} = %{version}-%{release}
%define gold_archs %ix86 %arm aarch64 x86_64 ppc ppc64 %sparc
-%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
-Group: Development/Libraries/C and C++
+Group: Development/Building
Requires: binutils = %{version}-%{release}
Requires: zlib-devel
Provides: binutils:/usr/include/bfd.h
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
+%if 0%{!?cross:1}
+%ifarch %arm
+ulimit -Hs unlimited
+ulimit -s unlimited
+%endif
+%endif
+
sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/version.h
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
--with-pic --build=%{HOST}
mkdir build-dir
cd build-dir
+
+%ifarch %arm
+export CONFIG_SHELL="/bin/bash"
+export SHELL="/bin/bash"
+%endif
+
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%endif
%endif
../configure CFLAGS="${RPM_OPT_FLAGS}" \
+ --enable-plugins \
+%ifarch %gold_archs
+ --enable-gold \
+%endif
--prefix=%{_prefix} \
--with-bugurl=http://bugs.opensuse.org/ \
--with-pkgversion="GNU Binutils; %{DIST}" \
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
+
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%ifarch %gold_archs
+ln -sf ../../bin/ld.gold $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%endif
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
-%exclude %{_bindir}/gold
-%exclude %{_bindir}/ld.gold
+%exclude %{_bindir}/*gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%ifarch %gold_archs
%files gold
%defattr(-,root,root)
-%{_bindir}/gold
-%{_bindir}/ld.gold
+%{_bindir}/*gold
+%if 0%{?cross:1}
+%if "%{TARGET}" == "arm"
+%{_prefix}/%{TARGET}-tizen-linux-gnueabi/bin/*gold
+%else
+%{_prefix}/%{TARGET}-tizen-linux/bin/*gold
+%endif
+%else
+%{_prefix}/%{HOST}/bin/*gold
+%endif
%endif
%if 0%{!?cross:1}