]>
Commit | Line | Data |
---|---|---|
166a6c21 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
166a6c21 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = binutils |
602900c1 | 7 | version = 2.24 |
4c4a5d3c | 8 | release = 1 |
166a6c21 | 9 | |
802ea3af MT |
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. | |
166a6c21 | 15 | |
802ea3af MT |
16 | description |
17 | The GNU Binary Utilities, or binutils, is a collection of programming | |
166a6c21 | 18 | tools for the manipulation of object code in various object file formats. |
802ea3af MT |
19 | end |
20 | ||
0c98d65a MT |
21 | source_dl |
22 | http://ftp.gnu.org/gnu/binutils/ | |
23 | ftp://ftp.kernel.org/pub/linux/devel/binutils | |
24 | end | |
802ea3af MT |
25 | |
26 | build | |
27 | requires | |
28 | bison | |
29 | dejagnu | |
30 | flex | |
31 | gcc-c++ | |
e5e21531 | 32 | pakfire-builder >= 0.9.23-5 |
602900c1 | 33 | perl |
802ea3af MT |
34 | texinfo |
35 | zlib-devel | |
36 | end | |
37 | ||
38 | prepare_cmds | |
39 | mkdir -pv %{DIR_SRC}/binutils-build | |
40 | ||
602900c1 MT |
41 | # On aarch64 we might use 64KiB pages |
42 | sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*aarch64.c | |
43 | ||
802ea3af MT |
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 | ||
602900c1 | 49 | perl -pi -e 's/i\[3-7\]86/i[34567]86/g' */conf* |
802ea3af | 50 | sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in} |
602900c1 MT |
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 | |
802ea3af MT |
59 | end |
60 | ||
bb86d46e | 61 | configure_options += \ |
f71c9576 MT |
62 | --build=%{DISTRO_BUILDTARGET} \ |
63 | --host=%{DISTRO_BUILDTARGET} \ | |
bb86d46e MT |
64 | --target=%{DISTRO_BUILDTARGET} \ |
65 | --disable-werror \ | |
f71c9576 MT |
66 | --disable-static \ |
67 | --enable-64-bit-bfd \ | |
68 | --enable-plugins \ | |
69 | --with-bugurl="http://bugzilla.ipfire.org/" | |
802ea3af MT |
70 | |
71 | build | |
68b0def9 MT |
72 | cd %{DIR_SRC}/binutils-build |
73 | ../%{thisapp}/configure \ | |
bb86d46e | 74 | %{configure_options} |
68b0def9 MT |
75 | |
76 | make tooldir=/usr %{PARALLELISMFLAGS} | |
802ea3af MT |
77 | end |
78 | ||
0c98d65a MT |
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 | |
802ea3af MT |
86 | |
87 | install | |
0c98d65a MT |
88 | cd %{DIR_SRC}/binutils-build |
89 | make tooldir=/usr install DESTDIR=%{BUILDROOT} | |
802ea3af MT |
90 | |
91 | cp -fv %{DIR_APP}/include/libiberty.h %{BUILDROOT}/usr/include | |
d5518e81 MT |
92 | |
93 | # Prevent packages from linking against libbfd and libopcodes, | |
94 | # because they change too often. | |
bb86d46e | 95 | rm -rfv %{BUILDROOT}%{libdir}/lib{bfd,opcodes}.so |
0c98d65a MT |
96 | |
97 | # Remove Windows/Novell only man pages. | |
98 | rm -vf %{BUILDROOT}%{mandir}/man1/{dlltool,nlmconv,windres}* | |
802ea3af | 99 | end |
68b0def9 MT |
100 | |
101 | # Keep static version of libiberty. | |
102 | keep_libraries | |
bb86d46e | 103 | %{libdir}/libiberty.a |
68b0def9 | 104 | end |
802ea3af MT |
105 | end |
106 | ||
107 | packages | |
108 | package %{name} | |
e5e21531 MT |
109 | provides |
110 | bundled(libiberty) | |
111 | end | |
112 | end | |
974699b4 MT |
113 | |
114 | package %{name}-devel | |
115 | template DEVEL | |
f45434a7 | 116 | |
e5e21531 MT |
117 | requires |
118 | binutils = %{thisver} | |
119 | zlib-devel | |
120 | end | |
121 | ||
f45434a7 MT |
122 | # Don't package libbfd and libopcodes in the -devel package. |
123 | files | |
124 | /usr/include | |
56c5b2e4 | 125 | %{libdir}/*.a |
f45434a7 | 126 | end |
802ea3af | 127 | end |
1f9bc2f0 MT |
128 | |
129 | package %{name}-debuginfo | |
130 | template DEBUGINFO | |
131 | end | |
802ea3af | 132 | end |