• Download Gist
cross-mipsel-linux-gnu-binutils.PKGBUILD
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
pkgname=cross-mipsel-linux-gnu-binutils
pkgver=2.23.2
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.bz2)
md5sums=('4f8fa651e35ef262edc01d60fb45702e')
 
_target=mipsel-linux-gnu
 
 
build() {
cd $srcdir/binutils-${pkgver}
 
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
 
[ $NOEXTRACT -eq 1 ] || ./configure --prefix=${_xprefix} \
--program-prefix=${_target} \
--enable-shared \
--disable-multilib \
--with-lib-path=${_xprefix}/lib/binutils/${_target} \
--disable-nls \
--target=${_target} \
--host=$CHOST \
--build=$CHOST \
--with-sysroot=/usr/$CHOST/${_target}
 
make configure-host
make tooldir=$pkgdir/${_xprefix}
}
 
package() {
cd $srcdir/binutils-${pkgver}
make prefix=$pkgdir/${_xprefix} tooldir=$pkgdir/${_xprefix} install
 
mkdir -p $pkgdir/${_xprefix}/lib/binutils/${_target}
cp -v include/libiberty.h $pkgdir/${_xprefix}/lib/binutils/${_target}
 
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
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.