From 391b5b359a346aff490103da7dddc85047f83830 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 1 Oct 2021 20:54:53 +0100 Subject: gentoo resync : 01.10.2021 --- sys-libs/newlib/Manifest | 4 +- sys-libs/newlib/newlib-4.1.0-r1.ebuild | 154 +++++++++++++++++++++++++++++++++ sys-libs/newlib/newlib-4.1.0.ebuild | 154 --------------------------------- sys-libs/newlib/newlib-9999.ebuild | 4 +- 4 files changed, 158 insertions(+), 158 deletions(-) create mode 100644 sys-libs/newlib/newlib-4.1.0-r1.ebuild delete mode 100644 sys-libs/newlib/newlib-4.1.0.ebuild (limited to 'sys-libs/newlib') diff --git a/sys-libs/newlib/Manifest b/sys-libs/newlib/Manifest index 504b70c3416e..dc46e6faef86 100644 --- a/sys-libs/newlib/Manifest +++ b/sys-libs/newlib/Manifest @@ -1,5 +1,5 @@ AUX newlib-3.3.0-no-nano-cxx.patch 1338 BLAKE2B ff16751b01784a38dc07aa79120c38f0274bb14caeeb653cecca4b3ca69c60a72e0e1918fea8f2c0f4734293817539122fa41b349f61ceabb3cb9ae878a11d13 SHA512 08dfc7d854dc75c8b875fa7c1829078c8df8988b4ba2b20739d387c656ca63b8b344487861d23658e31b72f911d05c2f57abe51bdf3b2dedcc88ce072c6595c8 DIST newlib-4.1.0.tar.gz 18648429 BLAKE2B c4d4d734bceeacf05b75d450d4316392d0000266812f98f99cd3f9f0926ac9848e1dc145361827d1d6951edfe5f109923c982d9f284f927ffc5fd5e5edaf8be6 SHA512 6a24b64bb8136e4cd9d21b8720a36f87a34397fd952520af66903e183455c5cf19bb0ee4607c12a05d139c6c59382263383cb62c461a839f969d23d3bc4b1d34 -EBUILD newlib-4.1.0.ebuild 4458 BLAKE2B 1dd071212b733aec7c9b274c966439517eefec491cc99e2e2b2068b08dfca5b80de3de4482a67e5c1a6c51a4f53154b545115d883b98cf1e6d9c17636f02920f SHA512 7934761958f4171a30c109d46b5fe4f353f1a8f812a69663e4315a472cceb378102d862d335b0c991e3a479c2557daa960a8502aa1686b49456ee0629c2e133b -EBUILD newlib-9999.ebuild 4458 BLAKE2B 1dd071212b733aec7c9b274c966439517eefec491cc99e2e2b2068b08dfca5b80de3de4482a67e5c1a6c51a4f53154b545115d883b98cf1e6d9c17636f02920f SHA512 7934761958f4171a30c109d46b5fe4f353f1a8f812a69663e4315a472cceb378102d862d335b0c991e3a479c2557daa960a8502aa1686b49456ee0629c2e133b +EBUILD newlib-4.1.0-r1.ebuild 4461 BLAKE2B 773ba5ca88402bde9d676c7e989151ec62b860b29d0d37922b81df9fe1ae8a7cabb7ecdc200cdada5aaab543cac51344b74ce2015152a8214bb943d171b3ae9d SHA512 323a94f3ca36f9b23749a1373aa52cc4cb5d496fc21d34d58544026881a8cf0c136a15c63e0ddd596ff73593bf4fe057b9b3bb862118acc3a50c82ee4d2a62a8 +EBUILD newlib-9999.ebuild 4461 BLAKE2B 773ba5ca88402bde9d676c7e989151ec62b860b29d0d37922b81df9fe1ae8a7cabb7ecdc200cdada5aaab543cac51344b74ce2015152a8214bb943d171b3ae9d SHA512 323a94f3ca36f9b23749a1373aa52cc4cb5d496fc21d34d58544026881a8cf0c136a15c63e0ddd596ff73593bf4fe057b9b3bb862118acc3a50c82ee4d2a62a8 MISC metadata.xml 414 BLAKE2B 0e367a5f7b225bd2d381433ff239e076c3de8feb795ddb586d867bbc9a1b990379a3f27a39ede9549c7e328262004101e4392560717f596c941e9a152848eacb SHA512 44000ecc340eb2da9391ac9b226486e0f95aeb8de5bc7633882fef97943e0348bbb04ada64a15c82d2995d8aaedac5da1fa8c9d453c4ab3d2efc51ce06ab6477 diff --git a/sys-libs/newlib/newlib-4.1.0-r1.ebuild b/sys-libs/newlib/newlib-4.1.0-r1.ebuild new file mode 100644 index 000000000000..a5ec41db3c45 --- /dev/null +++ b/sys-libs/newlib/newlib-4.1.0-r1.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2021 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="~arm ~hppa ~m68k ~mips ~ppc ~ppc64 ~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.1.0.ebuild b/sys-libs/newlib/newlib-4.1.0.ebuild deleted file mode 100644 index e16fd4c10b75..000000000000 --- a/sys-libs/newlib/newlib-4.1.0.ebuild +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright 1999-2020 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="~arm ~hppa ~m68k ~mips ~ppc ~ppc64 ~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\|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-9999.ebuild b/sys-libs/newlib/newlib-9999.ebuild index e16fd4c10b75..a5ec41db3c45 100644 --- a/sys-libs/newlib/newlib-9999.ebuild +++ b/sys-libs/newlib/newlib-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -136,7 +136,7 @@ src_install() { 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\|rdimon\)\.a" -print) + 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 -- cgit v1.2.3