X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail.ovgu.de (mail.ovgu.de [141.44.1.66]) by lists.alpinelinux.org (Postfix) with ESMTP id B65445C551E for ; Sat, 26 Aug 2017 14:08:21 +0000 (GMT) Received: from mail.ovgu.de (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 4892A40065 for ; Sat, 26 Aug 2017 16:08:21 +0200 (CEST) Received: from notebook-marian.fritz.box (p5B15FE48.dip0.t-ipconnect.de [91.21.254.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.ovgu.de (Postfix) with ESMTPSA id 9F8D840064; Sat, 26 Aug 2017 16:08:20 +0200 (CEST) From: Marian Buschsieweke To: alpine-aports@lists.alpinelinux.org Cc: Marian Buschsieweke Subject: [alpine-aports] [PATCH 3/3] testing/newlib-arm-none-eabi: New aport Date: Sat, 26 Aug 2017 16:07:29 +0200 Message-Id: <20170826140729.2822-3-marian.buschsieweke@ovgu.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170826140729.2822-1-marian.buschsieweke@ovgu.de> References: <20170826140729.2822-1-marian.buschsieweke@ovgu.de> X-PMX-Version: 6.3.3.2656215, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.8.26.140016, AntiVirus-Engine: 5.40.0, AntiVirus-Data: 2017.8.25.5400000 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, MULTIPLE_REAL_RCPTS 0, RDNS_POOLED 0, RDNS_SUSP 0, RDNS_SUSP_SPECIFIC 0, REFERENCES 0, URI_WITH_PATH_ONLY 0, __ANY_URI 0, __C230066_P5 0, __CC_NAME 0, __CC_NAME_DIFF_FROM_ACC 0, __CC_REAL_NAMES 0, __CP_URI_IN_BODY 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FROM_DOMAIN_IN_ANY_CC1 0, __FROM_DOMAIN_IN_RCPT 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HTTPS_URI 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MULTIPLE_URI_TEXT 0, __NO_HTML_TAG_RAW 0, __RDNS_POOLED_10 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NS , __URI_WITH_PATH 0' X-Spam-Score: Gauge=IIIIIIII X-PMX-consideredAsSpam: no X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: A C standard library implementation intended for use on embedded systems http://www.sourceware.org/newlib/ --- testing/newlib-arm-none-eabi/APKBUILD | 83 +++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 testing/newlib-arm-none-eabi/APKBUILD diff --git a/testing/newlib-arm-none-eabi/APKBUILD b/testing/newlib-arm-none-eabi/APKBUILD new file mode 100644 index 0000000000..581bcc1ebe --- /dev/null +++ b/testing/newlib-arm-none-eabi/APKBUILD @@ -0,0 +1,83 @@ +# Contributor: Marian Buschsieweke +# Maintainer: Marian Buschsieweke + +_pkgbase=newlib +_target=arm-none-eabi +pkgname="${_pkgbase}-${_target}" +pkgver=2.5.0.20170818 +pkgrel=0 +pkgdesc="A C standard library implementation intended for use on embedded systems" +url="http://www.sourceware.org/newlib/" +depends="binutils-${_target} gcc-${_target}" +makedepends="texinfo" +arch="all" +license="BSD" +subpackages="$pkgname-doc" +source="ftp://sourceware.org/pub/$_pkgbase/$_pkgbase-$pkgver.tar.gz" +options="!check" + +builddir="$srcdir/$_pkgbase-$pkgver" + +# This package installes two version of the newlib library to remain compatible +# with projects expecting the GNU ARM Embedded Toolchain [1]. The nano version +# appends the postix "_nano" to the libaries. The is not an arbitrary choice, +# it matches the specs in "/usr/arm-none-eabi/lib/nano.specs", which is +# part of the default newlib installation. +# [1]: https://launchpad.net/gcc-arm-embedded/ + +build() { + mkdir "${builddir}/build" "${builddir}/build-nano" + + # nano version + cd "${builddir}/build-nano" + CFLAGS_NANO="-Os -ffunction-sections -fdata-sections -D=__OPTIMIZE_SIZE__ -DPREFER_SIZE_OVER_SPEED" + env CFLAGS_FOR_TARGET="$CFLAGS_NANO" "$builddir"/configure \ + --prefix=/usr/ \ + --target=$_target \ + --disable-newlib-supplied-syscalls \ + --enable-newlib-reent-small \ + --disable-newlib-fvwrite-in-streamio \ + --disable-newlib-fseek-optimization \ + --disable-newlib-wide-orient \ + --enable-newlib-nano-malloc \ + --disable-newlib-unbuf-stream-opt \ + --enable-lite-exit \ + --enable-newlib-global-atexit \ + --enable-newlib-nano-formatted-io \ + --disable-nls \ + --disable-newlib-io-float \ + --disable-libssp + make + + # regular version + cd "${builddir}/build" + "$builddir"/configure \ + --prefix=/usr/ \ + --target=$_target \ + --enable-newlib-io-long-long \ + --enable-newlib-register-fini \ + --disable-newlib-supplied-syscalls \ + --disable-nls + make +} + +package() { + for dir in include lib/thumb lib/fpu lib/cpu-init; do + mkdir -p "${pkgdir}/usr/${_target}/${dir}" + done + + # install nano version + cd "${builddir}/build-nano" + make DESTDIR="$pkgdir" install + # rename nano version libs + cd "${pkgdir}/usr/${_target}/lib" + for file in $(find . -regex ".*\(c\|g\|rdimon\)\.a"); do + mv "$file" "${file%.a}_nano.a" + done + + # install regular version + cd "${builddir}/build" + make DESTDIR="$pkgdir" install +} + +sha512sums="41382f722232593a9a2bf7de09dc51a26ad51bf8ad06259b0fd38a13cfcd577688e836446d7e88b7741eeec316cfa137ff9b4e16cca846b11bb70948ff1b8c16 newlib-2.5.0.20170818.tar.gz" -- 2.14.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---