diff options
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/Manifest.gz | bin | 6223 -> 6221 bytes | |||
-rw-r--r-- | sys-devel/binutils/Manifest | 8 | ||||
-rw-r--r-- | sys-devel/binutils/binutils-2.44.9999.ebuild | 568 | ||||
-rw-r--r-- | sys-devel/binutils/binutils-2.44.ebuild | 568 | ||||
-rw-r--r-- | sys-devel/binutils/binutils-9999.ebuild | 12 | ||||
-rw-r--r-- | sys-devel/binutils/metadata.xml | 1 | ||||
-rw-r--r-- | sys-devel/gcc/Manifest | 9 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-12.4.1_p20250130.ebuild | 65 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-13.3.1_p20250131.ebuild | 66 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-14.2.1_p20250201.ebuild | 54 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-15.0.1_pre20250202.ebuild | 53 |
11 files changed, 1396 insertions, 8 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz Binary files differindex 75740648e961..257173a4fd9f 100644 --- a/sys-devel/Manifest.gz +++ b/sys-devel/Manifest.gz diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest index a47047092968..55c7957d4e1c 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -32,6 +32,8 @@ DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5 DIST binutils-2.43-patches-2.tar.xz 35184 BLAKE2B fa35c9f182c7ae0fed28614f47618d1563a58f223fd1805f348b618c1fbf039a444e44d88f46d040b6971e481e0da882e5c4492fd167d17bf39579d87a446434 SHA512 a7e167d3f6a2c08f19af4685d90a6160a1a52f1a87f5660fb6d80ec664033829c0eacad0d77b1306620e50ff89d1f9f63a7c2b064ad9775400f0cb0eba3159a4 DIST binutils-2.43-patches-3.tar.xz 62692 BLAKE2B a189a01a6a99c4fdff124cf90ecc18f874812c17fc735376c855469c487b6a71489ad5c2f86c518d2e029cc83d65757144ff9abddbe7ec3fc06e22f9501c62f4 SHA512 99a30e18fdfd7bdce85bb903f8d61837cfbb639ead8a680ff1a85ad1d615b658e696bdf196c4a002d029f952d34aa441e09e861b22f5400c65f07cce5934cd8f DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb +DIST binutils-2.44-patches-1.tar.xz 9156 BLAKE2B c72a7d0ffdb852f8de9c18e187b5768085b3a070744a4fadef508ab0e865d3a3967ec12a0ee7a325b6b689f39e5243aacd9d3f73ceb723d53592ec6ca640161b SHA512 053de98536e92837d0a08fac26bb0f057431747fe6e82f8b9ac54dd9aed65d8de379d653c0e8a8cd31267b9769825a420db5f40957f8c4eb54a7e4a9d76fadb8 +DIST binutils-2.44.tar.xz 27285788 BLAKE2B 0eb031ace9fb5a7047b81b5a05b1760f7d332c8ed67f98899f153a45f181b83e661a484551af05c0a9b2adc422da84619103c7b1f3c9fad5327872832b5446aa SHA512 b85d3bbc0e334cf67a96219d3c7c65fbf3e832b2c98a7417bf131f3645a0307057ec81cd2b29ff2563cec53e3d42f73e2c60cc5708e80d4a730efdcc6ae14ad7 EBUILD binutils-2.32-r2.ebuild 11734 BLAKE2B e444592c29be99e72f80090c85a383bb307c741ed77bcf71058dad5d78eff13d5185cdb4bce47b51422154f998ae67e117f2c49e39d4b4ec49b7396f4103d306 SHA512 19a752a8789b698769217873864b9f544830521ed41be54db86b947343ee83af655b74104365c2e8fd195c4285fa3dc65e0bc1aa78bf9c16be5ea22aea519c13 EBUILD binutils-2.33.1-r1.ebuild 11470 BLAKE2B 70541c64c7ca2734b1cdfc27e2a7bd8bc72fde852a7fdbcbf763795463e481556e36910dbe9fe2e0df4d7621bfaffcc36de70222919852b44419b02efad0ff4f SHA512 3c9f95f54f6c55692ef5daac6dd4d6e5a2514a27f8c6f4b592582f23bd3b3e4c83ce5c6fbfc1f5a6bb845a717b30458d40772a661d74adbddeb0d4081a88c438 EBUILD binutils-2.34-r2.ebuild 11566 BLAKE2B 6490e77611835748738230495725ec099c45e65cfa20109a4d185fcf456f012cc9f95fed6b33a6774906c1b826046f79082ac740548830d0befc0a488e6c447e SHA512 a9d14b875f30c613c9b533f116db09d0743d3079007b149da31a9f87a5dd308c03bb495ccd65efee7524c38a7684ff4c22ced5ec8e3d70d4f71103e2e467a883 @@ -46,5 +48,7 @@ EBUILD binutils-2.42-r2.ebuild 15820 BLAKE2B dddc8ff1ef483b95e221ee2546a98ac55c1 EBUILD binutils-2.43-r1.ebuild 15926 BLAKE2B b3b35bfa409fe26d430f2c17f3f52a1523b29e34caedda21ad488cb428e94c0db85d468e3e53265fd3429a1827418c3b66f9f5ee0bbf87e0c9c0c8b5e2d1ff20 SHA512 a33b271959387d4d31340cf96a684f648e3d5893c47013de4ce77a94342f332bd68090e72288272f53fd2c381217cf4e9edbde2542f0f4a8f6bed1917d046b81 EBUILD binutils-2.43-r2.ebuild 15915 BLAKE2B 5e1134d93cd165c867bdf25c825dfd7122a2494ed0ea4487cdde57d44e0032c98f37c0a416635c03e7ec7bea491f340d35b00f07678a9f134d21cbf1a5855c7b SHA512 a523d0d50f9aade97195b61837518dc82d8a7616fbf1080e51c916cfea3d200a72657967e4ad60c56099cf8e3f271f310683d52d77d1f65d24d4a2070aa62613 EBUILD binutils-2.43.9999.ebuild 16246 BLAKE2B 3433cab71a488713b2ccc757f59c2d9677a038f2569aaaf9425bd14302b5eb63129df40d9f71b19822c93ed167d3fc1c0458e9dea140ffe69ee1a6b2ab06c612 SHA512 958749d5c3d31575d5d413f8dd8b6d78d32b840a27838a650afdeaf2713b43ddc47ffbc921bfdbffe227edd02c3ccad2f29e020da134a43a7935afe1a9ffa027 -EBUILD binutils-9999.ebuild 16168 BLAKE2B 726f64f1e160dc4f9e06235a755ec8805885190e4f07add2abc2a970830f81f11be4dc2d44a3e11d5afcb625b63f7850537326ee0b01de13f3a47cd861cd6b6b SHA512 d7c3047b807b84fcb0504fed59c50bb1f6d6c04ccd0b90f472b3ad7eec61c2b048af5a37f11ad63c3f149ae5190e2c0ebfbff9fbb518d2b0401dec52834c0c13 -MISC metadata.xml 995 BLAKE2B 85ccdd924f8c459a4cd7e608dff59c7281523da0d9457b0094b97e140cd07a300cb38383d9402808859100ca0bf219ce86e367bb5282216121bd81f68d588c17 SHA512 3ee538640e5d8c0efe6b8cf1de299e0d78965dece1ad814384844e8e24db72b11ca30d5fb68dfae2e71046d35aee0e71ee3ecbda3730ca49446dd0b2cd0f817c +EBUILD binutils-2.44.9999.ebuild 16104 BLAKE2B 4b03f1ac1e6113ad659e5b405a1e37b31890e0b69239f95b5b481f3807e6f988ecf54f83f974acc81cfefd0b7680c3e3e82f0952a9ee5d34cb9eebf9f559b0e4 SHA512 db39ae66a97020b67019b814a70a67cebe750aab822ec492a3a4d2a5acea51e9c6abf997207dd71462086660c26e9dd40c88325fe0e21ab85dd324206cde6737 +EBUILD binutils-2.44.ebuild 16104 BLAKE2B 4b03f1ac1e6113ad659e5b405a1e37b31890e0b69239f95b5b481f3807e6f988ecf54f83f974acc81cfefd0b7680c3e3e82f0952a9ee5d34cb9eebf9f559b0e4 SHA512 db39ae66a97020b67019b814a70a67cebe750aab822ec492a3a4d2a5acea51e9c6abf997207dd71462086660c26e9dd40c88325fe0e21ab85dd324206cde6737 +EBUILD binutils-9999.ebuild 16104 BLAKE2B 4b03f1ac1e6113ad659e5b405a1e37b31890e0b69239f95b5b481f3807e6f988ecf54f83f974acc81cfefd0b7680c3e3e82f0952a9ee5d34cb9eebf9f559b0e4 SHA512 db39ae66a97020b67019b814a70a67cebe750aab822ec492a3a4d2a5acea51e9c6abf997207dd71462086660c26e9dd40c88325fe0e21ab85dd324206cde6737 +MISC metadata.xml 1081 BLAKE2B 84552999d26b3fa492cd1fd9116339229bb88b0132c083355800c65df993650f23cdff42d232a150d36fc9b21b63001198fda9e39bac26459556a04002542069 SHA512 5be692843451ee199cae8e5aae10232de600ef8158190ff067818cc90884aaf7712c1f72941a6c64d19565d39a59190b8eeb770e6d123283b35385f23fc2f93d diff --git a/sys-devel/binutils/binutils-2.44.9999.ebuild b/sys-devel/binutils/binutils-2.44.9999.ebuild new file mode 100644 index 000000000000..57401c0bb097 --- /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.43-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.43-linker-prefix.patch + fi + fi + fi + + # Make sure our explicit libdir paths don't get clobbered, bug #562460 + sed -i \ + -e 's:@bfdlibdir@:@libdir@:g' \ + -e 's:@bfdincludedir@:@includedir@:g' \ + {bfd,opcodes}/Makefile.in || die + + # Apply things from PATCHES and user dirs + default + + # Run misc portage update scripts + gnuconfig_update + elibtoolize --portage --no-uclibc +} + +toolchain-binutils_bugurl() { + printf "https://bugs.gentoo.org/" +} +toolchain-binutils_pkgversion() { + printf "Gentoo ${PV}" + [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" +} + +src_configure() { + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + + # Setup some paths + LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} + INCPATH=${LIBPATH}/include + DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + if is_cross ; then + TOOLPATH=/usr/${CHOST}/${CTARGET} + else + TOOLPATH=/usr/${CTARGET} + fi + BINPATH=${TOOLPATH}/binutils-bin/${PV} + + # Make sure we filter $LINGUAS so that only ones that + # actually work make it through, bug #42033 + strip-linguas -u */po + + # Keep things sane + strip-flags + use cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local x + echo + for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do + einfo "$(printf '%10s' ${x}:) ${!x}" + done + echo + + cd "${MY_BUILDDIR}" || die + local myconf=() + + if use plugins ; then + myconf+=( --enable-plugins ) + fi + + if use nls ; then + myconf+=( --without-included-gettext ) + else + myconf+=( --disable-nls ) + fi + + myconf+=( --with-system-zlib ) + + # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch + # logic in toolchain.eclass. bug #446946 + # + # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 + case $(tc-arch) in + ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; + esac + + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) + + [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) + + is_cross && myconf+=( + --with-sysroot="${EPREFIX}"/usr/${CTARGET} + --enable-poison-system-directories + ) + + myconf+=( --enable-secureplt ) + + # mips can't do hash-style=gnu ... + if [[ $(tc-arch) != mips ]] ; then + myconf+=( --enable-default-hash-style=gnu ) + fi + + myconf+=( + --prefix="${EPREFIX}"/usr + --host=${CHOST} + --target=${CTARGET} + --datadir="${EPREFIX}"${DATAPATH} + --datarootdir="${EPREFIX}"${DATAPATH} + --infodir="${EPREFIX}"${DATAPATH}/info + --mandir="${EPREFIX}"${DATAPATH}/man + --bindir="${EPREFIX}"${BINPATH} + --libdir="${EPREFIX}"${LIBPATH} + --libexecdir="${EPREFIX}"${LIBPATH} + --includedir="${EPREFIX}"${INCPATH} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with xxhash) + $(use_with zstd) + + # Disable modules that are in a combined binutils/gdb tree, bug #490566 + --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim} + # Strip out broken static link flags: https://gcc.gnu.org/PR56750 + --without-stage1-ldflags + # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100 + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + + # We can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + + # Enables colored disassembly by default (equivalent to passing + # --disassembler-color=terminal to all objdump invocations). + --enable-colored-disassembly + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + # TOOD: breaks glibc test suite + #--enable-error-execstack=yes + #--enable-error-rwx-segments=yes + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if use test || { use pgo && tc-is-lto ; } ; then + # -Wa,* needs to be consistent everywhere or lto-wrapper will complain + filter-flags '-Wa,*' + fi + + if ! is_cross ; then + 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.44.ebuild b/sys-devel/binutils/binutils-2.44.ebuild new file mode 100644 index 000000000000..57401c0bb097 --- /dev/null +++ b/sys-devel/binutils/binutils-2.44.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.43-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.43-linker-prefix.patch + fi + fi + fi + + # Make sure our explicit libdir paths don't get clobbered, bug #562460 + sed -i \ + -e 's:@bfdlibdir@:@libdir@:g' \ + -e 's:@bfdincludedir@:@includedir@:g' \ + {bfd,opcodes}/Makefile.in || die + + # Apply things from PATCHES and user dirs + default + + # Run misc portage update scripts + gnuconfig_update + elibtoolize --portage --no-uclibc +} + +toolchain-binutils_bugurl() { + printf "https://bugs.gentoo.org/" +} +toolchain-binutils_pkgversion() { + printf "Gentoo ${PV}" + [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" +} + +src_configure() { + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + + # Setup some paths + LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} + INCPATH=${LIBPATH}/include + DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + if is_cross ; then + TOOLPATH=/usr/${CHOST}/${CTARGET} + else + TOOLPATH=/usr/${CTARGET} + fi + BINPATH=${TOOLPATH}/binutils-bin/${PV} + + # Make sure we filter $LINGUAS so that only ones that + # actually work make it through, bug #42033 + strip-linguas -u */po + + # Keep things sane + strip-flags + use cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local x + echo + for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do + einfo "$(printf '%10s' ${x}:) ${!x}" + done + echo + + cd "${MY_BUILDDIR}" || die + local myconf=() + + if use plugins ; then + myconf+=( --enable-plugins ) + fi + + if use nls ; then + myconf+=( --without-included-gettext ) + else + myconf+=( --disable-nls ) + fi + + myconf+=( --with-system-zlib ) + + # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch + # logic in toolchain.eclass. bug #446946 + # + # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 + case $(tc-arch) in + ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; + esac + + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) + + [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) + + is_cross && myconf+=( + --with-sysroot="${EPREFIX}"/usr/${CTARGET} + --enable-poison-system-directories + ) + + myconf+=( --enable-secureplt ) + + # mips can't do hash-style=gnu ... + if [[ $(tc-arch) != mips ]] ; then + myconf+=( --enable-default-hash-style=gnu ) + fi + + myconf+=( + --prefix="${EPREFIX}"/usr + --host=${CHOST} + --target=${CTARGET} + --datadir="${EPREFIX}"${DATAPATH} + --datarootdir="${EPREFIX}"${DATAPATH} + --infodir="${EPREFIX}"${DATAPATH}/info + --mandir="${EPREFIX}"${DATAPATH}/man + --bindir="${EPREFIX}"${BINPATH} + --libdir="${EPREFIX}"${LIBPATH} + --libexecdir="${EPREFIX}"${LIBPATH} + --includedir="${EPREFIX}"${INCPATH} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with xxhash) + $(use_with zstd) + + # Disable modules that are in a combined binutils/gdb tree, bug #490566 + --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim} + # Strip out broken static link flags: https://gcc.gnu.org/PR56750 + --without-stage1-ldflags + # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100 + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + + # We can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + + # Enables colored disassembly by default (equivalent to passing + # --disassembler-color=terminal to all objdump invocations). + --enable-colored-disassembly + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + # TOOD: breaks glibc test suite + #--enable-error-execstack=yes + #--enable-error-rwx-segments=yes + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if use test || { use pgo && tc-is-lto ; } ; then + # -Wa,* needs to be consistent everywhere or lto-wrapper will complain + filter-flags '-Wa,*' + fi + + if ! is_cross ; then + 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-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild index cf451757ad6c..57401c0bb097 100644 --- a/sys-devel/binutils/binutils-9999.ebuild +++ b/sys-devel/binutils/binutils-9999.ebuild @@ -9,7 +9,7 @@ DESCRIPTION="Tools necessary to build programs" HOMEPAGE="https://sourceware.org/binutils/" LICENSE="GPL-3+" -IUSE="cet debuginfod doc 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 @@ -60,7 +60,10 @@ RDEPEND=" ) zstd? ( app-arch/zstd:= ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + xxhash? ( dev-libs/xxhash ) +" BDEPEND=" doc? ( sys-apps/texinfo ) pgo? ( @@ -205,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 ) @@ -273,6 +272,7 @@ src_configure() { --with-bugurl="$(toolchain-binutils_bugurl)" --with-pkgversion="$(toolchain-binutils_pkgversion)" $(use_enable static-libs static) + $(use_with xxhash) $(use_with zstd) # Disable modules that are in a combined binutils/gdb tree, bug #490566 diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml index 3cc106863437..88560e418c0e 100644 --- a/sys-devel/binutils/metadata.xml +++ b/sys-devel/binutils/metadata.xml @@ -14,6 +14,7 @@ <flag name="plugins">Enable plugin support in tools</flag> <flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag> <flag name="debuginfod">Enable debuginfod support via <pkg>dev-libs/elfutils</pkg> libdebuginfod</flag> + <flag name="xxhash">Use <pkg>dev-libs/xxhash</pkg> for --build-id=xx support</flag> </use> <upstream> <remote-id type="cpe">cpe:/a:gnu:binutils</remote-id> diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index 307ed9c29b60..dbc6c9828c07 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -10,6 +10,7 @@ DIST gcc-11.5.0.tar.xz 82399864 BLAKE2B f4a61faad32aac9e9cb553c1a1a011df0a057f6e DIST gcc-12-20241219.tar.xz 79920016 BLAKE2B 71044352515f33eaf0bcc64cc6eacdecb8b7b1dbca6d8836b629f76e60320f5090178ff37b6804fbda0913c0f55afca37588647974fd72e9961edd338ccf6ffb SHA512 e0c08366f392083feb1ae242242e9bd335681234808ed44d4e75afe157be2814bef321d2327186d217f38bbb6176706e1258228904d31fdb3bb37c8e245dacb0 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.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 @@ -17,6 +18,7 @@ DIST gcc-12.4.0.tar.xz 83377372 BLAKE2B 0d5aa9995bf53fa2dc976a846240cfb8fafd125a DIST gcc-13-20241220.tar.xz 84504500 BLAKE2B 60d6dcdcafa36399a0c0de7fef3a4eb4ca8e0b6780cd31c9eace2965c53115205bf64e8247b833a4375c1e3ad2d94820b5bdc97a4689be95d8ab55a676afa689 SHA512 10fe009dc3b8872b24350e4fb999f71b848bd5a03e48e8292f76e6eca3dbdef8383a3b13b813aada983ebdbe3ecab1642961b3210cd1e0063a86655a44493017 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.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,15 +26,18 @@ DIST gcc-13.3.0-patches-2.tar.xz 44440 BLAKE2B ebde73f6c3cd1a5fdc5bbce36414a59dd DIST gcc-14-20241221.tar.xz 88198252 BLAKE2B 7491c2e1c8885e201859143bdf5cae95af4c0db77709ec7d761ad535df30042f5deb8488ba7c508de3673e4b0f2af1de8d17476f39cd47b745ddccec6a9e4470 SHA512 91fe1e1d1f8e8fad64930a2eadf942a542bd42f841fceb49f475bccac00f04692b8cd38821ea9ee05f78b5c51001d8bd39df5f71f3a3d89aab8980019cea9be8 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.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-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.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-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 @@ -44,19 +49,23 @@ EBUILD gcc-12.4.0.ebuild 1615 BLAKE2B c241479503ef04500043053c4e400559aba8d0b71e EBUILD gcc-12.4.1_p20241219.ebuild 1615 BLAKE2B ea5fc1179a82bc8c92c01be77a9c6cff68018ff4fc196627cd4daf66ebec4019b89ff7b682cf8560d456f18e1800808d4ba94c9b9cfc1b717eac132eb8c0f9b9 SHA512 ef2d2cf32e012f5074a26853aac97fa76d979881ff81b1e788cfe192e61d1973729553268f6c7e419320315bd0da0a40f47ef0ff099425626e6aa0debfccdcb7 EBUILD gcc-12.4.1_p20250116.ebuild 1624 BLAKE2B f4a16d6af11158666ec0ad9ced5841c89b6ce70964950b3c439105b240a3534b633dca7bf97aaef847b222f8aa323f815fa7410b5f4b115f07f50f4ff1cd31db SHA512 30bc2e09a28caf65eccc0e2f496d5095d2735e5e118b269d2cfad638c8874283ce364a14074d63c4e43862e247cc0626364c7f19ab3ac314250a5e52360331fc EBUILD gcc-12.4.1_p20250123.ebuild 1624 BLAKE2B f4a16d6af11158666ec0ad9ced5841c89b6ce70964950b3c439105b240a3534b633dca7bf97aaef847b222f8aa323f815fa7410b5f4b115f07f50f4ff1cd31db SHA512 30bc2e09a28caf65eccc0e2f496d5095d2735e5e118b269d2cfad638c8874283ce364a14074d63c4e43862e247cc0626364c7f19ab3ac314250a5e52360331fc +EBUILD gcc-12.4.1_p20250130.ebuild 1624 BLAKE2B f4a16d6af11158666ec0ad9ced5841c89b6ce70964950b3c439105b240a3534b633dca7bf97aaef847b222f8aa323f815fa7410b5f4b115f07f50f4ff1cd31db SHA512 30bc2e09a28caf65eccc0e2f496d5095d2735e5e118b269d2cfad638c8874283ce364a14074d63c4e43862e247cc0626364c7f19ab3ac314250a5e52360331fc EBUILD gcc-12.5.9999.ebuild 1592 BLAKE2B 287d83b5979c9cf974e890e5835bab37fa34a97dfc8fd473d1344e9896835a2980c885e7584649ebaede68b06dcf5cdbbc0f768aa1fa6c1603d3b0135a93d170 SHA512 025fa1a7803303e99c2186bc2eb2e69e9cd5401f787aa4eac2f0ad709558142130adff6fb75e610d2b9acf9ea7775540e4b249ecbd348d30167a04108e97d523 EBUILD gcc-13.2.0.ebuild 1682 BLAKE2B 5a19639504afafced19bd1ad913e3106a65d16b4b3d5aeabedb0cbc891bdac22d9cd0a21928eef51b88dcbbe64927fabe8fc9bf0fe19ea755ad5959bf5acfb67 SHA512 3865dff4bb19f022f6a1a2d653bc8f7eab9c47e99ec5b30e4600506faab301f410ff26f1155b5305f219f3b89f344cc8271aef8b6d6fb2568e8937d5867ea843 EBUILD gcc-13.3.1_p20241220.ebuild 1674 BLAKE2B f259931c9581507f6140ee400ddab4bb7f0889a6eefdf2f7f72430cf34c487f0aa0cde5b3bbe13b513331e3f656078c5033f3540b8873de949d3225b2f584976 SHA512 865c309f411438db3b85ee5cdc93025e4ae7808236d382057c4d0c40a03850555d559357168f2928c174660fbe7a4aa530fb055af90ad5f086af7f46c9654029 EBUILD gcc-13.3.1_p20250117.ebuild 1683 BLAKE2B 206ccd1583bf86e8facebad527f8deb2aa0c804bb3db379016e8bcc60319a42647510c0e27b1fd622121721877346d07565d15878c5bdd7ea6ef4bf8473f9db3 SHA512 d593a33b2b28477201788954afc6c307e8ad9d1d720cf4de273742c441e43894516ae8c57756dca8cd504c2a1da021aeb2a403bacbf8870ea9d9f8e823373c9f EBUILD gcc-13.3.1_p20250124.ebuild 1683 BLAKE2B 206ccd1583bf86e8facebad527f8deb2aa0c804bb3db379016e8bcc60319a42647510c0e27b1fd622121721877346d07565d15878c5bdd7ea6ef4bf8473f9db3 SHA512 d593a33b2b28477201788954afc6c307e8ad9d1d720cf4de273742c441e43894516ae8c57756dca8cd504c2a1da021aeb2a403bacbf8870ea9d9f8e823373c9f +EBUILD gcc-13.3.1_p20250131.ebuild 1683 BLAKE2B 206ccd1583bf86e8facebad527f8deb2aa0c804bb3db379016e8bcc60319a42647510c0e27b1fd622121721877346d07565d15878c5bdd7ea6ef4bf8473f9db3 SHA512 d593a33b2b28477201788954afc6c307e8ad9d1d720cf4de273742c441e43894516ae8c57756dca8cd504c2a1da021aeb2a403bacbf8870ea9d9f8e823373c9f EBUILD gcc-13.4.9999.ebuild 1651 BLAKE2B 48ad06325489ff94c03e1a1584a9d92f3d624aa8c6a1bb1a55ec8818ef66a75b9acca9a3b18c2743d11b118f1643fecdd5be577f780dad86dc89f67ac095e761 SHA512 7670b8cd00501d127cfaa8ca283bf83b1b29cbe65aa3e2f956c0c3fb169a903f1ef55d298c05b833cd3a2b3e6a72c0f7a2145aca698be730e20fc1a1c406c2de EBUILD gcc-14.2.1_p20241221.ebuild 1537 BLAKE2B c7c007768b41459ce15112d6b1847aba0793f45416979433d1416ea786c2eb93c340da86af3e78999c68bbf16cce0f67f7653587bfb549fb68cd0ba9d25dd300 SHA512 021fec1ab5cf2073a93018221caa9af35c0a2975fb9820e484a03250136edc15135ccfd2861f7815b04ea1fd1bf109bca9bd66222469c99414fecd0b5ef072be EBUILD gcc-14.2.1_p20250118.ebuild 1440 BLAKE2B e19fede45adb75c13176dc209b4ffa6818bd0753db3dd8710327bf8402307f5e48bef65116de97b437987a0eceb153156c3996250ab240f06c68d946f29f2fd5 SHA512 d966850a6b8759390507ffe1975298975699a2272f293e69cef9173b3c252065685ded61a8870700d2dd4d420525d4813243daed279ac7836e00dab4c2cd116f EBUILD gcc-14.2.1_p20250125.ebuild 1440 BLAKE2B e19fede45adb75c13176dc209b4ffa6818bd0753db3dd8710327bf8402307f5e48bef65116de97b437987a0eceb153156c3996250ab240f06c68d946f29f2fd5 SHA512 d966850a6b8759390507ffe1975298975699a2272f293e69cef9173b3c252065685ded61a8870700d2dd4d420525d4813243daed279ac7836e00dab4c2cd116f +EBUILD gcc-14.2.1_p20250201.ebuild 1440 BLAKE2B e19fede45adb75c13176dc209b4ffa6818bd0753db3dd8710327bf8402307f5e48bef65116de97b437987a0eceb153156c3996250ab240f06c68d946f29f2fd5 SHA512 d966850a6b8759390507ffe1975298975699a2272f293e69cef9173b3c252065685ded61a8870700d2dd4d420525d4813243daed279ac7836e00dab4c2cd116f EBUILD gcc-14.3.9999.ebuild 1410 BLAKE2B 0f77f0e17b7bf3d617ed4feec61406108d92e9ac8bd3597651b7f6814c45ddf56393228cda23fccf189e3fa106b9d389196da4f565283a10923bfe29a06fbfe2 SHA512 802582faf27fe46fcd75b8b917aa155739e4e0f70d010f14bf42cea3007da124a53fe1ee903e6004d4d8277350ac88d7ade78f79ce8a036b29e14dec45ba2d15 EBUILD gcc-15.0.0_pre20250112-r3.ebuild 1360 BLAKE2B 2664e6319b5295dcee40ab54f116eb5d95e74f62c9c49895199f2e9ba0c708732ff2ed04ee4c6f427e414383f7033c74613fc3f373f7731273097a154dfaecf1 SHA512 6482fae23fb13f6d726b77d4241026a58e9e0afe9fde4191cc879a9c953625b2c92213d76427f743a5ef54cc4d90eddccc66562e09c21ba48ea15336c8540d51 EBUILD gcc-15.0.1_pre20250119.ebuild 1360 BLAKE2B 87f127b63e1fc913bd57a354fb9d9a8e8628f22767793ce4a54be7f29ec5af0dd02e22103644318a32f1dcee378e3ece07cc714523d8f9955b377d8d4cb6c610 SHA512 41c9ea8e3932e365c369551c4c9649780cfa8fed2b9b682a1359e4fc8c415ae945f2e59e9d045701bec266946808ff2e486d2fa26eae30e4efe657cbd1a11659 EBUILD gcc-15.0.1_pre20250126.ebuild 1360 BLAKE2B b443a664f9fce1f359cb45a8af97255d94862013198fd9f2c659bbef3374e0911307c3b74dc4354dc68cc8c8277ee3db287d1e00514265ae3ebb372f76d5217f SHA512 c65a8406610fd429dc6d9501b39d4e43ef6151322159cf062c15f99dfd3e0494cca0fe59c132a5a9cd8ac02b4d619ac9be7cc9657c3d3f9e1d176beaa5f80cc7 +EBUILD gcc-15.0.1_pre20250202.ebuild 1360 BLAKE2B 65cb041c77ca584db2ba238d1cfbc77061f1b80a7f3e27455c5a865b4f21deef0862f7dbb249fd4d9e657217f4f5690bedd1770cecb4f88b1af468c7ebd55156 SHA512 acd25dba00d02d78b0d77ac25770c2fe6e44a1947b0b3df95dd29323701cca3b98f9e2699b9d2170322a970636d77860784b52e43a82fd08e631d34804702d25 EBUILD gcc-15.0.9999.ebuild 1332 BLAKE2B 6f17f77603522bac72d4d57094cc086263a9bfe6273c04d91b169ebc23d78fa2943c0950d4a40fe846d9d92648e54ca54ad1cecd5446ed5710062f9dca569b4b SHA512 4e4a673229a36dee68238e10efb2d9e0ff1c530411395e5230bbf567c92342a4b79d0ecb0ec91573c52fd8b5efd5cf6d20e612971848c9529378e0c42c0e213d EBUILD gcc-8.5.0-r2.ebuild 549 BLAKE2B 2856372670c76fbe54778c0532815e3510b01b1c8aad99acc3e9183bf6829251952e29887340895625c1e421e19302430ae1a0a8dddcd8470bd71cc221f0b6b0 SHA512 559ba0dbdc7542b6af5d101f19a5b3c9eab38b9996c26330834ffa924fd8c792988f223b492e6ac84255eccbc4af762be50c2d60e84ca24b7a9ebba134608c6d EBUILD gcc-9.5.0.ebuild 1257 BLAKE2B b398cea6cb4227fd126b85feb3e735f6b505236f54aecc9983e46fd30dbfcd8f16e80680c231567212c7cbd524b0d485574f7c5c5830137f9ebeea089a641e90 SHA512 0faea0a2389563bede22ba172ae6ab490a693c221bf6700152e9f63b23fad8d74a595a50c40cdf2eed32ee5e9cdddfdb6e2907629036c94034327f5772c93f6f diff --git a/sys-devel/gcc/gcc-12.4.1_p20250130.ebuild b/sys-devel/gcc/gcc-12.4.1_p20250130.ebuild new file mode 100644 index 000000000000..83011b194d30 --- /dev/null +++ b/sys-devel/gcc/gcc-12.4.1_p20250130.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_p20250131.ebuild b/sys-devel/gcc/gcc-13.3.1_p20250131.ebuild new file mode 100644 index 000000000000..ac245b9b4177 --- /dev/null +++ b/sys-devel/gcc/gcc-13.3.1_p20250131.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_p20250201.ebuild b/sys-devel/gcc/gcc-14.2.1_p20250201.ebuild new file mode 100644 index 000000000000..95c826f0298f --- /dev/null +++ b/sys-devel/gcc/gcc-14.2.1_p20250201.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="7" +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_pre20250202.ebuild b/sys-devel/gcc/gcc-15.0.1_pre20250202.ebuild new file mode 100644 index 000000000000..3af8354bedc2 --- /dev/null +++ b/sys-devel/gcc/gcc-15.0.1_pre20250202.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="44" +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 +} |