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