summaryrefslogtreecommitdiff
path: root/sys-devel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-06 00:10:59 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-06 00:10:59 +0000
commit22eaa60297c2dbc92dd1658fb7d8e46878552755 (patch)
treec3e1147cecf778a6418d736658cedc5d7f2dfa2d /sys-devel
parente019d91362a4788fe5cc5788877327b813d0f730 (diff)
gentoo auto-resync : 06:02:2025 - 00:10:59
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/Manifest.gzbin6221 -> 6218 bytes
-rw-r--r--sys-devel/binutils-hppa64/Manifest6
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.44.ebuild577
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-9999.ebuild577
-rw-r--r--sys-devel/binutils-hppa64/metadata.xml1
-rw-r--r--sys-devel/clang-crossdev-wrappers/Manifest9
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild5
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild5
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild7
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild7
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-20.ebuild42
-rw-r--r--sys-devel/patch/Manifest3
-rw-r--r--sys-devel/patch/files/patch-2.7.6-configure-mkdir-spruced-up.patch38
-rw-r--r--sys-devel/patch/files/patch-2.7.6-ndebug-assert-hash-table.patch37
-rw-r--r--sys-devel/patch/patch-2.7.6-r7.ebuild86
-rw-r--r--sys-devel/rust-std/Manifest2
-rw-r--r--sys-devel/rust-std/rust-std-1.84.1.ebuild154
17 files changed, 1537 insertions, 19 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz
index 257173a4fd9f..08e0d95782f2 100644
--- a/sys-devel/Manifest.gz
+++ b/sys-devel/Manifest.gz
Binary files differ
diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index f3d7177b4061..9fa1437214e3 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -13,6 +13,8 @@ DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5
DIST binutils-2.43-patches-2.tar.xz 35184 BLAKE2B fa35c9f182c7ae0fed28614f47618d1563a58f223fd1805f348b618c1fbf039a444e44d88f46d040b6971e481e0da882e5c4492fd167d17bf39579d87a446434 SHA512 a7e167d3f6a2c08f19af4685d90a6160a1a52f1a87f5660fb6d80ec664033829c0eacad0d77b1306620e50ff89d1f9f63a7c2b064ad9775400f0cb0eba3159a4
DIST binutils-2.43-patches-3.tar.xz 62692 BLAKE2B a189a01a6a99c4fdff124cf90ecc18f874812c17fc735376c855469c487b6a71489ad5c2f86c518d2e029cc83d65757144ff9abddbe7ec3fc06e22f9501c62f4 SHA512 99a30e18fdfd7bdce85bb903f8d61837cfbb639ead8a680ff1a85ad1d615b658e696bdf196c4a002d029f952d34aa441e09e861b22f5400c65f07cce5934cd8f
DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb
+DIST binutils-2.44-patches-1.tar.xz 9156 BLAKE2B c72a7d0ffdb852f8de9c18e187b5768085b3a070744a4fadef508ab0e865d3a3967ec12a0ee7a325b6b689f39e5243aacd9d3f73ceb723d53592ec6ca640161b SHA512 053de98536e92837d0a08fac26bb0f057431747fe6e82f8b9ac54dd9aed65d8de379d653c0e8a8cd31267b9769825a420db5f40957f8c4eb54a7e4a9d76fadb8
+DIST binutils-2.44.tar.xz 27285788 BLAKE2B 0eb031ace9fb5a7047b81b5a05b1760f7d332c8ed67f98899f153a45f181b83e661a484551af05c0a9b2adc422da84619103c7b1f3c9fad5327872832b5446aa SHA512 b85d3bbc0e334cf67a96219d3c7c65fbf3e832b2c98a7417bf131f3645a0307057ec81cd2b29ff2563cec53e3d42f73e2c60cc5708e80d4a730efdcc6ae14ad7
EBUILD binutils-hppa64-2.37_p1-r2.ebuild 12850 BLAKE2B 3359bbaab0af3be9e6cc5f84959caa5b3d57d0af838b7a952854051b647fa496bf7dc3b0582c5bbd518f55fc38bb06d3bdf67ea85f7c3af0d892993741cc3672 SHA512 5e9ff80f051dde6a7909b2d6827745b038d57ee0aeee7e1f5dbbbdb1f08941444a971d5296dc65b9341e02ca383b46f7bd484f68cee74bb1682de22cab7bd4d5
EBUILD binutils-hppa64-2.38-r2.ebuild 12858 BLAKE2B a91eea4d22fd3dc6c3d9010b256d006f3a832cb390ba9e387bfd4a5c4ceeb6fe8ad02624f50c957b2917b528451e31e2c4d5f048d12f78c1224ee71660f06b21 SHA512 b185556f88eff64c40a12fecee2f9d7f0873b9d59926cd853831d6d7a9b6f7fba71541ca0f93eb9919795041f5e2ff0049f855dda8537300e66e1bd687e8f446
EBUILD binutils-hppa64-2.39-r5.ebuild 13863 BLAKE2B 0e88fddae6ee0f05a7a34d60a8781bae08c2fca3c8599756054dcb51d304b2ff4ae43c072e68ed8045f70a120efa9422cf6ed76302f1fd1e088721f24cca73d4 SHA512 5973e97817c730917c2697a542e67c63e3c51494094ced7778f932fee35fd192fbc0d0b2e5bfbc8cb554224586a48afdcd0ca331ab8531e01a8410a59c422890
@@ -21,4 +23,6 @@ EBUILD binutils-hppa64-2.41-r5.ebuild 14048 BLAKE2B 4290a888bb76e52e1e9f32e08193
EBUILD binutils-hppa64-2.42-r2.ebuild 15050 BLAKE2B 12c416e003cb069390df8b41c52ff3d39336762103f1ed772504b8827da75353a5c713ba8f3871e909f29964a367663a8c8702c66fb2f7be9b9f874114f55517 SHA512 1dc91becc7d292b93e9e1a61509883c516910f7611820309d5d435b47711b12e76aebf65f687486230b4dea8e27b7bd543082b3e94951bb4d9884382cebbca2f
EBUILD binutils-hppa64-2.43-r1.ebuild 15051 BLAKE2B 4e4fbe505015299a78d0094c478fff36335a9649e1d72fb49ab70cd5484d040c86db957ff278fcff2880210c3cb77bdd5bed0696b4886710bb0dcfb5a7870d7c SHA512 7767ad7dfa5f2a62f0f24f93327a425284947311889c50c9eac6b4642cc89ea940ad7ac3897b987cc54f609be13c4accc8fd3ed03ecab5b88f25d5855d2d3c95
EBUILD binutils-hppa64-2.43-r2.ebuild 15050 BLAKE2B 012fdcedf5e30e8fe3efe783491bd08521d0c5493fc09ff69e63ceaba07c3e67b69e7abf0522de4585da5267fc9924e5c69a0382a37e2c035b9425eaeedbf267 SHA512 49de0dd639484578847a1bc27cd2f574ed91b85e9194a7dd7458f22deae4407ada606927c8b4d2f62c39b1f2f992baea93f7d8b99e68f2e3006d9fd2b9911914
-MISC metadata.xml 1110 BLAKE2B 0a916aa36bbf2a81095732fc321d989c9ff369de43474ff98317530c19085d1f20f5934ede2caa5939e2b4dbd29c1d98ea35de1ad4056db396c72e75abf97aa9 SHA512 216d0df87f2eb99c79b9417ff295280a05c48757d4969b3a6a48a8dfbe4004a67511006b192680432f971ebb6e5950a2b0d20ce50415cb13123badbe9ece95d5
+EBUILD binutils-hppa64-2.44.ebuild 16375 BLAKE2B 17417c215935b17a59a0a354d231778125c22c72a4c81e4ce99daa9be88c3a1d468f8b91474e8dcad62d6de663038a9caeb67d7c0165b31395bc7f6eb8db789d SHA512 a514094b99f2cab162fb5c2e0da113271b2a0241733f61bbd8329242e1fd7f6d23bdc8f96350eb2ebaaa34f8aa883bd048fb14a5d0850254c0630d8de54da7e9
+EBUILD binutils-hppa64-9999.ebuild 16375 BLAKE2B 17417c215935b17a59a0a354d231778125c22c72a4c81e4ce99daa9be88c3a1d468f8b91474e8dcad62d6de663038a9caeb67d7c0165b31395bc7f6eb8db789d SHA512 a514094b99f2cab162fb5c2e0da113271b2a0241733f61bbd8329242e1fd7f6d23bdc8f96350eb2ebaaa34f8aa883bd048fb14a5d0850254c0630d8de54da7e9
+MISC metadata.xml 1196 BLAKE2B a4ddcf2032f9a57adcbf32b4439a4461ef1fda39d06d391252463c75ac454ee63556d5e23410f3460f84f48b93d56bd8d11e7922d29f477c298fde1d61881622 SHA512 40e9f31b3a75ec8c29b89ba7a218d7ba87eeb420495b32243e0a021f46642ea8fb133dcf4083a04306d0b608538187fafa89c67ffe0b09a8bd882e6e9ba38620
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.44.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.44.ebuild
new file mode 100644
index 000000000000..4a104db1825c
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.44.ebuild
@@ -0,0 +1,577 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla xxhash zstd"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ SLOT=${PV}
+elif [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ SLOT=$(ver_cut 1-2)
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ #KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="
+ ${RDEPEND}
+ xxhash? ( dev-libs/xxhash )
+"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ pgo? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+ if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="
+ https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git
+ https://github.com/gentoo/binutils-patches
+ "
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ if [[ ${PV} != 9999 ]] ; then
+ EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch
+ fi
+ EGIT_REPO_URI="
+ https://sourceware.org/git/binutils-gdb.git
+ https://git.sr.ht/~sourceware/binutils-gdb
+ https://gitlab.com/x86-binutils/binutils-gdb.git
+ "
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999 ]] ; then
+ patchsetname="from git master"
+ elif [[ ${PV} == *9999 ]] ; then
+ patchsetname="from git branch ${EGIT_BRANCH}"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == *9999 ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
+ eapply "${FILESDIR}"/binutils-2.43-linker-search-path.patch \
+ "${FILESDIR}"/binutils-2.43-linker-prefix.patch
+ fi
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ --enable-relro
+ --enable-install-libiberty
+ --enable-textrel-check=$(usex hardened error warning)
+ # Things to think about
+ #--enable-deterministic-archives
+ --enable-new-dtags
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with xxhash)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
+ # Strip out broken static link flags: https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+
+ # Enables colored disassembly by default (equivalent to passing
+ # --disassembler-color=terminal to all objdump invocations).
+ --enable-colored-disassembly
+ )
+
+ case ${CTARGET} in
+ x86_64-*|aarch64*|arm64*|i[3456]*)
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #
+ # TODO: Get the logic for this fixed upstream so it doesn't
+ # create impossible broken combinations on some arches, like mips.
+ #
+ # TODO: Get the logic for this fixed upstream so --disable-* works
+ # as expected.
+ myconf+=(
+ --enable-warn-execstack=yes
+ --enable-warn-rwx-segments=yes
+ )
+
+ if use hardened ; then
+ myconf+=(
+ # TOOD: breaks glibc test suite
+ #--enable-error-execstack=yes
+ #--enable-error-rwx-segments=yes
+ --enable-default-execstack=no
+ )
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ if use elibc_musl ; then
+ # Override our earlier setting for musl, as textrels don't
+ # work there at all. See bug #707660.
+ myconf+=(
+ --enable-textrel-check=error
+ )
+ fi
+
+ if use test || { use pgo && tc-is-lto ; } ; then
+ # -Wa,* needs to be consistent everywhere or lto-wrapper will complain
+ filter-flags '-Wa,*'
+ fi
+
+ if ! is_cross ; then
+ # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+ myconf+=( $(use_enable pgo pgo-build) )
+
+ if use pgo ; then
+ # We let configure handle it for us because it has to run
+ # the testsuite later on for profiling, and LTO isn't compatible
+ # with the testsuite.
+ filter-lto
+
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ # see linker prefix patch
+ emake \
+ tooldir="${EPREFIX}${TOOLPATH}" \
+ gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+ all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ (
+ # Tests don't expect LTO
+ filter-lto
+
+ # lto-wrapper warnings which confuse tests
+ filter-flags '-Wa,*'
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check \
+ CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
+ CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
+ LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+ )
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ docompress "${DATAPATH}"/{info,man}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # the hppa64 hack; this should go into 9999 as a PN-conditional
+ # tweak the default fake list a little bit
+ cd "${D}"/etc/env.d/binutils
+ sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET} || eerror binutils-config returned an error
+ else
+ binutils-config ${choice} || eerror binutils-config returned an error
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-9999.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-9999.ebuild
new file mode 100644
index 000000000000..4a104db1825c
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-9999.ebuild
@@ -0,0 +1,577 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla xxhash zstd"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ SLOT=${PV}
+elif [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ SLOT=$(ver_cut 1-2)
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ #KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="
+ ${RDEPEND}
+ xxhash? ( dev-libs/xxhash )
+"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ pgo? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+ if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="
+ https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git
+ https://github.com/gentoo/binutils-patches
+ "
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ if [[ ${PV} != 9999 ]] ; then
+ EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch
+ fi
+ EGIT_REPO_URI="
+ https://sourceware.org/git/binutils-gdb.git
+ https://git.sr.ht/~sourceware/binutils-gdb
+ https://gitlab.com/x86-binutils/binutils-gdb.git
+ "
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999 ]] ; then
+ patchsetname="from git master"
+ elif [[ ${PV} == *9999 ]] ; then
+ patchsetname="from git branch ${EGIT_BRANCH}"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == *9999 ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
+ eapply "${FILESDIR}"/binutils-2.43-linker-search-path.patch \
+ "${FILESDIR}"/binutils-2.43-linker-prefix.patch
+ fi
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ --enable-relro
+ --enable-install-libiberty
+ --enable-textrel-check=$(usex hardened error warning)
+ # Things to think about
+ #--enable-deterministic-archives
+ --enable-new-dtags
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with xxhash)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
+ # Strip out broken static link flags: https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+
+ # Enables colored disassembly by default (equivalent to passing
+ # --disassembler-color=terminal to all objdump invocations).
+ --enable-colored-disassembly
+ )
+
+ case ${CTARGET} in
+ x86_64-*|aarch64*|arm64*|i[3456]*)
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #
+ # TODO: Get the logic for this fixed upstream so it doesn't
+ # create impossible broken combinations on some arches, like mips.
+ #
+ # TODO: Get the logic for this fixed upstream so --disable-* works
+ # as expected.
+ myconf+=(
+ --enable-warn-execstack=yes
+ --enable-warn-rwx-segments=yes
+ )
+
+ if use hardened ; then
+ myconf+=(
+ # TOOD: breaks glibc test suite
+ #--enable-error-execstack=yes
+ #--enable-error-rwx-segments=yes
+ --enable-default-execstack=no
+ )
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ if use elibc_musl ; then
+ # Override our earlier setting for musl, as textrels don't
+ # work there at all. See bug #707660.
+ myconf+=(
+ --enable-textrel-check=error
+ )
+ fi
+
+ if use test || { use pgo && tc-is-lto ; } ; then
+ # -Wa,* needs to be consistent everywhere or lto-wrapper will complain
+ filter-flags '-Wa,*'
+ fi
+
+ if ! is_cross ; then
+ # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+ myconf+=( $(use_enable pgo pgo-build) )
+
+ if use pgo ; then
+ # We let configure handle it for us because it has to run
+ # the testsuite later on for profiling, and LTO isn't compatible
+ # with the testsuite.
+ filter-lto
+
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ # see linker prefix patch
+ emake \
+ tooldir="${EPREFIX}${TOOLPATH}" \
+ gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+ all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ (
+ # Tests don't expect LTO
+ filter-lto
+
+ # lto-wrapper warnings which confuse tests
+ filter-flags '-Wa,*'
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check \
+ CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
+ CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
+ LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+ )
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ docompress "${DATAPATH}"/{info,man}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # the hppa64 hack; this should go into 9999 as a PN-conditional
+ # tweak the default fake list a little bit
+ cd "${D}"/etc/env.d/binutils
+ sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET} || eerror binutils-config returned an error
+ else
+ binutils-config ${choice} || eerror binutils-config returned an error
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils-hppa64/metadata.xml b/sys-devel/binutils-hppa64/metadata.xml
index 5e566060dac2..2b2732a97fa5 100644
--- a/sys-devel/binutils-hppa64/metadata.xml
+++ b/sys-devel/binutils-hppa64/metadata.xml
@@ -18,6 +18,7 @@
<flag name="plugins">Enable plugin support in tools</flag>
<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
<flag name="debuginfod">Enable debuginfod support via <pkg>dev-libs/elfutils</pkg> libdebuginfod</flag>
+ <flag name="xxhash">Use <pkg>dev-libs/xxhash</pkg> for --build-id=xx support</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
diff --git a/sys-devel/clang-crossdev-wrappers/Manifest b/sys-devel/clang-crossdev-wrappers/Manifest
index f9457aeae90d..c715e7ae3098 100644
--- a/sys-devel/clang-crossdev-wrappers/Manifest
+++ b/sys-devel/clang-crossdev-wrappers/Manifest
@@ -1,5 +1,6 @@
-EBUILD clang-crossdev-wrappers-16.ebuild 996 BLAKE2B 56a2eac0f968771216c974bbb55f4dbf1ea3fe39e23b0bac0836cc4120e06c25c5b47c1daa4b3f2be15442f69344edfd6190e651d5a93b918e1996ec317258ba SHA512 24cec49a7e8fee2ee340c46a6534e15779466dd0ed96fe386a5c1aeb1aafee0a6c0302fd3eeea396d088964e9dd5213c6af7a3705a30cbe46b40bb5242f76156
-EBUILD clang-crossdev-wrappers-17.ebuild 996 BLAKE2B 56a2eac0f968771216c974bbb55f4dbf1ea3fe39e23b0bac0836cc4120e06c25c5b47c1daa4b3f2be15442f69344edfd6190e651d5a93b918e1996ec317258ba SHA512 24cec49a7e8fee2ee340c46a6534e15779466dd0ed96fe386a5c1aeb1aafee0a6c0302fd3eeea396d088964e9dd5213c6af7a3705a30cbe46b40bb5242f76156
-EBUILD clang-crossdev-wrappers-18.ebuild 1003 BLAKE2B 191b26e83e16debcef0636ab948bf9df52fb61373d7a97c5710a7a881a7bc6c208f0a093cf8bb4bda593e105ec49ba40b87281d894df84b846825754f635b940 SHA512 734ce2a7e4f2ff4fb9922333669076474fe84c73eabc6e6e460beb43c9b16fc9cfce1e5a3bcdf9a605dec6545edef057d9d561d5fef2614a9488c3a01e0c82a9
-EBUILD clang-crossdev-wrappers-19.ebuild 928 BLAKE2B fa6de481884755c7231ed388b364edbbae1099d8e333e1890f85aab20f23e0d2f8f931acd8560164a7442a24495fb73189871f15bfadb9e19a4c6ad2707d18c9 SHA512 a3a7698657ec490d98b7d66829df12a2a4f9ffabf764f601a78dbf55014a1933f70f7ce9aae3e6e3d149801e9e8347957d362f072b3c85dfa4f240441368ac9b
+EBUILD clang-crossdev-wrappers-16.ebuild 975 BLAKE2B 8c32f9f4dc0d4bc4cab789684f39264c223d386df7076fa70b7ccd9de0040c7caaec7361ee12b48695136168ba48e324c0024c57e79ea970710868346b98bfba SHA512 a217d3e066c8aa5cb527d4c2c2bdcf015273fce92ff842cb9f029639ce7cd81730ce54fdc4af67faad8d7f956014080a5a6e1c29a44669e36b5fbaba9b2e875e
+EBUILD clang-crossdev-wrappers-17.ebuild 975 BLAKE2B 8c32f9f4dc0d4bc4cab789684f39264c223d386df7076fa70b7ccd9de0040c7caaec7361ee12b48695136168ba48e324c0024c57e79ea970710868346b98bfba SHA512 a217d3e066c8aa5cb527d4c2c2bdcf015273fce92ff842cb9f029639ce7cd81730ce54fdc4af67faad8d7f956014080a5a6e1c29a44669e36b5fbaba9b2e875e
+EBUILD clang-crossdev-wrappers-18.ebuild 981 BLAKE2B 73de4506f2e2ec3a38b3813827a82b39b75a2a1dbb1288f8f14a5539fdc7e957d45af7e1fa72f0b27f81e74f5f42f85ce0d080cbb185d6e653b5cc9838aa3105 SHA512 7dabe2e7e84e4a8e51d8b3649df0ffe162e721521e3660cf37ee9179966fce12e05be1ebd91858d1716e07f8bc88498c6ab5b90f828b38aa6f6816d3b740abcb
+EBUILD clang-crossdev-wrappers-19.ebuild 999 BLAKE2B f53fc876389bce28ccd6b410820f76e5b0e51570191831c60104f0b5da385a69d9d10f4657d2266c485d8724889b13c06a7e7ae3c1ab981c2e93f9296b6f1f0a SHA512 f35fdb8afb006addc9fb494bc1430a09b1086ef53d9b55777277c600a2a6a43249c10bc74227502b07104908f5e0c6a306ea836459b97e9ec90d32cb0945bc42
+EBUILD clang-crossdev-wrappers-20.ebuild 895 BLAKE2B e0a139f452496de51af7f679a0546ff1149a3d7ccb448ed71fe0462d5781c94cce6d518f331e87505e73667a4889506ca1a3f8caecbf0719dd1c89d04b04f102 SHA512 fd992f0ddcb23ad183a68391897d10dad9f616a5e0f76866e6fd0cad0a9e9b40733fbfb160157a15632345a538259ed62a460ac598746bb49e19a21216845600
MISC metadata.xml 308 BLAKE2B 8a56e0600fd80db6bd01529b04bd4616962e67ee955c95cc6082153f6835efc50e405d18f778ebdb67572c9fe552f6f292ddb960e2802c4bfdac88e00d911d37 SHA512 4c6483cbed3a1b379d433406ac7f04af61d7a0baa8df68e84a173c2d25d6b1dd27e961215235c7cf59a62c5db5917ef8af06696cf84e52d40b364b688c49458a
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild
index 8c956f0568fa..7681bde0dd88 100644
--- a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Gentoo Authors
+# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,7 +7,6 @@ inherit crossdev
DESCRIPTION="Symlinks to a Clang crosscompiler"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
@@ -20,7 +19,7 @@ RDEPEND="
"
src_install() {
- local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ local llvm_path="/usr/lib/llvm/${SLOT}"
into "${llvm_path}"
for exe in "clang" "clang++" "clang-cpp"; do
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild
index 8c956f0568fa..7681bde0dd88 100644
--- a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Gentoo Authors
+# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,7 +7,6 @@ inherit crossdev
DESCRIPTION="Symlinks to a Clang crosscompiler"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
@@ -20,7 +19,7 @@ RDEPEND="
"
src_install() {
- local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ local llvm_path="/usr/lib/llvm/${SLOT}"
into "${llvm_path}"
for exe in "clang" "clang++" "clang-cpp"; do
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild
index 344337caf896..500d6e8d3742 100644
--- a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Gentoo Authors
+# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,12 +7,11 @@ inherit crossdev
DESCRIPTION="Symlinks to a Clang crosscompiler"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos"
+KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos"
RDEPEND="
llvm-core/clang:${SLOT}
@@ -20,7 +19,7 @@ RDEPEND="
"
src_install() {
- local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ local llvm_path="/usr/lib/llvm/${SLOT}"
into "${llvm_path}"
for exe in "clang" "clang++" "clang-cpp"; do
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild
index 0681adeb8455..2387858ba289 100644
--- a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Gentoo Authors
+# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,12 +7,11 @@ inherit crossdev
DESCRIPTION="Symlinks to a Clang crosscompiler"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
-KEYWORDS=""
+KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos"
PROPERTIES="live"
RDEPEND="
@@ -21,7 +20,7 @@ RDEPEND="
"
src_install() {
- local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ local llvm_path="/usr/lib/llvm/${SLOT}"
into "${llvm_path}"
for exe in "clang" "clang++" "clang-cpp"; do
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-20.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-20.ebuild
new file mode 100644
index 000000000000..38497dbb9fa7
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-20.ebuild
@@ -0,0 +1,42 @@
+# Copyright 2022-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit crossdev
+
+DESCRIPTION="Symlinks to a Clang crosscompiler"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+PROPERTIES="live"
+
+RDEPEND="
+ llvm-core/clang:${SLOT}
+ llvm-core/lld:${SLOT}
+"
+
+src_install() {
+ local llvm_path="/usr/lib/llvm/${SLOT}"
+ into "${llvm_path}"
+
+ for exe in "clang" "clang++" "clang-cpp"; do
+ newbin - "${CTARGET}-${exe}" <<-EOF
+ #!/bin/sh
+ exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@}
+ EOF
+ done
+
+ local tools=(
+ ${CTARGET}-clang-${SLOT}:${CTARGET}-clang
+ ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp
+ ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++
+ )
+
+ local t
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${llvm_path}/bin/${t%:*}"
+ done
+}
diff --git a/sys-devel/patch/Manifest b/sys-devel/patch/Manifest
index 1fe8a35404b8..d593558c8ef3 100644
--- a/sys-devel/patch/Manifest
+++ b/sys-devel/patch/Manifest
@@ -8,14 +8,17 @@ AUX patch-2.7.6-CVE-2019-13636.patch 3749 BLAKE2B 162bc7fd617d713cc6e39988eecf66
AUX patch-2.7.6-CVE-2019-13638.patch 1184 BLAKE2B e52b1336a8410538e4c490e08c239eecf29baf03b4226fda865941d081f8289961746ff7526cfce6d298321826c9b3ee047bd56ba1c27f1c53036f3ac2250669 SHA512 d60f8c2364fca9b73aa73b5914cfd6571d11528d13fa7703ccfa93730cbdf8a6e4c9ca04cb7d02a40d33c38075890790b490052d5217e728b0948991da937980
AUX patch-2.7.6-Do-not-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINITY.patch 3046 BLAKE2B 8cdeab68f392b5d89f7857f3126c162fa2859cfc2815ba5507423f958f5f85a1dbbb86244f40c13aa8769d7630fa3b91611e33d41fb12c76d1849152e5652ecc SHA512 f886614c6f4d46d02218a436ae7980014fe6ef0d49114d122623ff0cd946cdeb136eebe33a59a8ccfef070e91cddf86cdca1d7feb8579f734b1bab6decb0bfd4
AUX patch-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch 860 BLAKE2B 3514ecd15b9c379efcb3cfcb0b1bcb389b63a5d6a108f889812498581c62f86655bb0acacc2a1e495a97613140770796030e82d050d12e502f0d3caadcf54097 SHA512 ced7714cba5f038affb29311aa42f112cea99882e38abc41106bed550ad9996fbc3df314fae5168ca305aaa39429f9d81dbf83469f93f7fe3736a044d41cecd9
+AUX patch-2.7.6-configure-mkdir-spruced-up.patch 1119 BLAKE2B d5f8167c0162a6f7103a1b4dee7c46e94507513874c5a18a77938ab57a36505476d811cad5910386009dd459f4d3d690c6240a08c395dd4c847cdca73aaf8706 SHA512 4b15329fb191ab61d00e0bb9411219aab4575132ef8a7290f5cab86974bf4c11304d766eceaca1d71e791b44fffb5157e75b8f5786aab5e8c56ec2e995801c11
AUX patch-2.7.6-configure-mkdir.patch 478 BLAKE2B 95135becb2749c9c0217aa6185a38470c8a6559e713e326a6bf4feb57ad1465e17e7fcdf3c3aafe4f75691749a4303bbada1a40c2f084d74dcd3a41d0014eb9e SHA512 90f2189a7336294eac9d33194645baf761a563067addadb8f195df4980318ff55ccdcdd63e64ce350ed1cb6a2285c5c1b3bb1b902eb12a240d60251747267653
AUX patch-2.7.6-fix-error-handling-with-git-style-patches.patch 3582 BLAKE2B c443abb5112283aeb20db4ccf57c0d1241bfa586ad8d54d0ff2e1ae9026174f560df37dda1fedfc39db8178db05f77a4f94827ede80982311f475f460e4ae57f SHA512 1c05cf05b7348b86c878bd464a3f2f978b3e97655bf4f9aa83732af8bfd1e82046b88db39b7ce70e33ffc00c7f09c28ba777fba3fbd9538fd76767bfc396f382
AUX patch-2.7.6-fix-test-suite.patch 3006 BLAKE2B 4b00c743f880f3cd672d6d37ff89d691d34d38b9652a9434544db10c3e28adf412071a14b5f6e4fcb1cead5e6ec0c20f786b061c96eb3fed4d9e8744a18bb02a SHA512 626256394ca2df1fadfb6cfaaa4458b86912ba70debac88d959ce3c34d2f5791284fb2b9b38b88b3e38a50a1e0f6585f0c860a9866f27c40be4884e95d7d83f2
+AUX patch-2.7.6-ndebug-assert-hash-table.patch 1399 BLAKE2B 3b7633b8991ac40e9c80540b9928378b13c37f71100fb52fc5d8625a38a5c79b6aa5298d62c1408570b293306137b6b5b24a48f63922fdd569fc2d8326981796 SHA512 4296cee5770973d96098acadda45a35f4fe5b2bd51616c903bd4b11aececf5cf9e6c601d5a9dd3c0f402b6efdfa0b86a231bb67b8ea2ef2ef2ca150e05857372
DIST patch-2.7.6.tar.xz 783756 BLAKE2B e3dd2d155a94c39cb60eafc26677e84de14c3a6d5814dff69de091ded52f21862490970254297795f2c42a0c3203f7e88a8f65bb66968f8dfd6e066bf53f2dfb SHA512 fcca87bdb67a88685a8a25597f9e015f5e60197b9a269fa350ae35a7991ed8da553939b4bbc7f7d3cfd863c67142af403b04165633acbce4339056a905e87fbd
DIST patch-2.7.6.tar.xz.sig 801 BLAKE2B 8f2decb10402ecf0208d05ea7cce3bae565d31ee2bb2a118367c117d25b158d8bd525cae654ec0c0e2c036cc8f47a331edc1bb10b100683ade64dfa3b651988b SHA512 1302a1110dcda4f3d83b5263415d72be55c46dae0efb1c123e9c346154e09def5657004bbe7249e2d014555349410e7a5217140dd8852331235f75bcc757351b
DIST patch-2.7.6_p20241103.tar.xz 903028 BLAKE2B 874f390bd9a3ed2c5da59c41c708bf41d9bf3bcfe799a0647c7382013793a29ec331df82510424ff2fd9b280e0594822d08eae1074af774d57f625214edc3578 SHA512 29db065dd17e25aa562acb1d7ba6be780eed59c2cc9b74e76b5d5b2dac1768e25e8a28acde0907825f6d863a7e14ede33537c89361624e3dcfbb6c0fa6fb0cf2
DIST patch-2.7.6_p20241103.tar.xz.sig 833 BLAKE2B 3a065dd0c8f83a0287f091536fa89a9914272ae49bdd2b67f91173365789275427e52f20bfcff50c65194a97e96cd07201781d1d13eb84f0adc2d52d741d8598 SHA512 4ee1151deced3dab999794913a2bfc54096cf42a9c0757b192b7fad71ecd6ec28f4f1451818262f154240e909654253d20b41a555230d260c9c4d29f36dd54ba
EBUILD patch-2.7.6-r6.ebuild 2393 BLAKE2B bee456b5704807b931046f85172a93aa3ed564979a02ff307943b7c4d585d21bdcebc1d637f5914925d0eb9d088f5d2413ab9903ec8daf442a316455c9a2954a SHA512 706529f59336e2d746b88c68acfea63d299372505e021b38fd301f25ae09c3afc2fea9daab73526399dc1fa0898914a1937f9a18d1bce1c0cade10354ec484c6
+EBUILD patch-2.7.6-r7.ebuild 2470 BLAKE2B a2f64c2a715847db3121093c2f9c774121fb0b17d768e394d06a8e90c00b21edaf10d3967af1874a0631db42f2d506ecc62c792aae97a5611da5554f5b1c58bc SHA512 1483a88b0bae665d7edd71a1b9270388eae633f9ba8f7038ff9b22b5143a031894f61f7acb18a093d24568c055412da7e49948fe53b2c5f1b66ee650fe5574b3
EBUILD patch-2.7.6_p20241103.ebuild 2022 BLAKE2B 04d854955a65458923f4a29a357457993b209f871a468f17bd0f42de97eb8a2964c0bb6b38f2c9338f7056ed63383d79c498ccab689092efef04e2cc42e7c6e3 SHA512 11961cfccb1b57a9fd259a5190e65476cdff103c6e358437e267a60509371d9b7ef707a8e019356e3d54cf379d7da4d54e11a3c7632385b62b440812c81a42c5
EBUILD patch-9999.ebuild 1613 BLAKE2B 84d30f889908c17a62e5ecdbc482cb38d558219a5bf222ae25392e5c537995c8328c14920746df9384a87272769dc163ce953c2f53aa2ba809b0bf58ab3ec45d SHA512 183ac7ec9a826506393911f81b5f0736dca3c8a88f9017f706a862f0cd653050e72c858db8fc20a98431caf2fcd8f2c61d238b560c9609d09722b938bed729fd
MISC metadata.xml 329 BLAKE2B ac0ac5e4a422955e2e1cc040d03ab9df083c70d0275145366ffe47c04fb08ac5e9c1cf776ab9c96e023910a0f66a7ff3cfd8377574d8e282cd78c435a6d8bdd2 SHA512 a0c5d5bc2d111a6d22afa4bae0e56ac7f927798122fed5373dd64a214d7b51dc436482bf21eb2ef32073c2f4004cb6dd6449afd58b7ab6936ed3c2e3a4c39872
diff --git a/sys-devel/patch/files/patch-2.7.6-configure-mkdir-spruced-up.patch b/sys-devel/patch/files/patch-2.7.6-configure-mkdir-spruced-up.patch
new file mode 100644
index 000000000000..8ef7a954a4d9
--- /dev/null
+++ b/sys-devel/patch/files/patch-2.7.6-configure-mkdir-spruced-up.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/898598
+https://github.com/coreutils/gnulib/commit/3c136a2cc38d71083f123231a8b9ad4b01930789
+--- a/configure
++++ b/configure
+@@ -17084,6 +17084,8 @@ else
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <errno.h>
++/* Android 4.3 declares fchownat() in <sys/stat.h> instead. */
++#include <sys/stat.h>
+ #include <sys/types.h>
+ int
+ main ()
+@@ -17130,6 +17132,8 @@ else
+ /* end confdefs.h. */
+ #include <unistd.h>
+ #include <fcntl.h>
++ /* Android 4.3 declares fchownat() in <sys/stat.h> instead. */
++ #include <sys/stat.h>
+
+ int
+ main ()
+--- a/lib/unistd.in.h
++++ b/lib/unistd.in.h
+@@ -113,6 +113,13 @@
+ # include <netdb.h>
+ #endif
+
++/* Android 4.3 declares fchownat in <sys/stat.h>, not in <unistd.h>. */
++/* But avoid namespace pollution on glibc systems. */
++#if (@GNULIB_FCHOWNAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \
++ && !defined __GLIBC__
++# include <sys/stat.h>
++#endif
++
+ /* MSVC defines off_t in <sys/types.h>.
+ May also define off_t to a 64-bit type on native Windows. */
+ #if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@
diff --git a/sys-devel/patch/files/patch-2.7.6-ndebug-assert-hash-table.patch b/sys-devel/patch/files/patch-2.7.6-ndebug-assert-hash-table.patch
new file mode 100644
index 000000000000..d3aa7aa4c34e
--- /dev/null
+++ b/sys-devel/patch/files/patch-2.7.6-ndebug-assert-hash-table.patch
@@ -0,0 +1,37 @@
+From 01ae7ce6a7f270937face6aec75db28d30d83059 Mon Sep 17 00:00:00 2001
+Message-ID: <01ae7ce6a7f270937face6aec75db28d30d83059.1738773172.git.sam@gentoo.org>
+From: Sam James <sam@gentoo.org>
+Date: Wed, 5 Feb 2025 16:16:06 +0000
+Subject: [PATCH] Fix dodgy assert with side-effects in insert_cached_dirfd
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Michał Górny <mgorny@gentoo.org> reported that patch was running out of
+FDs and that the `deep-directories` test was failing. This turns out
+to be because `hash_insert` isn't called at all with `-DNDEBUG` because
+`insert_cached_dirfd` only calls it in one case inside of an `assert`.
+
+See https://github.com/conda-forge/patch-feedstock/issues/11.
+
+This regressed in 025a54b789bd88ed15430f8633514e296826983e.
+
+* src/safe.c (insert_cached_dirfd): Don't use 'assert' for 'hash_insert'
+ call with side-effects.
+--- a/src/safe.c
++++ b/src/safe.c
+@@ -183,7 +183,8 @@ static void insert_cached_dirfd (struct cached_dirfd *entry, int keepfd)
+
+ /* Only insert if the parent still exists. */
+ if (! list_empty (&entry->children_link))
+- assert (hash_insert (cached_dirfds, entry) == entry);
++ if (hash_insert (cached_dirfds, entry) != entry)
++ xalloc_die ();
+ }
+
+ static void invalidate_cached_dirfd (int dirfd, const char *name)
+
+base-commit: 1da6bf84db2ed0be88ccb47139256e48243a75f0
+--
+2.48.1
+
diff --git a/sys-devel/patch/patch-2.7.6-r7.ebuild b/sys-devel/patch/patch-2.7.6-r7.ebuild
new file mode 100644
index 000000000000..61ce4a002a1d
--- /dev/null
+++ b/sys-devel/patch/patch-2.7.6-r7.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/patch.asc
+inherit flag-o-matic verify-sig
+
+DESCRIPTION="Utility to apply diffs to files"
+HOMEPAGE="https://www.gnu.org/software/patch/patch.html"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://git.savannah.gnu.org/git/patch.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://gnu/patch/${P}.tar.xz"
+ SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )"
+
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="static test xattr"
+RESTRICT="!test? ( test )"
+
+RDEPEND="xattr? ( sys-apps/attr )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ test? ( sys-apps/ed )
+ verify-sig? ( sec-keys/openpgp-keys-patch )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-test-suite.patch
+ "${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6951.patch
+ "${FILESDIR}"/${PN}-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6952.patch
+ "${FILESDIR}"/${PN}-2.7.6-Do-not-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINITY.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix1.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix2.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13636.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13638.patch
+ "${FILESDIR}"/${PN}-2.7.6-Avoid-invalid-memory-access-in-context-format-diffs.patch
+ "${FILESDIR}"/${PN}-2.7.6-configure-mkdir-spruced-up.patch
+ "${FILESDIR}"/${PN}-2.7.6-ndebug-assert-hash-table.patch
+)
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+
+ cd "${S}" || die
+ ./bootstrap || die
+ elif use verify-sig ; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
+ fi
+
+ default
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ local myeconfargs=(
+ $(use_enable xattr)
+ # rename to gpatch for better BSD compatibility
+ --program-prefix=g
+ )
+ # Do not let $ED mess up the search for `ed` 470210.
+ ac_cv_path_ED=$(type -P ed) \
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ emake check gl_public_submodule_commit=
+}
+
+src_install() {
+ default
+
+ # symlink to the standard name
+ dosym gpatch /usr/bin/patch
+ dosym gpatch.1 /usr/share/man/man1/patch.1
+}
diff --git a/sys-devel/rust-std/Manifest b/sys-devel/rust-std/Manifest
index d3bac054ec8d..f3b00dfd3e50 100644
--- a/sys-devel/rust-std/Manifest
+++ b/sys-devel/rust-std/Manifest
@@ -9,6 +9,7 @@ DIST rustc-1.81.0-src.tar.xz 216743872 BLAKE2B d9f52da9092d0723c862ebbb2dc351cad
DIST rustc-1.82.0-src.tar.xz 219769328 BLAKE2B 611f33e134c2d459c9af1695c0a4d033df93afc986e91a17fceb0dd293fb4ffbd5f7475ef571d36cecf49da6c3fdb3801c98d7f72f9dd1c39e42502f649b192f SHA512 d158c7c71c1814bde2a3ec3cbeabe34949bd3201b730c0d7ec6baad4158bb28dd13696c430a6b99dc38b9d23ad7ddf8dde7d2487cbfbbbe9c3473016994210f0
DIST rustc-1.83.0-src.tar.xz 353808388 BLAKE2B 217c85f7351a7c57a2684da2c7c81a32094187b3812dee628b327a5b2faca57235abc54d033c586c071c8bfa0c7360bb28761aaa42fe18414e388db704d81231 SHA512 64db57949c6ac1df6a3f4c6bd0938685a5fb1bc3d318b34ccfcfccb0f9eff1cffd4d8a53a190ef0409eeca9ad12bc6234c2c1de69196cc74ae02d6afa20d0ce6
DIST rustc-1.84.0-src.tar.xz 354993944 BLAKE2B e4697d8a9f42484556ed490390aef535b2214ccb3715ade57936211c1c637737da5f2b9a6c53a30df0fba1744fbd80d4d1382c0b74f6b36b36098bf187557201 SHA512 9e964c1b964e74083a9002fa04b072fa8fe7a520b24ad55e88a89bb2a2a2cd5727c5438d6db425b824ae7502ab215c2dd3f49777efd65f76bae09965df2e070a
+DIST rustc-1.84.1-src.tar.xz 355078168 BLAKE2B 849e8c909493bf76ce9749b9dcb1967180223b91a41d690bc477e78557d4e24949c9a8d8276d824af8c54ad62bc4a998e7a8efbc0bbd2008a4f64f51a7690d48 SHA512 f1cc4765736551508408126e44086988e8ddc30c1a929bf7b61c6be85ad0d65928dd5fb1041cfaeee8eb37d2208f2c1917e276aef2bc9a8e40e34f6713b349e1
EBUILD rust-std-1.71.1.ebuild 3434 BLAKE2B b419921941149604dde46b09eaf4c6c3456a750e86984e9da87f55a8c26a6f47ad0af220c9bf25eeb64087417cf03bfe21f2c649b9e4a470fac704665ea03991 SHA512 7b01967a53f8cc7343088ce1e744a5622f2e6129df1e3807490b782a9819e71493dd06cb848cdd748aa8caa8edda51af1c7088c819e249855cd2143c5b824df1
EBUILD rust-std-1.74.1.ebuild 3425 BLAKE2B 565cff2ad12983badb862c9c4cdf1ca6b29de258e0a612cc3320fab5b4802fe7fb15ca6e15e9a7f4007675a6ca9d9b294b01deaed19b61b411199ce5e70f25bd SHA512 49c10f5731a6d22c86b07497135c7a372bdc6d6c9cf5e6f4ec6848a73725d1238a94fc814763e60d6e680d1720e33e2607a458a5fbae41a043d6514abc9c4fbb
EBUILD rust-std-1.75.0.ebuild 3513 BLAKE2B 0c7896ca2859e793c0daef7f0c8b28ec676dc80c737602bd127f420f651c922f4d5e4d0d066a4f22f3bf7f23d3b3e3da4b8903dd6b3cda8a00b170b44ee24906 SHA512 c4261b37358667ac32851fda7f79eb210bec30b2de69d5b867a5e6a6b26bbb10eb1acea2837fff4b836e0642982b15dff1b75912b0548959e5c9600d174c36ce
@@ -19,4 +20,5 @@ EBUILD rust-std-1.81.0.ebuild 3424 BLAKE2B a1c2699723dfe16c431d46779b4bfa0360116
EBUILD rust-std-1.82.0.ebuild 3424 BLAKE2B a1c2699723dfe16c431d46779b4bfa03601162a912961e0c0c0c3aa95b39a69726513e6d040c8aebc4ff0dcf9f9d5aae9b20acc694407251b328749ca7e55048 SHA512 bbc066c53e4742f704a5f67431c6295e780b231145258eb8812c19a2ee048526eadf2a28727dfdb9f37f5adb205806ad0d1088fee7ec053ad70ac3fa6d8fe1c3
EBUILD rust-std-1.83.0.ebuild 3424 BLAKE2B a1c2699723dfe16c431d46779b4bfa03601162a912961e0c0c0c3aa95b39a69726513e6d040c8aebc4ff0dcf9f9d5aae9b20acc694407251b328749ca7e55048 SHA512 bbc066c53e4742f704a5f67431c6295e780b231145258eb8812c19a2ee048526eadf2a28727dfdb9f37f5adb205806ad0d1088fee7ec053ad70ac3fa6d8fe1c3
EBUILD rust-std-1.84.0.ebuild 3424 BLAKE2B fc74d016011076c5666a5bd3e2f81817d54bd1befb750ee39ea9c9310eda4995682ff24d3d327900148e06691167d3610692baf33ef29ae9652863aa7c6a8a23 SHA512 2d135ccb3cff3701ae8230821d14b2048a37b1ea94fe79da992bcbe9d007a6d95f46fbfaab41d7bbd49952b4fa99c548e95107ac7d37d88cf9c90fac992d6f6c
+EBUILD rust-std-1.84.1.ebuild 3424 BLAKE2B fc74d016011076c5666a5bd3e2f81817d54bd1befb750ee39ea9c9310eda4995682ff24d3d327900148e06691167d3610692baf33ef29ae9652863aa7c6a8a23 SHA512 2d135ccb3cff3701ae8230821d14b2048a37b1ea94fe79da992bcbe9d007a6d95f46fbfaab41d7bbd49952b4fa99c548e95107ac7d37d88cf9c90fac992d6f6c
MISC metadata.xml 1088 BLAKE2B de084a7853c3464405807bbd6d75477dbfdee3f3f8318d27b1dd01ec9a3cf8af1072a0593105f2220caff6ebe055d36ca2974cabf00271458a2a13c2f394ccaa SHA512 c0cb17085432a5316b4a4a719398d5998b6379273fb94a7ee517b385b70a3bc6b61e9bb77ae1bb3fa94fe2efef403eab7c2a4c802f431abe4af22d392b764e96
diff --git a/sys-devel/rust-std/rust-std-1.84.1.ebuild b/sys-devel/rust-std/rust-std-1.84.1.ebuild
new file mode 100644
index 000000000000..de231d3c162c
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.84.1.ebuild
@@ -0,0 +1,154 @@
+# Copyright 2020-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs
+
+DESCRIPTION="Rust standard library, standalone (for crossdev)"
+HOMEPAGE="https://www.rust-lang.org"
+SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz"
+S="${WORKDIR}/${P/-std/c}-src"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4"
+SLOT="stable/$(ver_cut 1-2)"
+# please do not keyword
+#KEYWORDS="" #nowarn
+IUSE="debug"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ ~dev-lang/rust-${PV}:=
+"
+
+DEPEND="||
+ (
+ >="${CATEGORY}"/gcc-4.7:*
+ >="${CATEGORY/sys-devel/llvm-core}"/clang-3.5:*
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+# need full compiler to run tests
+RESTRICT="test"
+
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
+
+#
+# The cross magic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_cross() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_pretend() {
+ is_cross || die "${PN} should only be used for cross"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ # do the great cleanup
+ strip-flags
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
+ strip-unsupported-flags
+
+ local rust_root x
+ rust_root="$(rustc --print sysroot)"
+ rtarget="$(rust_abi ${CTARGET})"
+ rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
+ rbuild="$(rust_abi ${CBUILD})"
+ rhost="$(rust_abi ${CHOST})"
+
+ echo
+ for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
+ einfo "$(printf '%10s' ${x^^}:) ${!x}"
+ done
+
+ cat <<- EOF > "${S}"/config.toml
+ [build]
+ build = "${rbuild}"
+ host = ["${rhost}"]
+ target = ["${rtarget}"]
+ cargo = "${rust_root}/bin/cargo"
+ rustc = "${rust_root}/bin/rustc"
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ verbose = 2
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ dist-src = false
+ remap-debuginfo = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ [target.${rtarget}]
+ ar = "$(tc-getAR ${CTARGET})"
+ cc = "$(tc-getCC ${CTARGET})"
+ cxx = "$(tc-getCXX ${CTARGET})"
+ linker = "$(tc-getCC ${CTARGET})"
+ ranlib = "$(tc-getRANLIB ${CTARGET})"
+ $(usev elibc_musl 'crt-static = false')
+ EOF
+
+ einfo "${PN^} configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ env RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
+ library/std --stage 0 || die
+}
+
+src_test() {
+ ewarn "${PN} can't run tests"
+}
+
+src_install() {
+ local rustlib="lib/rust/${PV}/lib/rustlib"
+ dodir "/usr/${rustlib}"
+ pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
+ cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
+ popd > /dev/null || die
+}