summaryrefslogtreecommitdiff
path: root/sys-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-20 23:41:21 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-20 23:41:21 +0000
commit374561aeaff53ce5a2836af934749923b4ea3763 (patch)
tree66880cb44879bf28002f361a4c862814df616b8f /sys-libs
parentea0515fa73da4755b498bdb18bd7fd7a13e616cf (diff)
gentoo auto-resync : 20:01:2023 - 23:41:20
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/Manifest.gzbin14550 -> 14554 bytes
-rw-r--r--sys-libs/newlib/Manifest4
-rw-r--r--sys-libs/newlib/newlib-4.3.0.20230120.ebuild153
-rw-r--r--sys-libs/newlib/newlib-9999.ebuild13
4 files changed, 162 insertions, 8 deletions
diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz
index 55bcde4d52e0..52eaa7a88913 100644
--- a/sys-libs/Manifest.gz
+++ b/sys-libs/Manifest.gz
Binary files differ
diff --git a/sys-libs/newlib/Manifest b/sys-libs/newlib/Manifest
index 4ec054ef72df..d1d2fdb9eaa8 100644
--- a/sys-libs/newlib/Manifest
+++ b/sys-libs/newlib/Manifest
@@ -1,7 +1,9 @@
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
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
EBUILD newlib-4.1.0-r1.ebuild 4482 BLAKE2B b66394e3023130851f37adbba484d7a394c0d41e5a1d04f534bf1e1d71ed57d0ee65deccc6b1e10569bfca7d4f87b354eca82d785991f8bed0e22741104416c0 SHA512 cce2be618954ee7e935159f3549773d25d0cf1ef5fd72ea638ce38783f0b0314b3d2f7b86fa8ef24e1039eaf392ce3eea0a4fb765ef6dd54a5a27c38147d5c73
EBUILD newlib-4.2.0.20211231.ebuild 4502 BLAKE2B 66102221f039f37e4ee99de3b77389b19520869234b545f1a263d25487c551876a84bb854e39796d56f18bcc2771b444a417b86a10cc574ebfb1a18764a3eae8 SHA512 b61c63d696541d40c4ddbfc39fb6f626b00aebde4244b1239e58335482b77065826bfeaa6ecf0e2eb0b1b134f6c4ea3cd4d01bdf0a72e24e889c8379e3bfe607
-EBUILD newlib-9999.ebuild 4502 BLAKE2B 66102221f039f37e4ee99de3b77389b19520869234b545f1a263d25487c551876a84bb854e39796d56f18bcc2771b444a417b86a10cc574ebfb1a18764a3eae8 SHA512 b61c63d696541d40c4ddbfc39fb6f626b00aebde4244b1239e58335482b77065826bfeaa6ecf0e2eb0b1b134f6c4ea3cd4d01bdf0a72e24e889c8379e3bfe607
+EBUILD newlib-4.3.0.20230120.ebuild 4427 BLAKE2B a0d4427fcf2a216cab88d89f764499130d816c4b1ff4c85cf3fe71bff90f88c710491b0993a7fca96f3eb3b4d740f7b121862fe6f4924474241d23594a7ceda0 SHA512 6f0736c6c32ea79fabebbe0531332ddcad315aa883ea9def17c9a07cebc02aaace1ab0b1f77a6351ccca4dbff17d51eec29129632340fea83bae3fbf37c22365
+EBUILD newlib-9999.ebuild 4427 BLAKE2B a0d4427fcf2a216cab88d89f764499130d816c4b1ff4c85cf3fe71bff90f88c710491b0993a7fca96f3eb3b4d740f7b121862fe6f4924474241d23594a7ceda0 SHA512 6f0736c6c32ea79fabebbe0531332ddcad315aa883ea9def17c9a07cebc02aaace1ab0b1f77a6351ccca4dbff17d51eec29129632340fea83bae3fbf37c22365
MISC metadata.xml 414 BLAKE2B 0e367a5f7b225bd2d381433ff239e076c3de8feb795ddb586d867bbc9a1b990379a3f27a39ede9549c7e328262004101e4392560717f596c941e9a152848eacb SHA512 44000ecc340eb2da9391ac9b226486e0f95aeb8de5bc7633882fef97943e0348bbb04ada64a15c82d2995d8aaedac5da1fa8c9d453c4ab3d2efc51ce06ab6477
diff --git a/sys-libs/newlib/newlib-4.3.0.20230120.ebuild b/sys-libs/newlib/newlib-4.3.0.20230120.ebuild
new file mode 100644
index 000000000000..83237271fd55
--- /dev/null
+++ b/sys-libs/newlib/newlib-4.3.0.20230120.ebuild
@@ -0,0 +1,153 @@
+# 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 -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-9999.ebuild b/sys-libs/newlib/newlib-9999.ebuild
index 39e03d098e4d..83237271fd55 100644
--- a/sys-libs/newlib/newlib-9999.ebuild
+++ b/sys-libs/newlib/newlib-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -37,12 +37,8 @@ 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"
+CFLAGS_FULL="-ffunction-sections -fdata-sections"
+CFLAGS_NANO="-Os -ffunction-sections -fdata-sections"
pkg_setup() {
# Reject newlib-on-glibc type installs
@@ -71,6 +67,9 @@ src_configure() {
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.