Browse Source

updated binutils to 2.20.51.0.12

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@3269 ec354946-7b23-47d6-9f5a-488ba84defc7
kenta 13 years ago
parent
commit
a731286f97
1 changed files with 74 additions and 25 deletions
  1. 74 25
      b/binutils/binutils-vl.spec

+ 74 - 25
b/binutils/binutils-vl.spec

@@ -10,25 +10,32 @@
 Summary: A GNU collection of binary utilities.
 Summary(ja): GNU 版バイナリユーティリティ集
 Name: binutils
-Version: 2.20.51.0.2
-Release: 5%{?_dist_release}
+Version: 2.20.51.0.12
+Release: 1%{?_dist_release}
 License: GPLv3+
 Group: Development/Tools
 URL: http://sources.redhat.com/binutils
 Source: ftp://ftp.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2
 Source2: binutils-2.19.50.0.1-output-format.sed
-Patch01: binutils-2.20.51.0.2-libtool-lib64.patch
-Patch02: binutils-2.20.51.0.2-ppc64-pie.patch
+Patch01: binutils-2.20.51.0.12-libtool-lib64.patch
+Patch02: binutils-2.20.51.0.12-ppc64-pie.patch
 Patch03: binutils-2.20.51.0.2-ia64-lib64.patch
-Patch04: binutils-2.20.51.0.2-envvar-revert.patch
-Patch05: binutils-2.20.51.0.2-version.patch
-Patch06: binutils-2.20.51.0.2-set-long-long.patch
-Patch07: binutils-2.20.51.0.2-build-id.patch
-Patch08: binutils-2.20.51.0.2-add-needed.patch
-Patch09: binutils-2.20.51.0.2-ifunc-ld-s.patch
-Patch10: binutils-2.20.51.0.2-lwp.patch
-Patch12: binutils-2.20.51.0.2-gas-expr.patch
-Patch13: binutils-2.20.51.0.2-ppc-hidden-plt-relocs.patch
+Patch04: binutils-2.20.51.0.12-version.patch
+Patch05: binutils-2.20.51.0.2-set-long-long.patch
+Patch06: binutils-2.20.51.0.12-build-id.patch
+Patch07: binutils-2.20.51.0.12-copy-osabi.patch
+Patch08: binutils-2.20.51.0.12-sec-merge-emit.patch
+Patch09: binutils-2.20.51.0.12-gold-plugins.patch
+
+%if %{?_dist_release} > vl6
+%define gold_arches %ix86 x86_64
+%endif
+
+%ifarch %gold_arches
+%define build_gold	both
+%else
+%define build_gold	ld
+%endif
 
 %if 0%{?_with_debug:1}
 # Define this if you want to skip the strip step and preserve debug info.
@@ -55,6 +62,16 @@ Requires(preun): /sbin/install-info
 Obsoletes: gnupro
 %endif
 
+# The higher of these two numbers determines the default ld.
+%{!?ld_bfd_priority: %define ld_bfd_priority	50}
+%{!?ld_gold_priority:%define ld_gold_priority	30}
+
+%if "%{build_gold}" == "both"
+Requires(post): coreutils
+Requires(post): alternatives
+Requires(preun): alternatives
+%endif
+
 # On ARM EABI systems, we do want -gnueabi to be part of the
 # target triple.
 %ifnarch %{arm}
@@ -108,15 +125,12 @@ to consider using libelf instead of BFD.
 %patch03 -p0 -b .ia64-lib64~
 %endif
 %endif
-%patch04 -p0 -b .envvar-revert~
-%patch05 -p0 -b .version~
-%patch06 -p0 -b .set-long-long~
-%patch07 -p0 -b .build-id~
-%patch08 -p0 -b .add-needed~
-%patch09 -p0 -b .ifunc-ld-s~
-%patch10 -p0 -b .lwp~
-%patch12 -p0 -b .gas-expr~
-%patch13 -p0 -b .hidden-plt~
+%patch04 -p0 -b .version~
+%patch05 -p0 -b .set-long-long~
+%patch06 -p0 -b .build-id~
+%patch07 -p0 -b .copy-osabi~
+%patch08 -p0 -b .sec-merge-emit~
+%patch09 -p0 -b .gold-plugins~
 
 # We cannot run autotools as there is an exact requirement of autoconf-2.59.
 
@@ -170,7 +184,9 @@ CFLAGS="$CFLAGS -O0 -ggdb2"
 %configure \
   --build=%{_target_platform} --host=%{_target_platform} \
   --target=%{binutils_target} \
-  --disable-gold \
+%if "%{build_gold}" == "both"
+  --enable-gold=%{build_gold} \
+%endif
 %if %{enable_shared}
   --enable-shared \
 %else
@@ -293,7 +309,11 @@ cat gprof.lang >> binutils.lang
 
 if [ -x ld/ld-new ]; then
   %find_lang ld
-  cat ld.lang >> %{?cross}binutils.lang
+  cat ld.lang >> binutils.lang
+fi
+if [ -x gold/ld-new ]; then
+  %find_lang gold
+  cat gold.lang >> binutils.lang
 fi
 
 %clean
@@ -301,6 +321,14 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %post
+%if "%{build_gold}" == "both"
+%__rm -f %{_bindir}/ld
+update-alternatives --install %{_bindir}/ld ld \
+  %{_bindir}/ld.bfd %{ld_bfd_priority}
+update-alternatives --install %{_bindir}/ld ld \
+  %{_bindir}/ld.gold %{ld_gold_priority}
+%endif
+
 /sbin/ldconfig
 if [ -e %{_infodir}/binutils.info.gz ]
 then
@@ -313,6 +341,13 @@ then
 fi
 
 %preun
+%if "%{build_gold}" == "both"
+if [ $1 = 0 ]; then
+update-alternatives --remove ld %{_bindir}/ld.gold
+update-alternatives --remove ld %{_bindir}/ld.bfd
+fi
+%endif
+
 if [ $1 = 0 ] ;then
   if [ -e %{_infodir}/binutils.info.gz ]
   then
@@ -345,7 +380,10 @@ fi
 %files -f binutils.lang
 %defattr(-,root,root,-)
 %doc README
-%{_prefix}/bin/*
+%{_bindir}/*
+%if "%{build_gold}" == "both"
+%ghost %{_bindir}/ld
+%endif
 %{_mandir}/man1/*
 %if %{enable_shared}
 %{_libdir}/lib*.so
@@ -365,6 +403,17 @@ fi
 
 
 %changelog
+* Sun Apr 03 2011 NAKAMURA Kenta <kenta@vinelinux.org> - 2.20.51.0.12-1
+- updated to 2.20.51.0.12
+- updated --build-id patch.
+- dropped redundant patches:
+  binutils-2.20.51.0.2-envvar-revert.patch,
+  binutils-2.20.51.0.2-add-needed.patch,
+  binutils-2.20.51.0.2-ifunc-ld-s.patch,
+  binutils-2.20.51.0.2-lwp.patch,
+  binutils-2.20.51.0.2-gas-expr.patch,
+  binutils-2.20.51.0.2-ppc-hidden-plt-relocs.patch.
+
 * Tue Apr  6 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.20.51.0.2-5
 - rebuilt with gcc-4.4.3-4