diff options
Diffstat (limited to 'sys-devel')
26 files changed, 1735 insertions, 89 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz Binary files differindex d6250e797b2e..cdc18ab611cb 100644 --- a/sys-devel/Manifest.gz +++ b/sys-devel/Manifest.gz diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest index f3d7177b4061..ac774cffa6bf 100644 --- a/sys-devel/binutils-hppa64/Manifest +++ b/sys-devel/binutils-hppa64/Manifest @@ -10,15 +10,17 @@ DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 -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 EBUILD binutils-hppa64-2.40-r7.ebuild 13863 BLAKE2B 0e88fddae6ee0f05a7a34d60a8781bae08c2fca3c8599756054dcb51d304b2ff4ae43c072e68ed8045f70a120efa9422cf6ed76302f1fd1e088721f24cca73d4 SHA512 5973e97817c730917c2697a542e67c63e3c51494094ced7778f932fee35fd192fbc0d0b2e5bfbc8cb554224586a48afdcd0ca331ab8531e01a8410a59c422890 EBUILD binutils-hppa64-2.41-r5.ebuild 14048 BLAKE2B 4290a888bb76e52e1e9f32e081934d2f39759bc4aaa2b750a465325f3a9068a257dda9a45c3aae0848c4120bc4df4692cce382acca265f042c0bb75783e80242 SHA512 56928ada7bd013904eae956667997492dfc707975632171a5124f66d6306308f03de6decfb36700adf0cc2759737527716eb9a919267304844c394468ffbb994 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 16374 BLAKE2B 27d8b0c8bcb54df66958da8cc8bf5353809e9cd9191da09b0a167b8bdda06925994c22273e759e1dad18dd655f211c51c64dc4b5e409451e584482d844d6bde8 SHA512 bafd9d04a81b79447792279395b5d9eb9c8eeeac428a2befe215520856f25fda7e19f525f2240ed18a9a2681702357d54f1dc1071ffef3b1956337e5a7b26192 +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.43-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.44.ebuild index a71d9243c9cc..5981d3ef3705 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r1.ebuild +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.44.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,7 +11,7 @@ DESCRIPTION="Tools necessary to build programs" HOMEPAGE="https://sourceware.org/binutils/" LICENSE="GPL-3+" -IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" +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 @@ -21,12 +21,15 @@ IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins sta # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=2 +PATCH_VER=1 PATCH_DEV=dilfridge -if [[ ${PV} == 9999* ]]; then +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} @@ -59,9 +62,16 @@ RDEPEND=" ) zstd? ( app-arch/zstd:= ) " -DEPEND="${RDEPEND}" +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 @@ -78,13 +88,23 @@ 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" + 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 - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + 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 @@ -107,13 +127,15 @@ src_unpack() { src_prepare() { local patchsetname - if [[ ${PV} == 9999* ]] ; then + 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 [[ -n ${PATCH_VER} ]] || [[ ${PV} == *9999 ]] ; then if ! use vanilla; then einfo "Applying binutils patchset ${patchsetname}" eapply "${WORKDIR}/patch" @@ -122,8 +144,8 @@ src_prepare() { # 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.40-linker-search-path.patch \ - "${FILESDIR}"/binutils-2.41-linker-prefix.patch + eapply "${FILESDIR}"/binutils-2.43-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.43-linker-prefix.patch fi fi fi @@ -176,8 +198,6 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -191,10 +211,6 @@ src_configure() { if use plugins ; then myconf+=( --enable-plugins ) fi - # enable gold (installed as ld.gold) and ld's plugin architecture - if use gold ; then - myconf+=( --enable-gold ) - fi if use nls ; then myconf+=( --without-included-gettext ) @@ -259,10 +275,11 @@ src_configure() { --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,libdecnumber,readline,sim} + --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 @@ -285,6 +302,10 @@ src_configure() { # - 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 @@ -325,11 +346,21 @@ src_configure() { ) 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 @@ -367,10 +398,24 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" || die - # bug #637066 - filter-flags -Wall -Wreturn-type + ( + # Tests don't expect LTO + filter-lto + + # lto-wrapper warnings which confuse tests + filter-flags '-Wa,*' - emake -k check + # 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() { @@ -401,7 +446,6 @@ src_install() { done if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then - # No die for now, dies on hppa? mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ rm -r "${ED}"/usr/${CHOST}/{include,lib} @@ -421,9 +465,8 @@ src_install() { ) doins "${libiberty_headers[@]/#/${S}/include/}" if [[ -d ${ED}/${LIBPATH}/lib ]] ; then - # TODO: add || die here, fails on hppa? - mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ - rm -r "${ED}"/${LIBPATH}/lib + mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die fi # Generate an env.d entry for this binutils @@ -479,7 +522,7 @@ src_install() { 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} + binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error } pkg_postrm() { @@ -496,12 +539,12 @@ pkg_postrm() { choice=${choice//$'\n'/ } choice=${choice/* } if [[ -z ${choice} ]] ; then - binutils-config -u ${CTARGET} + binutils-config -u ${CTARGET} || eerror binutils-config returned an error else - binutils-config ${choice} + binutils-config ${choice} || eerror binutils-config returned an error fi elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then - binutils-config ${CTARGET}-${PV} + binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error fi } 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/binutils/Manifest b/sys-devel/binutils/Manifest index 1fddfa17dac9..2db0707df524 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -29,9 +29,10 @@ DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 -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-2.32-r2.ebuild 11734 BLAKE2B e444592c29be99e72f80090c85a383bb307c741ed77bcf71058dad5d78eff13d5185cdb4bce47b51422154f998ae67e117f2c49e39d4b4ec49b7396f4103d306 SHA512 19a752a8789b698769217873864b9f544830521ed41be54db86b947343ee83af655b74104365c2e8fd195c4285fa3dc65e0bc1aa78bf9c16be5ea22aea519c13 EBUILD binutils-2.33.1-r1.ebuild 11470 BLAKE2B 70541c64c7ca2734b1cdfc27e2a7bd8bc72fde852a7fdbcbf763795463e481556e36910dbe9fe2e0df4d7621bfaffcc36de70222919852b44419b02efad0ff4f SHA512 3c9f95f54f6c55692ef5daac6dd4d6e5a2514a27f8c6f4b592582f23bd3b3e4c83ce5c6fbfc1f5a6bb845a717b30458d40772a661d74adbddeb0d4081a88c438 EBUILD binutils-2.34-r2.ebuild 11566 BLAKE2B 6490e77611835748738230495725ec099c45e65cfa20109a4d185fcf456f012cc9f95fed6b33a6774906c1b826046f79082ac740548830d0befc0a488e6c447e SHA512 a9d14b875f30c613c9b533f116db09d0743d3079007b149da31a9f87a5dd308c03bb495ccd65efee7524c38a7684ff4c22ced5ec8e3d70d4f71103e2e467a883 @@ -43,8 +44,9 @@ EBUILD binutils-2.39-r5.ebuild 13726 BLAKE2B f3a42e6963397e5f6b20e1323ceb4bdb43f EBUILD binutils-2.40-r9.ebuild 14203 BLAKE2B 7e9038bb5bd10baa51e0b00c760861f9da00a4b1ad583f61be2e8f5786bc1e832a30dd5abccaa370b8d5b8afe011605b8ab87a000afa8f125f50b4c88b261d6f SHA512 1487ab81b89ce044dea12953aa6c31d7ec519d1b2fea8acd50c8a409939088f0f573585abcec084f7943ecd3e131640b4b019947d00f90cf6991eaa8cff4b4c9 EBUILD binutils-2.41-r5.ebuild 14725 BLAKE2B b9a9abaa3309cf4f9d1c2cdaaf4daedfe667689e2e8e4db980226197c5e70d86cb7b3aa6b4fda4938a89ee686faf73e7856e839d298066c17779900355a3aaa1 SHA512 4c4161d93ec3dcdac855045c47062237d2054f54660418dde524bbfab444013312a240311b0166c9f9cc9405e3a5bb44c80dd035df1629516481781b06930b2c EBUILD binutils-2.42-r2.ebuild 15820 BLAKE2B dddc8ff1ef483b95e221ee2546a98ac55c15953bf5917ba9af44b735d816dc4ebc28bcbb35517d47514e966f345b27ea916b9f913db5c34fba890cb83ee0a43c SHA512 b293a31e90825eeb30b82ff3e8a331a7c6e82acce901c0fcca0976b292447bf1bd65ac1b3734879c03365e92adbb75fe85da57023f6b822ae50d5293f18e1408 -EBUILD binutils-2.43-r1.ebuild 15926 BLAKE2B b3b35bfa409fe26d430f2c17f3f52a1523b29e34caedda21ad488cb428e94c0db85d468e3e53265fd3429a1827418c3b66f9f5ee0bbf87e0c9c0c8b5e2d1ff20 SHA512 a33b271959387d4d31340cf96a684f648e3d5893c47013de4ce77a94342f332bd68090e72288272f53fd2c381217cf4e9edbde2542f0f4a8f6bed1917d046b81 EBUILD binutils-2.43-r2.ebuild 15915 BLAKE2B 5e1134d93cd165c867bdf25c825dfd7122a2494ed0ea4487cdde57d44e0032c98f37c0a416635c03e7ec7bea491f340d35b00f07678a9f134d21cbf1a5855c7b SHA512 a523d0d50f9aade97195b61837518dc82d8a7616fbf1080e51c916cfea3d200a72657967e4ad60c56099cf8e3f271f310683d52d77d1f65d24d4a2070aa62613 EBUILD binutils-2.43.9999.ebuild 16246 BLAKE2B 3433cab71a488713b2ccc757f59c2d9677a038f2569aaaf9425bd14302b5eb63129df40d9f71b19822c93ed167d3fc1c0458e9dea140ffe69ee1a6b2ab06c612 SHA512 958749d5c3d31575d5d413f8dd8b6d78d32b840a27838a650afdeaf2713b43ddc47ffbc921bfdbffe227edd02c3ccad2f29e020da134a43a7935afe1a9ffa027 -EBUILD binutils-9999.ebuild 16044 BLAKE2B ff6e8d33dad54669354d7b128a24da870b4514a5120fd9b4e78450fe98d1242b12aae91fe5e01137bc7eb2984961ac76318e8565f31d04d05ff5eed503eb2dae SHA512 d37e804942e8a715dd6515a98c057e6ce95a0a490f77860feecaf5cb9314303328d9ac91911ca2e2860b7ea9f7c5e6220215c100f8a230f11b48e1a3be37de74 -MISC metadata.xml 995 BLAKE2B 85ccdd924f8c459a4cd7e608dff59c7281523da0d9457b0094b97e140cd07a300cb38383d9402808859100ca0bf219ce86e367bb5282216121bd81f68d588c17 SHA512 3ee538640e5d8c0efe6b8cf1de299e0d78965dece1ad814384844e8e24db72b11ca30d5fb68dfae2e71046d35aee0e71ee3ecbda3730ca49446dd0b2cd0f817c +EBUILD binutils-2.44.9999.ebuild 16104 BLAKE2B 159e01891529f35b766fa7a4fbbd70d5bcc6092cb95e456486fe9e8046703653adfbbd0f26ed9bf0ac9b28fbc5b4e3199baa30637c00ff3fb9d5df78fe665ce3 SHA512 c04f614d62c5bcaa2487023d9a3656525330cae9a1777936f83336236201aa99d2831462ca431d5c58fb96f489119c82546af75613365ed131c36e533d05f8e4 +EBUILD binutils-2.44.ebuild 16103 BLAKE2B 248b3d221c0dcf7ee354cb3c5d5cb436a9660d32a26afeda34af3ab298595ea9db1c32ab1ca40950d8629466ef6fea3d8b0decd46d3988477eb65981291f94cc SHA512 4fbcbfb27d73688fcc9b23b00f08a2fe1fbf0d6c8abbe4eac9967e1a7077deb5685f25d7d65b126b2d34e55d9e7f1b9778bf3faa2dc7f5b2484fcdb7daa24dfd +EBUILD binutils-9999.ebuild 16104 BLAKE2B 4b03f1ac1e6113ad659e5b405a1e37b31890e0b69239f95b5b481f3807e6f988ecf54f83f974acc81cfefd0b7680c3e3e82f0952a9ee5d34cb9eebf9f559b0e4 SHA512 db39ae66a97020b67019b814a70a67cebe750aab822ec492a3a4d2a5acea51e9c6abf997207dd71462086660c26e9dd40c88325fe0e21ab85dd324206cde6737 +MISC metadata.xml 1081 BLAKE2B 84552999d26b3fa492cd1fd9116339229bb88b0132c083355800c65df993650f23cdff42d232a150d36fc9b21b63001198fda9e39bac26459556a04002542069 SHA512 5be692843451ee199cae8e5aae10232de600ef8158190ff067818cc90884aaf7712c1f72941a6c64d19565d39a59190b8eeb770e6d123283b35385f23fc2f93d diff --git a/sys-devel/binutils/binutils-2.44.9999.ebuild b/sys-devel/binutils/binutils-2.44.9999.ebuild new file mode 100644 index 000000000000..c0e3858009a8 --- /dev/null +++ b/sys-devel/binutils/binutils-2.44.9999.ebuild @@ -0,0 +1,568 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +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 + +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 is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.41-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 + myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) ) + + 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 +} + +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/binutils-2.43-r1.ebuild b/sys-devel/binutils/binutils-2.44.ebuild index 65d4e3c31f14..878b49227445 100644 --- a/sys-devel/binutils/binutils-2.43-r1.ebuild +++ b/sys-devel/binutils/binutils-2.44.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -9,7 +9,7 @@ DESCRIPTION="Tools necessary to build programs" HOMEPAGE="https://sourceware.org/binutils/" LICENSE="GPL-3+" -IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" +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 @@ -19,7 +19,7 @@ IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins sta # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=2 +PATCH_VER=1 PATCH_DEV=dilfridge if [[ ${PV} == 9999 ]]; then @@ -60,7 +60,10 @@ RDEPEND=" ) zstd? ( app-arch/zstd:= ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + xxhash? ( dev-libs/xxhash ) +" BDEPEND=" doc? ( sys-apps/texinfo ) pgo? ( @@ -83,7 +86,10 @@ MY_BUILDDIR=${WORKDIR}/build src_unpack() { if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" + 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 @@ -91,7 +97,11 @@ src_unpack() { 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" + 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 @@ -131,8 +141,8 @@ src_prepare() { # This is applied conditionally for now just out of caution. # It should be okay on non-prefix systems though. See bug #892549. if is_cross || use prefix; then - eapply "${FILESDIR}"/binutils-2.43-linker-search-path.patch \ - "${FILESDIR}"/binutils-2.43-linker-prefix.patch + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.41-linker-prefix.patch fi fi fi @@ -185,9 +195,6 @@ src_configure() { use cet && filter-flags -mindirect-branch -mindirect-branch=* use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - # https://sourceware.org/PR32372 - append-cflags $(test-flags-CC -std=gnu17) - local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -201,10 +208,6 @@ src_configure() { if use plugins ; then myconf+=( --enable-plugins ) fi - # enable gold (installed as ld.gold) and ld's plugin architecture - if use gold ; then - myconf+=( --enable-gold ) - fi if use nls ; then myconf+=( --without-included-gettext ) @@ -269,6 +272,7 @@ src_configure() { --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 @@ -295,6 +299,10 @@ src_configure() { # - 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 diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild index f9a5e117e92b..57401c0bb097 100644 --- a/sys-devel/binutils/binutils-9999.ebuild +++ b/sys-devel/binutils/binutils-9999.ebuild @@ -9,7 +9,7 @@ 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 zstd" +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 @@ -60,7 +60,10 @@ RDEPEND=" ) zstd? ( app-arch/zstd:= ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + xxhash? ( dev-libs/xxhash ) +" BDEPEND=" doc? ( sys-apps/texinfo ) pgo? ( @@ -269,6 +272,7 @@ src_configure() { --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 diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml index 3cc106863437..88560e418c0e 100644 --- a/sys-devel/binutils/metadata.xml +++ b/sys-devel/binutils/metadata.xml @@ -14,6 +14,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/crosstool-ng/Manifest b/sys-devel/crosstool-ng/Manifest index 1861cb62f44c..30c1e31da286 100644 --- a/sys-devel/crosstool-ng/Manifest +++ b/sys-devel/crosstool-ng/Manifest @@ -1,4 +1,6 @@ DIST crosstool-ng-1.26.0.tar.xz 1144720 BLAKE2B 68c38dca58a239bd2a7a4e0f0adfa0069d97aba632c8a8a70594a67bf1049f0576db2d20b8a6ac90b170c1a3d8245f952a949e4fd006abe1d5e54effbb8e100b SHA512 7834184ae5792fd347455f9f48fee826248dcb82d271954ed4304b1a18f63995ff8a2c3b817564dcf147ac7e16e02d779195b26d97eb57db27f1118a1837002a +DIST crosstool-ng-1.27.0.tar.xz 1163084 BLAKE2B 6f9c7e16a6bdccbfd31fd7839df59878deedf193251ef0896bfde79b9b844646b83316fdaf26ca826377375cc36f77e6ddf6503c10ca30dbcf9d9086b3272830 SHA512 2201106561a199ebaddd238ed5158f62f63787333b87d2692aa726ad21bc90b08483deed7257fc35af995e355cfb567d7550b5ea171259ec5a0e0c3bee3b3ca2 EBUILD crosstool-ng-1.26.0-r1.ebuild 1715 BLAKE2B 13d4fc08a83bc2bfed5f7f20fb11c81c20c0e1e584798a37953037f909dd954cc7ffb34e04b782be07fb8cdd83a0a88b0cdaf6751cd170c06ef5ce8244b7dd5c SHA512 495b9002de96e19b98b9cc635d7d86ac16d2ad04e1a73aaf088ea25530a175625add3940cc45f9f1514edb400f03f744f2e53ee818e0c3c2e8b5764cbc2dfd0d -EBUILD crosstool-ng-9999.ebuild 2152 BLAKE2B c6bc736dbf5019427043d79c37dfaf4401e410f60059fa9e0ed53d8c408185091d88515ea5960f284ae139ba8911ffa0aa8dd14f947f260c9c485c8e8b254a46 SHA512 e845065fd4d1b7610b7fc7ae5c35c5761308861578728d3b89eb9f538c457e72df7eaedbc278bc4edc048c7894ef74a87b5d2e3e6ffc555db2ddeb504c718054 +EBUILD crosstool-ng-1.27.0.ebuild 2018 BLAKE2B 200e1babd59ef3285bd5ba5a0fc7e56f42f008ccee8108041b7461b5599bf7c18d86357ab85d7fc9fffa861b4a5f9a12470269a405c1f17b8c18591fc4ba1ba0 SHA512 f0cdea868cfc3ea30471493d37976da721903eca33cd970b0ca7b846b8d17221ef2603957c0456966f38a1511fae3c8c346dc79dcabf3e2b40608415b71b2dd7 +EBUILD crosstool-ng-9999.ebuild 2018 BLAKE2B 200e1babd59ef3285bd5ba5a0fc7e56f42f008ccee8108041b7461b5599bf7c18d86357ab85d7fc9fffa861b4a5f9a12470269a405c1f17b8c18591fc4ba1ba0 SHA512 f0cdea868cfc3ea30471493d37976da721903eca33cd970b0ca7b846b8d17221ef2603957c0456966f38a1511fae3c8c346dc79dcabf3e2b40608415b71b2dd7 MISC metadata.xml 973 BLAKE2B e910f49277500ae3bebdd7307c8e6bce9cf8b16e968790c308c08678da2742ce04aae68b6fef00af59c4f56ecfbf6a1ed1a7a255d7c78925af30e0ecd22195a1 SHA512 012a54cb5bac5775dd0f7ea8980a8422a108d3447ec34386ca5c1d2fd5bb996e22e2a683a66b401822ccf59aee864580066c97d3d6b85c797373223c68e47379 diff --git a/sys-devel/crosstool-ng/crosstool-ng-1.27.0.ebuild b/sys-devel/crosstool-ng/crosstool-ng-1.27.0.ebuild new file mode 100644 index 000000000000..2a0c5d8f9e91 --- /dev/null +++ b/sys-devel/crosstool-ng/crosstool-ng-1.27.0.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +inherit python-single-r1 + +DESCRIPTION="Versatile (cross-)toolchain generator" +HOMEPAGE="https://crosstool-ng.github.io/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/crosstool-ng/crosstool-ng.git" + inherit autotools git-r3 +else + SRC_URI=" + https://github.com/crosstool-ng/crosstool-ng/releases/download/${PN}-${PV/_rc/-rc}/${P}.tar.xz + http://crosstool-ng.org/download/crosstool-ng/${P}.tar.xz + " + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~x86" + fi +fi + +LICENSE="GPL-2 doc? ( CC-BY-SA-2.5 )" +SLOT="0" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +IUSE="curl cvs doc dtc git lzip meson ninja python rsync subversion wget" + +# TODO: Consider dropping these USE (optfeature), but configure does check for them +BDEPEND=" + app-arch/unzip + >=app-shells/bash-3.1 + sys-apps/help2man + >=sys-apps/sed-4.0 + sys-apps/gawk + sys-apps/texinfo + sys-apps/which + sys-devel/bison + sys-devel/flex + curl? ( net-misc/curl ) + cvs? ( dev-vcs/cvs ) + dtc? ( sys-apps/dtc ) + git? ( dev-vcs/git ) + lzip? ( app-arch/lzip ) + meson? ( dev-build/meson ) + python? ( ${PYTHON_DEPS} ) + ninja? ( app-alternatives/ninja ) + rsync? ( net-misc/rsync ) + subversion? ( dev-vcs/subversion ) + wget? ( net-misc/wget ) +" +RDEPEND=" + ${BDEPEND} +" + +src_prepare() { + if [[ ${PV} == 9999 ]]; then + # Some data files must be generated before autoreconf, and the logic + # is non-trivial, so the upstream bootstrap script must be used. + # In addition, eautoreconf mis-detects the project to make use of + # gettext while it actually isn't, so just rely on the invocation of + # autoreconf for us in the bootstrap script. + ./bootstrap || die "bootstrap failed" + fi + + default +} + +src_configure() { + # Needs bison+flex + unset YACC LEX + + CONFIG_SHELL="${BROOT}"/bin/bash econf +} + +src_install() { + emake DESTDIR="${D}" install + + rm -f "${ED}"/usr/share/man/man1/ct-ng.1.gz || die + doman docs/ct-ng.1 +} diff --git a/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild b/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild index 78700c65fe2d..2a0c5d8f9e91 100644 --- a/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild +++ b/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit python-single-r1 DESCRIPTION="Versatile (cross-)toolchain generator" @@ -73,17 +73,12 @@ src_configure() { # Needs bison+flex unset YACC LEX - default + CONFIG_SHELL="${BROOT}"/bin/bash econf } src_install() { emake DESTDIR="${D}" install - if use doc ; then - mv "${ED}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} "${ED}"/usr/share/doc/ || die - fi - - rm -rf "${ED}"/usr/share/doc/crosstool-ng || die - rm -rf "${ED}"/usr/share/man/man1/ct-ng.1.gz || die + rm -f "${ED}"/usr/share/man/man1/ct-ng.1.gz || die doman docs/ct-ng.1 } diff --git a/sys-devel/patch/Manifest b/sys-devel/patch/Manifest index 1fe8a35404b8..d85f67fa6553 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 +DIST patch-2.7.6_p20250206.tar.xz 906596 BLAKE2B f110bcf19b655c900327088ba023743fd845161dd00cab228675d3c0992fa397916adf153c35775fc5ff8e733b559ce8a05eac71eec7156403f4c9ab17ff2a3e SHA512 2dd05af5f9f0864b0cccc5c5194d0ba4ca427fc366b91210e2f539a50bd2006d7142606f8f223b45c5d426eafef7e6b17c6b67c2ef9b7ec75589bb3d9fce68d3 +DIST patch-2.7.6_p20250206.tar.xz.sig 833 BLAKE2B 8363136c58bbde5c349a4c96cd277588f3b679a98ea1c21da39bcf375c2b85c0d36165f1dceab453a09bcc2745d5ab6959d5ba28020e138591e7530dbf72f180 SHA512 a114f836502bb02910c8f88d7e667ce92ef6b0b9a26eb466ee9bd1ad8956036867801b19ea3ee27418fe0fb6e673e3d5d2aad2b9c05f7e99fd8bb1a9d604ea6f EBUILD patch-2.7.6-r6.ebuild 2393 BLAKE2B bee456b5704807b931046f85172a93aa3ed564979a02ff307943b7c4d585d21bdcebc1d637f5914925d0eb9d088f5d2413ab9903ec8daf442a316455c9a2954a SHA512 706529f59336e2d746b88c68acfea63d299372505e021b38fd301f25ae09c3afc2fea9daab73526399dc1fa0898914a1937f9a18d1bce1c0cade10354ec484c6 -EBUILD patch-2.7.6_p20241103.ebuild 2022 BLAKE2B 04d854955a65458923f4a29a357457993b209f871a468f17bd0f42de97eb8a2964c0bb6b38f2c9338f7056ed63383d79c498ccab689092efef04e2cc42e7c6e3 SHA512 11961cfccb1b57a9fd259a5190e65476cdff103c6e358437e267a60509371d9b7ef707a8e019356e3d54cf379d7da4d54e11a3c7632385b62b440812c81a42c5 +EBUILD patch-2.7.6-r7.ebuild 2470 BLAKE2B a2f64c2a715847db3121093c2f9c774121fb0b17d768e394d06a8e90c00b21edaf10d3967af1874a0631db42f2d506ecc62c792aae97a5611da5554f5b1c58bc SHA512 1483a88b0bae665d7edd71a1b9270388eae633f9ba8f7038ff9b22b5143a031894f61f7acb18a093d24568c055412da7e49948fe53b2c5f1b66ee650fe5574b3 +EBUILD patch-2.7.6_p20250206.ebuild 2032 BLAKE2B 7e277dc2a1325214f8f350ef09d6a5aac7883e6c88adbb06e84c16a0edb892caa543f05c8ea509f55f2a3b2dad7b64078e2820e2867ea202f61d9084fe60bcdc SHA512 4923f005b09759593d31ba9468a35d7bc7761e0e8c04147d68f83598326cb42e3a0c028c150079d999348281a34530ab5c85dff45db15a6eb5ba5ecb47138bbc 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/patch/patch-2.7.6_p20241103.ebuild b/sys-devel/patch/patch-2.7.6_p20250206.ebuild index 05897044befe..15df468ab034 100644 --- a/sys-devel/patch/patch-2.7.6_p20241103.ebuild +++ b/sys-devel/patch/patch-2.7.6_p20250206.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -14,9 +14,9 @@ if [[ ${PV} == 9999 ]] ; then elif [[ ${PV} = *_p* ]] ; then # Note: could put this in devspace, but if it's gone, we don't want # it in tree anyway. It's just for testing. - MY_SNAPSHOT="$(ver_cut 1-3).200-be8b" - SRC_URI="https://meyering.net/patch/patch-${MY_SNAPSHOT}.tar.xz -> ${P}.tar.xz" - SRC_URI+=" verify-sig? ( https://meyering.net/patch/patch-${MY_SNAPSHOT}.tar.xz.sig -> ${P}.tar.xz.sig )" + MY_SNAPSHOT="$(ver_cut 1-3).211-86ac" + SRC_URI="https://alpha.gnu.org/gnu/patch/patch-${MY_SNAPSHOT}.tar.xz -> ${P}.tar.xz" + SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/patch/patch-${MY_SNAPSHOT}.tar.xz.sig -> ${P}.tar.xz.sig )" S="${WORKDIR}"/${PN}-${MY_SNAPSHOT} else SRC_URI="mirror://gnu/patch/${P}.tar.xz" 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 +} |