aboutsummaryrefslogtreecommitdiffstats
path: root/community/binutils-cross-embedded/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/binutils-cross-embedded/APKBUILD')
-rw-r--r--community/binutils-cross-embedded/APKBUILD47
1 files changed, 32 insertions, 15 deletions
diff --git a/community/binutils-cross-embedded/APKBUILD b/community/binutils-cross-embedded/APKBUILD
index 0a8303ab271..461f9772351 100644
--- a/community/binutils-cross-embedded/APKBUILD
+++ b/community/binutils-cross-embedded/APKBUILD
@@ -2,30 +2,46 @@
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Based on binutils-avr
_pkgbase=binutils
-_targets="
+pkgname="$_pkgbase-cross-embedded"
+pkgver=2.42
+pkgrel=0
+pkgdesc="tools necessary to build programs for embedded targets"
+url="https://www.gnu.org/software/binutils/"
+makedepends="gettext libtool autoconf automake bison texinfo zlib-dev zstd-dev"
+arch="aarch64 armv7 ppc64le x86_64 x86"
+license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
+source="https://ftp.gnu.org/gnu/$_pkgbase/$_pkgbase-$pkgver.tar.xz"
+builddir="$srcdir/$_pkgbase-$pkgver"
+
+# classify targets as exotic or mainstream. Only build support for
+# exotic targets on typical developer / CI hardware (x86_86, aarach64).
+_targets_mainstream="
arm-none-eabi
avr
- mips-mti-elf
+ riscv-none-elf
+ "
+
+_targets_exotic="
msp430-elf
or1k-elf
- riscv-none-elf
aarch64-none-elf
"
-pkgname="$_pkgbase-cross-embedded"
-pkgver=2.37
-pkgrel=0
-pkgdesc="tools necessary to build programs for embedded targets"
-url="https://www.gnu.org/software/binutils/"
-makedepends="gettext libtool autoconf automake bison texinfo zlib-dev"
-arch="all"
-license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
+
+case "$CARCH" in
+x86_64|aarch64)
+ # support all targets on typical workstation / notebook / CI servers
+ _targets="$_targets_mainstream $_targets_exotic"
+ ;;
+*)
+ # support only mainstream targets on exotic hosts
+ _targets="$_targets_mainstream"
+ ;;
+esac
+
for target in $_targets; do
targetnorm="${target//-/_}"
subpackages="$_pkgbase-$target:$targetnorm $subpackages"
done
-source="https://ftp.gnu.org/gnu/$_pkgbase/$_pkgbase-$pkgver.tar.xz"
-
-builddir="$srcdir/$_pkgbase-$pkgver"
# secfixes:
# 2.37-r0:
@@ -49,6 +65,7 @@ build() {
--with-gnu-ld \
--enable-deterministic-archieves \
--enable-interwork \
+ --enable-lto \
--enable-multilib \
--enable-plugins \
--enable-ld=default \
@@ -121,5 +138,5 @@ aarch64_none_elf() {
}
sha512sums="
-5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7 binutils-2.37.tar.xz
+155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 binutils-2.42.tar.xz
"