PKGBUILDs/core/binutils/PKGBUILD
2009-09-26 09:35:50 -05:00

46 lines
1.6 KiB
Bash

# Maintainer: Alexander Foremny <alexanderforemny@gmail.com>
# toolchain build order: kernel-headers->glibc->binutils->gcc-libs->gcc->binutils->glibc
pkgname=binutils
pkgver=2.19.1
pkgrel=3
_date=20090205
pkgdesc="A set of programs to assemble and manipulate binary and object files"
arch=('arm')
url="http://www.gnu.org/software/binutils/"
license=('GPL')
groups=('base-devel')
options=('!libtool' '!distcc' '!ccache')
depends=('glibc>=2.9' 'texinfo>=4.13a-3')
source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2)
md5sums=('8fd8a7082814124917289eba9f2b46f1')
build() {
mkdir -p $srcdir/binutils-build
cd $srcdir/binutils-build
CC="gcc -L`pwd`/bfd/.libs/"
../configure --prefix=/usr \
--mandir=/usr/share/man --infodir=/usr/share/info \
--enable-shared || return 1
# fix man files install path
sed -i -e "s:mandir \= \/usr\/share:mandir \= ${pkgdir}\/usr\/share:" ${srcdir}/binutils-build/Makefile || return 1
# fix info files install path
sed -i -e "s:infodir \= \/usr\/share:infodir \= ${pkgdir}\/usr\/share:" ${srcdir}/binutils-build/Makefile || return 1
# This checks the host environment and makes sure all the necessary tools are available to compile Binutils.
make configure-host || return 1
make tooldir=${startdir}/pkg/usr || return 1
make prefix=${startdir}/pkg/usr tooldir=${startdir}/pkg/usr install
install -m 644 ../include/libiberty.h ${startdir}/pkg/usr/include
# Remove these symlinks, with binutils prereleases they are not ABI stable.
# Programs should compile static to the .a file.
rm -f ${startdir}/pkg/usr/lib/lib{bfd,opcodes}.so
}