summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/binutils-hppa64/Manifest3
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild4
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild4
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.44.ebuild (renamed from sys-devel/binutils-hppa64/binutils-hppa64-2.43-r1.ebuild)105
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-9999.ebuild577
-rw-r--r--sys-devel/binutils-hppa64/metadata.xml1
-rw-r--r--sys-devel/binutils/Manifest3
-rw-r--r--sys-devel/binutils/binutils-2.42-r2.ebuild4
-rw-r--r--sys-devel/binutils/binutils-2.43-r2.ebuild2
-rw-r--r--sys-devel/binutils/binutils-2.43.9999.ebuild2
-rw-r--r--sys-devel/binutils/binutils-2.44.9999.ebuild568
-rw-r--r--sys-devel/binutils/binutils-2.44.ebuild (renamed from sys-devel/binutils/binutils-2.43-r1.ebuild)40
-rw-r--r--sys-devel/binutils/binutils-9999.ebuild18
-rw-r--r--sys-devel/binutils/metadata.xml1
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild5
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild5
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild7
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild7
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-20.ebuild42
-rw-r--r--sys-devel/crosstool-ng/Manifest1
-rw-r--r--sys-devel/crosstool-ng/crosstool-ng-1.27.0.ebuild84
-rw-r--r--sys-devel/crosstool-ng/crosstool-ng-9999.ebuild13
-rw-r--r--sys-devel/dev86/Manifest1
-rw-r--r--sys-devel/dev86/dev86-0.16.21-r3.ebuild11
-rw-r--r--sys-devel/dev86/dev86-1.0.1.ebuild69
-rw-r--r--sys-devel/dev86/files/dev86-1.0.1-makefile.patch66
-rw-r--r--sys-devel/dev86/metadata.xml1
-rw-r--r--sys-devel/gcc/Manifest11
-rw-r--r--sys-devel/gcc/files/gcc-15.0.1_pre20250209-coro.patch124
-rw-r--r--sys-devel/gcc/files/gcc-15.0.1_pre20250209-range-for-mariadb.patch530
-rw-r--r--sys-devel/gcc/gcc-12.4.1_p20250206.ebuild65
-rw-r--r--sys-devel/gcc/gcc-12.4.1_p20250213.ebuild65
-rw-r--r--sys-devel/gcc/gcc-13.3.1_p20250207.ebuild66
-rw-r--r--sys-devel/gcc/gcc-13.3.1_p20250214.ebuild66
-rw-r--r--sys-devel/gcc/gcc-14.2.1_p20250208.ebuild54
-rw-r--r--sys-devel/gcc/gcc-14.2.1_p20250215.ebuild54
-rw-r--r--sys-devel/gcc/gcc-15.0.1_pre20250209-r1.ebuild55
-rw-r--r--sys-devel/gcc/gcc-15.0.1_pre20250216.ebuild53
-rw-r--r--sys-devel/gettext/Manifest4
-rw-r--r--sys-devel/gettext/gettext-0.22.5-r1.ebuild4
-rw-r--r--sys-devel/gettext/gettext-0.23.1.ebuild (renamed from sys-devel/gettext/gettext-0.23.ebuild)5
-rw-r--r--sys-devel/mold/mold-2.36.0.ebuild12
-rw-r--r--sys-devel/mold/mold-9999.ebuild14
-rw-r--r--sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0-r2.ebuild4
-rw-r--r--sys-devel/patch/Manifest4
-rw-r--r--sys-devel/patch/files/patch-2.7.6-configure-mkdir-spruced-up.patch38
-rw-r--r--sys-devel/patch/files/patch-2.7.6-ndebug-assert-hash-table.patch40
-rw-r--r--sys-devel/patch/patch-2.7.6-r7.ebuild86
-rw-r--r--sys-devel/patch/patch-2.7.6_p20250206.ebuild (renamed from sys-devel/patch/patch-2.7.6_p20241103.ebuild)13
-rw-r--r--sys-devel/patch/patch-9999.ebuild11
-rw-r--r--sys-devel/rust-std/Manifest1
-rw-r--r--sys-devel/rust-std/rust-std-1.84.1.ebuild154
-rw-r--r--sys-devel/smatch/Manifest1
-rw-r--r--sys-devel/smatch/files/smatch-1.72-C23.patch20
-rw-r--r--sys-devel/smatch/files/smatch-1.72-function-prototype.patch54
-rw-r--r--sys-devel/smatch/files/smatch-1.72-make-deps.patch14
-rw-r--r--sys-devel/smatch/smatch-1.72-r2.ebuild (renamed from sys-devel/smatch/smatch-1.72.ebuild)17
-rw-r--r--sys-devel/smatch/smatch-1.73-r1.ebuild73
-rw-r--r--sys-devel/smatch/smatch-9999.ebuild12
59 files changed, 3238 insertions, 130 deletions
diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 29777418ad0b..3b8fcab1abd3 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -10,6 +10,7 @@ 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
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild
index 73dc3ceeedb0..5ad530101093 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.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
@@ -306,7 +306,7 @@ src_configure() {
if use hardened ; then
myconf+=(
- # TOOD: breaks glibc test suite
+ # TODO: breaks glibc test suite
#--enable-error-execstack=yes
#--enable-error-rwx-segments=yes
--enable-default-execstack=no
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild
index fa9d8b2f4555..ba46b854f6a7 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.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
@@ -306,7 +306,7 @@ src_configure() {
if use hardened ; then
myconf+=(
- # TOOD: breaks glibc test suite
+ # TODO: breaks glibc test suite
#--enable-error-execstack=yes
#--enable-error-rwx-segments=yes
--enable-default-execstack=no
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..9bbb2e5a20e7 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
@@ -306,7 +327,7 @@ src_configure() {
if use hardened ; then
myconf+=(
- # TOOD: breaks glibc test suite
+ # TODO: breaks glibc test suite
#--enable-error-execstack=yes
#--enable-error-rwx-segments=yes
--enable-default-execstack=no
@@ -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..6a28de62f155
--- /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+=(
+ # TODO: 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 b72d306765dc..c048e8822a4b 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -20,6 +20,7 @@ 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
diff --git a/sys-devel/binutils/binutils-2.42-r2.ebuild b/sys-devel/binutils/binutils-2.42-r2.ebuild
index 267d2d3fd4b8..741c42f7de4d 100644
--- a/sys-devel/binutils/binutils-2.42-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.42-r2.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
@@ -309,7 +309,7 @@ src_configure() {
if use hardened ; then
myconf+=(
- # TOOD: breaks glibc test suite
+ # TODO: breaks glibc test suite
#--enable-error-execstack=yes
#--enable-error-rwx-segments=yes
--enable-default-execstack=no
diff --git a/sys-devel/binutils/binutils-2.43-r2.ebuild b/sys-devel/binutils/binutils-2.43-r2.ebuild
index 3771850d2087..675b58d5c5fd 100644
--- a/sys-devel/binutils/binutils-2.43-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.43-r2.ebuild
@@ -316,7 +316,7 @@ src_configure() {
if use hardened ; then
myconf+=(
- # TOOD: breaks glibc test suite
+ # TODO: breaks glibc test suite
#--enable-error-execstack=yes
#--enable-error-rwx-segments=yes
--enable-default-execstack=no
diff --git a/sys-devel/binutils/binutils-2.43.9999.ebuild b/sys-devel/binutils/binutils-2.43.9999.ebuild
index 1aaa2aa7ea05..aba22e72ca21 100644
--- a/sys-devel/binutils/binutils-2.43.9999.ebuild
+++ b/sys-devel/binutils/binutils-2.43.9999.ebuild
@@ -327,7 +327,7 @@ src_configure() {
if use hardened ; then
myconf+=(
- # TOOD: breaks glibc test suite
+ # TODO: breaks glibc test suite
#--enable-error-execstack=yes
#--enable-error-rwx-segments=yes
--enable-default-execstack=no
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..f6894326484b
--- /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+=(
+ # TODO: 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..6628fbed5bce 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
@@ -316,7 +324,7 @@ src_configure() {
if use hardened ; then
myconf+=(
- # TOOD: breaks glibc test suite
+ # TODO: breaks glibc test suite
#--enable-error-execstack=yes
#--enable-error-rwx-segments=yes
--enable-default-execstack=no
diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild
index f9a5e117e92b..bf8d3eccb26f 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
@@ -290,9 +294,9 @@ src_configure() {
# 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)
+ # - Doesn't build on musl (https://sourceware.org/PR29477)
+ # - No man pages (https://sourceware.org/PR29521)
+ # - Broken at runtime without Java (https://sourceware.org/PR29479)
# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
$(use_enable gprofng)
@@ -306,7 +310,7 @@ src_configure() {
# 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.
+ # See https://sourceware.org/PR29592.
#
# TODO: Get the logic for this fixed upstream so it doesn't
# create impossible broken combinations on some arches, like mips.
@@ -320,7 +324,7 @@ src_configure() {
if use hardened ; then
myconf+=(
- # TOOD: breaks glibc test suite
+ # TODO: breaks glibc test suite
#--enable-error-execstack=yes
#--enable-error-rwx-segments=yes
--enable-default-execstack=no
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/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 9c5eda7a01d6..92cb33aeaab3 100644
--- a/sys-devel/crosstool-ng/Manifest
+++ b/sys-devel/crosstool-ng/Manifest
@@ -1 +1,2 @@
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
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/dev86/Manifest b/sys-devel/dev86/Manifest
index 4b159bf82448..67c3f0071566 100644
--- a/sys-devel/dev86/Manifest
+++ b/sys-devel/dev86/Manifest
@@ -1 +1,2 @@
DIST Dev86src-0.16.21.tar.gz 717215 BLAKE2B 977353422937f57d2046f151a53008dcec90f4060d60675dcb81fa58af5f1ed758a1950dcbd211cda57c84b55bf58ffbad28195ff115db50a7a1108d434b8b4e SHA512 6d35dc3c7f9735cf7967cdb2bc0f7bee967ae26667cd8cef56bbdf7d7855ef1d35057db4c0031ff86b9b95d3c8ee44aff408446115b35b6c10cf207a33838016
+DIST Dev86src-1.0.1.tar.gz 745528 BLAKE2B e64ab251342cb97bdb581a6170d269282221983d3c751963e6a3ec2d5f1d6878bdf96740a3a84939e2bed110ec84179e9bd8f55209b2be8f66c178d829ac390e SHA512 0b0e08d8a66faf12599085c44082832101202bfe9c5fcbe4e564e104f56075c699b2680d61924a523fc9f61288a75648ec30cd5257c15abed8d95fab55211231
diff --git a/sys-devel/dev86/dev86-0.16.21-r3.ebuild b/sys-devel/dev86/dev86-0.16.21-r3.ebuild
index e3784e658bfb..e5f0660f954f 100644
--- a/sys-devel/dev86/dev86-0.16.21-r3.ebuild
+++ b/sys-devel/dev86/dev86-0.16.21-r3.ebuild
@@ -1,7 +1,8 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+
inherit toolchain-funcs
DESCRIPTION="Bruce's C compiler - Simple C compiler to generate 8086 code"
@@ -11,7 +12,6 @@ SRC_URI="http://v3.sk/~lkundrak/dev86/Dev86src-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
-IUSE=""
RDEPEND="sys-devel/bin86"
DEPEND="${RDEPEND}
@@ -37,10 +37,11 @@ src_prepare() {
makefile.in || die
fi
- sed -i -e "s|-O2 -g|${CFLAGS}|" -e '/INEXE=/s:-s::' makefile.in || die
+ sed -i -e "s|-O2 -g|${CFLAGS} -std=gnu89|" -e '/INEXE=/s:-s::' makefile.in || die
sed -i -e "s:/lib/:/$(get_libdir)/:" bcc/bcc.c || die
sed -i -e '/INSTALL_OPTS=/s:-s::' bin86/Makefile || die
sed -i -e '/install -m 755 -s/s:-s::' dis88/Makefile || die
+ sed -i -e 's:CFLAGS=-O:CFLAGS=-O -std=gnu89:' dis88/Makefile || die
}
src_compile() {
@@ -50,7 +51,7 @@ src_compile() {
# First `make` is also a config, so set all the path vars here
emake -j1 \
- CC="$(tc-getCC)" \
+ CC="$(tc-getCC) -std=gnu89" \
LIBDIR="/usr/$(get_libdir)/bcc" \
INCLDIR="/usr/$(get_libdir)/bcc" \
all
@@ -63,7 +64,7 @@ src_compile() {
cd bootblocks || die
emake \
- HOSTCC="$(tc-getCC)"
+ HOSTCC="$(tc-getCC) -std=gnu89"
}
diff --git a/sys-devel/dev86/dev86-1.0.1.ebuild b/sys-devel/dev86/dev86-1.0.1.ebuild
new file mode 100644
index 000000000000..10efe33362ce
--- /dev/null
+++ b/sys-devel/dev86/dev86-1.0.1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Bruce's C compiler - Simple C compiler to generate 8086 code"
+HOMEPAGE="http://www.debath.co.uk/ https://github.com/lkundrak/dev86"
+SRC_URI="https://codeberg.org/jbruchon/dev86/archive/v${PV}.tar.gz -> Dev86src-${PV}.tar.gz"
+S="${WORKDIR}/dev86"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="sys-devel/bin86"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-makefile.patch"
+)
+
+src_prepare() {
+ default
+
+ sed -i -e "s|-O2 -g|${CFLAGS}|" -e '/INEXE=/s:-s::' makefile.in || die
+ sed -i -e "s:/lib/:/$(get_libdir)/:" bcc/bcc.c || die
+ sed -i -e '/INSTALL_OPTS=/s:-s::' bin86/Makefile || die
+ sed -i -e '/install -m 755 -s/s:-s::' dis88/Makefile || die
+}
+
+src_compile() {
+ # Don't mess with CPPFLAGS as they tend to break compilation
+ # (bug #343655).
+ unset CPPFLAGS
+
+ ln -s lib lib64 || die
+ ln -s ../kinclude/arch libc/include/arch || die
+ ln -s ../kinclude/linuxmt libc/include/linuxmt || die
+
+ # This is needed to help find `bcc` and `bcc-cpp`.
+ export PATH=${S}/bcc:${S}/cpp:${S}/copt:${S}/bin:${PATH}
+
+ # First `make` is also a config, so set all the path vars here
+ emake -j1 \
+ CC="$(tc-getCC) -std=gnu17" \
+ LIBDIR="/usr/$(get_libdir)/bcc" \
+ INCLDIR="/usr/$(get_libdir)/bcc" \
+ all
+ emake -j1 \
+ CC="$(tc-getCC) -std=gnu17" \
+ LIBDIR="/usr/$(get_libdir)/bcc" \
+ INCLDIR="/usr/$(get_libdir)/bcc" \
+ bootblocks
+}
+
+src_install() {
+ emake -j1 install-all DIST="${D}"
+ dostrip -x "/usr/*/bcc/lib*.a /usr/*/i386/libc.a"
+
+ dobin bootblocks/makeboot
+ # remove all the stuff supplied by bin86
+ rm "${D}"/usr/bin/{as,ld,nm,objdump,size}86 || die
+ rm "${D}"/usr/man/man1/{as,ld}86.1 || die
+
+ dodir /usr/share
+ mv "${D}"/usr/{man,share/man} || die
+}
diff --git a/sys-devel/dev86/files/dev86-1.0.1-makefile.patch b/sys-devel/dev86/files/dev86-1.0.1-makefile.patch
new file mode 100644
index 000000000000..0362d7aa49b4
--- /dev/null
+++ b/sys-devel/dev86/files/dev86-1.0.1-makefile.patch
@@ -0,0 +1,66 @@
+quick fix to make build success w/ modern compiler
+
+fix should be done in upstream
+diff --git a/Makefile b/Makefile
+index 359c47a..8868558 100644
+--- a/Makefile
++++ b/Makefile
+@@ -29,7 +29,7 @@ BUILD_LDFLAGS ?= $(LDFLAGS)
+
+ # Some makes take the last of a list as the default ...
+ all: make.fil
+- PATH="`pwd`/bin:$$PATH" $(MAKE) -f make.fil VERSION=$(VERSION) TOPDIR=`pwd` $@
++ PATH="`pwd`/bin:`pwd`/bcc:`pwd`/copt:`pwd`/cpp:$$PATH" $(MAKE) -f make.fil VERSION=$(VERSION) TOPDIR=`pwd` $@
+
+ $(TARGETS): make.fil
+ PATH="`pwd`/bin:$$PATH" $(MAKE) -f make.fil VERSION=$(VERSION) TOPDIR=`pwd` $@
+diff --git a/bootblocks/Makefile b/bootblocks/Makefile
+index a4c3a2e..4b4aca1 100644
+--- a/bootblocks/Makefile
++++ b/bootblocks/Makefile
+@@ -1,5 +1,5 @@
+ HOSTCC=cc
+-HOSTCCFLAGS=-O2 -pipe
++HOSTCCFLAGS=-O2 -pipe -std=c89 -Wno-error=return-type
+ BCC=bcc
+ AS86=as86
+
+diff --git a/dis88/Makefile b/dis88/Makefile
+index 146d1cf..9c3ab4f 100644
+--- a/dis88/Makefile
++++ b/dis88/Makefile
+@@ -25,7 +25,7 @@
+ # be necessary to alter the formats of the tables.
+
+ #CC=bcc
+-CFLAGS=-O
++CFLAGS=-O -std=c89
+ LDFLAGS=
+ PREFIX=/usr
+
+diff --git a/dis88/dis.h b/dis88/dis.h
+index 21bbc2e..bfc64e7 100644
+--- a/dis88/dis.h
++++ b/dis88/dis.h
+@@ -163,7 +163,7 @@ _PROTOTYPE(void mahand, (int j ));
+ _PROTOTYPE(void mjhand, (int j ));
+
+ /* dismain.c */
+-_PROTOTYPE(void main, (int argc, char **argv ));
++_PROTOTYPE(int main, (int argc, char **argv ));
+
+ /* distabs.c */
+ _PROTOTYPE(char *getnam, (int k ));
+diff --git a/dis88/dismain.c b/dis88/dismain.c
+index 6f51e73..fb07d3e 100644
+--- a/dis88/dismain.c
++++ b/dis88/dismain.c
+@@ -538,7 +538,7 @@ static void disbss()
+ * *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+-void
++int
+ main(argc,argv)
+
+ int argc; /* Command-line args from OS */
diff --git a/sys-devel/dev86/metadata.xml b/sys-devel/dev86/metadata.xml
index c4f5ea2afda9..6633792f0e6d 100644
--- a/sys-devel/dev86/metadata.xml
+++ b/sys-devel/dev86/metadata.xml
@@ -3,6 +3,7 @@
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
+ <remote-id type="codeberg">jbruchon/dev86</remote-id>
<remote-id type="github">lkundrak/dev86</remote-id>
</upstream>
</pkgmetadata>
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 0a7f46c2e5a5..b85afaea0297 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -8,6 +8,8 @@ DIST gcc-12-20241219.tar.xz 79920016 BLAKE2B 71044352515f33eaf0bcc64cc6eacdecb8b
DIST gcc-12-20250116.tar.xz 79921816 BLAKE2B b4c2ee7fb76b15834b5637d157c39cbdedca4b458d767eaa5b7275ef835db5f2f44437a7242dcccb1c57a706cdb7788cecc42bfb99795b8ed0ccf589c24296f5 SHA512 271f31a7d213da38f197fe8124030780b334dd84b62d09e58757c722232c3465d2344e0664be6c62f0b5187f604e5af01fffa262a6b4f5b27a0199693e563ac4
DIST gcc-12-20250123.tar.xz 79912136 BLAKE2B f143da3aaa36020b99c0da4b4951743f90fcbcdf93af325bd76878944187005e80b11657b85ab0cf014434acf5431a45cb29effb9a8e3922092ec5dee6606b51 SHA512 1b9dba666d9538171f935334c5a7106499758f26422a497c748c4ea90983e77bfaaecdb8a96099e1a43c0722e15d34a3c0f549e531cb56ea3a990e71f0b2135b
DIST gcc-12-20250130.tar.xz 79936036 BLAKE2B ceca895f319d4d97e1d936c8caad24b847d95aba24270c5489dda55ed0a2f69f6da58b34705af7ccedd002567e6dba52f91e82a4b79d646e7a885057267838fe SHA512 043ca62adc0d7dc9a3021dc288c2483c0baf4e18b7f155944e79d6b95b4c8efe3ac694ddc8d7ab12d715a9313dd0a5f9fe7271002a497ad0ecdf9e9451f95073
+DIST gcc-12-20250206.tar.xz 79919852 BLAKE2B b20f3c61d9f25a78bb3b60243d523552d36728353e75c77cf71831685f83fdc539c5ea52244a41deabe64e4158a62d852478e261be82cc97b4c28e6393d842ac SHA512 34692ec6575ab526123f697888bfa8b48103a3416a82562e292adc845db31adf3eb76179625627b908ed129c893f200657537e3a33ad7f2619b635f285171d64
+DIST gcc-12-20250213.tar.xz 79923504 BLAKE2B 0ccfcb0bb5b7ccedc54964c5be0d8eec1cc9ea8e43714cc203bcfd5de16b5725a66727096ade8ab29316e6320466d2b99a82750aa3ac68a7c1b9651958f25b67 SHA512 9914d5a6cb0eb608e321ba4f5da6201c12083e5d2a58ff59875f37d5b0f34ad9324f9150ad27ec85b8e0e56983eff3973653ceb4a0011afdc1489efb044a5a06
DIST gcc-12.4.0-musl-patches-1.tar.xz 3068 BLAKE2B e5e39c24934072ea89e4467d0dc5196f3dadfb5ffba0c856d051648a2fbf57d434a57e95227cdf2b8cea45f0f5555aec2bc372d2f6cb0b69efd87831d248d364 SHA512 b9db204845a25be043d76cae826d42eebeeb4f9be7c3049af6fe7601a552bedfd24731156a6a36b4b5e2e2af656a589a5c556d2b0b3ded33ba290a773ee87c62
DIST gcc-12.4.0-patches-1.tar.xz 15576 BLAKE2B 98c29888de7701b365be7ac9062f0cee3340d58c85485e26f0d02f1483ec64cc9c10651488a4fd937551afe30f4e19777e6766871a724ae3ba6c290c16f4fdf1 SHA512 3f7c5d36e56e07ea9dd143a5d13342a6c1ccbf0643abd1c0bcbfb46bb7c7b1308aef6e3e882031c9c191610f01af906b19be5aa2b139cf617614f46e97463aec
DIST gcc-12.4.0-patches-2.tar.xz 14876 BLAKE2B 6bf5abbb2abba4b9fe9fa153ac4112fe5f563e97cd4e1b885ccd0d88abf1124fa91f20d6be972e2242410447be73bca60014785f8551b8087ed0d4cc3e868225 SHA512 dfd5f02d4c1076fad4ee998b2f620171dd3eb65a1160312def9dae89b18327a06db853f569e0e3c049e5ab06c61488bb6faecec52bafe737fddeb43628c54a1f
@@ -16,6 +18,8 @@ DIST gcc-13-20241220.tar.xz 84504500 BLAKE2B 60d6dcdcafa36399a0c0de7fef3a4eb4ca8
DIST gcc-13-20250117.tar.xz 84520416 BLAKE2B 3ce98ce1a17ec5a733e3cb8eab0a6084d5e32b225213f0af6f3ff699552d162514a0d6eb6e2805b07d5f97229a92a15f67958dc2ccc82e9d937b8af688a9528b SHA512 121f176f2d9779e33245ddc4048f1ca683311cf20c240e8e76ad6fea892a2e968876b838cc1d90cba06184a9cf4b4408b78dcbabc27368e0cadf1d8de749eed2
DIST gcc-13-20250124.tar.xz 84528596 BLAKE2B db8c45b1babd48158644899fe1a3e263eee6e716bc117be95f53aa30e00bf4a87b6de7c852e558887001cea53fbaaea4fe176f8a2361cf122cd05c36c7a0ae8f SHA512 d5d32c66d22a1fb2fca1db1c473125003ef204c68711459eb358374259efb924ea160c363b7b1c81659cc6bf154de499949c02e9adde1ddb4dcb2f2ebbb27e42
DIST gcc-13-20250131.tar.xz 84530144 BLAKE2B 45a667a31abd556383009d64ab9860ce2815c2446db02b985ec295344aed40060f8e90a01cea907082fdfc25a4572e0baf3fea9739b8777c0b9f76a9eacc4a22 SHA512 909fd58368f379863580e3641b0404e187293db5b3a88c703231726d8aced1241578d5865dcc1c62fcbe3ce030f24e433ff75bfff8266801d829998cab6abb01
+DIST gcc-13-20250207.tar.xz 84528380 BLAKE2B da70e92437a364ae75c83199c3d1d075d73d5e3a9d78159633736f15a483771f352d3628c0f99de727790197f60fe9ad40a25d106b6a646a703e72599c419244 SHA512 c99701b181903169ed664e3b53b1f8c84f894b047ff9da0535fd02ab1160a290bbd7e34709d87f611617f24a7f44b1a348ca37d6d60ce356fe8bcb3cf78506fb
+DIST gcc-13-20250214.tar.xz 84517404 BLAKE2B 0a37019f5948e16b35b4e5952f6ec90f77a284a2f5b4367c8ac223d9fef952903ce2c5b0807d6fa574a65ecd79c5a33a97a19e3d3face14b48f3ea7a9880ab44 SHA512 f15d0d9598b0c59303660c30298415b0e6a592ce2e4f2bf77ff5c1517a15e9f8308d09421efa6425a9fcccbb5499f70c87859fc98ac41264b64b383d815fa3e4
DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69
DIST gcc-13.2.0-patches-3.tar.xz 30956 BLAKE2B 29ce043b46645640ca1e983397af3e158588ad87575f0bc59451ea4a7dd5e3bb5b190ed031de6a22cd790d423ba111e95d222187dd09985dceb12db9f0a2d907 SHA512 4ffecae7be320124ad0c4e71e39e142b7aa8db0e70b5f486f491d7a33ea31efc6464c6abeea77df02a8bd5cf81f08225d625c8af5c27f9afa32c0d7d989f7a3c
DIST gcc-13.2.0.tar.xz 87858592 BLAKE2B 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 SHA512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2
@@ -24,17 +28,24 @@ DIST gcc-14-20241221.tar.xz 88198252 BLAKE2B 7491c2e1c8885e201859143bdf5cae95af4
DIST gcc-14-20250118.tar.xz 88214804 BLAKE2B dd35140f0565d419eee272f70e668a8614cfc8f6b7d352a1df8ba2408c6533711e024ca1a7b5e309421138e21d63c5b7f8b581d50b0680abf3dfd6002004bd14 SHA512 692fc50fec856c6cc5a0576d1caa59fd8b5ec298e36daaf5855ea0f922ed134fff346f73e38e47673b692cf03606a66f82e6bdb46e5d7729c370299645a2a093
DIST gcc-14-20250125.tar.xz 88214960 BLAKE2B c8f89803928db5c0374751b10a7d0bcaacfaa425f2b869fac96d35173afa9adf24d6969cdbfe20eea7425b97c23c14dbfda94bd72f447e530632e33719cd9916 SHA512 8d61d0002de3738ef51bbf0338d849121eb009a2908314511da0f79914f73bb5d1f8b1cc06b932188a3814f3bd6a61d0911da942ccc2352d8e2844f9f10ad039
DIST gcc-14-20250201.tar.xz 88210968 BLAKE2B 609c60e6343d2b947ca179b438d296409fcde779fe8eb96bbc56b105ba4bb3489ec1f0d609482bcfff7b25f5390eef9fced93e451acea17c52a182fe3584d6df SHA512 56362fe7169b6ca25c1fa729919a75c81080db54f43e25444957c72a82584ab7b209f72bdd01240a6bfa91b206e7f430e80bb13313a0b6453c88ca9244f32eb7
+DIST gcc-14-20250208.tar.xz 88198624 BLAKE2B 28f3dba8fa1a9b31792140f0b8fcb6aaf6c4a4252f2131d8110024c8fdd5db8d3ebe060a9e9ed7b13c99791c3a3a68be76b9ff4aa9226dc035d965e5f25032ba SHA512 a12105a75c3affc1dd4eb28c3ec75a5d142b37a0b13f91c43a7dd760deedd5a09df3d2cf1f68540eb62c0e6ce47831814aa0a77cc594f79b88c3ab060776d4e1
+DIST gcc-14-20250215.tar.xz 88203864 BLAKE2B b98ac4903372463a65ad03ac26432bb52be5242913f3fdcdfb2c864d38494e3b8230bdb8bd7a8aab5df00580765d8918ff014973a7d528afffc45eb57393483c SHA512 f39e79560e7c789a12fa8daf3338d99edb7947c881a1df8e392a6e1a5c84ba7449efbad4dfc23dfcd7d8d0df1eb79182c1a83c158f1d319a3cf01c1eacebe3eb
DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25
DIST gcc-14.2.0-patches-7.tar.xz 14244 BLAKE2B 11236e91e1fe83fec8ffaa40ec0cdd4b52a00a951e9aa9a7a0a932b234b8f1a9603333a7ccf55859f4ef53dd4d8ad1fd5c1d2514b6e45fce5b86bb58622a0ecc SHA512 5a4d86d943e31fa068b5a784c0132bd83c23243dcb3cf972557a42e004469a415e1b3185f31b1bb36f916594d475f266a2fda031a414e4a15e0bbfe471269eee
+DIST gcc-14.2.0-patches-8.tar.xz 14540 BLAKE2B 09f66035343d4cab694b8ab382170f8e2d546ddffedf3477f26edbd6a798ddf94294f569c2661729d40088d590bc17a4eb651710d8d9f66f33703734a1a82b67 SHA512 7a9a2724ef8db3c57b033d90751192969c16e5eaa8f4777b7f16470222ff3a18771b461bd89feaad701e7f0d573b883b487981588129933c732fb76117728b86
DIST gcc-15-20250112.tar.xz 90584884 BLAKE2B 35200ad43eaca0b97d330d22abb517ee5f8d196b83d40650e5a2e39b5a847b2c686108d15edf998df511992930bf3464b7e63d4562c17a6330a22a693b795122 SHA512 cd2b282eb7cd352fb326df692b653572319edc179ae6dec0c96ead858da4a85134098e128afa9dd76ff691262fd3cfce176c38420a78f56121b039a2a297f63e
DIST gcc-15-20250119.tar.xz 90709176 BLAKE2B da815cd472c0bb4101fb65fac73e93d8da8981c268880222501deb48f03865824773f93ae182ec60465e2b122a1503936dc10337b9b87dfdd15cde5e18641026 SHA512 9f3bb4ff5b04fe84ec3ce5342a29ca1d98f1988c0b3703c63b3f5bd5d58d035ed7c676cdf6bf730f5399a7b461e2929f28494f9ca4a87a6783c6e30114d2c838
DIST gcc-15-20250126.tar.xz 90895328 BLAKE2B 472b5c0ad2da8525a40530089f02bcdf6b8b3d3e31c1f5f86339d624c3a461ab24d35d815554513ba6dbe807f8f3a7f9e123f63ec0fe33796bee9e6da411deab SHA512 e55a19e07bd10b6c5f4a639d0fe548495297a4a1efe4c2cd4e891f27a2962bd929baeaf312b4f3a9e0a51b105e470de37a717fd8161ff75759aaa6b48c937d8a
DIST gcc-15-20250202.tar.xz 91011652 BLAKE2B 414fac76d3bb3887658387f80c64b587e75f71a8e1f2dc2c455c06a9d333125fdb113b30115ad1c3586fe92c786768c5f01eb1cb7e2cb6811adfb5fb1c46b391 SHA512 403c45199be4fb3f4b29495d26720f75bce20cea42fe0f47959db81f24769e20291a70ca2d63eccbeda9efd5abfb344ef7337c62118093092cd3438a1ef8fff4
+DIST gcc-15-20250209.tar.xz 91287472 BLAKE2B e589600b828d560f9de5af01d340f5ac710c23c45fb5e66fe2876e3e73052f435e25c7c630c09b6fbf05381299effae6415a3592a4222687c15e96f54896752e SHA512 fcadf48cdd2cc55a7f0266eaa7643ffeb3c4606c3a6f6780a501b30ab8babe4b15d1cfe55038a65ae789e600119d86819af2ffe2b0800512bd9b3803e2407ec7
+DIST gcc-15-20250216.tar.xz 91404792 BLAKE2B 1a007a432c7f7ac6ba0169caf2561e26267ae5c75403ecd52227dbee255eff4c1bca5db9d6ce2e772ee357dc06e648d7ebfb3629117b13d48343a474a17901c6 SHA512 8dcb3968e157a2cb6a06e4ba76a0fd95936025d99f48333aacc554f347d19df8e6b9a0c9c454acd730a5608122ff4c12a712ccdf09919f8e310cf6688c00df84
DIST gcc-15.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de
DIST gcc-15.0.0-patches-41.tar.xz 33308 BLAKE2B d95b2798837a40380d06818fb047b7a5ea2e5a20de12a760b168c4dbb39c7af6b45621034d17250754f6dbc83dacdd7a75ff41c505b158bcf2090eca678d5f05 SHA512 203bedbab8e5d139ac3421e6347a2aecba48f5757ea524241feff7154eb918dad0c7f9f7505bf9041ab67b7c57170f5ea26f8160af3b268aec2b9a1113325733
DIST gcc-15.0.0-patches-42.tar.xz 26904 BLAKE2B 21fad98bfa977cb359dfeecec5b35d4470429acf103f99e3519a34f87926225e83257f23eb2983adf68d2a8a3089f7769dedfde7302ef9f55c30b59bba47d1bb SHA512 3ede6bf4c908a179b4b9bf8d281385a6ecf64be481479c88ad0b250b6c93050ff76dd2cf6fc9b12bf8b503a123cad2b8c418abc4ab233524d7bd78e1d9f31009
DIST gcc-15.0.0-patches-43.tar.xz 25892 BLAKE2B 1d0dbbe277179aefaab20e03bf152ded962c69fe4b3afcdcf7211a71327149977109fe0e8b2bc198ee16a59ab2569d2b698f216712eaa65c2cdb6de209aa1ffb SHA512 ddf3e6d2876c4d567830de91b39acedda280d739f7948ec02d04b409be10d8e1bb41a510d1b5f78b26e79de18aa2b281f9ce2182088b6b514f2f46389af8c22e
DIST gcc-15.0.0-patches-44.tar.xz 25092 BLAKE2B 4010f1f7ab17e47879db78f11f99ff4c8fe1258dc326aae9af6e25be098d8cc5806223d014a668cf6d2f8e1a36a40ca0a6a5aa87e70f15164460c728d329793e SHA512 329ffc475fde3d5c19382c83fae2ce60fd3c0f1e336f7e87ca2df4689c73747807f1b9665ee00995356b5fbcee3bb1e3092c100d1b08f98f1d0b17d1ec8c8581
+DIST gcc-15.0.0-patches-45.tar.xz 25044 BLAKE2B f270b48434ec3ca3b1c52e62efa09a38625d40290fabf059914116423d14173c63cd45fcd496768cdc19eafdb10fabfe651d03ec56bb6b44a0e70eb00814b1dd SHA512 bb301b36c3c033f8d0abde9729f3c22d4867d4f6f9cfcf4456ee0a58331af25205db5d87fe1727fdbc3da04fa84c7434da83cc48c6674671a2db1a7e9b093a0b
+DIST gcc-15.0.0-patches-46.tar.xz 22212 BLAKE2B 159b2693ded0b1dbddd271ca56d7f6db3569a8f79155521737b968ad131eee2730d3441dacef821b9dcd31b17ca0bf16a7b24001e7cb4ae1b36c55750184a3f6 SHA512 26d293ee368c75570e606949480feed18a69baad4687beaf2f50629bfc72d542bbce4b1cb6580fe7e578409a108891dc9762bb15c53b611434c83db5dd83d695
DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6
DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8
DIST gcc-9.5.0-patches-2.tar.xz 14324 BLAKE2B 1d3bf3e673108ad2fcdcb86daefb4603d1c9f6aa815e34d1591054d466b76d6f50cce124ab4760528c4951ea16eb00888a3e6485417f81ebf250548732df4a8e SHA512 a6d6f650aaf0bd193a17ac279649f0544a282cea295824384c59341c3000eac4b574b60e00dd427585d928f9768166abf85168b47772132790ad98854acacbbf
diff --git a/sys-devel/gcc/files/gcc-15.0.1_pre20250209-coro.patch b/sys-devel/gcc/files/gcc-15.0.1_pre20250209-coro.patch
new file mode 100644
index 000000000000..bc51deefafe7
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-15.0.1_pre20250209-coro.patch
@@ -0,0 +1,124 @@
+https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=556248d7d2cf557423993eb68f6a55ae6bda0cee
+
+From 556248d7d2cf557423993eb68f6a55ae6bda0cee Mon Sep 17 00:00:00 2001
+From: Jason Merrill <jason@redhat.com>
+Date: Tue, 11 Feb 2025 13:51:32 +0100
+Subject: [PATCH] c++: don't default -frange-for-ext-temps in -std=gnu++20
+ [PR188574]
+
+Since -frange-for-ext-temps has been causing trouble, let's not enable it
+by default in pre-C++23 GNU modes for GCC 15, and also allow disabling it in
+C++23 and up.
+
+ PR c++/188574
+
+gcc/c-family/ChangeLog:
+
+ * c-opts.cc (c_common_post_options): Only enable
+ -frange-for-ext-temps by default in C++23.
+
+gcc/ChangeLog:
+
+ * doc/invoke.texi: Adjust -frange-for-ext-temps documentation.
+
+gcc/testsuite/ChangeLog:
+
+ * g++.dg/cpp23/range-for3.C: Use -frange-for-ext-temps.
+ * g++.dg/cpp23/range-for4.C: Adjust expected result.
+
+libgomp/ChangeLog:
+
+ * testsuite/libgomp.c++/range-for-4.C: Adjust expected result.
+---
+ gcc/c-family/c-opts.cc | 17 +++--------------
+ gcc/doc/invoke.texi | 5 ++---
+ gcc/testsuite/g++.dg/cpp23/range-for3.C | 4 ++--
+ gcc/testsuite/g++.dg/cpp23/range-for4.C | 4 ++--
+ libgomp/testsuite/libgomp.c++/range-for-4.C | 2 +-
+ 5 files changed, 10 insertions(+), 22 deletions(-)
+
+diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc
+index 87b231861a64..d43b3aef1024 100644
+--- a/gcc/c-family/c-opts.cc
++++ b/gcc/c-family/c-opts.cc
+@@ -1213,20 +1213,9 @@ c_common_post_options (const char **pfilename)
+ if (cxx_dialect >= cxx20)
+ flag_concepts = 1;
+
+- /* Enable lifetime extension of range based for temporaries for C++23.
+- Diagnose -std=c++23 -fno-range-for-ext-temps. */
+- if (cxx_dialect >= cxx23)
+- {
+- if (OPTION_SET_P (flag_range_for_ext_temps)
+- && !flag_range_for_ext_temps)
+- error ("%<-fno-range-for-ext-temps%> is incompatible with C++23");
+- flag_range_for_ext_temps = 1;
+- }
+- /* Otherwise default to enabled in GNU modes but allow user to override. */
+- else if (cxx_dialect >= cxx11
+- && !flag_iso
+- && !OPTION_SET_P (flag_range_for_ext_temps))
+- flag_range_for_ext_temps = 1;
++ /* Enable lifetime extension of range based for temporaries for C++23. */
++ SET_OPTION_IF_UNSET (&global_options, &global_options_set,
++ flag_range_for_ext_temps, cxx_dialect >= cxx23);
+
+ /* -fimmediate-escalation has no effect when immediate functions are not
+ supported. */
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 0aef2abf05b9..56d43cb67796 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -3548,9 +3548,8 @@ easier, you can use @option{-fno-pretty-templates} to disable them.
+ Enable lifetime extension of C++ range based for temporaries.
+ With @option{-std=c++23} and above this is part of the language standard,
+ so lifetime of the temporaries is extended until the end of the loop
+-regardless of this option. This option allows enabling that behavior also
+-in earlier versions of the standard and is enabled by default in the
+-GNU dialects, from @option{-std=gnu++11} until @option{-std=gnu++20}.
++by default. This option allows enabling that behavior also
++in earlier versions of the standard.
+
+ @opindex fno-rtti
+ @opindex frtti
+diff --git a/gcc/testsuite/g++.dg/cpp23/range-for3.C b/gcc/testsuite/g++.dg/cpp23/range-for3.C
+index 301e25886ec6..f95b21b3ceee 100644
+--- a/gcc/testsuite/g++.dg/cpp23/range-for3.C
++++ b/gcc/testsuite/g++.dg/cpp23/range-for3.C
+@@ -1,7 +1,7 @@
+ // P2718R0 - Wording for P2644R1 Fix for Range-based for Loop
+ // { dg-do run { target c++11 } }
+-// Verify -frange-for-ext-temps is set by default in -std=gnu++* modes.
+-// { dg-options "" }
++// Verify -frange-for-ext-temps works in earlier standards.
++// { dg-additional-options "-frange-for-ext-temps" }
+
+ #define RANGE_FOR_EXT_TEMPS 1
+ #include "range-for1.C"
+diff --git a/gcc/testsuite/g++.dg/cpp23/range-for4.C b/gcc/testsuite/g++.dg/cpp23/range-for4.C
+index f8c380d32c72..16204974bac9 100644
+--- a/gcc/testsuite/g++.dg/cpp23/range-for4.C
++++ b/gcc/testsuite/g++.dg/cpp23/range-for4.C
+@@ -1,7 +1,7 @@
+ // P2718R0 - Wording for P2644R1 Fix for Range-based for Loop
+ // { dg-do run { target c++11 } }
+-// Verify -frange-for-ext-temps is set by default in -std=gnu++* modes.
++// Verify -frange-for-ext-temps is not set by default in -std=gnu++* modes.
+ // { dg-options "" }
+
+-#define RANGE_FOR_EXT_TEMPS 1
++#define RANGE_FOR_EXT_TEMPS 0
+ #include "range-for2.C"
+diff --git a/libgomp/testsuite/libgomp.c++/range-for-4.C b/libgomp/testsuite/libgomp.c++/range-for-4.C
+index 3c10e7349af7..aa6e4da523c1 100644
+--- a/libgomp/testsuite/libgomp.c++/range-for-4.C
++++ b/libgomp/testsuite/libgomp.c++/range-for-4.C
+@@ -3,5 +3,5 @@
+ // { dg-additional-options "-std=gnu++17" }
+ // { dg-require-effective-target tls_runtime }
+
+-#define RANGE_FOR_EXT_TEMPS 1
++#define RANGE_FOR_EXT_TEMPS 0
+ #include "range-for-1.C"
+--
+2.43.5
diff --git a/sys-devel/gcc/files/gcc-15.0.1_pre20250209-range-for-mariadb.patch b/sys-devel/gcc/files/gcc-15.0.1_pre20250209-range-for-mariadb.patch
new file mode 100644
index 000000000000..8ffe1b558b2e
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-15.0.1_pre20250209-range-for-mariadb.patch
@@ -0,0 +1,530 @@
+https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=26baa2c09b39abf037afad349a318dc5734eae25
+
+From 26baa2c09b39abf037afad349a318dc5734eae25 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Thu, 13 Feb 2025 10:21:29 +0100
+Subject: [PATCH] c++: Fix up regressions caused by for/while loops with
+ declarations [PR118822]
+
+The recent PR86769 r15-7426 changes regressed the following two testcases,
+the first one is more important as it is derived from real-world code.
+
+The first problem is that the chosen
+prep = do_pushlevel (sk_block);
+// emit something
+body = push_stmt_list ();
+// emit further stuff
+body = pop_stmt_list (body);
+prep = do_poplevel (prep);
+way of constructing the {FOR,WHILE}_COND_PREP and {FOR,WHILE}_BODY
+isn't reliable. If during parsing a label is seen in the body and then
+some decl with destructors, sk_cleanup transparent scope is added, but
+the correspondiong result from push_stmt_list is saved in
+*current_binding_level and pop_stmt_list then pops even that statement list
+but only do_poplevel actually attempts to pop the sk_cleanup scope and so we
+ICE.
+The reason for not doing do_pushlevel (sk_block); do_pushlevel (sk_block);
+is that variables should be in the same scope (otherwise various e.g.
+redeclaration*.C tests FAIL) and doing do_pushlevel (sk_block); do_pushlevel
+(sk_cleanup); wouldn't work either as do_poplevel would silently unwind even
+the cleanup one.
+
+The second problem is that my assumption that the declaration in the
+condition will have zero or one cleanup is just wrong, at least for
+structured bindings used as condition, there can be as many cleanups as
+there are names in the binding + 1.
+
+So, the following patch changes the earlier approach. Nothing is removed
+from the {FOR,WHILE}_COND_PREP subtrees while doing adjust_loop_decl_cond,
+push_stmt_list isn't called either; all it does is remember as an integer
+the number of cleanups (CLEANUP_STMT at the end of the STATEMENT_LISTs)
+from querying stmt_list_stack and finding the initial *body_p in there
+(that integer is stored into {FOR,WHILE}_COND_CLEANUP), and temporarily
+{FOR,WHILE}_BODY is set to the last statement (if any) in the innermost
+STATEMENT_LIST at the adjust_loop_decl_cond time; then at
+finish_{for,while}_stmt a new finish_loop_cond_prep routine takes care of
+do_poplevel for the scope (which is in {FOR,WHILE}_COND_PREP) and finds
+given {FOR,WHILE}_COND_CLEANUP number and {FOR,WHILE}_BODY tree the right
+spot where body statements start and moves that into {FOR,WHILE}_BODY.
+Finally genericize_c_loop then inserts the cond, body, continue label, expr
+into the right subtree of {FOR,WHILE}_COND_PREP.
+The constexpr evaluation unfortunately had to be changed as well, because
+we don't want to evaluate everything in BIND_EXPR_BODY (*_COND_PREP ())
+right away, we want to evaluate it with the exception of the CLEANUP_STMT
+cleanups at the end (given {FOR,WHILE}_COND_CLEANUP levels), and defer
+the evaluation of the cleanups until after cond, body, expr are evaluated.
+
+2025-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/118822
+ PR c++/118833
+gcc/
+ * tree-iterator.h (tsi_split_stmt_list): Declare.
+ * tree-iterator.cc (tsi_split_stmt_list): New function.
+gcc/c-family/
+ * c-common.h (WHILE_COND_CLEANUP): Change description in comment.
+ (FOR_COND_CLEANUP): Likewise.
+ * c-gimplify.cc (genericize_c_loop): Adjust for COND_CLEANUP
+ being CLEANUP_STMT/TRY_FINALLY_EXPR trailing nesting depth
+ instead of actual cleanup.
+gcc/cp/
+ * semantics.cc (adjust_loop_decl_cond): Allow multiple trailing
+ CLEANUP_STMT levels in *BODY_P. Set *CLEANUP_P to the number
+ of levels rather than one particular cleanup, keep the cleanups
+ in *PREP_P. Set *BODY_P to the last stmt in the cur_stmt_list
+ or NULL if *CLEANUP_P and the innermost cur_stmt_list is empty.
+ (finish_loop_cond_prep): New function.
+ (finish_while_stmt, finish_for_stmt): Use it. Don't call
+ set_one_cleanup_loc.
+ * constexpr.cc (cxx_eval_loop_expr): Adjust handling of
+ {FOR,WHILE}_COND_{PREP,CLEANUP}.
+gcc/testsuite/
+ * g++.dg/expr/for9.C: New test.
+ * g++.dg/cpp26/decomp12.C: New test.
+---
+ gcc/c-family/c-common.h | 6 +-
+ gcc/c-family/c-gimplify.cc | 41 +++------
+ gcc/cp/constexpr.cc | 97 +++++++++++++++++--
+ gcc/cp/semantics.cc | 128 +++++++++++++++++++-------
+ gcc/testsuite/g++.dg/cpp26/decomp12.C | 46 +++++++++
+ gcc/testsuite/g++.dg/expr/for9.C | 25 +++++
+ gcc/tree-iterator.cc | 22 +++++
+ gcc/tree-iterator.h | 1 +
+ 8 files changed, 297 insertions(+), 69 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp26/decomp12.C
+ create mode 100644 gcc/testsuite/g++.dg/expr/for9.C
+
+diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
+index bc238430b7a7..ea6c29750567 100644
+--- a/gcc/c-family/c-common.h
++++ b/gcc/c-family/c-common.h
+@@ -1518,7 +1518,8 @@ extern tree build_userdef_literal (tree suffix_id, tree value,
+
+ /* WHILE_STMT accessors. These give access to the condition of the
+ while statement, the body, and name of the while statement, and
+- condition preparation statements and its cleanup, respectively. */
++ condition preparation statements and number of its nested cleanups,
++ respectively. */
+ #define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0)
+ #define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1)
+ #define WHILE_NAME(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 2)
+@@ -1533,7 +1534,8 @@ extern tree build_userdef_literal (tree suffix_id, tree value,
+
+ /* FOR_STMT accessors. These give access to the init statement,
+ condition, update expression, body and name of the for statement,
+- and condition preparation statements and its cleanup, respectively. */
++ and condition preparation statements and number of its nested cleanups,
++ respectively. */
+ #define FOR_INIT_STMT(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 0)
+ #define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1)
+ #define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2)
+diff --git a/gcc/c-family/c-gimplify.cc b/gcc/c-family/c-gimplify.cc
+index d53e0c2dc567..dc5e80dfa6be 100644
+--- a/gcc/c-family/c-gimplify.cc
++++ b/gcc/c-family/c-gimplify.cc
+@@ -258,8 +258,10 @@ expr_loc_or_loc (const_tree expr, location_t or_loc)
+ for C++ for/while loops with variable declaration as condition. COND_PREP
+ is a BIND_EXPR with the declaration and initialization of the condition
+ variable, into which COND, BODY, continue label if needed and INCR if
+- non-NULL should be appended, and COND_CLEANUP are statements which should
+- be evaluated after that or if anything in COND, BODY or INCR throws. */
++ non-NULL should be appended, and COND_CLEANUP is number of nested
++ CLEANUP_STMT -> TRY_FINALLY_EXPR statements at the end. If non-NULL,
++ COND, BODY, continue label if needed and INCR if non-NULL should be
++ appended to the body of the COND_CLEANUP's nested TRY_FINALLY_EXPR. */
+
+ static void
+ genericize_c_loop (tree *stmt_p, location_t start_locus, tree cond, tree body,
+@@ -278,7 +280,6 @@ genericize_c_loop (tree *stmt_p, location_t start_locus, tree cond, tree body,
+ walk_tree_1 (&cond_prep, func, data, NULL, lh);
+ walk_tree_1 (&cond, func, data, NULL, lh);
+ walk_tree_1 (&incr, func, data, NULL, lh);
+- walk_tree_1 (&cond_cleanup, func, data, NULL, lh);
+
+ blab = begin_bc_block (bc_break, start_locus);
+ clab = begin_bc_block (bc_continue, start_locus);
+@@ -309,36 +310,24 @@ genericize_c_loop (tree *stmt_p, location_t start_locus, tree cond, tree body,
+ EXPR;
+ goto top;
+
+- or
+-
+- try {
+- if (COND); else break;
+- BODY;
+- cont:
+- EXPR;
+- } finally {
+- COND_CLEANUP
+- }
+-
+- appended into COND_PREP body. */
++ appended into COND_PREP body or body of some TRY_FINALLY_EXPRs
++ at the end of COND_PREP. */
+ gcc_assert (cond_is_first && TREE_CODE (cond_prep) == BIND_EXPR);
+ tree top = build1 (LABEL_EXPR, void_type_node,
+ create_artificial_label (start_locus));
+ exit = build1 (GOTO_EXPR, void_type_node, LABEL_EXPR_LABEL (top));
+ append_to_statement_list (top, &outer_stmt_list);
+ append_to_statement_list (cond_prep, &outer_stmt_list);
+- stmt_list = BIND_EXPR_BODY (cond_prep);
+- BIND_EXPR_BODY (cond_prep) = NULL_TREE;
+ stmt_list_p = &BIND_EXPR_BODY (cond_prep);
+- if (cond_cleanup && TREE_SIDE_EFFECTS (cond_cleanup))
+- {
+- t = build2_loc (EXPR_LOCATION (cond_cleanup), TRY_FINALLY_EXPR,
+- void_type_node, NULL_TREE, cond_cleanup);
+- append_to_statement_list (t, &stmt_list);
+- *stmt_list_p = stmt_list;
+- stmt_list_p = &TREE_OPERAND (t, 0);
+- stmt_list = NULL_TREE;
+- }
++ if (cond_cleanup)
++ for (unsigned depth = tree_to_uhwi (cond_cleanup); depth; --depth)
++ {
++ t = tsi_stmt (tsi_last (*stmt_list_p));
++ gcc_assert (TREE_CODE (t) == TRY_FINALLY_EXPR);
++ stmt_list_p = &TREE_OPERAND (t, 0);
++ }
++ stmt_list = *stmt_list_p;
++ *stmt_list_p = NULL_TREE;
+ tree after_cond = create_artificial_label (cond_locus);
+ tree goto_after_cond = build1 (GOTO_EXPR, void_type_node, after_cond);
+ t = build1 (GOTO_EXPR, void_type_node, get_bc_label (bc_break));
+diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc
+index f142dd32bc80..299b13456873 100644
+--- a/gcc/cp/constexpr.cc
++++ b/gcc/cp/constexpr.cc
+@@ -7153,6 +7153,7 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t,
+
+ tree body, cond = NULL_TREE, expr = NULL_TREE;
+ tree cond_prep = NULL_TREE, cond_cleanup = NULL_TREE;
++ unsigned cond_cleanup_depth = 0;
+ int count = 0;
+ switch (TREE_CODE (t))
+ {
+@@ -7188,11 +7189,25 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t,
+ }
+ if (cond_prep)
+ gcc_assert (TREE_CODE (cond_prep) == BIND_EXPR);
+- auto cleanup_cond = [=] {
++ auto cleanup_cond = [&] {
+ /* Clean up the condition variable after each iteration. */
+- if (cond_cleanup && !*non_constant_p)
+- cxx_eval_constant_expression (ctx, cond_cleanup, vc_discard,
+- non_constant_p, overflow_p);
++ if (cond_cleanup_depth && !*non_constant_p)
++ {
++ auto_vec<tree, 4> cleanups (cond_cleanup_depth);
++ tree s = BIND_EXPR_BODY (cond_prep);
++ unsigned i;
++ for (i = cond_cleanup_depth; i; --i)
++ {
++ tree_stmt_iterator iter = tsi_last (s);
++ s = tsi_stmt (iter);
++ cleanups.quick_push (CLEANUP_EXPR (s));
++ s = CLEANUP_BODY (s);
++ }
++ tree c;
++ FOR_EACH_VEC_ELT_REVERSE (cleanups, i, c)
++ cxx_eval_constant_expression (ctx, c, vc_discard, non_constant_p,
++ overflow_p);
++ }
+ if (cond_prep)
+ for (tree decl = BIND_EXPR_VARS (cond_prep);
+ decl; decl = DECL_CHAIN (decl))
+@@ -7227,9 +7242,77 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t,
+ for (tree decl = BIND_EXPR_VARS (cond_prep);
+ decl; decl = DECL_CHAIN (decl))
+ ctx->global->clear_value (decl);
+- cxx_eval_constant_expression (ctx, BIND_EXPR_BODY (cond_prep),
+- vc_discard, non_constant_p,
+- overflow_p, jump_target);
++ if (cond_cleanup)
++ {
++ /* If COND_CLEANUP is non-NULL, we need to evaluate DEPTH
++ nested STATEMENT_LISTs from inside of BIND_EXPR_BODY,
++ but defer the evaluation of CLEANUP_EXPRs of CLEANUP_STMT
++ at the end of those STATEMENT_LISTs. */
++ cond_cleanup_depth = 0;
++ tree s = BIND_EXPR_BODY (cond_prep);
++ for (unsigned depth = tree_to_uhwi (cond_cleanup);
++ depth; --depth)
++ {
++ for (tree_stmt_iterator i = tsi_start (s);
++ !tsi_end_p (i); ++i)
++ {
++ tree stmt = *i;
++ if (TREE_CODE (stmt) == DEBUG_BEGIN_STMT)
++ continue;
++ if (tsi_one_before_end_p (i))
++ {
++ /* The last statement in the STATEMENT_LIST
++ has to be a CLEANUP_STMT (verified in
++ finish_loop_cond_prep). We want to
++ evaluate just its CLEANUP_BODY part but not
++ CLEANUP_EXPR part just yet. */
++ gcc_assert (TREE_CODE (stmt) == CLEANUP_STMT);
++ /* If the CLEANUP_STMT is not actually to be
++ evaluated, don't increment cond_cleanup_depth
++ so that we don't evaluate the CLEANUP_EXPR
++ for it later either. */
++ if (*jump_target)
++ {
++ depth = 1;
++ break;
++ }
++ ++cond_cleanup_depth;
++ /* If not in the innermost one, next iteration
++ will handle CLEANUP_BODY similarly. */
++ if (depth > 1)
++ {
++ s = CLEANUP_BODY (stmt);
++ break;
++ }
++ /* The innermost one can be evaluated normally. */
++ cxx_eval_constant_expression (ctx,
++ CLEANUP_BODY (stmt),
++ vc_discard,
++ non_constant_p,
++ overflow_p,
++ jump_target);
++ break;
++ }
++ /* And so should be evaluated statements which aren't
++ last in the STATEMENT_LIST. */
++ cxx_eval_constant_expression (ctx, stmt, vc_discard,
++ non_constant_p, overflow_p,
++ jump_target);
++ if (*non_constant_p
++ || returns (jump_target)
++ || breaks (jump_target)
++ || continues (jump_target))
++ {
++ depth = 1;
++ break;
++ }
++ }
++ }
++ }
++ else
++ cxx_eval_constant_expression (ctx, BIND_EXPR_BODY (cond_prep),
++ vc_discard, non_constant_p,
++ overflow_p, jump_target);
+ }
+
+ if (cond)
+diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc
+index 8a2d86576fb0..7c7d3e3c4326 100644
+--- a/gcc/cp/semantics.cc
++++ b/gcc/cp/semantics.cc
+@@ -790,8 +790,8 @@ finish_cond (tree *cond_p, tree expr)
+ while (A x = 42) { }
+ for (; A x = 42;) { }
+ move the *BODY_P statements as a BIND_EXPR into {FOR,WHILE}_COND_PREP
+- and if there is any CLEANUP_STMT at the end, remove that and
+- put the cleanup into {FOR,WHILE}_COND_CLEANUP.
++ and if there are any CLEANUP_STMT at the end, remember their count in
++ {FOR,WHILE}_COND_CLEANUP.
+ genericize_c_loop will then handle it appropriately. In particular,
+ the {FOR,WHILE}_COND, {FOR,WHILE}_BODY, if used continue label and
+ FOR_EXPR will be appended into the {FOR,WHILE}_COND_PREP BIND_EXPR,
+@@ -807,26 +807,88 @@ adjust_loop_decl_cond (tree *body_p, tree *prep_p, tree *cleanup_p)
+ return;
+
+ gcc_assert (!processing_template_decl);
+- if (*body_p != cur_stmt_list)
+- {
+- /* There can be either no cleanup at all, if the condition
+- declaration doesn't have non-trivial destructor, or a single
+- one if it does. In that case extract it into *CLEANUP_P. */
+- gcc_assert (stmt_list_stack->length () > 1
+- && (*stmt_list_stack)[stmt_list_stack->length ()
+- - 2] == *body_p);
+- tree_stmt_iterator last = tsi_last (*body_p);
+- gcc_assert (tsi_one_before_end_p (last)
+- && TREE_CODE (tsi_stmt (last)) == CLEANUP_STMT
+- && CLEANUP_BODY (tsi_stmt (last)) == cur_stmt_list
+- && tsi_end_p (tsi_last (cur_stmt_list))
+- && !CLEANUP_EH_ONLY (tsi_stmt (last)));
+- *cleanup_p = CLEANUP_EXPR (tsi_stmt (last));
+- tsi_delink (&last);
++ *prep_p = *body_p;
++ if (*prep_p != cur_stmt_list)
++ {
++ /* There can be just one CLEANUP_STMT, or there could be multiple
++ nested CLEANUP_STMTs, e.g. for structured bindings used as
++ condition. */
++ gcc_assert (stmt_list_stack->length () > 1);
++ for (unsigned i = stmt_list_stack->length () - 2; ; --i)
++ {
++ tree t = (*stmt_list_stack)[i];
++ tree_stmt_iterator last = tsi_last (t);
++ gcc_assert (tsi_one_before_end_p (last)
++ && TREE_CODE (tsi_stmt (last)) == CLEANUP_STMT
++ && (CLEANUP_BODY (tsi_stmt (last))
++ == (*stmt_list_stack)[i + 1])
++ && !CLEANUP_EH_ONLY (tsi_stmt (last)));
++ if (t == *prep_p)
++ {
++ *cleanup_p = build_int_cst (long_unsigned_type_node,
++ stmt_list_stack->length () - 1 - i);
++ break;
++ }
++ gcc_assert (i >= 1);
++ }
+ }
+ current_binding_level->keep = true;
+- *prep_p = *body_p;
+- *body_p = push_stmt_list ();
++ tree_stmt_iterator iter = tsi_last (cur_stmt_list);
++ /* Temporarily store in {FOR,WHILE}_BODY the last statement of
++ the innnermost statement list or NULL if it has no statement.
++ This is used in finish_loop_cond_prep to find out the splitting
++ point and then {FOR,WHILE}_BODY will be changed to the actual
++ body. */
++ if (tsi_end_p (iter))
++ *body_p = NULL_TREE;
++ else
++ *body_p = tsi_stmt (iter);
++}
++
++/* Finalize {FOR,WHILE}_{BODY,COND_PREP} after the loop body.
++ The above function initialized *BODY_P to the last statement
++ in *PREP_P at that point.
++ Call do_poplevel on *PREP_P and move everything after that
++ former last statement into *BODY_P. genericize_c_loop
++ will later put those parts back together.
++ CLEANUP is {FOR,WHILE}_COND_CLEANUP. */
++
++static void
++finish_loop_cond_prep (tree *body_p, tree *prep_p, tree cleanup)
++{
++ *prep_p = do_poplevel (*prep_p);
++ gcc_assert (TREE_CODE (*prep_p) == BIND_EXPR);
++ if (BIND_EXPR_BODY (*prep_p) == *body_p)
++ {
++ gcc_assert (cleanup == NULL_TREE);
++ *body_p = build_empty_stmt (input_location);
++ return;
++ }
++ tree stmt_list = BIND_EXPR_BODY (*prep_p);
++ gcc_assert (TREE_CODE (stmt_list) == STATEMENT_LIST);
++ if (cleanup)
++ {
++ tree_stmt_iterator iter = tsi_last (stmt_list);
++ gcc_assert (TREE_CODE (tsi_stmt (iter)) == CLEANUP_STMT);
++ for (unsigned depth = tree_to_uhwi (cleanup); depth > 1; --depth)
++ {
++ gcc_assert (TREE_CODE (CLEANUP_BODY (tsi_stmt (iter)))
++ == STATEMENT_LIST);
++ iter = tsi_last (CLEANUP_BODY (tsi_stmt (iter)));
++ gcc_assert (TREE_CODE (tsi_stmt (iter)) == CLEANUP_STMT);
++ }
++ if (*body_p == NULL_TREE)
++ {
++ *body_p = CLEANUP_BODY (tsi_stmt (iter));
++ CLEANUP_BODY (tsi_stmt (iter)) = build_empty_stmt (input_location);
++ return;
++ }
++ stmt_list = CLEANUP_BODY (tsi_stmt (iter));
++ }
++ tree_stmt_iterator iter = tsi_start (stmt_list);
++ while (tsi_stmt (iter) != *body_p)
++ tsi_next (&iter);
++ *body_p = tsi_split_stmt_list (input_location, iter);
+ }
+
+ /* Finish a goto-statement. */
+@@ -1437,14 +1499,13 @@ void
+ finish_while_stmt (tree while_stmt)
+ {
+ end_maybe_infinite_loop (boolean_true_node);
+- WHILE_BODY (while_stmt)
+- = (WHILE_COND_PREP (while_stmt)
+- ? pop_stmt_list (WHILE_BODY (while_stmt))
+- : do_poplevel (WHILE_BODY (while_stmt)));
+- finish_loop_cond (&WHILE_COND (while_stmt), WHILE_BODY (while_stmt));
+ if (WHILE_COND_PREP (while_stmt))
+- WHILE_COND_PREP (while_stmt) = do_poplevel (WHILE_COND_PREP (while_stmt));
+- set_one_cleanup_loc (WHILE_COND_CLEANUP (while_stmt), input_location);
++ finish_loop_cond_prep (&WHILE_BODY (while_stmt),
++ &WHILE_COND_PREP (while_stmt),
++ WHILE_COND_CLEANUP (while_stmt));
++ else
++ WHILE_BODY (while_stmt) = do_poplevel (WHILE_BODY (while_stmt));
++ finish_loop_cond (&WHILE_COND (while_stmt), WHILE_BODY (while_stmt));
+ }
+
+ /* Begin a do-statement. Returns a newly created DO_STMT if
+@@ -1709,17 +1770,16 @@ finish_for_stmt (tree for_stmt)
+ RANGE_FOR_BODY (for_stmt) = do_poplevel (RANGE_FOR_BODY (for_stmt));
+ else
+ {
+- FOR_BODY (for_stmt)
+- = (FOR_COND_PREP (for_stmt)
+- ? pop_stmt_list (FOR_BODY (for_stmt))
+- : do_poplevel (FOR_BODY (for_stmt)));
++ if (FOR_COND_PREP (for_stmt))
++ finish_loop_cond_prep (&FOR_BODY (for_stmt),
++ &FOR_COND_PREP (for_stmt),
++ FOR_COND_CLEANUP (for_stmt));
++ else
++ FOR_BODY (for_stmt) = do_poplevel (FOR_BODY (for_stmt));
+ if (FOR_COND (for_stmt))
+ finish_loop_cond (&FOR_COND (for_stmt),
+ FOR_EXPR (for_stmt) ? integer_one_node
+ : FOR_BODY (for_stmt));
+- if (FOR_COND_PREP (for_stmt))
+- FOR_COND_PREP (for_stmt) = do_poplevel (FOR_COND_PREP (for_stmt));
+- set_one_cleanup_loc (FOR_COND_CLEANUP (for_stmt), input_location);
+ }
+
+ /* Pop the scope for the body of the loop. */
+diff --git a/gcc/tree-iterator.cc b/gcc/tree-iterator.cc
+index db2219c62489..b7e2b421c5ee 100644
+--- a/gcc/tree-iterator.cc
++++ b/gcc/tree-iterator.cc
+@@ -284,6 +284,28 @@ tsi_delink (tree_stmt_iterator *i)
+ i->ptr = next;
+ }
+
++/* Split a STATEMENT_LIST in I.contrainer into two, all statements
++ from the start until I.ptr inclusive will remain in the original
++ one, all statements after I.ptr are removed from that STATEMENT_LIST
++ and returned as a new STATEMENT_LIST. If I is the last statement,
++ an empty statement with LOC location is returned. */
++
++tree
++tsi_split_stmt_list (location_t loc, tree_stmt_iterator i)
++{
++ if (tsi_one_before_end_p (i))
++ return build_empty_stmt (loc);
++ tsi_next (&i);
++ tree ret = NULL_TREE;
++ while (!tsi_end_p (i))
++ {
++ tree t = tsi_stmt (i);
++ tsi_delink (&i);
++ append_to_statement_list_force (t, &ret);
++ }
++ return ret;
++}
++
+ /* Return the first expression in a sequence of COMPOUND_EXPRs, or in
+ a STATEMENT_LIST, disregarding DEBUG_BEGIN_STMTs, recursing into a
+ STATEMENT_LIST if that's the first non-DEBUG_BEGIN_STMT. */
+diff --git a/gcc/tree-iterator.h b/gcc/tree-iterator.h
+index 27795e9ee2b8..d1bc9014c65b 100644
+--- a/gcc/tree-iterator.h
++++ b/gcc/tree-iterator.h
+@@ -138,6 +138,7 @@ extern void tsi_link_after (tree_stmt_iterator *, tree,
+ enum tsi_iterator_update);
+
+ extern void tsi_delink (tree_stmt_iterator *);
++extern tree tsi_split_stmt_list (location_t, tree_stmt_iterator);
+
+ extern tree alloc_stmt_list (void);
+ extern void free_stmt_list (tree);
+--
+2.43.5
diff --git a/sys-devel/gcc/gcc-12.4.1_p20250206.ebuild b/sys-devel/gcc/gcc-12.4.1_p20250206.ebuild
new file mode 100644
index 000000000000..83011b194d30
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.4.1_p20250206.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="12.4.0"
+PATCH_VER="2"
+MUSL_VER="1"
+MUSL_GCC_VER="12.4.0"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-12.4.1_p20250213.ebuild b/sys-devel/gcc/gcc-12.4.1_p20250213.ebuild
new file mode 100644
index 000000000000..83011b194d30
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.4.1_p20250213.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="12.4.0"
+PATCH_VER="2"
+MUSL_VER="1"
+MUSL_GCC_VER="12.4.0"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-13.3.1_p20250207.ebuild b/sys-devel/gcc/gcc-13.3.1_p20250207.ebuild
new file mode 100644
index 000000000000..ac245b9b4177
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.3.1_p20250207.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="13.3.0"
+MUSL_GCC_VER="13.2.0"
+PATCH_VER="2"
+MUSL_VER="2"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-13.3.1_p20250214.ebuild b/sys-devel/gcc/gcc-13.3.1_p20250214.ebuild
new file mode 100644
index 000000000000..ac245b9b4177
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.3.1_p20250214.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="13.3.0"
+MUSL_GCC_VER="13.2.0"
+PATCH_VER="2"
+MUSL_VER="2"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-14.2.1_p20250208.ebuild b/sys-devel/gcc/gcc-14.2.1_p20250208.ebuild
new file mode 100644
index 000000000000..8797a7ea318b
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.2.1_p20250208.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="14.2.0"
+PATCH_VER="8"
+MUSL_VER="1"
+MUSL_GCC_VER="14.1.0"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # m68k doesnt build (ICE, bug 932733)
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-14.2.1_p20250215.ebuild b/sys-devel/gcc/gcc-14.2.1_p20250215.ebuild
new file mode 100644
index 000000000000..8797a7ea318b
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.2.1_p20250215.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="14.2.0"
+PATCH_VER="8"
+MUSL_VER="1"
+MUSL_GCC_VER="14.1.0"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # m68k doesnt build (ICE, bug 932733)
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-15.0.1_pre20250209-r1.ebuild b/sys-devel/gcc/gcc-15.0.1_pre20250209-r1.ebuild
new file mode 100644
index 000000000000..c30b842f308f
--- /dev/null
+++ b/sys-devel/gcc/gcc-15.0.1_pre20250209-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="15.0.0"
+PATCH_VER="45"
+MUSL_VER="2"
+MUSL_GCC_VER="15.0.0"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+ eapply "${FILESDIR}"/${P}-coro.patch
+ eapply "${FILESDIR}"/${P}-range-for-mariadb.patch
+}
diff --git a/sys-devel/gcc/gcc-15.0.1_pre20250216.ebuild b/sys-devel/gcc/gcc-15.0.1_pre20250216.ebuild
new file mode 100644
index 000000000000..876aa1eb35e2
--- /dev/null
+++ b/sys-devel/gcc/gcc-15.0.1_pre20250216.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="15.0.0"
+PATCH_VER="46"
+MUSL_VER="2"
+MUSL_GCC_VER="15.0.0"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest
index 0104221a7a87..f4a76d0f3274 100644
--- a/sys-devel/gettext/Manifest
+++ b/sys-devel/gettext/Manifest
@@ -4,5 +4,5 @@ DIST gettext-0.22.4.tar.xz 10255384 BLAKE2B 3f93aa5aef8e40d2e01acaa5aeed11efefd0
DIST gettext-0.22.4.tar.xz.sig 833 BLAKE2B fbb00b53c807934a11263c120861971fffebbd39689eda1fae0fb956476e69c3fb6799440cbf3acfcf43ecea2c134ea4dadb95becbac98badb43e546f3c8e9fb SHA512 a774c98de643b1ea3df645e451878652c2baa5cd786642aa457e6d5f5c44787cb1231eb15ad4390acdf314822633acaffffaa853eb69cbbc72c3b79b547a8854
DIST gettext-0.22.5.tar.xz 10270724 BLAKE2B 18c383518f5a78b5c04cf76de976524da2a87a892a30d6386778bb4c7dd526ffc3f14f484906c5d3a513b7caf76ea560e53962b325e552182d6940055d798f24 SHA512 a60999bb9d09441f138214d87acb7e59aab81e765bb9253a77c54902681c5de164a5a04de2a9778dfb479dbdefaab2d5de1fbaf6095c555c43e7e9fd7a1c09bd
DIST gettext-0.22.5.tar.xz.sig 833 BLAKE2B bb3e5ced34ab109f498347a3567103fe3491f69addb4a5ce25bf854fae1a11340eef1a9826b369d2416b53e5f7065aeebdb1609615f064cf7fb4151e82a5b4e5 SHA512 87f1df69206702be928b09a59a19ae4c23072cbc78ea16e76bfc4c929de76a3c0bb8e4eb2c3100c6e7b3b51d23e3b0e484c7e1d576ba7e25fd887934dc9ed8f7
-DIST gettext-0.23.tar.xz 11053572 BLAKE2B 208e5a73ed021c22357b1a1f0324dd7c9fa14b458b610c6f2fbd85f6541dd2bc23179c63dcd43000689482d8a6337f5255f501581d67ee2338ef3d50ec5e9c2e SHA512 1de09c0a83b1b4bb810abacbaf7c3e0fedbfbddea1cf7c89df3838c5f0a14cf58d686eb5876cfae302acb31c93beefb61a12c8a889a998fd235798699dc2c155
-DIST gettext-0.23.tar.xz.sig 833 BLAKE2B 5da93144e3d2eb745729b3f2d68e85ad508214b62694a22da7d37c6a3c9eaacd0d44339564b6373690dce29d9140a8af31ccea9e61726d2651ecc8234405b681 SHA512 25a6a2d1d9eb406b2be036b01f709a0badb84b70e23908c51fcbc1e26836510748f9623a075622271962d37bb859d4553755c6ed9832c1f39742ae1179b9292a
+DIST gettext-0.23.1.tar.xz 11038556 BLAKE2B 08d10340f3d855a87a96594c6f2dcf72925394f02e86235090f8d272e0a27ce32e57a0fbaed61aaf61d7328ff30be076dccaecaa13832d8db3ec0a51786780b9 SHA512 d75908f73eabe36c01d72d342ca694dbefad5f43da54f0ccb43bfd0518baff5becc8f50e787f21fadb7c29b3123638e4559334ea4f8e48a97107e8c5e22453b6
+DIST gettext-0.23.1.tar.xz.sig 833 BLAKE2B 7ab3c5b76825fcd71371f25f0cc3d79704c5ae405f153917901f583f5780f3707f622522b2bac89dbf32a7bf281216ad7469608af490ad6072f12c81e472200a SHA512 8aa2ba38d863d15a91b526b8b22d5aa54e07bc9cf716a551338d4f7f4230288bfa1234d4628e28fcdb4dc4050786a233a194197ca247d98c939e4d06bca4c230
diff --git a/sys-devel/gettext/gettext-0.22.5-r1.ebuild b/sys-devel/gettext/gettext-0.22.5-r1.ebuild
index cbcedaee51df..1528c6eabef0 100644
--- a/sys-devel/gettext/gettext-0.22.5-r1.ebuild
+++ b/sys-devel/gettext/gettext-0.22.5-r1.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
# Note: Keep version bumps in sync with dev-libs/libintl.
@@ -23,7 +23,7 @@ else
mirror://gnu/${PN}/${P}.tar.xz
verify-sig? ( mirror://gnu/${PN}/${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"
+ 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
# Only libasprintf is under the LGPL (and libintl is in a sep package),
diff --git a/sys-devel/gettext/gettext-0.23.ebuild b/sys-devel/gettext/gettext-0.23.1.ebuild
index 05471c9bd42f..9a7956b9ee6a 100644
--- a/sys-devel/gettext/gettext-0.23.ebuild
+++ b/sys-devel/gettext/gettext-0.23.1.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
# Note: Keep version bumps in sync with dev-libs/libintl.
@@ -54,6 +54,7 @@ RDEPEND="
${DEPEND}
git? ( dev-vcs/git )
java? ( >=virtual/jre-1.8:* )
+ nls? ( app-i18n/gnulib-l10n )
"
BDEPEND="
git? ( dev-vcs/git )
@@ -74,8 +75,6 @@ MULTILIB_WRAPPED_HEADERS=(
PATCHES=(
"${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch
- "${FILESDIR}"/${PN}-0.23-libxml2-2.12.0.patch
- "${FILESDIR}"/${PN}-0.23-no-nls.patch
)
QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so"
diff --git a/sys-devel/mold/mold-2.36.0.ebuild b/sys-devel/mold/mold-2.36.0.ebuild
index a58b5bfabc3f..4d2c1476008e 100644
--- a/sys-devel/mold/mold-2.36.0.ebuild
+++ b/sys-devel/mold/mold-2.36.0.ebuild
@@ -21,7 +21,8 @@ fi
# - siphash ( MIT CC0-1.0 )
LICENSE="MIT BSD-2 CC0-1.0"
SLOT="0"
-IUSE="debug"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
RDEPEND="
app-arch/zstd:=
@@ -70,12 +71,19 @@ src_configure() {
use debug || append-cppflags "-DNDEBUG"
local mycmakeargs=(
- -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DBUILD_TESTING=$(usex test)
-DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
-DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin)
-DMOLD_USE_SYSTEM_MIMALLOC=ON
-DMOLD_USE_SYSTEM_TBB=ON
)
+
+ if use test ; then
+ mycmakeargs+=(
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ )
+ fi
+
cmake_src_configure
}
diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index e0398e86fe4b..4d2c1476008e 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Gentoo Authors
+# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -21,7 +21,8 @@ fi
# - siphash ( MIT CC0-1.0 )
LICENSE="MIT BSD-2 CC0-1.0"
SLOT="0"
-IUSE="debug"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
RDEPEND="
app-arch/zstd:=
@@ -70,12 +71,19 @@ src_configure() {
use debug || append-cppflags "-DNDEBUG"
local mycmakeargs=(
- -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DBUILD_TESTING=$(usex test)
-DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
-DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin)
-DMOLD_USE_SYSTEM_MIMALLOC=ON
-DMOLD_USE_SYSTEM_TBB=ON
)
+
+ if use test ; then
+ mycmakeargs+=(
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ )
+ fi
+
cmake_src_configure
}
diff --git a/sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0-r2.ebuild b/sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0-r2.ebuild
index 2dfb32856eb2..5e6fc5f299e9 100644
--- a/sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0-r2.ebuild
+++ b/sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -7,13 +7,11 @@ inherit multilib
DESCRIPTION="Wrappers for gcc tools to be used on non-native CHOSTs"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
KEYWORDS="amd64"
-IUSE=""
RDEPEND="sys-devel/gcc:="
diff --git a/sys-devel/patch/Manifest b/sys-devel/patch/Manifest
index 8da8b1d590ac..ebef4b3a0b52 100644
--- a/sys-devel/patch/Manifest
+++ b/sys-devel/patch/Manifest
@@ -1,4 +1,4 @@
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
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..3993fdc9ce18
--- /dev/null
+++ b/sys-devel/patch/files/patch-2.7.6-ndebug-assert-hash-table.patch
@@ -0,0 +1,40 @@
+https://git.savannah.gnu.org/cgit/patch.git/commit/?id=86ac7e2d7b19e2fd9aab58a8cbeeebd5c6343e5c
+https://lists.gnu.org/archive/html/bug-patch/2025-02/msg00002.html
+
+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..5e593eb27c80 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,16 +14,15 @@ 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"
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
+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"
LICENSE="GPL-3+"
SLOT="0"
@@ -34,7 +33,7 @@ RDEPEND="xattr? ( sys-apps/attr )"
DEPEND="${RDEPEND}"
BDEPEND="
test? ( sys-apps/ed )
- verify-sig? ( sec-keys/openpgp-keys-patch )
+ verify-sig? ( >=sec-keys/openpgp-keys-patch-20250206 )
"
src_unpack() {
diff --git a/sys-devel/patch/patch-9999.ebuild b/sys-devel/patch/patch-9999.ebuild
index df6c6cec8db2..c410f22ffd4f 100644
--- a/sys-devel/patch/patch-9999.ebuild
+++ b/sys-devel/patch/patch-9999.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
@@ -11,6 +11,13 @@ 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
+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).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"
SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )"
@@ -27,7 +34,7 @@ RDEPEND="xattr? ( sys-apps/attr )"
DEPEND="${RDEPEND}"
BDEPEND="
test? ( sys-apps/ed )
- verify-sig? ( sec-keys/openpgp-keys-patch )
+ verify-sig? ( >=sec-keys/openpgp-keys-patch-20250206 )
"
src_unpack() {
diff --git a/sys-devel/rust-std/Manifest b/sys-devel/rust-std/Manifest
index ffe938c1da83..1aacd5d7f30e 100644
--- a/sys-devel/rust-std/Manifest
+++ b/sys-devel/rust-std/Manifest
@@ -8,3 +8,4 @@ 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
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
+}
diff --git a/sys-devel/smatch/Manifest b/sys-devel/smatch/Manifest
index 9ca3a1ada7b3..ee90b12a7820 100644
--- a/sys-devel/smatch/Manifest
+++ b/sys-devel/smatch/Manifest
@@ -1 +1,2 @@
DIST smatch-1.72.tar.gz 1431923 BLAKE2B ec4119fce985876afc9a46a74a0a56e8e8cb271a964c16496972c59ade95aa3d2df3a839a819e31cb081ca8a3b1f6bf6934ec97d73209091cfd86c87c1433557 SHA512 6d12e9ba85f332fcc56657296596e811cf3b75d4ad37007e07feb31baa4b315732361915972a2139ae13f75b8a73f953488ceb9de41529db9e84c81fb6fde77e
+DIST smatch-1.73.tar.gz 1472634 BLAKE2B 189a1f6dd684689a47afb848e5429b9e009c17c55df572e62d70802138861a4b95068a1ce7c93ac749219dc72d540cc69e9809b397b7e54af568a85c389fa080 SHA512 ea878f3e04c8a8cb5476ccf6b6fffe660380ab1ac3fad76f5793a072f692c534c4db46fed79c1e6bad7c3fac1f367b9ebb67cc77265beacfdbec38cc9b85fdd3
diff --git a/sys-devel/smatch/files/smatch-1.72-C23.patch b/sys-devel/smatch/files/smatch-1.72-C23.patch
new file mode 100644
index 000000000000..40540180f25f
--- /dev/null
+++ b/sys-devel/smatch/files/smatch-1.72-C23.patch
@@ -0,0 +1,20 @@
+unreachable() is defined in C23 as function-like macro, undefine
+This definition conflicts with usage in smatch, as it has a valid
+meaning in processing syntactic tree, not a mark that part of the
+smatch state itself can't be reached.
+Other possible solution would be mass-rename of all usages to prevent
+conflict.
+https://bugs.gentoo.org/944322
+--- a/smatch.h
++++ b/smatch.h
+@@ -717,6 +717,10 @@ void __set_fake_cur_stree_fast(struct stree *stree);
+ void __pop_fake_cur_stree_fast(void);
+ void __merge_stree_into_cur(struct stree *stree);
+
++#if __STDC_VERSION__ > 201710L
++#undef unreachable //defined in C23
++#endif
++
+ int unreachable(void);
+ void __set_cur_stree_readonly(void);
+ void __set_cur_stree_writable(void);
diff --git a/sys-devel/smatch/files/smatch-1.72-function-prototype.patch b/sys-devel/smatch/files/smatch-1.72-function-prototype.patch
new file mode 100644
index 000000000000..abf7a330ccd9
--- /dev/null
+++ b/sys-devel/smatch/files/smatch-1.72-function-prototype.patch
@@ -0,0 +1,54 @@
+https://bugs.gentoo.org/881087
+Modified to work with 1.72 and 1.73
+From 223d2a8d0391a655e853f5deba1f06c75196bdf2 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Luk=C3=A1=C5=A1=20Zaoral?= <lzaoral@redhat.com>
+Date: Fri, 19 Jan 2024 17:39:39 +0100
+Subject: [PATCH 1/1] untracked_param: fix compilation errors with GCC 14
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+select_return_states_hook expects that the passed function does not declare
+the key and value arguments as const.
+
+Signed-off-by: Lukáš Zaoral <lzaoral@redhat.com>
+Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
+---
+ smatch.h | 2 +-
+ smatch_untracked_param.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/smatch.h b/smatch.h
+index ce09ae73..ecdbe684 100644
+--- a/smatch.h
++++ b/smatch.h
+@@ -1443,6 +1443,6 @@ bool buf_comp2_has_bytes(struct expression *buf_expr, struct expression *var);
+ bool buf_has_bytes(struct expression *buf, struct expression *var);
+
+ /* smatch_untracked_param.c */
+-void mark_untracked(struct expression *expr, int param, const char *key, const char *value);
++void mark_untracked(struct expression *expr, int param, char *key, char *value);
+ void add_untracked_param_hook(void (func)(struct expression *call, int param));
+ void add_lost_param_hook(void (func)(struct expression *call, int param));
+diff --git a/smatch_untracked_param.c b/smatch_untracked_param.c
+index b7230f06..a84889ca 100644
+--- a/smatch_untracked_param.c
++++ b/smatch_untracked_param.c
+@@ -120,12 +120,12 @@ free:
+
+ }
+
+-void mark_untracked(struct expression *expr, int param, const char *key, const char *value)
++void mark_untracked(struct expression *expr, int param, char *key, char *value)
+ {
+ mark_untracked_lost(expr, param, key, UNTRACKED_PARAM);
+ }
+
+-void mark_lost(struct expression *expr, int param, const char *key, const char *value)
++void mark_lost(struct expression *expr, int param, char *key, char *value)
+ {
+ mark_untracked_lost(expr, param, key, LOST_PARAM);
+ }
+--
+2.11.4.GIT
+
diff --git a/sys-devel/smatch/files/smatch-1.72-make-deps.patch b/sys-devel/smatch/files/smatch-1.72-make-deps.patch
new file mode 100644
index 000000000000..9d2bf1e6bebc
--- /dev/null
+++ b/sys-devel/smatch/files/smatch-1.72-make-deps.patch
@@ -0,0 +1,14 @@
+Missing build dependency was found with MAKEOPTS=--shuffle=3383668468
+and solved by expanding targets' dependencies in makefile.
+https://bugs.gentoo.org/882047
+--- a/Makefile
++++ b/Makefile
+@@ -400,7 +400,7 @@ cflags += $($(*)-cflags) $(CPPFLAGS) $(CFLAGS)
+ selfcheck: $(OBJS:.o=.sc)
+
+ SPARSE_VERSION:=$(shell git describe --dirty 2>/dev/null || echo '$(VERSION)')
+-lib.o: version.h
++lib.o options.o compile-i386.o: version.h
+ version.h: FORCE
+ @echo '#define SPARSE_VERSION "$(SPARSE_VERSION)"' > version.h.tmp
+ @if cmp -s version.h version.h.tmp; then \
diff --git a/sys-devel/smatch/smatch-1.72.ebuild b/sys-devel/smatch/smatch-1.72-r2.ebuild
index 2e2fc45d2564..766d480f9753 100644
--- a/sys-devel/smatch/smatch-1.72.ebuild
+++ b/sys-devel/smatch/smatch-1.72-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit toolchain-funcs
if [[ ${PV} == 9999 ]] ; then
@@ -9,7 +9,7 @@ if [[ ${PV} == 9999 ]] ; then
https://repo.or.cz/r/${PN}.git"
inherit git-r3
else
- SRC_URI="http://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz
+ SRC_URI="https://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz
mirror://gentoo/${P}.tar.gz"
# Update on bumps
S="${WORKDIR}"/${P}-7f4b936
@@ -18,7 +18,7 @@ else
fi
DESCRIPTION="Static analysis tool for C"
-HOMEPAGE="http://smatch.sourceforge.net/"
+HOMEPAGE="https://smatch.sourceforge.net/"
# bug #853733
LICENSE="GPL-2+ MIT OSL-1.1"
@@ -28,11 +28,16 @@ RDEPEND="dev-db/sqlite"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}/${P}-C23.patch"
+ "${FILESDIR}/${P}-function-prototype.patch"
+ "${FILESDIR}/${P}-make-deps.patch"
+ )
+
src_prepare() {
default
sed -i \
- -e '/^CFLAGS =/{s:=:+=:;s:-O2 -finline-functions:${CPPFLAGS}:}' \
-e 's:pkg-config:$(PKG_CONFIG):' \
Makefile || die
}
@@ -65,5 +70,5 @@ src_install() {
dobin smatch
insinto /usr/share/smatch/smatch_data
doins smatch_data/*
- dodoc FAQ README
+ dodoc FAQ Documentation/smatch.rst
}
diff --git a/sys-devel/smatch/smatch-1.73-r1.ebuild b/sys-devel/smatch/smatch-1.73-r1.ebuild
new file mode 100644
index 000000000000..6de428a0fb15
--- /dev/null
+++ b/sys-devel/smatch/smatch-1.73-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://repo.or.cz/${PN}.git
+ https://repo.or.cz/r/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz
+ mirror://gentoo/${P}.tar.gz"
+ # Update on bumps
+ S="${WORKDIR}"/${P}-2b596bf
+
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="Static analysis tool for C"
+HOMEPAGE="https://smatch.sourceforge.net/"
+
+# bug #853733
+LICENSE="GPL-2+ MIT OSL-1.1"
+SLOT="0"
+
+RDEPEND="dev-db/sqlite"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.72-C23.patch"
+ "${FILESDIR}/${PN}-1.72-function-prototype.patch"
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's:pkg-config:$(PKG_CONFIG):' \
+ Makefile || die
+}
+
+_emake() {
+ # gtk/llvm/xml is used by sparse which we don't install
+ emake \
+ PREFIX="${EPREFIX}/usr" \
+ V=1 \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ LD='$(CC)' \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ HAVE_GTK2=no \
+ HAVE_LLVM=no \
+ HAVE_LIBXML=no \
+ "$@"
+}
+
+src_compile() {
+ _emake smatch
+}
+
+src_test() {
+ _emake check
+}
+
+src_install() {
+ # default install target installs a lot of sparse cruft
+ dobin smatch
+ insinto /usr/share/smatch/smatch_data
+ doins smatch_data/*
+ dodoc FAQ Documentation/smatch.txt
+}
diff --git a/sys-devel/smatch/smatch-9999.ebuild b/sys-devel/smatch/smatch-9999.ebuild
index 2e2fc45d2564..6432bf04a327 100644
--- a/sys-devel/smatch/smatch-9999.ebuild
+++ b/sys-devel/smatch/smatch-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit toolchain-funcs
if [[ ${PV} == 9999 ]] ; then
@@ -9,7 +9,7 @@ if [[ ${PV} == 9999 ]] ; then
https://repo.or.cz/r/${PN}.git"
inherit git-r3
else
- SRC_URI="http://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz
+ SRC_URI="https://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz
mirror://gentoo/${P}.tar.gz"
# Update on bumps
S="${WORKDIR}"/${P}-7f4b936
@@ -18,7 +18,7 @@ else
fi
DESCRIPTION="Static analysis tool for C"
-HOMEPAGE="http://smatch.sourceforge.net/"
+HOMEPAGE="https://smatch.sourceforge.net/"
# bug #853733
LICENSE="GPL-2+ MIT OSL-1.1"
@@ -62,8 +62,8 @@ src_test() {
src_install() {
# default install target installs a lot of sparse cruft
- dobin smatch
+ dobin smatch cgcc
insinto /usr/share/smatch/smatch_data
doins smatch_data/*
- dodoc FAQ README
+ dodoc FAQ Documentation/smatch.rst
}