diff options
author | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
---|---|---|
committer | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
commit | 0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch) | |
tree | c0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core-testing/binutils/PKGBUILD | |
download | linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2 |
initial import
Diffstat (limited to 'abs/core-testing/binutils/PKGBUILD')
-rw-r--r-- | abs/core-testing/binutils/PKGBUILD | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/abs/core-testing/binutils/PKGBUILD b/abs/core-testing/binutils/PKGBUILD new file mode 100644 index 0000000..f958da6 --- /dev/null +++ b/abs/core-testing/binutils/PKGBUILD @@ -0,0 +1,67 @@ +# $Id: PKGBUILD 2707 2008-06-12 14:03:09Z andyrtr $ +# Maintainer: judd <jvinet@zeroflux.org> + +# compile always twice: first binutils, then gcc, then binutils again + +pkgname=binutils +pkgver=2.18 +pkgrel=17 +_date=20080610 +pkgdesc="A set of programs to assemble and manipulate binary and object files" +arch=('i686' 'x86_64') +url="http://sources.redhat.com/binutils" +license=('GPL') +groups=('base') +options=('!libtool' '!distcc' '!ccache') +depends=('glibc>=2.8-1') +makedepends=('texinfo>=4.12-2') +source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2) +md5sums=('9847b4141a1c99558cfd88dd65182566') + +build() { + # for cvs checkout +# mkdir ${startdir}/src/${pkgname}-${_date} +# cd ${startdir}/src/${pkgname}-${_date} +# export _TAG=binutils-2_18-branch +# export 'CVSROOT=:pserver:anoncvs@sourceware.org:/cvs/src' +# cvs -z9 co -r $_TAG binutils || return 1 +# cd src && tar -cvjf ../binutils-2.18_${_date}.tar.bz2 * +# return 1 + + cd ${startdir}/src + autoconf + + mkdir build + cd build + + CC="gcc -L`pwd`/bfd/.libs/" + if [ "${CARCH}" = "x86_64" ]; then + ../configure --prefix=/usr --enable-shared --enable-64-bit-bfd --disable-multilib + else + ../configure --prefix=/usr --enable-shared + fi + + # 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 + + if [ "${CARCH}" = "x86_64" ]; then + # Rebuild libiberty.a with -fPIC + make -C libiberty clean + make CFLAGS="$CFLAGS -fPIC" -C libiberty + install -m 644 libiberty/libiberty.a ${startdir}/pkg/usr/lib + # Rebuild libbfd.a with -fPIC + make -C bfd clean + make CFLAGS="$CFLAGS -fPIC" -C bfd + install -m 644 bfd/libbfd.a ${startdir}/pkg/usr/lib + fi + + rm -f ${startdir}/pkg/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}* + + # 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 +} |