packages: binutils/binutils-build-id.patch, binutils/binutils.spec - rel 2; ...

arekm arekm at pld-linux.org
Sun Mar 27 13:53:24 CEST 2011


Author: arekm                        Date: Sun Mar 27 11:53:24 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2; merge gold into main subpackage and use it by default; update build-id patch

---- Files affected:
packages/binutils:
   binutils-build-id.patch (1.1 -> 1.2) , binutils.spec (1.333 -> 1.334) 

---- Diffs:

================================================================
Index: packages/binutils/binutils-build-id.patch
diff -u packages/binutils/binutils-build-id.patch:1.1 packages/binutils/binutils-build-id.patch:1.2
--- packages/binutils/binutils-build-id.patch:1.1	Mon Mar 23 08:47:02 2009
+++ packages/binutils/binutils-build-id.patch	Sun Mar 27 13:53:18 2011
@@ -1,6 +1,26 @@
---- ../binutils-2.19.50.0.1.orig/bfd/elfcode.h	2008-11-26 09:29:54.000000000 +0000
-+++ ./bfd/elfcode.h	2008-11-26 12:01:37.000000000 +0000
-@@ -1170,6 +1170,19 @@ elf_checksum_contents (bfd *abfd,
+--- bfd/compress.c.jj	2010-12-24 11:40:19.000000000 +0100
++++ bfd/compress.c	2011-01-28 15:40:19.869777126 +0100
+@@ -174,7 +174,7 @@ bfd_get_full_section_contents (bfd *abfd
+     case COMPRESS_SECTION_NONE:
+       if (p == NULL)
+ 	{
+-	  p = (bfd_byte *) bfd_malloc (sz);
++	  p = (bfd_byte *) bfd_zmalloc (sz);
+ 	  if (p == NULL)
+ 	    return FALSE;
+ 	}
+@@ -214,7 +214,7 @@ bfd_get_full_section_contents (bfd *abfd
+       if (!ret)
+ 	goto fail_compressed;
+ 
+-      uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size);
++      uncompressed_buffer = (bfd_byte *) bfd_zmalloc (uncompressed_size);
+       if (uncompressed_buffer == NULL)
+ 	goto fail_compressed;
+ 
+--- bfd/elfcode.h.jj	2010-12-31 03:43:21.000000000 +0100
++++ bfd/elfcode.h	2011-01-28 15:34:39.055388479 +0100
+@@ -1158,6 +1158,24 @@ elf_checksum_contents (bfd *abfd,
  
        if (i_shdr.contents)
  	(*process) (i_shdr.contents, i_shdr.sh_size, arg);
@@ -12,7 +32,12 @@
 +	  if (sec != NULL)
 +	    {
 +	      if (sec->contents == NULL)
-+		bfd_malloc_and_get_section (abfd, sec, & sec->contents);
++		{
++		  /* Force rereading from file.  */
++		  sec->flags &= ~SEC_IN_MEMORY;
++		  if (! bfd_malloc_and_get_section (abfd, sec, & sec->contents))
++		    continue;
++		}
 +	      if (sec->contents != NULL)
 +		(*process) (sec->contents, i_shdr.sh_size, arg);
 +	    }

================================================================
Index: packages/binutils/binutils.spec
diff -u packages/binutils/binutils.spec:1.333 packages/binutils/binutils.spec:1.334
--- packages/binutils/binutils.spec:1.333	Thu Mar 10 19:14:47 2011
+++ packages/binutils/binutils.spec	Sun Mar 27 13:53:18 2011
@@ -4,7 +4,6 @@
 %bcond_with	allarchs	# enable all targets
 # define addtargets x,y,z	# build with additional targets x,y,z (e.g. x86_64-linux)
 				# http://sourceware.org/ml/binutils/2008-03/msg00162.html
-%bcond_without	gold		# don't build gold (no C++ dependencies)
 %bcond_without	pax		# without PaX flags (for upstream bugreports)
 #
 Summary:	GNU Binary Utility Development Utilities
@@ -18,7 +17,7 @@
 Summary(uk.UTF-8):	Набір інструментів GNU для побудови виконуваних програм
 Name:		binutils
 Version:	2.21.51.0.7
-Release:	1
+Release:	2
 Epoch:		3
 License:	GPL v3+
 Group:		Development/Tools
@@ -41,7 +40,7 @@
 BuildRequires:	bison
 BuildRequires:	flex
 BuildRequires:	gettext-devel
-%{?with_gold:BuildRequires:	libstdc++-devel >= 6:4.0-1}
+BuildRequires:	libstdc++-devel >= 6:4.0-1
 BuildRequires:	perl-tools-pod
 %ifarch sparc sparc32
 BuildRequires:	sparc32
@@ -49,6 +48,7 @@
 BuildRequires:	texinfo >= 4.2
 Conflicts:	gcc-c++ < 5:3.3
 Conflicts:	modutils < 2.4.17
+Obsoletes:	binutils-gold
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -143,42 +143,6 @@
 uznany za przestarzały, ale jest nadal potrzebny do zbudowania
 niektórych pakietów.
 
-%package gold
-Summary:	GOLD - new version of ELF linker originally developed at Google
-Summary(pl.UTF-8):	GOLD - nowa wersja linkera ELF powstała w Google
-Group:		Development/Tools
-Requires:	%{name} = %{epoch}:%{version}-%{release}
-
-%description gold
-gold is an ELF linker. It is intended to have complete support for ELF
-and to run as fast as possible on modern systems. For normal use it is
-a drop-in replacement for the older GNU linker. gold was originally
-developed at Google, and was contributed to the Free Software
-Foundation in March 2008.
-
-gold supports most of the features of the GNU linker for ELF targets.
-Notable omissions - features of the GNU linker not currently supported
-in gold - are:
- - MEMORY regions in linker scripts
- - MRI compatible linker scripts
- - cross-reference reports (--cref)
- - various other minor options.
-
-%description gold -l pl.UTF-8
-gold to linker dla plików ELF. Powstał z myślą o pełnej obsłudze
-formatu ELF i jak najszybszym działaniu na współczesnych systemach.
-Przy zwykłym użyciu jest zamiennikiem starszego linkera GNU. gold
-początkowo był rozwijany przez Google i został przekazany Free
-Software Foundation w marcu 2008.
-
-gold obsługuje większość funkcji linkera GNU dla plików ELF. Istotne
-braki - możliwości linkera GNU aktualnie nie obsługiwane przez gold -
-to:
-- regiony typu MEMORY w skryptach linkera
-- skrypty linkera kompatybilne z MRI
-- raporty odsyłaczy (--cref)
-- kilka innych, mniej istotnych opcji.
-
 %prep
 %setup -q
 %patch0 -p1
@@ -188,7 +152,7 @@
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
-%patch8 -p1
+%patch8 -p0
 %patch9 -p1
 
 # file contains hacks for ac 2.59 only
@@ -248,10 +212,8 @@
 	%{?with_allarchs:--enable-64-bit-bfd} \
 %endif
 	%{?with_allarchs:--enable-targets=alpha-linux,arm-linux,cris-linux,hppa-linux,i386-linux,ia64-linux,x86_64-linux,m68k-linux,mips-linux,mips64-linux,mips64el-linux,mipsel-linux,ppc-linux,s390-linux,s390x-linux,sh-linux,sparc-linux,sparc64-linux,i386-linuxaout} \
-%if %{with gold}
-	--enable-gold
-%else
-	--disable-gold
+%ifarch %{ix86} %{x8664}
+	--enable-gold=default --enable-ld \
 %endif
 
 %{__make}
@@ -286,12 +248,10 @@
 %find_lang gprof
 touch ld.lang
 %find_lang ld
-%if %{with gold}
 %find_lang gold
-%endif
 %find_lang opcodes
 cat bfd.lang opcodes.lang > %{name}-libs.lang
-cat gas.lang gprof.lang ld.lang >> %{name}.lang
+cat gas.lang gprof.lang ld.lang gold.lang >> %{name}.lang
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -322,6 +282,7 @@
 %attr(755,root,root) %{_bindir}/gprof
 %attr(755,root,root) %{_bindir}/ld
 %attr(755,root,root) %{_bindir}/ld.bfd
+%attr(755,root,root) %{_bindir}/ld.gold
 %attr(755,root,root) %{_bindir}/nm
 %attr(755,root,root) %{_bindir}/objcopy
 %attr(755,root,root) %{_bindir}/objdump
@@ -376,19 +337,15 @@
 %attr(755,root,root) %{_bindir}/gasp
 %{_infodir}/gasp.info*
 
-%if %{with gold}
-%files gold -f gold.lang
-%defattr(644,root,root,755)
-%doc gold/{ChangeLog,README,TODO}
-%attr(755,root,root) %{_bindir}/ld.gold
-%endif
-
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.334  2011/03/27 11:53:18  arekm
+- rel 2; merge gold into main subpackage and use it by default; update build-id patch
+
 Revision 1.333  2011/03/10 18:14:47  qboosh
 - updated to 2.21.51.0.7
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/binutils/binutils-build-id.patch?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/binutils/binutils.spec?r1=1.333&r2=1.334&f=u



More information about the pld-cvs-commit mailing list