Mail archive
alpine-aports

[alpine-aports] [PATCH 1/6] testing/binutils-cross-embedded: New aport

From: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
Date: Sun, 10 Mar 2019 10:01:20 +0100

binutils for bare metal targets
---
 testing/binutils-cross-embedded/APKBUILD | 101 +++++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 testing/binutils-cross-embedded/APKBUILD
diff --git a/testing/binutils-cross-embedded/APKBUILD b/testing/binutils-cross-embedded/APKBUILD
new file mode 100644
index 0000000000..a503e63344
--- /dev/null
+++ b/testing/binutils-cross-embedded/APKBUILD
_at_@ -0,0 +1,101 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
+# Based on binutils-avr
+_pkgbase=binutils
+_targets="
+	arm-none-eabi
+	mips-mti-elf
+	msp430-elf
+	"
+pkgname="$_pkgbase-cross-embedded"
+pkgver=2.32
+pkgrel=0
+pkgdesc="Tools necessary to build programs for embedded targets"
+url="http://www.gnu.org/software/${_pkgbase}/"
+makedepends="gettext libtool autoconf automake bison zlib-dev"
+arch="all"
+license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
+for target in $_targets; do
+	targetnorm="${target//-/_}"
+	subpackages="${_pkgbase}-${target}:${targetnorm} ${subpackages}"
+done
+source="http://ftp.gnu.org/gnu/${_pkgbase}/${_pkgbase}-${pkgver}.tar.bz2"
+
+builddir="$srcdir/${_pkgbase}-$pkgver"
+
+build() {
+	for target in $_targets; do
+		workingdir="${srcdir}/build-${target}"
+		mkdir "$workingdir"
+		cd "$workingdir"
+		"$builddir"/configure \
+			--target=${target} \
+			--with-sysroot=/usr/$target \
+			--prefix=/usr/ \
+			--infodir=/deleteme/info \
+			--htmldir=/deleteme/html \
+			--pdfdir=/deleteme/pdf \
+			--mandir=/deleteme/man \
+			--with-gnu-as \
+			--with-gnu-ld \
+			--enable-deterministic-archieves \
+			--enable-interwork \
+			--enable-multilib \
+			--enable-plugins \
+			--enable-ld=default \
+			--disable-nls
+		make tooldir=/usr -j 16
+	done
+}
+
+check() {
+	for target in $_targets; do
+		workingdir="${srcdir}/build-${target}"
+		cd "$workingdir"
+		make check
+	done
+}
+
+package() {
+	for target in $_targets; do
+		depends="$depends $_pkgbase-$target"
+	done
+	mkdir -p "${pkgdir}"
+}
+
+_install_subpkg() {
+	target="${subpkgname#${_pkgbase}-}"
+	pkgdesc="Tools necessary to build programs for ${target}"
+	workingdir="${srcdir}/build-${target}"
+	cd "$workingdir"
+	make install DESTDIR="$subpkgdir"
+	rm -rf "$subpkgdir"/deleteme
+	for bin in ar as nm objcopy objdump ranlib strip readelf; do
+		rm -f "$subpkgdir"/usr/bin/"$bin"
+	done
+}
+
+arm_none_eabi() {
+	_install_subpkg
+}
+
+avr() {
+	_install_subpkg
+}
+
+mips_mti_elf() {
+	_install_subpkg
+}
+
+msp430_elf() {
+	_install_subpkg
+}
+
+xtensa_esp32_elf() {
+	_install_subpkg
+}
+
+xtensa_lx106_elf() {
+	_install_subpkg
+}
+
+sha512sums="99ec7ed2b5ebfd3ac16cecb1567ec4a72f81ac30717002d601708f7547b2f8122ffcce076c986f22894aede33c54c73012210a4e973ba9b6e2d87a242a2bee12  binutils-2.32.tar.bz2"
-- 
2.21.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Mar 10 2019 - 10:01:20 UTC