]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - binutils/binutils.nm
libuecc: New package
[people/ms/ipfire-3.x.git] / binutils / binutils.nm
index bb6919a62afb33d4326544e47d05dd7059caa2e3..451e434d12e78bcd9015f6eec4323a7242aea686 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = binutils
-version    = 2.21.51.0.8
-release    = 2
+version    = 2.24
+release    = 1
 
 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
@@ -26,6 +29,8 @@ build
                dejagnu
                flex
                gcc-c++
+               pakfire-builder >= 0.9.23-5
+               perl
                texinfo
                zlib-devel
        end
@@ -33,50 +38,95 @@ build
        prepare_cmds
                mkdir -pv %{DIR_SRC}/binutils-build
 
+               # On aarch64 we might use 64KiB pages
+               sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*aarch64.c
+
                # Suppress the installation of an outdated standards.info file as a newer
                # one is installed later on in the Autoconf instructions:
                rm -fv etc/standards.info
                sed -e '/^INFO/s/standards.info //' -i etc/Makefile.in
 
+               perl -pi -e 's/i\[3-7\]86/i[34567]86/g' */conf*
                sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in}
+               sed -i -e '/^libopcodes_la_\(DEPENDENCIES\|LIBADD\)/s,$, ../bfd/libbfd.la,' opcodes/Makefile.{am,in}
+
+               # Build libbfd.so and libopcodes.so with -Bsymbolic-functions if possible.
+               if gcc %{CFLAGS} -v --help 2>&1 | grep -q -- -Bsymbolic-functions; then
+                       sed -i -e 's/^libbfd_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' bfd/Makefile.{am,in}
+                       sed -i -e 's/^libopcodes_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' opcodes/Makefile.{am,in}
+               fi
+               touch */configure
        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
-
-               cd %{DIR_SRC}/binutils-build && make tooldir=/usr %{PARALLELISMFLAGS}
+               cd %{DIR_SRC}/binutils-build
+               ../%{thisapp}/configure \
+                       %{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
+               %{libdir}/libiberty.a
        end
 end
 
 packages
        package %{name}
+               provides
+                       bundled(libiberty)
+               end
+       end
 
        package %{name}-devel
                template DEVEL
+
+               requires
+                       binutils = %{thisver}
+                       zlib-devel
+               end
+
+               # Don't package libbfd and libopcodes in the -devel package.
+               files
+                       /usr/include
+                       %{libdir}/*.a
+               end
+       end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
        end
 end