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
9 pkgdesc="A set of programs to assemble and manipulate binary and object files"
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')
19 cd $srcdir/binutils-${pkgver}
21 [ $NOEXTRACT -eq 1 ] || ./configure --prefix=${_xprefix} \
22 --program-prefix=arm-none-eabi- \
25 --with-lib-path=${_xprefix}/lib/binutils/arm-none-eabi \
27 --target=arm-none-eabi \
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
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