blob: ac242c134a6f464128c4c9f06d60b25698a7f0cf (
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
|
# $Id: PKGBUILD 60835 2011-12-18 22:14:40Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=arm-elf-binutils
pkgver=2.22
pkgrel=1
_xprefix=/usr
pkgdesc="A set of programs to assemble and manipulate binary and object files"
arch=(i686 x86_64)
license=(GPL)
options=(!libtool)
url="http://sources.redhat.com/binutils"
depends=('glibc' 'zlib')
source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.gz)
md5sums=('8b3ad7090e3989810943aa19103fdb83')
build() {
cd $srcdir/binutils-${pkgver}
[ $NOEXTRACT -eq 1 ] || ./configure --prefix=${_xprefix} \
--program-prefix=arm-elf- \
--enable-shared \
--disable-multilib \
--with-lib-path=${_xprefix}/lib/binutils/arm-elf \
--disable-nls \
--target=arm-elf \
--host=$CHOST \
--build=$CHOST \
--with-sysroot=/usr/$CHOST/arm-elf \
# --with-build-sysroot=/usr/i686-pc-linux-gnu/arm-elf/
# mkdir -p $pkgdir/${_xprefix}/lib/binutils
# sed -i 's|know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP));|{know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP));}|' gas/config/tc-arm.c
make configure-host
make tooldir=$pkgdir/${_xprefix}
make prefix=$pkgdir/${_xprefix} tooldir=$pkgdir/${_xprefix} install
mkdir -p $pkgdir/${_xprefix}/lib/binutils/arm-elf
cp -v include/libiberty.h $pkgdir/${_xprefix}/lib/binutils/arm-elf
rm -f $pkgdir/${_xprefix}/man/man1/{dlltool,nlmconv,windres}*
rm -f $pkgdir/usr/bin/ar
rm -f $pkgdir/usr/bin/as
rm -f $pkgdir/usr/bin/ld
rm -f $pkgdir/usr/bin/nm
rm -f $pkgdir/usr/bin/objdump
rm -f $pkgdir/usr/bin/ranlib
rm -f $pkgdir/usr/bin/strip
rm -f $pkgdir/usr/bin/objcopy
rm -f $pkgdir/usr/lib/libiberty.a
rm -rf $pkgdir/usr/share
}
|