1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 maintainer = Michael Tremer <michael.tremer@ipfire.org>
11 groups = Development/Tools
12 url = http://www.gnu.org/software/binutils/
14 summary = The GNU Binutils are a collection of binary tools.
17 The GNU Binary Utilities, or binutils, is a collection of programming
18 tools for the manipulation of object code in various object file formats.
21 source_dl = https://ftp.gnu.org/gnu/binutils/ \
22 https://sourceware.org/pub/binutils/releases/
23 sources = %{thisapp}.tar.xz
31 pakfire-builder >= 0.9.23-5
38 mkdir -pv %{DIR_SRC}/binutils-build
40 # On aarch64 we might use 64KiB pages
41 sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*aarch64.c
43 # Suppress the installation of an outdated standards.info file as a newer
44 # one is installed later on in the Autoconf instructions:
45 rm -fv etc/standards.info
46 sed -e '/^INFO/s/standards.info //' -i etc/Makefile.in
48 perl -pi -e 's/i\[3-7\]86/i[34567]86/g' */conf*
49 sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in}
50 sed -i -e '/^libopcodes_la_\(DEPENDENCIES\|LIBADD\)/s,$, ../bfd/libbfd.la,' opcodes/Makefile.{am,in}
52 # Build libbfd.so and libopcodes.so with -Bsymbolic-functions if possible.
53 if gcc %{CFLAGS} -v --help 2>&1 | grep -q -- -Bsymbolic-functions; then
54 sed -i -e 's/^libbfd_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' bfd/Makefile.{am,in}
55 sed -i -e 's/^libopcodes_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' opcodes/Makefile.{am,in}
60 configure_options += \
61 --build=%{DISTRO_BUILDTARGET} \
62 --host=%{DISTRO_BUILDTARGET} \
63 --target=%{DISTRO_BUILDTARGET} \
68 --with-bugurl="http://bugzilla.ipfire.org/" \
73 cd %{DIR_SRC}/binutils-build
74 ../%{thisapp}/configure \
77 make tooldir=/usr %{PARALLELISMFLAGS}
81 cd %{DIR_SRC}/binutils-build
82 make -k check </dev/null || :
84 echo "==== RESULTS ===="
85 cat {gas/testsuite/gas,ld/ld,binutils/binutils}.sum
89 cd %{DIR_SRC}/binutils-build
90 make tooldir=/usr install DESTDIR=%{BUILDROOT}
92 cp -fv %{DIR_APP}/include/libiberty.h %{BUILDROOT}/usr/include
94 # Prevent packages from linking against libbfd and libopcodes,
95 # because they change too often.
96 rm -rfv %{BUILDROOT}%{libdir}/lib{bfd,opcodes}.so
98 # Remove Windows/Novell only man pages.
99 rm -vf %{BUILDROOT}%{mandir}/man1/{dlltool,nlmconv,windres}*
102 # Keep static version of libiberty.
104 %{libdir}/libiberty.a
115 package %{name}-devel
119 binutils = %{thisver}
123 # Don't package libbfd and libopcodes in the -devel package.
130 package %{name}-debuginfo