mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-06 15:13:51 +02:00
cross-arm-none-eabi-newlib: build a nano variant
This commit is contained in:
parent
541236ac9e
commit
d8c12f40e2
1 changed files with 61 additions and 12 deletions
|
@ -3,21 +3,14 @@ _triplet=arm-none-eabi
|
||||||
_pkgname=newlib
|
_pkgname=newlib
|
||||||
pkgname=cross-${_triplet}-${_pkgname}
|
pkgname=cross-${_triplet}-${_pkgname}
|
||||||
version=3.1.0.20181231
|
version=3.1.0.20181231
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="${_pkgname}-${version}"
|
wrksrc="${_pkgname}-${version}"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="
|
configure_args="
|
||||||
--disable-newlib-supplied-syscalls
|
--prefix=/usr --target=${_triplet} --host=${XBPS_CROSS_TRIPLET}
|
||||||
--disable-nls
|
--with-gnu-as --with-gnu-ld --disable-nls
|
||||||
--enable-interwork
|
--disable-newlib-supplied-syscalls --enable-newlib-retargetable-locking
|
||||||
--enable-newlib-io-long-long
|
--enable-interwork"
|
||||||
--enable-newlib-register-fini
|
|
||||||
--host=${XBPS_CROSS_TRIPLET}
|
|
||||||
--prefix=/usr
|
|
||||||
--target=${_triplet}
|
|
||||||
--with-gnu-as
|
|
||||||
--with-gnu-ld
|
|
||||||
"
|
|
||||||
hostmakedepends="cross-arm-none-eabi-binutils cross-arm-none-eabi-gcc"
|
hostmakedepends="cross-arm-none-eabi-binutils cross-arm-none-eabi-gcc"
|
||||||
short_desc="C library intended for use on embedded systems"
|
short_desc="C library intended for use on embedded systems"
|
||||||
maintainer="Ivan Sokolov <ivan-p-sokolov@ya.ru>"
|
maintainer="Ivan Sokolov <ivan-p-sokolov@ya.ru>"
|
||||||
|
@ -26,3 +19,59 @@ homepage="https://www.sourceware.org/${_pkgname}/"
|
||||||
distfiles="ftp://sources.redhat.com/pub/${_pkgname}/${_pkgname}-${version}.tar.gz"
|
distfiles="ftp://sources.redhat.com/pub/${_pkgname}/${_pkgname}-${version}.tar.gz"
|
||||||
checksum=9e12fea7297648b114434033ed4458755afe7b9b6c7d58123389e82bd37681c0
|
checksum=9e12fea7297648b114434033ed4458755afe7b9b6c7d58123389e82bd37681c0
|
||||||
nostrip=yes
|
nostrip=yes
|
||||||
|
|
||||||
|
post_extract() {
|
||||||
|
mkdir -p build-{newlib,nano}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
|
pushd build-newlib
|
||||||
|
export CFLAGS_FOR_TARGET="-g -O2 -ffunction-sections -fdata-sections"
|
||||||
|
../configure ${configure_args} \
|
||||||
|
--enable-newlib-io-long-long \
|
||||||
|
--enable-newlib-register-fini
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd build-nano
|
||||||
|
export CFLAGS_FOR_TARGET="-g -Os -ffunction-sections -fdata-sections"
|
||||||
|
../configure ${configure_args} \
|
||||||
|
--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
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
pushd build-newlib
|
||||||
|
make ${makejobs}
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd build-nano
|
||||||
|
make ${makejobs}
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
pushd build-nano
|
||||||
|
make DESTDIR=${DESTDIR} install
|
||||||
|
find ${DESTDIR} -regex ".*/lib\(c\|g\|rdimon\)\.a" \
|
||||||
|
-exec rename .a _nano.a '{}' \;
|
||||||
|
install -d ${DESTDIR}/usr/${_triplet}/include/newlib-nano
|
||||||
|
install -m644 -t ${DESTDIR}/usr/${_triplet}/include/newlib-nano \
|
||||||
|
${DESTDIR}/usr/${_triplet}/include/newlib.h
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd build-newlib
|
||||||
|
make DESTDIR=${DESTDIR} install
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vlicense COPYING
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue