summaryrefslogtreecommitdiff
path: root/libre-testing/binutils
diff options
context:
space:
mode:
authorGaming4JC <g4jc@openmailbox.org>2017-01-08 10:01:53 -0500
committerGaming4JC <g4jc@openmailbox.org>2017-01-08 10:01:53 -0500
commit207fa1b1593bbc0811dab7ae2aa6046fa935c340 (patch)
tree7e22f1802db470e95fd43fab76de6c27da97258e /libre-testing/binutils
parentd09eb0f4a3d314263b7e97babb531ac06f8f300c (diff)
downloadabslibre-207fa1b1593bbc0811dab7ae2aa6046fa935c340.tar.gz
abslibre-207fa1b1593bbc0811dab7ae2aa6046fa935c340.tar.bz2
abslibre-207fa1b1593bbc0811dab7ae2aa6046fa935c340.zip
Push binutils, we need to get this compiling from source
Diffstat (limited to 'libre-testing/binutils')
-rw-r--r--libre-testing/binutils/PKGBUILD76
1 files changed, 76 insertions, 0 deletions
diff --git a/libre-testing/binutils/PKGBUILD b/libre-testing/binutils/PKGBUILD
new file mode 100644
index 000000000..69096266a
--- /dev/null
+++ b/libre-testing/binutils/PKGBUILD
@@ -0,0 +1,76 @@
+# $Id$
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+
+pkgname=binutils
+pkgver=2.27
+pkgrel=1.91
+pkgdesc="A set of programs to assemble and manipulate binary and object files"
+arch=('i686' 'x86_64')
+url="https://www.gnu.org/software/binutils/"
+license=('GPL')
+groups=('base-devel')
+depends=('glibc>=2.24-2' 'zlib')
+makedepends=('git')
+checkdepends=('dejagnu' 'bc')
+conflicts=('binutils-multilib')
+replaces=('binutils-multilib')
+options=('staticlibs' '!distcc' '!ccache')
+source=("https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2"{,.sig})
+validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93') # Tristan Gingold <gingold@adacore.com>
+sha512sums=('cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb'
+ 'a0eb45809667850c2ef85be64ba0637a9a9b721bc77b24d0630f2f420855c33b9d781378fb58f4b0a4856caebf54c49d5e22d5f90761c419c1d0f7167da48f4a') # https://mirrors.kernel.org/sourceware/binutils/sha512.sum
+
+prepare() {
+ cd binutils-$pkgver
+
+ # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+
+ mkdir ${srcdir}/binutils-build
+}
+
+build() {
+ cd binutils-build
+
+ ../binutils-$pkgver/configure \
+ --prefix=/usr \
+ --with-lib-path=/usr/lib:/usr/local/lib \
+ --with-bugurl=https://bugs.archlinux.org/ \
+ --enable-threads \
+ --enable-shared \
+ --with-pic \
+ --enable-ld=default \
+ --enable-gold \
+ --enable-plugins \
+ --enable-deterministic-archives \
+ --disable-werror \
+ --disable-gdb
+
+ # check the host environment and makes sure all the necessary tools are available
+ make configure-host
+
+ make tooldir=/usr
+}
+
+check() {
+ cd binutils-build
+
+ # unset LDFLAGS as testsuite makes assumptions about which ones are active
+ # ignore failures in gold testsuite...
+ make -k LDFLAGS="" check || true
+}
+
+package() {
+ cd binutils-build
+ make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
+
+ # Remove unwanted files
+ rm ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
+
+ # No shared linking to these files outside binutils
+ rm ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
+ echo "INPUT ( /usr/lib/libbfd.a -liberty -lz -ldl )" > "$pkgdir"/usr/lib/libbfd.so
+ echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" > "$pkgdir"/usr/lib/libopcodes.so
+}