diff options
author | Roman Beslik | 2015-07-03 16:58:11 +0300 |
---|---|---|
committer | Roman Beslik | 2015-07-03 16:58:11 +0300 |
commit | 4e63f87a17a9105ee8098219f8d98104eb3f526a (patch) | |
tree | bb8489d675f52fdf11a83218e9b8fee5df055834 | |
download | aur-4e63f87a17a9105ee8098219f8d98104eb3f526a.tar.gz |
init
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 96 | ||||
-rw-r--r-- | binutils-2.22-tune-bfd-hash.patch | 19 | ||||
-rw-r--r-- | binutils.install | 17 |
4 files changed, 157 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..00509f1182ee --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = binutils-tune-bfd-hash + pkgdesc = A set of programs to assemble and manipulate binary and object files. 'ld' is patched for using with GHC, see http://www.haskell.org/pipermail/glasgow-haskell-users/2010-April/018722.html . + pkgver = 2.22 + pkgrel = 3 + url = http://www.gnu.org/software/binutils/ + install = binutils.install + arch = i686 + arch = x86_64 + groups = base-devel + license = GPL + checkdepends = dejagnu + depends = glibc>=2.14 + depends = zlib + provides = binutils=2.22 + conflicts = binutils + options = !libtool + options = !distcc + options = !ccache + source = ftp://ftp.archlinux.org/other/binutils/binutils-2.22_20111201.tar.bz2 + source = binutils-2.22-tune-bfd-hash.patch + md5sums = 77c15027ac112c65fd5f73ca91b0651c + md5sums = 900535c217e97cb8113d4c43c0f11f22 + +pkgname = binutils-tune-bfd-hash + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3acf6d870ae4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,96 @@ +# $Id: PKGBUILD 144850 2011-12-08 12:17:07Z allan $ +# Maintainer: Allan McRae <allan@archlinux.org> + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc + +pkgname=binutils-tune-bfd-hash +_pkgname=binutils +pkgver=2.22 +pkgrel=3 +_date=20111201 +pkgdesc="A set of programs to assemble and manipulate binary and object files. 'ld' is patched for using with GHC, see http://www.haskell.org/pipermail/glasgow-haskell-users/2010-April/018722.html ." +arch=('i686' 'x86_64') +url="http://www.gnu.org/software/binutils/" +license=('GPL') +groups=('base-devel') +depends=('glibc>=2.14' 'zlib') +checkdepends=('dejagnu') +options=('!libtool' '!distcc' '!ccache') +install=binutils.install +source=(ftp://ftp.archlinux.org/other/${_pkgname}/${_pkgname}-${pkgver}_${_date}.tar.bz2 + binutils-2.22-tune-bfd-hash.patch) +md5sums=('77c15027ac112c65fd5f73ca91b0651c' + "900535c217e97cb8113d4c43c0f11f22") +provides=("binutils=$pkgver") +conflicts=('binutils') + +mksource() { + mkdir ${_pkgname}-${_date} + cd ${_pkgname}-${_date} + export _TAG=binutils-2_22-branch + export 'CVSROOT=:pserver:anoncvs@sourceware.org:/cvs/src' + cvs -z9 co -r $_TAG binutils || return 1 + mv src binutils + tar -cvjf ../binutils-${pkgver}_${_date}.tar.bz2 binutils/* +} + +build() { + cd ${srcdir}/${_pkgname} + patch -p1 < ${srcdir}/binutils-2.22-tune-bfd-hash.patch || return 1 + cd ${srcdir} + mkdir binutils-build && cd binutils-build + + [[ $CARCH == "x86_64" ]] && CONFIGFLAG="--enable-64-bit-bfd --disable-multilib" + + ${srcdir}/binutils/configure --prefix=/usr \ + --enable-ld=default --enable-gold \ + --enable-plugins --enable-threads \ + --enable-shared $CONFIGFLAG + + # check the host environment and makes sure all the necessary tools are available + make configure-host + + make tooldir=${pkgdir}/usr +} + +check() { + cd ${srcdir}/binutils-build + + # do not abort on errors - manually check log files + make -k -j1 check || true +} + +package() { + cd ${srcdir}/binutils-build + install -m755 -d ${pkgdir}/usr/lib ${pkgdir}/usr/include + make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install + + # Rebuild libbfd.a with -fPIC + make -C bfd clean + make CFLAGS="$CFLAGS -fPIC" -C bfd + + # Rebuild libiberty.a with -fPIC + make -C libiberty clean + make CFLAGS="$CFLAGS -fPIC" -C libiberty + + # Rebuild libbfd.a with -fPIC + make -C bfd clean + # hidden visability prevent 3rd party shared libraries exporting bfd non-stable API + make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd + + install -m644 libiberty/libiberty.a ${pkgdir}/usr/lib + install -m644 bfd/libbfd.a ${pkgdir}/usr/lib + + # Add some useful headers + install -m644 ${srcdir}/binutils/include/libiberty.h ${pkgdir}/usr/include + install -m644 ${srcdir}/binutils/include/demangle.h ${pkgdir}/usr/include + + # Remove Windows/Novell specific man pages + rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}* + + # Remove these symlinks, they are not ABI stable. + # Programs should compile static to the .a file. + rm -f ${pkgdir}/usr/lib/lib{bfd,opcodes}.so + echo "INPUT ( /usr/lib/libbfd.a -liberty -lz )" >${pkgdir}/usr/lib/libbfd.so + echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" >${pkgdir}/usr/lib/libopcodes.so +} diff --git a/binutils-2.22-tune-bfd-hash.patch b/binutils-2.22-tune-bfd-hash.patch new file mode 100644 index 000000000000..295a032ed28d --- /dev/null +++ b/binutils-2.22-tune-bfd-hash.patch @@ -0,0 +1,19 @@ +commit a8c9fe1ae3d7d90f0d5f0cd6b81a58f25b429255 +Author: Bertram Felgenhauer <int-e@gmx.de> +Date: Fri May 16 22:45:20 2008 +0200 + + tune bfd hash to use less memory. it's still fast. + +diff --git a/bfd/hash.c b/bfd/hash.c +index 5edccac..90b5069 100644 +--- a/bfd/hash.c ++++ b/bfd/hash.c +@@ -299,7 +299,7 @@ SUBSUBSECTION + */ + + /* The default number of entries to use when creating a hash table. */ +-#define DEFAULT_SIZE 4051 ++#define DEFAULT_SIZE 31 + + /* The following function returns a nearest prime number which is + greater than N, and near a power of two. Copied from libiberty. diff --git a/binutils.install b/binutils.install new file mode 100644 index 000000000000..8bf9f3a47213 --- /dev/null +++ b/binutils.install @@ -0,0 +1,17 @@ +infodir=usr/share/info +filelist=(as.info bfd.info binutils.info configure.info gprof.info ld.info standards.info) + +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + |