summaryrefslogtreecommitdiff
path: root/cross/cross-binutils
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2018-05-04 20:29:24 -0300
committerDavid P <megver83@parabola.nu>2018-05-04 20:29:24 -0300
commit88d5eda679c3030071ca52196cf8c1f849be4c68 (patch)
treeb5408c179e5de2b01b4c897eff94311cfe79b999 /cross/cross-binutils
parentf904467fbbc7b3355d5057044e8f10a125e6b97d (diff)
downloadabslibre-88d5eda679c3030071ca52196cf8c1f849be4c68.tar.gz
abslibre-88d5eda679c3030071ca52196cf8c1f849be4c68.tar.bz2
abslibre-88d5eda679c3030071ca52196cf8c1f849be4c68.zip
Remove outdated compilers from [cross]
Also update the generic PKGBUILDs, and add cross-newlib
Diffstat (limited to 'cross/cross-binutils')
-rw-r--r--cross/cross-binutils/PKGBUILD166
1 files changed, 78 insertions, 88 deletions
diff --git a/cross/cross-binutils/PKGBUILD b/cross/cross-binutils/PKGBUILD
index 7c1623782..d01e8e9fc 100644
--- a/cross/cross-binutils/PKGBUILD
+++ b/cross/cross-binutils/PKGBUILD
@@ -1,5 +1,5 @@
-# Maintainer (Arch): Allan McRae <allan@archlinux.org>
-# Maintainer: Márcio Silva <coadde@hyperbola.info>
+# Contributor: Márcio Silva <coadde@hyperbola.info>
+# Maintainer: David P. <megver83@parabola.nu>
# toolchain build order: {kernel}-api-headers->glibc->binutils->gcc->binutils->glibc
@@ -11,6 +11,8 @@
# ->binutils(target system)->gcc(target system)->binutils(target system)
# ->glibc(target system)
+# NOTE: libtool requires rebuilt with each new gcc version
+
#--------------------------------------------------------------------------------
# cross-compile table
#--------------------------------------------------------------------------------
@@ -66,110 +68,98 @@
# < : experimental support. (future)
#--------------------------------------------------------------------------------
-# options
-#--------------------------------------------------------------------------------
-
-# Hardware architecture:
-
-# options: "same", "x86_64", "i686", "armv7l" or "xtensa"
-_arch_target=armv7l
-
-# OS target:
-
-# system: <os> or <kernel>-<os>
-# options: "gnu", "linux-gnu", "linux-gnueabihf" or "elf"
-_os_target=linux-gnueabihf
-
-#--------------------------------------------------------------------------------
-# variables
-#--------------------------------------------------------------------------------
-
-# set the default values if it's not added
-[[ -z $_arch_target ]] && _arch_target=same
-[[ -z $_os_target ]] && _os_target=linux-gnu
-
-# set the value on _arch variable
-if [[ $_arch_target == same ]]; then
- _arch=$CARCH
-else
- _arch=$_arch_target
-fi
-
-# set the value on _target variable
-if [[ $_arch == i686 ]]; then
- _target=$_arch-pc-$_os_target
-else
- _target=$_arch-unknown-$_os_target
-fi
-
+# Tips for build():
#--------------------------------------------------------------------------------
-
-_pkgname=binutils
-pkgname=$_target-$_pkgname
-pkgver=2.27
-_pkgverpatch=$pkgver
+# * If builing without "--disable-multilib" make sure to have "--with-python-dir=share/gcc-$_target"
+
+# * When building using `make' instead of `make all-gcc' append "--with-sysroot=/usr/$_target" and
+# "--with-native-system-header-dir=/include". You'll also have to build and add a libc implementation
+# in makedepends as $_target-<libc> (e.g. $_target-newlib or $_target-glibc)
+
+# Toolchain triplet: <_arch>-<machine>-<_os_target>
+# <machine> is generally optional and uneeded
+_target=x86_64-pc-linux-gnu
+
+# This are some options for names. Change $_target_name in pkgdesc according to the target architecture
+case ${_target%%-*} in
+ arm*) _target_name=ARM
+ ;;
+ aarch64*) _target_name=ARM64
+ ;;
+ xtensa) _target_name=Xtensa
+ ;;
+ sh*) _target_name=SuperH
+ ;;
+ powerpc*) _target_name=PowerPC
+ ;;
+ riscv*) _target_name=RISC-V
+ ;;
+ mips*) _target_name=MIPS
+ ;;
+ i686) _target_name=x86
+ ;;
+ *) _target_name=${_target%%-*}
+ ;;
+esac
+
+pkgname=$_target-binutils
+pkgver=2.30
pkgrel=1
-_commit=2870b1ba
-pkgdesc="A set of programs to assemble and manipulate binary and object files"
+pkgdesc="A set of programs to assemble and manipulate binary and object files for the $_target_name target"
arch=('i686' 'x86_64' 'armv7h' 'aarch64' 'mips64el')
-url="http://www.gnu.org/software/$_pkgname/"
-license=('GPL')
-groups=('cross-devel')
-depends=('glibc>=2.24' 'zlib')
-makedepends=('git')
-checkdepends=('dejagnu' 'bc')
-options=('staticlibs' '!distcc' '!ccache')
-#source=(ftp://ftp.gnu.org/gnu/$_pkgname/$_pkgname-${pkgver}.tar.bz2{,.sig})
-source=(git://sourceware.org/git/$_pkgname-gdb.git#commit=${_commit}
- https://repo.parabola.nu/other/$_pkgname/$_pkgverpatch/$_pkgname-xtensa.patch)
-md5sums=('SKIP'
- 'd3c1408246493c42fc2b78508571f584')
-#validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93')
+url='http://www.gnu.org/software/binutils/'
+license=(GPL)
+depends=(zlib)
+source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2{,.sig})
+sha512sums=('c3ce91aa20f058ec589bf18c722bf651331b394db6378900cc813cc0eea3a331a96584d5ae090630b627369510397dccc9edfcd43d4aeefc99579f277a05c72c'
+ 'SKIP')
+validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93' # Tristan Gingold <gingold@adacore.com>
+ '3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') # Nick Clifton (Chief Binutils Maintainer) <nickc@redhat.com>
prepare() {
- cd $_pkgname-gdb
-
- # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
+ cd binutils-$pkgver
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
-
- # open-ath9k-htc-firmware patch
- [[ $_target == xtensa-unknown-elf ]] && patch -p1 -i ${srcdir}/$_pkgname-xtensa.patch
-
- mkdir ${srcdir}/$_pkgname-build
}
build() {
- cd $_pkgname-build
-
- ../$_pkgname-gdb/configure --prefix=/usr \
- --with-lib-path=/usr/lib:/usr/local/lib \
- --with-bugurl=https://labs.parabola.nu/ \
- --enable-threads --with-pic \
- --enable-ld=default --enable-gold --enable-plugins \
- --enable-deterministic-archives \
- --disable-werror --disable-gdb --disable-nls \
- --target=$_target --with-sysroot=/usr/$_target
-
- # check the host environment and makes sure all the necessary tools are available
- make configure-host
-
- make tooldir=/usr
+ cd binutils-$pkgver
+
+ if [ "${CARCH}" != "i686" ]; then
+ # enabling gold linker at i686 makes the install fail
+ enable_gold='--enable-gold'
+ fi
+
+ ./configure --target=$_target \
+ --with-sysroot=/usr/$_target \
+ --prefix=/usr \
+ --disable-multilib \
+ --with-gnu-as \
+ --with-gnu-ld \
+ --disable-nls \
+ --enable-ld=default \
+ $enable_gold \
+ --enable-plugins \
+ --enable-deterministic-archives
+
+ make
}
check() {
- cd $_pkgname-build
+ cd binutils-$pkgver
# unset LDFLAGS as testsuite makes assumptions about which ones are active
- # ignore failures in gold testsuite...
+ # do not abort on errors - manually check log files
make -k LDFLAGS="" check || true
}
package() {
- cd $_pkgname-build
- make prefix=${pkgdir}/usr install
+ cd binutils-$pkgver
+
+ make DESTDIR="$pkgdir" install
+
+ # Remove file conflicting with host binutils and manpages for MS Windows tools
+ rm "$pkgdir"/usr/share/man/man1/$_target-{dlltool,nlmconv,windres,windmc}*
# Remove info documents that conflict with host version
- rm -rf ${pkgdir}/usr/share/info
- [[ $_target != xtensa-unknown-elf ]] && echo "INPUT ( /usr/lib/libbfd.a -liberty -lz -ldl )" > "$pkgdir"/usr/lib/libbfd.so
- [[ $_target != xtensa-unknown-elf ]] && echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" > "$pkgdir"/usr/lib/libopcodes.so
+ rm -r "$pkgdir"/usr/share/info
}