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/APKBUILD46
1 files changed, 31 insertions, 15 deletions
diff --git a/community/binutils-cross-embedded/APKBUILD b/community/binutils-cross-embedded/APKBUILD
index 3433632c878..ada6fdf96da 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.41
+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.38
-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:
@@ -122,5 +138,5 @@ aarch64_none_elf() {
}
sha512sums="
-8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d binutils-2.38.tar.xz
+5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 binutils-2.41.tar.xz
"