]> git.pld-linux.org Git - packages/binutils.git/blobdiff - binutils.spec
- TODO: bug gas/584 (breaks libunwind on amd64)
[packages/binutils.git] / binutils.spec
index 11c7251e843cba9abe5c82dec35e9fe8d10861b2..6fcc0ddd190a69375c4208ebefda92798b812597 100644 (file)
@@ -1,6 +1,9 @@
 #
-# conditional build:
-# _with_allarchs       - enable
+# TODO: bug gas/584
+#
+# Conditional build:
+%bcond_with    allarchs        # enable all targets
+# define addtargets x,y,z      # build with additional targets x,y,z (e.g. x86_64-linux)
 #
 Summary:       GNU Binary Utility Development Utilities
 Summary(de):   GNU Binary Utility Development Utilities
@@ -12,23 +15,24 @@ Summary(ru):        
 Summary(tr):   GNU geliþtirme araçlarý
 Summary(uk):   îÁ¦Ҡ¦ÎÓÔÒÕÍÅÎԦנGNU ÄÌÑ ÐÏÂÕÄÏ×É ×ÉËÏÎÕ×ÁÎÉÈ ÐÒÏÇÒÁÍ
 Name:          binutils
-Version:       2.14.90.0.5
-Release:       2
+Version:       2.15.94.0.1
+Release:       1
 Epoch:         2
 License:       GPL
 Group:         Development/Tools
 Source0:       ftp://ftp.kernel.org/pub/linux/devel/binutils/%{name}-%{version}.tar.bz2
-# Source0-md5: 023e0914937116121c2c34e59e0d1c4b
+# Source0-md5: 4a4cde8e5d0c97249bf6933f095813fe
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: a717d9707ec77d82acb6ec9078c472d6
 Patch0:                %{name}-gasp.patch
 Patch1:                %{name}-info.patch
 Patch2:                %{name}-array-sects-compat.patch
-Patch3:                %{name}-eh-frame-ro.patch
-Patch4:                %{name}-ia64-bootstrap.patch
-Patch5:                %{name}-libtool-relink.patch
+Patch3:                %{name}-libtool-relink.patch
+Patch4:                %{name}-pt_pax_flags.patch
+Patch5:                %{name}-mips-relocs.patch
 URL:           http://sources.redhat.com/binutils/
-BuildRequires: automake
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake >= 1.8.2
 BuildRequires: bison
 BuildRequires: flex
 BuildRequires: gettext-devel
@@ -42,6 +46,10 @@ Conflicts:   gcc-c++ < 5:3.3
 Conflicts:     modutils < 2.4.17
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%ifarch sparc64
+%define                _libdir         /usr/lib
+%endif
+
 %description
 Binutils is a collection of binary utilities, including:
 - ar - create, modify and extract from archives,
@@ -55,17 +63,17 @@ Binutils is a collection of binary utilities, including:
 - addr2line - convert addresses to file and line,
 - nlmconv - convert object code into an NLM.
 
+%description -l es
+binutils es una colectánea de utilitarios necesarios para compilar
+programas. Incluye assembler y linker, así como varios otros programas
+para trabajar con formatos que se puedan ejecutar.
+
 %description -l pl
 Pakiet binutils zawiera zestaw narzêdzi umo¿liwiaj±cych kompilacjê
 programów. Znajduj± siê tutaj miêdzy innymi assembler, konsolidator
 (linker), a tak¿e inne narzêdzia do manipulowania binarnymi plikami
 programów i bibliotek.
 
-%description -l es
-binutils es una colectánea de utilitarios necesarios para compilar
-programas. Incluye assembler y linker, así como varios otros programas
-para trabajar con formatos que se puedan ejecutar.
-
 %description -l pt_BR
 binutils é uma coletânea de utilitários necessários para compilar
 programas. Inclui assembler e linker, assim como vários outros
@@ -85,7 +93,7 @@ binutils - 
 Summary:       GNU Binutils static libraries
 Summary(pl):   Biblioteki statyczne do GNU Binutils
 Group:         Development/Libraries
-Requires:      %{name} = %{epoch}:%{version}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 
 %description static
 Static libraries for GNU Binutils.
@@ -97,7 +105,7 @@ Biblioteki statyczne GNU Binutils.
 Summary:       GASP - old preprocessor for assembly programs
 Summary(pl):   GASP - stary preprocesor dla programów w asemblerze
 Group:         Development/Tools
-Requires:      %{name} = %{epoch}:%{version}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 
 %description gasp
 GASP - old preprocessor for assembly programs. It's officially
@@ -109,18 +117,39 @@ uznany za przestarza
 niektórych pakietów.
 
 %prep
-%setup  -q
+%setup -q
 %patch0 -p1
 %patch1 -p1
 %ifarch %{ix86}
 %patch2 -p1
 %endif
-%patch5 -p1
-# need update:
-#%patch3 -p1
-#%patch4 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p0
 
 %build
+# non-standard regeneration (needed because of gasp patch)
+cd gas
+aclocal
+automake --cygnus Makefile
+automake --cygnus doc/Makefile
+autoconf
+cd ..
+
+# More targets
+TARGETS=
+%ifarch ia64
+TARGETS=i686-linux
+%endif
+# uhm?
+%ifarch %{ix86}
+TARGETS=x86_64-linux
+%endif
+%ifarch sparc
+TARGETS=sparc64-linux
+%endif
+%{?addtargets:TARGETS="%{addtargets}"}
+
 cp -f /usr/share/automake/config.* .
 CFLAGS="%{rpmcflags}"; export CFLAGS
 CC="%{__cc}"; export CC
@@ -131,15 +160,19 @@ sparc32 \
        --enable-shared \
        --disable-debug \
        --prefix=%{_prefix} \
+       --libdir=%{_libdir} \
        --infodir=%{_infodir} \
        --mandir=%{_mandir} \
+       %{!?with_allarchs:`[ -n "${TARGETS}" ] && echo "--enable-targets=${TARGETS}"`} \
 %ifarch sparc
-       --enable-targets=sparc64-linux \
+       --enable-64-bit-bfd \
+%else
+       %{?with_allarchs:--enable-64-bit-bfd} \
 %endif
-       %{?_with_allarchs:--enable-64-bit-bfd} \
-       %{?_with_allarchs:--enable-targets=alpha-linux,arm-linux,cris-linux,hppa-linux,i386-linux,ia64-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}
+       %{?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}
 
-%{__make} tooldir=%{_prefix} all info
+%{__make} all info \
+        tooldir=%{_prefix}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -161,6 +194,7 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,nlmconv,windres}.1
 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 
 install include/libiberty.h $RPM_BUILD_ROOT%{_includedir}
+install libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
 
 # remove evil -L pointing inside builder's home
 perl -pi -e 's@-L[^ ]*/pic @@g' $RPM_BUILD_ROOT%{_libdir}/libbfd.la
@@ -183,11 +217,11 @@ rm -rf $RPM_BUILD_ROOT
 %doc README
 %attr(755,root,root) %{_bindir}/[!g]*
 %attr(755,root,root) %{_bindir}/g[!a]*
-%attr(755,root,root) %{_libdir}/*.so
-%{_libdir}/libiberty.a
-%{_libdir}/lib*.la
+%attr(755,root,root) %{_libdir}*/*.so
+%{_libdir}*/libiberty.a
+%{_libdir}*/lib*.la
 
-%{_libdir}/ldscripts
+%{_prefix}/lib/ldscripts
 %{_includedir}/*.h
 
 %{_infodir}/[!g]*.info*
@@ -204,7 +238,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib[!i]*.a
+%{_libdir}*/lib[!i]*.a
 
 %files gasp
 %defattr(644,root,root,755)
This page took 0.039201 seconds and 4 git commands to generate.