# Contributor: Vojtech Horky _pkgname=binutils _target="mips64el-unknown-linux-gnu" # We don't add the target because it duplicates it /usr/lib/$target/$target _sysroot="/usr/lib" unset CFLAGS CXXFLAGS LDFLAGS pkgname=cross-${_target}-binutils pkgver=2.22 pkgrel=7 pkgdesc="A set of programs to assemble and manipulate binary and object files for the MIPS architecture" url="http://www.gnu.org/software/binutils/" arch=('i686' 'x86_64') license=('GPL') depends=('zlib') source=("ftp://ftp.gnu.org/gnu/binutils/${_pkgname}-${pkgver}.tar.bz2") md5sums=('ee0f10756c84979622b992a4a61ea3f5') build() { cd ${srcdir}/${_pkgname}-${pkgver} CFLAGS=" -pipe "\ CXXFLAGS=" -pipe "\ ./configure --build=${CHOST} \ --host=${CHOST} \ --target=${_target} \ --prefix=${_sysroot} \ --disable-nls \ --disable-multilib \ --disable-werror \ --enable-ld=yes \ --enable-gold=no \ --with-sysroot=${_sysroot}/${_target} make } package() { cd ${srcdir}/${_pkgname}-${pkgver} make DESTDIR=${pkgdir} install mv ${pkgdir}/usr/lib/lib/libiberty.a ${pkgdir}${_sysroot}/${_target}/lib/ rm -r ${pkgdir}/usr/lib/lib ${pkgdir}/usr/lib/share }