diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-08 02:07:29 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-08 02:07:29 +0000 |
commit | 494168b06b81a32b889c3cb1f721f925d0a6824f (patch) | |
tree | 0ec763ffa61af808a83f365fb6680258d2e28a50 /sys-libs/newlib | |
parent | 2198f8593ae0312add1bdccb49edfcb935e5f8a6 (diff) |
gentoo auto-resync : 08:12:2024 - 02:07:28
Diffstat (limited to 'sys-libs/newlib')
-rw-r--r-- | sys-libs/newlib/Manifest | 5 | ||||
-rw-r--r-- | sys-libs/newlib/newlib-4.1.0-r2.ebuild | 154 | ||||
-rw-r--r-- | sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild | 154 | ||||
-rw-r--r-- | sys-libs/newlib/newlib-4.3.0.20230120-r1.ebuild | 153 |
4 files changed, 0 insertions, 466 deletions
diff --git a/sys-libs/newlib/Manifest b/sys-libs/newlib/Manifest index fd6b22781de8..37b686c5c4a1 100644 --- a/sys-libs/newlib/Manifest +++ b/sys-libs/newlib/Manifest @@ -1,12 +1,7 @@ AUX newlib-3.3.0-no-nano-cxx.patch 1338 BLAKE2B ff16751b01784a38dc07aa79120c38f0274bb14caeeb653cecca4b3ca69c60a72e0e1918fea8f2c0f4734293817539122fa41b349f61ceabb3cb9ae878a11d13 SHA512 08dfc7d854dc75c8b875fa7c1829078c8df8988b4ba2b20739d387c656ca63b8b344487861d23658e31b72f911d05c2f57abe51bdf3b2dedcc88ce072c6595c8 AUX newlib-4.3.0.20230120-libc-arm-setjmp-gcc-backwards-compat.patch 2411 BLAKE2B db79f5e534f70bc6338a647a242498d0e175624671c41ae9abf9030b046ffc50e576c7a25fe44e6607cdf42c072995e7d685889ae442097ad1c469919d59936c SHA512 91c684078904a38b0791bf788f48145eff9ccb393a8d1e181d5a66b3e359732576f257bd5908cd02844459cf12bbb2b43fbcd9b9095c36c08e6408aa68be95d1 -DIST newlib-4.1.0.tar.gz 18648429 BLAKE2B c4d4d734bceeacf05b75d450d4316392d0000266812f98f99cd3f9f0926ac9848e1dc145361827d1d6951edfe5f109923c982d9f284f927ffc5fd5e5edaf8be6 SHA512 6a24b64bb8136e4cd9d21b8720a36f87a34397fd952520af66903e183455c5cf19bb0ee4607c12a05d139c6c59382263383cb62c461a839f969d23d3bc4b1d34 -DIST newlib-4.2.0.20211231.tar.gz 18921589 BLAKE2B fb85a368d082e2b9005d5d295d6854eb7d0e351cfade6516e6a06b18656d9139d7629f55a6d5f63337c6bce511a2373e797bed96847f19941b26cacfb1c8d3bc SHA512 0c3efd7b74a6b8457a717cbb6aa6c5ff268eeaba375535465c6bd6502c3d32b54a9bc3ba7f2c6990f78e29152eee2f62acb39b674d24f9ddf440374a1ec9d2e8 DIST newlib-4.3.0.20230120.tar.gz 8832922 BLAKE2B b5493f25e44049f4e1222698894e7e67756928062e05f5d16bcd52b2221e5c04a80a9e0cbc3fc6e92d67fe6b3813e06b6d3a6d39e8742e02b8f13ff84d809de1 SHA512 4a06309d36c2255fef8fc8f2d133cafa850f1ed2eddfb27b5d45f5d16af69e0fca829a0b4c9b34af4ed3a28c6fcc929761e0ee823a4229f35c2853d432b5e7ef DIST newlib-4.4.0.20231231.tar.gz 9022406 BLAKE2B 1df810c7776aa1fe2806682509ab45df642f5e80d6069b7c6ca513b3d820440fc73abdf7505d1f3149d0a07f0c5558a48620d2824f1698c2f1df5f6473105eb4 SHA512 ea3baa0b7c9175aae024f0b7d272be092ef2c07483239a99329203e18a44bc23093d29e0ffcbe14bc591f610f0829eacd646cabb06d1c34aa23239cb1b814b46 -EBUILD newlib-4.1.0-r2.ebuild 4487 BLAKE2B 0ee16a23ff8e7048ccba6dd769530b8b6f23f574b0895e6233a450c5c4e83ad252a06d1f7d272976d6f11f269c6d7d9d555bcfabb3d527bc1aa55d4119ad29ae SHA512 b90f0ae3f65915833a342116ecdd985b28a13b8ad95613c92fed0b0be5eaf58fca362b1db4e655ed5f68e0da82212da1649f97871c8c948d3bd6bcf6055276ff -EBUILD newlib-4.2.0.20211231-r1.ebuild 4507 BLAKE2B 7c8c62f00175bf2a49eebc0af2b38ecf0f5849e870ab0bfe1972eb48bf5a634e159f5dec867433ac6edeea94d55a34a6bdc0ead3094801a24c4f9c5dcd349592 SHA512 514d6ab7776619894849a724d196f156b03ee63f4564fa627500aed07fdda07791944d3280377a229fc12cd5d3fb983dbc1a05fecefea3d961a67dbb54ec6acf -EBUILD newlib-4.3.0.20230120-r1.ebuild 4424 BLAKE2B 74b269b222db0dc5fad2c8eaab1c023cccc5fefe0cd14c2490b8e5f1125c07345f4c39a3aa67c972c737880901b60b1cd923d282b070645a198acfe12271aa04 SHA512 9d00014a5668ce2b8ebcfea42ae6ae3c7de773d351e4e30a8504d763b39f1b41907720b6e793445fc0414c9cceafe7f4bcf474df4120684e7915acb7dd3898df EBUILD newlib-4.3.0.20230120-r2.ebuild 4519 BLAKE2B 9db3b20c71eb0a64914497fe39df11cada6f60376a1677f8875b10853cfc6264102e314c2ebf34357a700e4549eda6fe3dc969151ecc9339a9d501820cf8b485 SHA512 8fd374c92ed35b6f6ca5d782ca343c6fbce0594f6585fae96f5000da287c78c8f7d15502e7394fdf3890d5865099e3d01ae9a67bc5f009071ac3c78782994d17 EBUILD newlib-4.4.0.20231231.ebuild 4906 BLAKE2B 48d0923da559914a2b36618111eedc6610dbb75c8982596d5f1ff8bd048bb7fa4872ead719f7a81622ee92a51969e96d01c68a4b8b57445d45a4cbf4145054d6 SHA512 d9609c845b667160f289ba2c9d1f36c91a06dc0afad8dcb72c80b231eb0456fb99cb8fdcb9ceaf2d471e331fbf30daa13fa352a6e0ab988d72478681b6998deb EBUILD newlib-9999.ebuild 4906 BLAKE2B 48d0923da559914a2b36618111eedc6610dbb75c8982596d5f1ff8bd048bb7fa4872ead719f7a81622ee92a51969e96d01c68a4b8b57445d45a4cbf4145054d6 SHA512 d9609c845b667160f289ba2c9d1f36c91a06dc0afad8dcb72c80b231eb0456fb99cb8fdcb9ceaf2d471e331fbf30daa13fa352a6e0ab988d72478681b6998deb diff --git a/sys-libs/newlib/newlib-4.1.0-r2.ebuild b/sys-libs/newlib/newlib-4.1.0-r2.ebuild deleted file mode 100644 index 52f5c0cbde67..000000000000 --- a/sys-libs/newlib/newlib-4.1.0-r2.ebuild +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit flag-o-matic toolchain-funcs - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://sourceware.org/git/newlib-cygwin.git" - inherit git-r3 -else - SRC_URI="ftp://sourceware.org/pub/newlib/${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" -fi - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -DESCRIPTION="Newlib is a C library intended for use on embedded systems" -HOMEPAGE="https://sourceware.org/newlib/" - -LICENSE="NEWLIB LIBGLOSS GPL-2" -SLOT="0" -IUSE="nls threads unicode headers-only nano" -RESTRICT="strip" - -PATCHES=( - "${FILESDIR}"/${PN}-3.3.0-no-nano-cxx.patch -) - -NEWLIBBUILD="${WORKDIR}/build" -NEWLIBNANOBUILD="${WORKDIR}/build.nano" -NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install" - -# Adding -U_FORTIFY_SOURCE to counter the effect of Gentoo's -# auto-addition of _FORTIFY_SOURCE at gcc site: bug #656018#c4 -# Currently newlib can't be built itself when _FORTIFY_SOURCE -# is set. -CFLAGS_FULL="-ffunction-sections -fdata-sections -U_FORTIFY_SOURCE" -CFLAGS_NANO="-Os -ffunction-sections -fdata-sections -U_FORTIFY_SOURCE" - -pkg_setup() { - # Reject newlib-on-glibc type installs - if [[ ${CTARGET} == ${CHOST} ]] ; then - case ${CHOST} in - *-newlib|*-elf) ;; - *) die "Use sys-devel/crossdev to build a newlib toolchain" ;; - esac - fi - - case ${CTARGET} in - msp430*) - if ver_test $(gcc-version ${CTARGET}) -lt 10.1; then - # bug #717610 - die "gcc for ${CTARGET} has to be 10.1 or above" - fi - ;; - esac -} - -src_configure() { - # TODO: we should fix this - unset LDFLAGS - CHOST=${CTARGET} strip-unsupported-flags - CCASFLAGS_ORIG="${CCASFLAGS}" - CFLAGS_ORIG="${CFLAGS}" - - local myconf=( - # Disable legacy syscall stub code in newlib. These have been - # moved to libgloss for a long time now, so the code in newlib - # itself just gets in the way. - --disable-newlib-supplied-syscalls - ) - [[ ${CTARGET} == "spu" ]] \ - && myconf+=( --disable-newlib-multithread ) \ - || myconf+=( $(use_enable threads newlib-multithread) ) - - mkdir -p "${NEWLIBBUILD}" - cd "${NEWLIBBUILD}" - - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}" - ECONF_SOURCE=${S} \ - econf \ - $(use_enable unicode newlib-mb) \ - $(use_enable nls) \ - "${myconf[@]}" - - # Build newlib-nano beside newlib (original) - # Based on https://tracker.debian.org/media/packages/n/newlib/rules-2.1.0%2Bgit20140818.1a8323b-2 - if use nano ; then - mkdir -p "${NEWLIBNANOBUILD}" || die - cd "${NEWLIBNANOBUILD}" || die - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}" - ECONF_SOURCE=${S} \ - econf \ - $(use_enable unicode newlib-mb) \ - $(use_enable nls) \ - --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 \ - "${myconf[@]}" - fi -} - -src_compile() { - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}" - emake -C "${NEWLIBBUILD}" - - if use nano ; then - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}" - emake -C "${NEWLIBNANOBUILD}" - fi -} - -src_install() { - cd "${NEWLIBBUILD}" || die - emake -j1 DESTDIR="${D}" install - - if use nano ; then - cd "${NEWLIBNANOBUILD}" || die - emake -j1 DESTDIR="${NEWLIBNANOTMPINSTALL}" install - # Rename nano lib* files to lib*_nano and move to the real ${D} - local nanolibfiles="" - nanolibfiles=$(find "${NEWLIBNANOTMPINSTALL}" -regex ".*/lib\(c\|g\|m\|rdimon\)\.a" -print) - for f in ${nanolibfiles}; do - local l="${f##${NEWLIBNANOTMPINSTALL}}" - mv -v "${f}" "${D}/${l%%\.a}_nano.a" || die - done - - # Move newlib-nano's version of newlib.h to newlib-nano/newlib.h - mkdir -p "${D}/usr/${CTARGET}/include/newlib-nano" || die - mv "${NEWLIBNANOTMPINSTALL}/usr/${CTARGET}/include/newlib.h" \ - "${D}/usr/${CTARGET}/include/newlib-nano/newlib.h" || die - fi - - # minor hack to keep things clean - rm -rf "${D}"/usr/share/info || die - rm -rf "${D}"/usr/info || die -} diff --git a/sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild b/sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild deleted file mode 100644 index 17fd43c36734..000000000000 --- a/sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit flag-o-matic toolchain-funcs - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://sourceware.org/git/newlib-cygwin.git" - inherit git-r3 -else - SRC_URI="ftp://sourceware.org/pub/newlib/${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" -fi - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -DESCRIPTION="Newlib is a C library intended for use on embedded systems" -HOMEPAGE="https://sourceware.org/newlib/" - -LICENSE="NEWLIB LIBGLOSS GPL-2" -SLOT="0" -IUSE="nls threads unicode headers-only nano" -RESTRICT="strip" - -PATCHES=( - "${FILESDIR}"/${PN}-3.3.0-no-nano-cxx.patch -) - -NEWLIBBUILD="${WORKDIR}/build" -NEWLIBNANOBUILD="${WORKDIR}/build.nano" -NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install" - -# Adding -U_FORTIFY_SOURCE to counter the effect of Gentoo's -# auto-addition of _FORTIFY_SOURCE at gcc site: bug #656018#c4 -# Currently newlib can't be built itself when _FORTIFY_SOURCE -# is set. -CFLAGS_FULL="-ffunction-sections -fdata-sections -U_FORTIFY_SOURCE" -CFLAGS_NANO="-Os -ffunction-sections -fdata-sections -U_FORTIFY_SOURCE" - -pkg_setup() { - # Reject newlib-on-glibc type installs - if [[ ${CTARGET} == ${CHOST} ]] ; then - case ${CHOST} in - *-newlib|*-elf) ;; - *) die "Use sys-devel/crossdev to build a newlib toolchain" ;; - esac - fi - - case ${CTARGET} in - msp430*) - if ver_test $(gcc-version ${CTARGET}) -lt 10.1; then - # bug #717610 - die "gcc for ${CTARGET} has to be 10.1 or above" - fi - ;; - esac -} - -src_configure() { - # TODO: we should fix this - unset LDFLAGS - CHOST=${CTARGET} strip-unsupported-flags - CCASFLAGS_ORIG="${CCASFLAGS}" - CFLAGS_ORIG="${CFLAGS}" - - local myconf=( - # Disable legacy syscall stub code in newlib. These have been - # moved to libgloss for a long time now, so the code in newlib - # itself just gets in the way. - --disable-newlib-supplied-syscalls - ) - [[ ${CTARGET} == "spu" ]] \ - && myconf+=( --disable-newlib-multithread ) \ - || myconf+=( $(use_enable threads newlib-multithread) ) - - mkdir -p "${NEWLIBBUILD}" - cd "${NEWLIBBUILD}" - - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}" - ECONF_SOURCE=${S} \ - econf \ - $(use_enable unicode newlib-mb) \ - $(use_enable nls) \ - "${myconf[@]}" - - # Build newlib-nano beside newlib (original) - # Based on https://tracker.debian.org/media/packages/n/newlib/rules-2.1.0%2Bgit20140818.1a8323b-2 - if use nano ; then - mkdir -p "${NEWLIBNANOBUILD}" || die - cd "${NEWLIBNANOBUILD}" || die - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}" - ECONF_SOURCE=${S} \ - econf \ - $(use_enable unicode newlib-mb) \ - $(use_enable nls) \ - --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 \ - "${myconf[@]}" - fi -} - -src_compile() { - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}" - emake -C "${NEWLIBBUILD}" - - if use nano ; then - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}" - emake -C "${NEWLIBNANOBUILD}" - fi -} - -src_install() { - cd "${NEWLIBBUILD}" || die - emake -j1 DESTDIR="${D}" install - - if use nano ; then - cd "${NEWLIBNANOBUILD}" || die - emake -j1 DESTDIR="${NEWLIBNANOTMPINSTALL}" install - # Rename nano lib* files to lib*_nano and move to the real ${D} - local nanolibfiles="" - nanolibfiles=$(find "${NEWLIBNANOTMPINSTALL}" -regex ".*/lib\(c\|g\|m\|rdimon\|gloss\)\.a" -print) - for f in ${nanolibfiles}; do - local l="${f##${NEWLIBNANOTMPINSTALL}}" - mv -v "${f}" "${D}/${l%%\.a}_nano.a" || die - done - - # Move newlib-nano's version of newlib.h to newlib-nano/newlib.h - mkdir -p "${ED}/usr/${CTARGET}/include/newlib-nano" || die - mv "${NEWLIBNANOTMPINSTALL}/${EPREFIX}/usr/${CTARGET}/include/newlib.h" \ - "${ED}/usr/${CTARGET}/include/newlib-nano/newlib.h" || die - fi - - # minor hack to keep things clean - rm -rf "${D}"/usr/share/info || die - rm -rf "${D}"/usr/info || die -} diff --git a/sys-libs/newlib/newlib-4.3.0.20230120-r1.ebuild b/sys-libs/newlib/newlib-4.3.0.20230120-r1.ebuild deleted file mode 100644 index 21ce7e99de7c..000000000000 --- a/sys-libs/newlib/newlib-4.3.0.20230120-r1.ebuild +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit flag-o-matic toolchain-funcs - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://sourceware.org/git/newlib-cygwin.git" - inherit git-r3 -else - SRC_URI="ftp://sourceware.org/pub/newlib/${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" -fi - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -DESCRIPTION="Newlib is a C library intended for use on embedded systems" -HOMEPAGE="https://sourceware.org/newlib/" - -LICENSE="NEWLIB LIBGLOSS GPL-2" -SLOT="0" -IUSE="nls threads unicode headers-only nano" -RESTRICT="strip" - -PATCHES=( - "${FILESDIR}"/${PN}-3.3.0-no-nano-cxx.patch -) - -NEWLIBBUILD="${WORKDIR}/build" -NEWLIBNANOBUILD="${WORKDIR}/build.nano" -NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install" - -CFLAGS_FULL="-ffunction-sections -fdata-sections" -CFLAGS_NANO="-Os -ffunction-sections -fdata-sections" - -pkg_setup() { - # Reject newlib-on-glibc type installs - if [[ ${CTARGET} == ${CHOST} ]] ; then - case ${CHOST} in - *-newlib|*-elf) ;; - *) die "Use sys-devel/crossdev to build a newlib toolchain" ;; - esac - fi - - case ${CTARGET} in - msp430*) - if ver_test $(gcc-version ${CTARGET}) -lt 10.1; then - # bug #717610 - die "gcc for ${CTARGET} has to be 10.1 or above" - fi - ;; - esac -} - -src_configure() { - # TODO: we should fix this - unset LDFLAGS - CHOST=${CTARGET} strip-unsupported-flags - CCASFLAGS_ORIG="${CCASFLAGS}" - CFLAGS_ORIG="${CFLAGS}" - - local myconf=( - # The top-level configure doesn't utilize this flag, but subdirs do, - # so autodetection for econf doesn't work. Add ourselves. - --disable-silent-rules - # Disable legacy syscall stub code in newlib. These have been - # moved to libgloss for a long time now, so the code in newlib - # itself just gets in the way. - --disable-newlib-supplied-syscalls - ) - [[ ${CTARGET} == "spu" ]] \ - && myconf+=( --disable-newlib-multithread ) \ - || myconf+=( $(use_enable threads newlib-multithread) ) - - mkdir -p "${NEWLIBBUILD}" - cd "${NEWLIBBUILD}" - - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}" - ECONF_SOURCE=${S} \ - econf \ - $(use_enable unicode newlib-mb) \ - $(use_enable nls) \ - "${myconf[@]}" - - # Build newlib-nano beside newlib (original) - # Based on https://tracker.debian.org/media/packages/n/newlib/rules-2.1.0%2Bgit20140818.1a8323b-2 - if use nano ; then - mkdir -p "${NEWLIBNANOBUILD}" || die - cd "${NEWLIBNANOBUILD}" || die - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}" - ECONF_SOURCE=${S} \ - econf \ - $(use_enable unicode newlib-mb) \ - $(use_enable nls) \ - --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 \ - "${myconf[@]}" - fi -} - -src_compile() { - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}" - emake -C "${NEWLIBBUILD}" - - if use nano ; then - export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}" - export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}" - emake -C "${NEWLIBNANOBUILD}" - fi -} - -src_install() { - cd "${NEWLIBBUILD}" || die - emake DESTDIR="${D}" install - - if use nano ; then - cd "${NEWLIBNANOBUILD}" || die - emake DESTDIR="${NEWLIBNANOTMPINSTALL}" install - # Rename nano lib* files to lib*_nano and move to the real ${D} - local nanolibfiles="" - nanolibfiles=$(find "${NEWLIBNANOTMPINSTALL}" -regex ".*/lib\(c\|g\|m\|rdimon\|gloss\)\.a" -print) - for f in ${nanolibfiles}; do - local l="${f##${NEWLIBNANOTMPINSTALL}}" - mv -v "${f}" "${D}/${l%%\.a}_nano.a" || die - done - - # Move newlib-nano's version of newlib.h to newlib-nano/newlib.h - mkdir -p "${ED}/usr/${CTARGET}/include/newlib-nano" || die - mv "${NEWLIBNANOTMPINSTALL}/${EPREFIX}/usr/${CTARGET}/include/newlib.h" \ - "${ED}/usr/${CTARGET}/include/newlib-nano/newlib.h" || die - fi - - # minor hack to keep things clean - rm -rf "${D}"/usr/share/info || die - rm -rf "${D}"/usr/info || die -} |