]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - binutils/binutils.nm
binutils: Fix default RELRO setting for the ARM platforms.
[people/ms/ipfire-3.x.git] / binutils / binutils.nm
index 82b8137538e26aeb71152ba04964b6a73f75a573..993f973b0c25a6ef1ca6125232a73c0f4bacdd9c 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = binutils
-version    = 2.21.51.0.8
-release    = 4
+version    = 2.22.52.0.3
+release    = 2
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
 groups     = Development/Tools
@@ -18,7 +18,10 @@ description
        tools for the manipulation of object code in various object file formats.
 end
 
-source_dl  = http://ftp.gnu.org/gnu/binutils/
+source_dl
+       http://ftp.gnu.org/gnu/binutils/
+       ftp://ftp.kernel.org/pub/linux/devel/binutils
+end
 
 build
        requires
@@ -41,40 +44,49 @@ build
                sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in}
        end
 
+       configure_options += \
+               --build=%{DISTRO_BUILDTARGET} \
+               --host=%{DISTRO_BUILDTARGET} \
+               --target=%{DISTRO_BUILDTARGET} \
+               --disable-werror \
+               --disable-static \
+               --enable-64-bit-bfd \
+               --enable-plugins \
+               --with-bugurl="http://bugzilla.ipfire.org/"
 
        build
-               BINUTILS_TARGET_PLATFORM=$(echo "%{DISTRO_MACHINE}" | sed -e "s/-gnu//")
-
                cd %{DIR_SRC}/binutils-build
                ../%{thisapp}/configure \
-                       --host=${BINUTILS_TARGET_PLATFORM} \
-                       --build=${BINUTILS_TARGET_PLATFORM} \
-                       --target=${BINUTILS_TARGET_PLATFORM} \
-                       --prefix=/usr \
-                       --mandir=/usr/share/man \
-                       --enable-shared \
-                       --disable-nls \
-                       --disable-werror \
-                       --disable-static
+                       %{configure_options}
 
                make tooldir=/usr %{PARALLELISMFLAGS}
        end
 
-       #def test
-       #       # Apply a sed substitution to prevent a testsuite error:
-       #       sed -i 's/getline/get_line/' libiberty/testsuite/test-demangle.c
-       #       cd %{DIR_SRC}/binutils-build && make check
-       #end
+       test
+               cd %{DIR_SRC}/binutils-build
+               make -k check </dev/null || :
+
+               echo "==== RESULTS ===="
+               cat {gas/testsuite/gas,ld/ld,binutils/binutils}.sum
+       end
 
        install
-               cd %{DIR_SRC}/binutils-build && make tooldir=/usr install DESTDIR=%{BUILDROOT}
+               cd %{DIR_SRC}/binutils-build
+               make tooldir=/usr install DESTDIR=%{BUILDROOT}
 
                cp -fv %{DIR_APP}/include/libiberty.h %{BUILDROOT}/usr/include
+
+               # Prevent packages from linking against libbfd and libopcodes,
+               # because they change too often.
+               rm -rfv %{BUILDROOT}%{libdir}/lib{bfd,opcodes}.so
+
+               # Remove Windows/Novell only man pages.
+               rm -vf %{BUILDROOT}%{mandir}/man1/{dlltool,nlmconv,windres}*
        end
 
        # Keep static version of libiberty.
        keep_libraries
-               /usr/lib/libiberty.a
+               %{libdir}/libiberty.a
        end
 end
 
@@ -87,9 +99,11 @@ packages
                # Don't package libbfd and libopcodes in the -devel package.
                files
                        /usr/include
-                       /usr/lib/*.a
-                       /usr/lib/libbfd.so
-                       /usr/lib/libopcodes.so
+                       %{libdir}/*.a
                end
        end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
 end