summaryrefslogtreecommitdiff
path: root/sys-devel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-20 01:06:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-20 01:06:10 +0100
commit6f97f3b697516aeae25033ec37234739fff23fbc (patch)
tree06e8fc580948f1ebb56af172dd293763a2d6e478 /sys-devel
parent60cdf17f0a24ced43a795eb9e096087f59c9d571 (diff)
gentoo auto-resync : 20:07:2023 - 01:06:10
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/Manifest.gzbin10470 -> 10499 bytes
-rw-r--r--sys-devel/autoconf/Manifest2
-rw-r--r--sys-devel/autoconf/autoconf-2.69-r9.ebuild2
-rw-r--r--sys-devel/binutils/Manifest5
-rw-r--r--sys-devel/binutils/binutils-2.40-r6.ebuild504
-rw-r--r--sys-devel/binutils/binutils-9999.ebuild9
-rw-r--r--sys-devel/binutils/metadata.xml1
-rw-r--r--sys-devel/gdb/Manifest5
-rw-r--r--sys-devel/gdb/gdb-13.2-r2.ebuild314
-rw-r--r--sys-devel/gdb/gdb-9999.ebuild9
-rw-r--r--sys-devel/gdb/metadata.xml1
11 files changed, 838 insertions, 14 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz
index da1a9bbaf9fc..f5cbd986de31 100644
--- a/sys-devel/Manifest.gz
+++ b/sys-devel/Manifest.gz
Binary files differ
diff --git a/sys-devel/autoconf/Manifest b/sys-devel/autoconf/Manifest
index bde76e0a6e55..f77c8b0079b8 100644
--- a/sys-devel/autoconf/Manifest
+++ b/sys-devel/autoconf/Manifest
@@ -29,7 +29,7 @@ EBUILD autoconf-2.13-r7.ebuild 1608 BLAKE2B b98fa629ade7ed517a13dc9b64a75c5b9d8e
EBUILD autoconf-2.13-r8.ebuild 1626 BLAKE2B c67df827c9eaf4763b5d97d9e827dd841badef188ba91d9fe56b5020db658b8c44640da66067afdb49d2c0f3927cd52de8ece121bf590e9dbabc2f3d3b749bb8 SHA512 13da1c910e92d6b446a75425ff390133d1fb6781babc377637f84093e5eec896a742ea24f52be0b783ea2dfb78f77a8eb8de96a0a7e483b74bdcab160537cd31
EBUILD autoconf-2.69-r5.ebuild 1806 BLAKE2B 739c1a44b953b09391c2d0d5c0c7b0aa056d6a9aba24191e3dbf1095c400a9cdc77d24c89f183694ed75269d4eb9454356e5b9e6b65db88193d9aeb9eefefa32 SHA512 b1a515253a692978e63b0493311b5a219999c046f44a7efd4fc37b862cdbec8b35e55c97f9b7f92c190c85e98448fc77c73c999a7509c19334437dcbd306a4dc
EBUILD autoconf-2.69-r8.ebuild 1757 BLAKE2B b8d7f29b6bf0a9c6b3ea1993cadb83dee51a8013a755e8c834d7eb716c6b587b20c4dfc6b595298e9da93281b0ea4ef9e2d8113edb9c00bf01c9dbf32c4cfec5 SHA512 a34448a9bf6874c74ee253689033c1428f15b2372bb78501a7c6ebfdc27d409f3b309c68f5e308598125ac7ebb9e268ec9b3d8ab41a7d6c2e6531028543480a3
-EBUILD autoconf-2.69-r9.ebuild 1729 BLAKE2B d80da7fab2b58c48a432a0f54edc2a6d939080d5310bdf1273ce6151027f26931663b13741a12370bf6378c42727ba8969d141a4a5a781aaf1452302a5cfc08d SHA512 aee67ef20c7f5a8652b323a97dd368539ce38d07032b4226e4c763a46e81e9345fc05651f46dfd0cbbffeb81b66b8c9a0b96efa4e1c7c8112580cbb4f158089c
+EBUILD autoconf-2.69-r9.ebuild 1728 BLAKE2B 6ac68f95d41d1b090c85175d540177cd95f620ade4ab0d1433c4fc6c246f5aa4d8a5c7fa146e98d5af8affc681ce9961045936fff6eb70503b7de695c364fa63 SHA512 e5b3d2226c83f14ee0e655202e9af325758fcb679d8e1ece91a218259552828b23888b282b238e6a08bb695a2db5c32792962e79872cffaddeb01eee444b61de
EBUILD autoconf-2.71-r1.ebuild 2209 BLAKE2B e745a44ee3abd6536c74a5206e67a9468d1a7c75e1448e023fbf66ab059f9b0242fb81bf03986a128eed8f13d6dd7fcc4b299c083393cafe58769a59a4cecf95 SHA512 5c03752ec0a15fdec87cbe53d976ec81b6d441bb1b175311dc19c6e78973a1865c06a26a8fd30cb0c28708f7f22ca6bc523f1fca33abe33fcd166e23780c400a
EBUILD autoconf-2.71-r5.ebuild 2425 BLAKE2B 136d90bc2514c86c3575cc225d133b560d66effbbe23a7fbd05043b69a000a42e78d258704ab182485bd5b2cba0705294f90f2cf4288135f3b2351404e176cb1 SHA512 42fe4a6c6f5a414d836ecf1cbfa9d04cd15810de23d3b5f5bbf909862015127b303ffe4bcedcfa8f171cb860923bc7b5b654593d6e20fc479866885d8cd3c47f
EBUILD autoconf-2.71-r6.ebuild 2396 BLAKE2B fe099ae66f3cc60ce49ddb81c6cdae8ae80c4c157142b9bc4ff66642c0e70cf3f4f974180869095dc58d5cd6f1141bb3c7c11ccaebe6790040e476e2d7ccdca9 SHA512 64f15ba6cd8cb5531834404d30e0b18df921581444a80e201ae713119117ff7b82663a96a0921c8a4c887f713df73aec4b91da0f7cd6748877336f777072f273
diff --git a/sys-devel/autoconf/autoconf-2.69-r9.ebuild b/sys-devel/autoconf/autoconf-2.69-r9.ebuild
index 3d9b70554f44..7b16150352b6 100644
--- a/sys-devel/autoconf/autoconf-2.69-r9.ebuild
+++ b/sys-devel/autoconf/autoconf-2.69-r9.ebuild
@@ -10,7 +10,7 @@ else
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.xz
https://dev.gentoo.org/~polynomial-c/dist/${P}-runstatedir_patches.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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 ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
inherit toolchain-autoconf
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index e2ef76afd870..6b21db851004 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -32,5 +32,6 @@ EBUILD binutils-2.37_p1-r2.ebuild 13294 BLAKE2B ec26ea427eb05e6368b046b05eb45ee1
EBUILD binutils-2.38-r2.ebuild 13672 BLAKE2B 84e1567892739e624554005600f8dbe123bcd524728bd1c06797fdfae2c91f39ddff5b6aac420c9571508f6f88b79a567c9144e5670f48c8fa4b7822e5ca5b02 SHA512 e7b6822f6482c3bbbab21292d19a267a711541e8757c7d1ea0c8b09cdfc71ba3beee98e53a56ab7d0789122bebca801e45d13d255b0051647dc1f89fa7a17680
EBUILD binutils-2.39-r5.ebuild 14198 BLAKE2B 509de3eac65a306d0430ed50ee4c734a8f8bb73b71f4ec366a3fd573300f59d77acb05b1a7fe86983ad61cbd59fa2a561d23cb5eea247e2ad0a125137caef81e SHA512 a86d974eacdddcd528f539b57c6e22826340d9efa52568d5aeef35ff191ad564dea5a643e99688833e4f4913a17bf20b74a67c993aecb2e8080511f46e057aa5
EBUILD binutils-2.40-r5.ebuild 14502 BLAKE2B e6f0d667bc355d347598ee34b4e364e04e03e3d359172026460760c8020fedc25be858af5cdafb28b1047f832c6daceaf70dd19b58ebbd29084989aa70a2ad89 SHA512 73e5138fe82e807d9174130724e5d04fcead6881b57abbc2d3d1dff7b3081d64787a31569e5dede6e6f45dc49b6ef741873e533a8c521e589e3075f8d92b278d
-EBUILD binutils-9999.ebuild 14507 BLAKE2B 8b781bc6256c523d2883cc0aa8cedfb00e61e3e9a741c787494fc5b71432432bfea0b55e20a417658a304339b58d7876c7408b28f7f9d71cc73f5480505beef3 SHA512 f8b31cc466caaedeb3e708bc7015d4314533f25ebec7240bee00443860fffa181b34c659405789da860772a2542abaaf69ba487a390693a05d5c4784255031a0
-MISC metadata.xml 889 BLAKE2B 9a627ab3db90639c30e19df93a064f9129d684ffe1176159d526ba7ba2e68c4c2cded8437382ceb97a5e2578fe79583042f6914a2b7650bb777ec1ce6bebd425 SHA512 b691e0335c2b059596557a3943047b0b8e718cc84c4fd885d44fe9887d3d170fce1317ba9949c3921a6e242434a24041777967e67beba911edf6932fe9f3d3cd
+EBUILD binutils-2.40-r6.ebuild 14463 BLAKE2B 7cb15b48dee4fac6c52e4fd9ec823317fc271531ee2b124c22d6c4aa419f4eab5b5718c6fbdf0a3cc144d06d9427c1f245dcda7ad2ed45210662ef8bf87918c1 SHA512 3552a0dda275d071abd33a5f2b51889b05d1e0f6fe51dffd9542f29fb1e9858f5ff64f359cc5eac8c72afa2c00b1aa957b6d43b6c87662ee17241e7fbc0c6e2a
+EBUILD binutils-9999.ebuild 14463 BLAKE2B ffded8a76726a87e11c9fe826324d0674b3aaef7661fb234538793489eced547a397c152f8bed319b92e87c1ef8be366976856c44717478d66cc45ebb47b972a SHA512 2a8fb1cf17e6f49db73fb91ce5e2d069c1e4451a4c08befa0243569cfc9a8f487410927646cbc1f33a790d0e8569509b41a736b0d175133f25ecd00265027a97
+MISC metadata.xml 995 BLAKE2B 85ccdd924f8c459a4cd7e608dff59c7281523da0d9457b0094b97e140cd07a300cb38383d9402808859100ca0bf219ce86e367bb5282216121bd81f68d588c17 SHA512 3ee538640e5d8c0efe6b8cf1de299e0d78965dece1ad814384844e8e24db72b11ca30d5fb68dfae2e71046d35aee0e71ee3ecbda3730ca49446dd0b2cd0f817c
diff --git a/sys-devel/binutils/binutils-2.40-r6.ebuild b/sys-devel/binutils/binutils-2.40-r6.ebuild
new file mode 100644
index 000000000000..ff5ebb262fb2
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.40-r6.ebuild
@@ -0,0 +1,504 @@
+# Copyright 1999-2023 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 gold gprofng multitarget +nls pgo +plugins static-libs test vanilla 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=5
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+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 ~ia64 ~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}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ sys-devel/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ sys-devel/flex
+ 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"
+ 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"
+ 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"
+ 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.
+ use prefix && eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch
+ 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
+
+ # Fix locale issues if possible, bug #122216
+ if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+ einfo "Fixing misc issues in configure files"
+ for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+ ebegin " Updating ${f/${S}\/}"
+ patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+ || eerror "Please file a bug about this"
+ eend $?
+ done
+ fi
+
+ # 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
+
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
+ 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
+ # 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 )
+ 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}
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.27) offer a configure flag now.
+ --enable-relro
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
+ --enable-install-libiberty
+ # Available from 2.35 on
+ --enable-textrel-check=warning
+
+ # 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.
+ #--enable-warn-execstack
+ #--enable-warn-rwx-segments
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
+ --enable-new-dtags
+
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,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)
+ )
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+ # 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]
+ emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake V=1 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
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k V=1 check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake V=1 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}
+
+ # 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}
+}
+
+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}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ 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 d8c2553ece20..ce9b9958cd11 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 doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla zstd"
+IUSE="cet debuginfod doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla zstd"
# Variables that can be set here (ignored for live ebuilds)
# PATCH_VER - the patchset version
@@ -52,6 +52,9 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
zstd? ( app-arch/zstd:= )
"
DEPEND="${RDEPEND}"
@@ -287,9 +290,7 @@ src_configure() {
# {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
- # Avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
+ $(use_with debuginfod)
# Avoid automagic dev-libs/msgpack dep, bug #865875
--without-msgpack
diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml
index 9b80e61912f4..3cc106863437 100644
--- a/sys-devel/binutils/metadata.xml
+++ b/sys-devel/binutils/metadata.xml
@@ -13,6 +13,7 @@
<flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
<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>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
index 37881fd4d138..a2cc9a4d8075 100644
--- a/sys-devel/gdb/Manifest
+++ b/sys-devel/gdb/Manifest
@@ -2,6 +2,7 @@ AUX gdb-13.2-fix-sparc-debugging.patch 4736 BLAKE2B 1c6161bca2b29cf035e68231d1c4
AUX gdb-8.3.1-verbose-build.patch 395 BLAKE2B e2e82307ceae64d16aa9b57a5e639eb5d217c4d977aed0847fdf125bb13ebc004906d9afb8e3f629c41efccca88df0040015e7799c1fd24de5fb50f62f5bbd90 SHA512 c2bb013e4fcabefddcd8042bd3cbb53471f83182cc8769fe0d19eed80ccc4a83bd84d120006fa25b3b7d0310dc2f2ec6b44a6ff74909cd312b7e491f371777a3
DIST gdb-13.2.tar.xz 23664644 BLAKE2B bf5216ba2286448a46f9e0a405367c5a678e6d7540204722d355b618018b7b75a2ebc5b51353304c5ded02a3979223a81781d305f5afa5be82516cdc2863d49f SHA512 8185d3e11ab60dafff5860a5016577bfe7dd7547ef01ebc867bc247603d82b74ff74c4f29492c7d2aee57076f52be33e289f4c6b414a4b870d4b3004909f4c34
EBUILD gdb-13.2-r1.ebuild 8702 BLAKE2B 86af8038bcc7e7d40e0cbc97ccabe3a2e52a4f9a89e1f01d45e0084b486ad242fff9d28e63895145ae23bd6d47c49b8815bb09501dd6a38ebe25f0f036230d7a SHA512 4ac9a32f405b531cac27a760adc2462f0e9960054c9416e352fec37fb563d40c4b9cc3720818a7a6ccf516efe64f94ef8865c3eabb12b2f22525c420801b8bdb
+EBUILD gdb-13.2-r2.ebuild 8658 BLAKE2B c892f7dcee1a95cfe40ba350200b673157d949d96cf81ce95d731e68f4607ce26276a6d1f706748c368a93ed7ed2babc2a1922e3bdc03d1dfce608b600f4eafe SHA512 a4120810b9e2278f399dfe38fb8a1fff945e58ee3e2f9e7bf11469b897cf2e7aa137fbfed3e8e9b6ca4fec56b31e386be825a4911b4d22a4c7d75f66f00f0ffc
EBUILD gdb-13.2.ebuild 8648 BLAKE2B f5d2ab303fb9fbbbe83aa34627418d9d68715336b2ca4dc7a599e978dfc5dcb5b4c514fba37ec7c8dbb3dd74171a2670b232379593612f1e7f691783b1d7f9af SHA512 9fe1903c5705560be32886cb590454e93bb9bd0f5ad0dbb67379c728e5693b3535fad78dcccbe84171da06317a2d07260c354377f9cfe65e9a74d0f125cb0c7d
-EBUILD gdb-9999.ebuild 8656 BLAKE2B 1cae4462b766233d95bb582c5f9a55237b779285f9aa72b9d361331014eda3f608cab2435182b566acb34ed7ee326b9b4b406ba516bd6a58cac53824b3195f5b SHA512 a1e45f5ed2e6fd5e85a6447e69280d325465c71eb10772efc794e8c8b262ad78e41bce944cb8132fead0e57d4dd2a4715b075c50ae6c1d2bfc8c30bdf85feb9c
-MISC metadata.xml 1242 BLAKE2B 368d8798d7d3b610653f635eb36ee5517912e8a2cb392622b32ac0aa90f336e3b391ba25811dee110644e50fabec0d64f6bcf3b219cdd240ec806e709a198eed SHA512 192fa340899680413c3d6c886ecd7d2262475a33aecc452192e5fe1d8e3eb5cf17546e57181e720128cf9b39cd8e4b1b1a73cb1f0c9887866c0ce88b288636e2
+EBUILD gdb-9999.ebuild 8612 BLAKE2B a58184c3ef73ad5617299911d0e673bcdf01ff558a781210a04701f5775bb53f3b4f5664474427ac4b7ef7b97cc98e1270bd33d5db8a7e4aeea6c5259296a1a7 SHA512 7269319e63801048dd10df53eaeedfcb26eabd1051fb87d47ba5e2fa3cbb4a63aea33c8ccdccd95e213e9b1837aa09f7b583766b04cb62cefe2806956cc83765
+MISC metadata.xml 1348 BLAKE2B 61eb80efbf21b4d0ededbe138710ef7ce69d4c2c137448d780a0a18db13b1b80ccfc41adf9cd825358bb952dae3a627f07d2cb89845ca52383d05fe32c494b49 SHA512 b50fe1fd5fccf7eddac4eff4fd7be955e02227763725b8e00d8e3606346afa978079ed8b754948b9a3ee065441acba4787b48c2b2d55535e0f8b9405fb4f2e90
diff --git a/sys-devel/gdb/gdb-13.2-r2.ebuild b/sys-devel/gdb/gdb-13.2-r2.ebuild
new file mode 100644
index 000000000000..0d8c5729c3d2
--- /dev/null
+++ b/sys-devel/gdb/gdb-13.2-r2.ebuild
@@ -0,0 +1,314 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging
+# tips & notes.
+
+PYTHON_COMPAT=( python3_{10..11} )
+inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs
+
+export CTARGET=${CTARGET:-${CHOST}}
+
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+case ${PV} in
+ 9999*)
+ # live git tree
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ inherit git-r3
+ SRC_URI=""
+ ;;
+ *.*.50_p2???????|*.*.90_p2???????)
+ # Weekly snapshots
+ MY_PV="${PV/_p/.}"
+ SRC_URI="
+ https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz
+ https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-weekly-${MY_PV}.tar.xz
+ "
+ S="${WORKDIR}/${PN}-${MY_PV}"
+
+ # e.g. 13.1.90_p20230325 is a snapshot on the stable branch, so it's fine
+ if [[ ${PV} == *.[123456789].9?_p2??????? ]] ; then
+ REGULAR_RELEASE=1
+ fi
+ ;;
+ *.*.9?)
+ # Prereleases
+ MY_PV="${PV/_p/.}"
+ SRC_URI="
+ https://sourceware.org/pub/gdb/snapshots/branch/gdb-${MY_PV}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-${MY_PV}.tar.xz
+ "
+ S="${WORKDIR}/${PN}-${MY_PV}"
+ ;;
+ *)
+ # Normal upstream release
+ SRC_URI="
+ mirror://gnu/gdb/${P}.tar.xz
+ https://sourceware.org/pub/gdb/releases/${P}.tar.xz
+ "
+
+ REGULAR_RELEASE=1
+esac
+
+PATCH_DEV=""
+PATCH_VER=""
+DESCRIPTION="GNU debugger"
+HOMEPAGE="https://sourceware.org/gdb/"
+SRC_URI="
+ ${SRC_URI}
+ ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz}
+ ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
+"
+
+LICENSE="GPL-3+ LGPL-2.1+"
+SLOT="0"
+IUSE="cet debuginfod guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
+if [[ -n ${REGULAR_RELEASE} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+fi
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/mpfr:=
+ dev-libs/gmp:=
+ >=sys-libs/ncurses-5.2-r2:=
+ >=sys-libs/readline-7:=
+ sys-libs/zlib
+ elibc_glibc? ( net-libs/libnsl:= )
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ lzma? ( app-arch/xz-utils )
+ python? ( ${PYTHON_DEPS} )
+ guile? ( >=dev-scheme/guile-2.0 )
+ xml? ( dev-libs/expat )
+ source-highlight? (
+ dev-util/source-highlight
+ )
+ xxhash? (
+ dev-libs/xxhash
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-arch/xz-utils
+ sys-apps/texinfo
+ app-alternatives/yacc
+ nls? ( sys-devel/gettext )
+ source-highlight? ( virtual/pkgconfig )
+ test? ( dev-util/dejagnu )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+ "${FILESDIR}"/${P}-fix-sparc-debugging.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ strip-linguas -u bfd/po opcodes/po
+
+ # Avoid using ancient termcap from host on Prefix systems
+ sed -i -e 's/termcap tinfow/tinfow/g' \
+ gdb/configure{.ac,} || die
+}
+
+gdb_branding() {
+ printf "Gentoo ${PV} "
+
+ if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
+ printf "p${PATCH_VER}"
+ else
+ printf "vanilla"
+ fi
+
+ [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}"
+}
+
+src_configure() {
+ strip-unsupported-flags
+
+ # 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}"
+
+ local myconf=(
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # gnulib's or gdb's configure.
+ --disable-dependency-tracking
+
+ --with-pkgversion="$(gdb_branding)"
+ --with-bugurl='https://bugs.gentoo.org/'
+ --disable-werror
+ # Disable modules that are in a combined binutils/gdb tree. bug #490566
+ --disable-{binutils,etc,gas,gold,gprof,gprofng,ld}
+
+ $(use_with debuginfod)
+
+ $(use_enable test unit-tests)
+
+ # 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)
+
+ # Helps when cross-compiling. Not to be confused with --with-sysroot.
+ --with-build-sysroot="${ESYSROOT}"
+ )
+
+ is_cross && myconf+=(
+ --with-sysroot="\${prefix}/${CTARGET}"
+ --includedir="\${prefix}/include/${CTARGET}"
+ --with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
+ )
+
+ # gdbserver only works for native targets (CHOST==CTARGET).
+ # it also doesn't support all targets, so rather than duplicate
+ # the target list (which changes between versions), use the
+ # "auto" value when things are turned on, which is triggered
+ # whenever no --enable or --disable is given
+ if is_cross || use !server ; then
+ myconf+=( --disable-gdbserver )
+ fi
+
+ myconf+=(
+ --enable-64-bit-bfd
+ --disable-install-libbfd
+ --disable-install-libiberty
+ --enable-obsolete
+ # This only disables building in the readline subdir.
+ # For gdb itself, it'll use the system version.
+ --disable-readline
+ --with-system-readline
+ # This only disables building in the zlib subdir.
+ # For gdb itself, it'll use the system version.
+ --without-zlib
+ --with-system-zlib
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
+ $(use_with xml expat)
+ $(use_with lzma)
+ $(use_enable nls)
+ $(use_enable sim)
+ $(use_enable source-highlight)
+ $(use multitarget && echo --enable-targets=all)
+ $(use_with python python "${EPYTHON}")
+ $(use_with xxhash)
+ $(use_with guile)
+ $(use_with zstd)
+
+ # Find libraries using the toolchain sysroot rather than the configured
+ # prefix. Needed when cross-compiling.
+ #
+ # Check which libraries to apply this to with:
+ # "${S}"/gdb/configure --help | grep without-lib | sort
+ --without-lib{babeltrace,expat,gmp,iconv,ipt,lzma,mpfr,xxhash}-prefix
+ )
+
+ # source-highlight is detected with pkg-config: bug #716558
+ export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
+
+ export CC_FOR_BUILD="$(tc-getBUILD_CC)"
+
+ # ensure proper compiler is detected for Clang builds: bug #831202
+ export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_test() {
+ # Run the unittests (nabbed invocation from Fedora's spec file) at least
+ emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"'
+
+ # Too many failures
+ # In fact, gdb's test suite needs some work to get passing.
+ # See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
+ # As of 11.2, on amd64: "# of unexpected failures 8600"
+ # Also, ia64 kernel crashes when gdb testsuite is running.
+ #emake -k check
+}
+
+src_install() {
+ emake V=1 DESTDIR="${D}" install
+
+ find "${ED}"/usr -name libiberty.a -delete || die
+
+ # Delete translations that conflict with binutils-libs. bug #528088
+ # Note: Should figure out how to store these in an internal gdb dir.
+ if use nls ; then
+ find "${ED}" \
+ -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
+ -delete || die
+ fi
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -rf "${ED}"/usr/share/{doc,info,locale} || die
+ local f
+ for f in "${ED}"/usr/share/man/*/* ; do
+ if [[ ${f##*/} != ${CTARGET}-* ]] ; then
+ mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
+ fi
+ done
+ return 0
+ fi
+
+ # Install it by hand for now:
+ # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
+ # Only install if it exists due to the twisted behavior (see
+ # notes in src_configure above).
+ [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay
+
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/PROBLEMS
+ docinto sim
+ dodoc sim/{MAINTAINERS,README-HACKING}
+
+ if use server ; then
+ docinto gdbserver
+ dodoc gdbserver/README
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
+
+ if use python ; then
+ python_optimize "${ED}"/usr/share/gdb/python/gdb
+ fi
+}
+
+pkg_postinst() {
+ # Portage doesn't unmerge files in /etc
+ rm -vf "${EROOT}"/etc/skel/.gdbinit
+
+ if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
+ ewarn "gdb is unable to get a mach task port when installed by Prefix"
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll"
+ ewarn "have to perform the following steps:"
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+ fi
+}
diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild
index f234645144c8..a9932a210efe 100644
--- a/sys-devel/gdb/gdb-9999.ebuild
+++ b/sys-devel/gdb/gdb-9999.ebuild
@@ -72,7 +72,7 @@ SRC_URI="
LICENSE="GPL-3+ LGPL-2.1+"
SLOT="0"
-IUSE="cet guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
+IUSE="cet debuginfod guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
if [[ -n ${REGULAR_RELEASE} ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
fi
@@ -86,6 +86,9 @@ RDEPEND="
>=sys-libs/readline-7:=
sys-libs/zlib
elibc_glibc? ( net-libs/libnsl:= )
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
lzma? ( app-arch/xz-utils )
python? ( ${PYTHON_DEPS} )
guile? ( >=dev-scheme/guile-2.0 )
@@ -158,9 +161,7 @@ src_configure() {
# Disable modules that are in a combined binutils/gdb tree. bug #490566
--disable-{binutils,etc,gas,gold,gprof,gprofng,ld}
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
+ $(use_with debuginfod)
$(use_enable test unit-tests)
diff --git a/sys-devel/gdb/metadata.xml b/sys-devel/gdb/metadata.xml
index 5baff33ff49e..2e08f18a3470 100644
--- a/sys-devel/gdb/metadata.xml
+++ b/sys-devel/gdb/metadata.xml
@@ -15,6 +15,7 @@
<flag name="source-highlight">Enable listing highlighting via <pkg>dev-util/source-highlight</pkg></flag>
<flag name="xml">Support parsing XML data files needed (at least) for cpu features, memory maps, and syscall tracing</flag>
<flag name="xxhash">Use <pkg>dev-libs/xxhash</pkg> to speed up internal hashing.</flag>
+ <flag name="debuginfod">Enable debuginfod support via <pkg>dev-libs/elfutils</pkg> libdebuginfod</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:gdb</remote-id>