updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / cross-arm-none-eabi-binutils / PKGBUILD
blobea718bac12dfd4320b8ce8eb53818d514359673a
1 # Maintainer: Matias De la Puente <mfpuente.ar@gmail.com>
2 # based on 'cross-arm-elf-binutils' by Sergej Pupykin <pupykin.s+arch@gmail.com>
4 pkgname=cross-arm-none-eabi-binutils
5 pkgver=2.21.1
6 subversion=a
7 pkgrel=1
8 _xprefix=/usr
9 pkgdesc="A set of programs to assemble and manipulate binary and object files"
10 arch=(i686 x86_64)
11 license=(GPL)
12 options=(!libtool)
13 url="http://sources.redhat.com/binutils"
14 depends=('glibc' 'zlib')
15 source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}${subversion}.tar.bz2)
16 sha256sums=('cdecfa69f02aa7b05fbcdf678e33137151f361313b2f3e48aba925f64eabf654')
18 build() {
19   cd $srcdir/binutils-${pkgver}
21   [ $NOEXTRACT -eq 1 ] || ./configure --prefix=${_xprefix} \
22         --program-prefix=arm-none-eabi- \
23         --enable-shared \
24         --disable-multilib \
25         --with-lib-path=${_xprefix}/lib/binutils/arm-none-eabi \
26         --disable-nls \
27         --target=arm-none-eabi \
28         --host=$CHOST \
29         --build=$CHOST \
30         --with-sysroot=/usr/$CHOST/arm-none-eabi \
31 #       --with-build-sysroot=/usr/i686-pc-linux-gnu/arm-none-eabi/
33 #  mkdir -p $pkgdir/${_xprefix}/lib/binutils
34   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 || return 1
36   make configure-host
37   make tooldir=$pkgdir/${_xprefix}
38   make prefix=$pkgdir/${_xprefix} tooldir=$pkgdir/${_xprefix} install
40   mkdir -p $pkgdir/${_xprefix}/lib/binutils/arm-none-eabi
41   cp -v include/libiberty.h $pkgdir/${_xprefix}/lib/binutils/arm-none-eabi
43   rm -f $pkgdir/${_xprefix}/man/man1/{dlltool,nlmconv,windres}*
45   rm -f $pkgdir/usr/bin/ar
46   rm -f $pkgdir/usr/bin/as
47   rm -f $pkgdir/usr/bin/ld
48   rm -f $pkgdir/usr/bin/nm
49   rm -f $pkgdir/usr/bin/objdump
50   rm -f $pkgdir/usr/bin/ranlib
51   rm -f $pkgdir/usr/bin/strip
52   rm -f $pkgdir/usr/bin/objcopy
53   rm -f $pkgdir/usr/lib/libiberty.a
54   rm -rf $pkgdir/usr/share
55   rm -rf $pkgdir/usr/lib/ldscripts