diff options
author | Sam James <sam@gentoo.org> | 2022-04-17 19:21:30 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-04-17 19:21:30 +0100 |
commit | a1c336d4a0b969ff50630573cd63af59bbd041ba (patch) | |
tree | 1eea7e56773a25f77d6e8ad6abd5a842761fc4dd /sys-devel | |
parent | sys-devel/gdb: fix USE=multitarget w/ glibc-2.35 (diff) | |
download | gentoo-a1c336d4a0b969ff50630573cd63af59bbd041ba.tar.gz gentoo-a1c336d4a0b969ff50630573cd63af59bbd041ba.tar.bz2 gentoo-a1c336d4a0b969ff50630573cd63af59bbd041ba.zip |
sys-devel/gdb: drop 10.2-r1, 11.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/gdb/Manifest | 2 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-10.1-cet.patch | 103 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch | 41 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-10.2-sparc-nat.patch | 47 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch | 13 | ||||
-rw-r--r-- | sys-devel/gdb/gdb-10.2-r1.ebuild | 259 | ||||
-rw-r--r-- | sys-devel/gdb/gdb-11.1.ebuild | 267 |
7 files changed, 0 insertions, 732 deletions
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest index ed14c21d8f6d..9fd223bc5afc 100644 --- a/sys-devel/gdb/Manifest +++ b/sys-devel/gdb/Manifest @@ -1,3 +1 @@ -DIST gdb-10.2.tar.xz 21518900 BLAKE2B c5d31d80d2b454767d6f844e8471b012ad437c3872391b618fd7b14c5cf251b78e55d28c12e81382fd600f67e2f618ff5dbe3a7b737a5d5161ceb3542afbb90b SHA512 3653762ac008e065c37cd641653184c9ff7ce51ee2222ade1122bec9d6cc64dffd4fb74888ef11ac1942064a08910e96b7865112ad37f4602eb0a16bed074caa -DIST gdb-11.1.tar.xz 22040696 BLAKE2B 6a639f6533f4008bfb469c23a26c4fcd039f1bc5dd33745f4876344451beb595d7a8843caeb5db70214924624c5b999f8831237d459bebf1cb2d2866f8b41ee2 SHA512 c40bf970e2f7c2107b29c5aa6a7150daa709d75ddadb73ac20742419d4637d158e3063a4c6ff6e47fae8ca8e1d36253973f85ea15445d004be6d5d7a2dd9bd46 DIST gdb-11.2.tar.xz 22039420 BLAKE2B 66ce7e12c99c33c8b4e6ababa673204aab525e72c90ba54cc34a5fd69948a09dc2a9ef2050764b2464544231b1d1a6431279c2877388551ca6fbf384a3f9b464 SHA512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127 diff --git a/sys-devel/gdb/files/gdb-10.1-cet.patch b/sys-devel/gdb/files/gdb-10.1-cet.patch deleted file mode 100644 index 7477ff90ac95..000000000000 --- a/sys-devel/gdb/files/gdb-10.1-cet.patch +++ /dev/null @@ -1,103 +0,0 @@ -https://bugs.gentoo.org/771765 -https://sourceware.org/PR27397 - -On i586-like CPUs endbr32 added by -Wl,-z,ibt,-z,shstk -generates crashing binaries and causes ./configure failure. - -From 847e4b3207f97762dc641db8d3b188081c3370c3 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Fri, 12 Feb 2021 16:30:23 -0800 -Subject: [PATCH] GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs - ---- - config/cet.m4 | 19 ++++++++++++++++--- - libiberty/configure | 29 +++++++++++++++++++++++++++++ - 2 files changed, 45 insertions(+), 3 deletions(-) - -diff --git a/config/cet.m4 b/config/cet.m4 -index c67fb4f35b6..7718be1afe8 100644 ---- a/config/cet.m4 -+++ b/config/cet.m4 -@@ -130,6 +130,18 @@ fi - if test x$may_have_cet = xyes; then - if test x$cross_compiling = xno; then - AC_TRY_RUN([ -+int -+main () -+{ -+ asm ("endbr32"); -+ return 0; -+} -+ ], -+ [have_multi_byte_nop=yes], -+ [have_multi_byte_nop=no]) -+ have_cet=no -+ if test x$have_multi_byte_nop = xyes; then -+ AC_TRY_RUN([ - static void - foo (void) - { -@@ -155,9 +167,10 @@ main () - bar (); - return 0; - } -- ], -- [have_cet=no], -- [have_cet=yes]) -+ ], -+ [have_cet=no], -+ [have_cet=yes]) -+ fi - if test x$enable_cet = xno -a x$have_cet = xyes; then - AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host]) - fi -diff --git a/libiberty/configure b/libiberty/configure -index 160b8c9e8b1..29a690d44fc 100755 ---- a/libiberty/configure -+++ b/libiberty/configure -@@ -5539,6 +5539,34 @@ else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -+int -+main () -+{ -+ asm ("endbr32"); -+ return 0; -+} -+ -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ have_multi_byte_nop=yes -+else -+ have_multi_byte_nop=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+ have_cet=no -+ if test x$have_multi_byte_nop = xyes; then -+ if test "$cross_compiling" = yes; then : -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "cannot run test program while cross compiling -+See \`config.log' for more details" "$LINENO" 5; } -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ - static void - foo (void) - { -@@ -5575,6 +5603,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -+ fi - if test x$enable_cet = xno -a x$have_cet = xyes; then - as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 - fi --- -2.29.2 - diff --git a/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch b/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch deleted file mode 100644 index 0d3e8c5cb949..000000000000 --- a/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch +++ /dev/null @@ -1,41 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=80d1206d7fea6eb756183e2825abdfd0f00cd976 -https://sourceware.org/PR27999 - -From 80d1206d7fea6eb756183e2825abdfd0f00cd976 Mon Sep 17 00:00:00 2001 -From: Andreas Schwab <schwab@suse.de> -Date: Mon, 21 Jun 2021 11:38:23 +0200 -Subject: [PATCH] gdb: Support DW_LLE_start_end - -Without that it is impossible to debug on riscv64. - ---- a/gdb/dwarf2/loc.c -+++ b/gdb/dwarf2/loc.c -@@ -255,9 +255,27 @@ decode_debug_loclists_addresses (dwarf2_per_cu_data *per_cu, - *new_ptr = loc_ptr; - return DEBUG_LOC_OFFSET_PAIR; - -+ case DW_LLE_start_end: -+ if (loc_ptr + 2 * addr_size > buf_end) -+ return DEBUG_LOC_BUFFER_OVERFLOW; -+ -+ if (signed_addr_p) -+ *low = extract_signed_integer (loc_ptr, addr_size, byte_order); -+ else -+ *low = extract_unsigned_integer (loc_ptr, addr_size, byte_order); -+ -+ loc_ptr += addr_size; -+ if (signed_addr_p) -+ *high = extract_signed_integer (loc_ptr, addr_size, byte_order); -+ else -+ *high = extract_unsigned_integer (loc_ptr, addr_size, byte_order); -+ -+ loc_ptr += addr_size; -+ *new_ptr = loc_ptr; -+ return DEBUG_LOC_START_END; -+ - /* Following cases are not supported yet. */ - case DW_LLE_startx_endx: -- case DW_LLE_start_end: - case DW_LLE_default_location: - default: - return DEBUG_LOC_INVALID_ENTRY; diff --git a/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch b/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch deleted file mode 100644 index 5e71efa0d33a..000000000000 --- a/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 288e3189fce8f466ca60411c27e8f1c0dac5d582 Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich <siarheit@google.com> -Date: Sun, 25 Apr 2021 20:50:38 +0100 -Subject: [PATCH] gdb: fix sparc build failure of linux-nat - -On sparc build failed as: - -``` -gdb/sparc-linux-nat.c: In member function - 'virtual void sparc_linux_nat_target::fetch_registers(regcache*, int)': -gdb/sparc-linux-nat.c:36:37: - error: cannot convert 'regcache*' to 'process_stratum_target*' - 36 | { sparc_fetch_inferior_registers (regcache, regnum); } - | ^~~~~~~~ - | | - | regcache* -``` - -The fix adopts gdb/sparc-nat.h API change in d1e93af64a6 -("gdb: set current thread in sparc_{fetch,collect}_inferior_registers"). - -gdb/ChangeLog: - - * sparc-linux-nat.c (sparc_linux_nat_target): fix sparc build - by passing `process_stratum_target*` parameter. ---- - gdb/sparc-linux-nat.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/gdb/sparc-linux-nat.c -+++ b/gdb/sparc-linux-nat.c -@@ -33,10 +33,10 @@ class sparc_linux_nat_target final : public linux_nat_target - public: - /* Add our register access methods. */ - void fetch_registers (struct regcache *regcache, int regnum) override -- { sparc_fetch_inferior_registers (regcache, regnum); } -+ { sparc_fetch_inferior_registers (this, regcache, regnum); } - - void store_registers (struct regcache *regcache, int regnum) override -- { sparc_store_inferior_registers (regcache, regnum); } -+ { sparc_store_inferior_registers (this, regcache, regnum); } - }; - - static sparc_linux_nat_target the_sparc_linux_nat_target; --- -2.31.1 - diff --git a/sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch b/sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch deleted file mode 100644 index 06aa6084d2d2..000000000000 --- a/sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch +++ /dev/null @@ -1,13 +0,0 @@ -Enable verbose build. By default gdb ignores even --disable-silent-rules. -Override verbosity back to non-silent. - -https://bugs.gentoo.org/695936 ---- a/gdb/silent-rules.mk -+++ b/gdb/silent-rules.mk -@@ -1,5 +1,4 @@ --# If V is undefined or V=0 is specified, use the silent/verbose/compact mode. --V ?= 0 -+V ?= 1 - ifeq ($(V),0) - ECHO_CXX = @echo " CXX $@"; - ECHO_CXXLD = @echo " CXXLD $@"; diff --git a/sys-devel/gdb/gdb-10.2-r1.ebuild b/sys-devel/gdb/gdb-10.2-r1.ebuild deleted file mode 100644 index 0133e0b20eb8..000000000000 --- a/sys-devel/gdb/gdb-10.2-r1.ebuild +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9,10} ) - -inherit eutils flag-o-matic python-single-r1 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.2???????) - # weekly snapshots - SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz" - ;; -*) - # Normal upstream release - SRC_URI="mirror://gnu/gdb/${P}.tar.xz - ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz" - ;; -esac - -PATCH_VER="" -PATCH_DEV="" -DESCRIPTION="GNU debugger" -HOMEPAGE="https://sourceware.org/gdb/" -SRC_URI="${SRC_URI} - ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz} - ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} -" - -LICENSE="GPL-2 LGPL-2" -SLOT="0" -if [[ ${PV} != 9999* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -fi -IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" -REQUIRED_USE=" - python? ( ${PYTHON_REQUIRED_USE} ) -" - -# ia64 kernel crashes when gdb testsuite is running -RESTRICT=" - ia64? ( test ) - - !test? ( test ) -" - -RDEPEND=" - dev-libs/mpfr:0= - >=sys-libs/ncurses-5.2-r2:0= - >=sys-libs/readline-7:0= - sys-libs/zlib - 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 - ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - app-arch/xz-utils - sys-apps/texinfo - virtual/yacc - nls? ( sys-devel/gettext ) - source-highlight? ( virtual/pkgconfig ) - test? ( dev-util/dejagnu ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch - "${FILESDIR}"/${PN}-10.1-cet.patch - "${FILESDIR}"/${PN}-10.2-sparc-nat.patch - "${FILESDIR}"/${PN}-10.2-DW_LLE-riscv64.patch -) - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - - strip-linguas -u bfd/po opcodes/po - export CC_FOR_BUILD="$(tc-getBUILD_CC)" - - # 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 - - 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. #490566 - --disable-{binutils,etc,gas,gold,gprof,ld} - - # avoid automagic dependency on (currently prefix) systems - # systems with debuginfod library, bug #754753 - --without-debuginfod - - # 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) - ) - local sysroot="${EPREFIX}/usr/${CTARGET}" - is_cross && myconf+=( - --with-sysroot="${sysroot}" - --includedir="${sysroot}/usr/include" - --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 source-highlight) - $(use multitarget && echo --enable-targets=all) - $(use_with python python "${EPYTHON}") - $(use_with xxhash) - $(use_with guile) - ) - if use sparc-solaris || use x86-solaris ; then - # disable largefile support - # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html - myconf+=( --disable-largefile ) - fi - - # source-highlight is detected with pkg-config: bug #716558 - export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" - - # ensure proper compiler is detected for Clang builds: bug #831202 - export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" - - econf "${myconf[@]}" -} - -src_install() { - default - find "${ED}"/usr -name libiberty.a -delete || die - - # Delete translations that conflict with binutils-libs. #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/ChangeLog gdb/PROBLEMS - docinto sim - dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} - if use server ; then - docinto gdbserver - dodoc gdbserver/{ChangeLog,README} - fi - - if [[ -n ${PATCH_VER} ]] ; then - dodoc "${WORKDIR}"/extra/gdbinit.sample - fi - - # Remove shared info pages - rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* - - if use python; then - python_optimize "${ED}"/usr/share/gdb/python/gdb - fi -} - -pkg_postinst() { - # portage sucks and doesnt 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-11.1.ebuild b/sys-devel/gdb/gdb-11.1.ebuild deleted file mode 100644 index 84c1146484b8..000000000000 --- a/sys-devel/gdb/gdb-11.1.ebuild +++ /dev/null @@ -1,267 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8,9,10} ) -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.2???????) - # weekly snapshots - SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz" - ;; - *) - # Normal upstream release - SRC_URI="mirror://gnu/gdb/${P}.tar.xz - ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz" - ;; -esac - -PATCH_VER="" -PATCH_DEV="" -DESCRIPTION="GNU debugger" -HOMEPAGE="https://sourceware.org/gdb/" -SRC_URI="${SRC_URI} - ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz} - ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} -" - -LICENSE="GPL-2 LGPL-2" -SLOT="0" - -if [[ ${PV} != 9999* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -fi - -IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -# ia64 kernel crashes when gdb testsuite is running -RESTRICT=" - ia64? ( test ) - !test? ( test ) -" - -RDEPEND=" - dev-libs/mpfr:0= - dev-libs/gmp:= - >=sys-libs/ncurses-5.2-r2:0= - >=sys-libs/readline-7:0= - sys-libs/zlib - 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 - ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - app-arch/xz-utils - sys-apps/texinfo - virtual/yacc - nls? ( sys-devel/gettext ) - source-highlight? ( virtual/pkgconfig ) - test? ( dev-util/dejagnu ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch - "${FILESDIR}"/${P}-glibc-2.34-sim.patch -) - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - - strip-linguas -u bfd/po opcodes/po - export CC_FOR_BUILD="$(tc-getBUILD_CC)" - - # 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 - - 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. #490566 - --disable-{binutils,etc,gas,gold,gprof,ld} - - # avoid automagic dependency on (currently prefix) systems - # systems with debuginfod library, bug #754753 - --without-debuginfod - - # 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) - ) - - local sysroot="${EPREFIX}/usr/${CTARGET}" - - is_cross && myconf+=( - --with-sysroot="${sysroot}" - --includedir="${sysroot}/usr/include" - --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 source-highlight) - $(use multitarget && echo --enable-targets=all) - $(use_with python python "${EPYTHON}") - $(use_with xxhash) - $(use_with guile) - ) - - if use sparc-solaris || use x86-solaris ; then - # Disable largefile support - # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html - myconf+=( --disable-largefile ) - fi - - # source-highlight is detected with pkg-config: bug #716558 - export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" - - # ensure proper compiler is detected for Clang builds: bug #831202 - export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" - - econf "${myconf[@]}" -} - -src_install() { - default - - find "${ED}"/usr -name libiberty.a -delete || die - - # Delete translations that conflict with binutils-libs. #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/ChangeLog gdb/PROBLEMS - docinto sim - dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} - - if use server ; then - docinto gdbserver - dodoc gdbserver/{ChangeLog,README} - fi - - if [[ -n ${PATCH_VER} ]] ; then - dodoc "${WORKDIR}"/extra/gdbinit.sample - fi - - # Remove shared info pages - rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,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 -} |