diff --git a/binutils.spec b/binutils.spec index a29282a..1ffbab7 100644 --- a/binutils.spec +++ b/binutils.spec @@ -19,6 +19,8 @@ Name: binutils BuildRequires: bison dejagnu flex gcc-c++ +# for some gold tests +BuildRequires: bc %if 0%{suse_version} > 1110 BuildRequires: zlib-devel-static %else @@ -344,10 +346,11 @@ mkdir build-dir cd build-dir ../configure %common_flags \ ${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \ - --enable-plugins --enable-shared \ + --enable-plugins \ %ifarch %gold_archs - --enable-gold + --enable-gold \ %endif + --enable-shared make %{?_smp_mflags} all-bfd TARGET-bfd=headers # force reconfiguring (???) rm bfd/Makefile @@ -432,6 +435,7 @@ ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold 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 +# we could eventually use alternatives for /usr/bin/ld if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then rm $RPM_BUILD_ROOT%{_bindir}/ld ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld; diff --git a/enable-targets-gold.diff b/enable-targets-gold.diff index cfba63b..0c8e4d4 100644 --- a/enable-targets-gold.diff +++ b/enable-targets-gold.diff @@ -10,3 +10,16 @@ else targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)" if test "$targ_extra_obj" != ""; then + +--- gold/testsuite/Makefile.in.orig 2011-01-11 16:34:55.000000000 +0100 ++++ gold/testsuite/Makefile.in 2011-01-11 16:35:49.000000000 +0100 +@@ -60,9 +60,7 @@ + @GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_2 = incremental_test.sh \ + @GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_comdat_test.sh gc_tls_test.sh \ + @GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_orphan_section_test.sh \ +-@GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_test.sh \ + @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_keep_unique_test.sh \ +-@GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_safe_test.sh \ + @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_safe_so_test.sh \ + @GCC_TRUE@@NATIVE_LINKER_TRUE@ final_layout.sh \ + @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_preemptible_functions_test.sh \