blob: e22deb5f99487fd4900f9007f469a5a734cbe26f (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# Contributor: Wojtek Kosior <kwojtus@protonmail.com>
# TODO check if it really breaks on i686 (as some PKGBUILDs suggest) and why
_target=arm-linux-gnueabi
pkgname=$_target-binutils
_pkgver=2.28
pkgver=${_pkgver}.0
_debrel=5
pkgrel=1
pkgdesc='A set of programs to assemble and manipulate binary and object files for the ARM GNU/Linux EABI target'
arch=(i686 x86_64)
url='http://www.gnu.org/software/binutils/'
license=('GPL-3' 'LGPL-3')
groups=('cross-devel')
depends=('glibc>=2.25' 'zlib')
makedepends=(binutils-source=$pkgver)
checkdepends=('dejagnu' 'bc')
options=('staticlibs' '!distcc' '!ccache')
conflicts=(arm-unknown-linux-gnueabi-binutils)
prepare() {
prepare-binutils-source "${srcdir}"
cd "${srcdir}/binutils-$_pkgver"
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
mkdir -p ${srcdir}/binutils-build
}
build() {
cd "${srcdir}/binutils-build"
# There's some gossip about --enable-gold causing fail on i686. Needs checking.
"${srcdir}/binutils-$_pkgver/configure" \
--target=$_target \
--prefix=/usr \
--with-lib-path=/lib:/usr/lib:/usr/local/lib \
--with-bugurl=https://issues.hyperbola.info/ \
--with-sysroot=/usr/$_target \
--prefix=/usr \
--with-gnu-as \
--with-gnu-ld \
--with-pic \
--enable-threads \
--enable-ld=default \
--enable-gold \
--enable-plugins \
--enable-deterministic-archives \
--disable-multilib \
--disable-werror \
--disable-gdb \
--disable-nls
# check the host environment and makes sure all the necessary tools are available
make configure-host
make
}
check() {
cd "${srcdir}/binutils-build"
# unset LDFLAGS as testsuite makes assumptions about which ones are active
# do not abort on errors - manually check log files
make -k LDFLAGS="" check || true
}
package() {
cd "${srcdir}/binutils-build"
make DESTDIR="$pkgdir" install
# Remove manpages for MS Windows tools
rm "$pkgdir"/usr/share/man/man1/$_target-{dlltool,nlmconv,windres,windmc}*
# Remove info documents that conflict with host version
rm -r "$pkgdir"/usr/share/info
# install license files
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 "${srcdir}/binutils-$_pkgver/"COPYING3{,.LIB} \
"${pkgdir}/usr/share/licenses/${pkgname}"
}
|