]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - binutils/binutils.nm
binutils: Update to 2.26
[people/amarx/ipfire-3.x.git] / binutils / binutils.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = binutils
7 version = 2.26
8 release = 1
9
10 maintainer = Michael Tremer <michael.tremer@ipfire.org>
11 groups = Development/Tools
12 url = http://www.gnu.org/software/binutils/
13 license = GPLv2+
14 summary = The GNU Binutils are a collection of binary tools.
15
16 description
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.
19 end
20
21 source_dl = http://ftp.gnu.org/gnu/binutils/
22
23 build
24 requires
25 bison
26 dejagnu
27 flex
28 gcc-c++
29 pakfire-builder >= 0.9.23-5
30 perl
31 texinfo
32 zlib-devel
33 end
34
35 prepare_cmds
36 mkdir -pv %{DIR_SRC}/binutils-build
37
38 # On aarch64 we might use 64KiB pages
39 sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*aarch64.c
40
41 # Suppress the installation of an outdated standards.info file as a newer
42 # one is installed later on in the Autoconf instructions:
43 rm -fv etc/standards.info
44 sed -e '/^INFO/s/standards.info //' -i etc/Makefile.in
45
46 perl -pi -e 's/i\[3-7\]86/i[34567]86/g' */conf*
47 sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in}
48 sed -i -e '/^libopcodes_la_\(DEPENDENCIES\|LIBADD\)/s,$, ../bfd/libbfd.la,' opcodes/Makefile.{am,in}
49
50 # Build libbfd.so and libopcodes.so with -Bsymbolic-functions if possible.
51 if gcc %{CFLAGS} -v --help 2>&1 | grep -q -- -Bsymbolic-functions; then
52 sed -i -e 's/^libbfd_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' bfd/Makefile.{am,in}
53 sed -i -e 's/^libopcodes_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' opcodes/Makefile.{am,in}
54 fi
55 touch */configure
56 end
57
58 configure_options += \
59 --build=%{DISTRO_BUILDTARGET} \
60 --host=%{DISTRO_BUILDTARGET} \
61 --target=%{DISTRO_BUILDTARGET} \
62 --disable-werror \
63 --disable-static \
64 --enable-64-bit-bfd \
65 --enable-plugins \
66 --with-bugurl="http://bugzilla.ipfire.org/"
67
68 build
69 cd %{DIR_SRC}/binutils-build
70 ../%{thisapp}/configure \
71 %{configure_options}
72
73 make tooldir=/usr %{PARALLELISMFLAGS}
74 end
75
76 test
77 cd %{DIR_SRC}/binutils-build
78 make -k check </dev/null || :
79
80 echo "==== RESULTS ===="
81 cat {gas/testsuite/gas,ld/ld,binutils/binutils}.sum
82 end
83
84 install
85 cd %{DIR_SRC}/binutils-build
86 make tooldir=/usr install DESTDIR=%{BUILDROOT}
87
88 cp -fv %{DIR_APP}/include/libiberty.h %{BUILDROOT}/usr/include
89
90 # Prevent packages from linking against libbfd and libopcodes,
91 # because they change too often.
92 rm -rfv %{BUILDROOT}%{libdir}/lib{bfd,opcodes}.so
93
94 # Remove Windows/Novell only man pages.
95 rm -vf %{BUILDROOT}%{mandir}/man1/{dlltool,nlmconv,windres}*
96 end
97
98 # Keep static version of libiberty.
99 keep_libraries
100 %{libdir}/libiberty.a
101 end
102 end
103
104 packages
105 package %{name}
106 provides
107 bundled(libiberty)
108 end
109 end
110
111 package %{name}-devel
112 template DEVEL
113
114 requires
115 binutils = %{thisver}
116 zlib-devel
117 end
118
119 # Don't package libbfd and libopcodes in the -devel package.
120 files
121 /usr/include
122 %{libdir}/*.a
123 end
124 end
125
126 package %{name}-debuginfo
127 template DEBUGINFO
128 end
129 end