public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2018-06-30 11:06 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2018-06-30 11:06 UTC (permalink / raw
  To: gentoo-commits

commit:     c61c0eeba20f941011ed6d87c86664c77f9b4152
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 30 11:06:26 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jun 30 11:06:40 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c61c0eeb

sys-devel/gdb: fix build failure on ia64, bug #658014

It's a backport of upstream fix by Émeric Maschino
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8

Reported-by: Émeric Maschino
Fixed-by: Émeric Maschino
Closes: https://bugs.gentoo.org/658014
Package-Manager: Portage-2.3.41, Repoman-2.3.9

 sys-devel/gdb/files/gdb-7.12.1-ia64-include.patch | 26 +++++++++++++++++++++++
 sys-devel/gdb/gdb-7.12.1.ebuild                   |  1 +
 2 files changed, 27 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-7.12.1-ia64-include.patch b/sys-devel/gdb/files/gdb-7.12.1-ia64-include.patch
new file mode 100644
index 00000000000..3b910da4227
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-7.12.1-ia64-include.patch
@@ -0,0 +1,26 @@
+fixes build failure on ia64
+
+It's a backport of upstream fix by Émeric Maschino
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8
+https://bugs.gentoo.org/658014
+--- a/gdb/nat/linux-ptrace.c	2017-01-21 14:48:42.000000000 +0100
++++ b/gdb/nat/linux-ptrace.c	2018-06-20 00:03:40.520317323 +0200
+@@ -21,8 +21,6 @@
+ #include "linux-procfs.h"
+ #include "linux-waitpid.h"
+ #include "buffer.h"
+-#include "gdb_wait.h"
+-#include "gdb_ptrace.h"
+ #include <sys/procfs.h>
+ 
+ /* Stores the ptrace options supported by the running kernel.
+--- a/gdb/nat/linux-ptrace.h	2017-01-21 14:46:47.000000000 +0100
++++ b/gdb/nat/linux-ptrace.h	2018-06-20 00:04:28.706220951 +0200
+@@ -21,6 +21,7 @@
+ struct buffer;
+ 
+ #include "nat/gdb_ptrace.h"
++#include "gdb_wait.h"
+ 
+ #ifdef __UCLIBC__
+ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))

diff --git a/sys-devel/gdb/gdb-7.12.1.ebuild b/sys-devel/gdb/gdb-7.12.1.ebuild
index a1863b60ff0..48dde882bdd 100644
--- a/sys-devel/gdb/gdb-7.12.1.ebuild
+++ b/sys-devel/gdb/gdb-7.12.1.ebuild
@@ -92,6 +92,7 @@ pkg_setup() {
 src_prepare() {
 	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
 	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+	epatch "${FILESDIR}"/${P}-ia64-include.patch #655270
 	epatch_user
 	strip-linguas -u bfd/po opcodes/po
 }


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2018-10-21 16:27 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2018-10-21 16:27 UTC (permalink / raw
  To: gentoo-commits

commit:     63d949769e25176de0d879cbef2b7cd80348ad0f
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 21 16:26:47 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Oct 21 16:27:36 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63d94976

sys-devel/gdb: link against tinfow first, then tinfo. bug #669096

In bug #669096 gdb was directly linked both
to libtinfo.so.6 and libncursesw.so.6:
    $ lddtree /usr/bin/gdb
    /usr/bin/gdb (interpreter => /lib64/ld-linux-x86-64.so.2)
    libtinfo.so.6 => /lib64/libtinfo.so.6
    libncursesw.so.6 => /lib64/libncursesw.so.6
        libtinfow.so.6 => /lib64/libtinfow.so.6
    ...
and caused gdb to SIGSEGV at start.

Let's consistently link against *w libraries when both available.

Note: the fix on it's own is not enough:
- we don't pass include paths to ncursesw libraries
- libreadline.so.7 is still linked against libtinfo.so.6 in Gentoo
  and needs a separate fix.

But it's enough to make immediate SIGSEGV to go away.

Reported-by: Michał Górny
Bug: https://bugs.gentoo.org/669096
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sys-devel/gdb/files/gdb-8.2-tinfow.patch |  44 ++++++
 sys-devel/gdb/gdb-8.2-r1.ebuild          | 261 +++++++++++++++++++++++++++++++
 2 files changed, 305 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-8.2-tinfow.patch b/sys-devel/gdb/files/gdb-8.2-tinfow.patch
new file mode 100644
index 00000000000..48f6109664a
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-8.2-tinfow.patch
@@ -0,0 +1,44 @@
+Try to link gdb against tinfow first, then tinfo.
+
+In bug #669096 gdb was directly linked both
+to libtinfo.so.6 and libncursesw.so.6:
+    $ lddtree /usr/bin/gdb
+    /usr/bin/gdb (interpreter => /lib64/ld-linux-x86-64.so.2)
+    libtinfo.so.6 => /lib64/libtinfo.so.6
+    libncursesw.so.6 => /lib64/libncursesw.so.6
+        libtinfow.so.6 => /lib64/libtinfow.so.6
+    ...
+and caused gdb to SIGSEGV at start.
+
+Let's consistently link against *w libraries.
+
+Note: the fix on it's own is not enough:
+- we don't pass include paths to ncursesw libraries
+- libreadline.so.7 is still linked against libtinfo.so.6 in Gentoo
+  and needs a separate fix.
+
+But it's enough to make immediate SIGSEGV to go away.
+
+Reported-by: Michał Górny
+Bug: https://bugs.gentoo.org/669096
+--- a/gdb/configure.ac
++++ b/gdb/configure.ac
+@@ -616,4 +616,4 @@ esac
+ 
+-# These are the libraries checked by Readline.
+-AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses])
++# These are the libraries checked by Readline. Not really: readline does not know about *w libs.
++AC_SEARCH_LIBS(tgetent, [termcap tinfow tinfo curses ncursesw ncurses])
+ 
+--- a/gdb/configure
++++ b/gdb/configure
+@@ -8984,3 +8984,3 @@ esac
+ 
+-# These are the libraries checked by Readline.
++# These are the libraries checked by Readline. Not really: readline does not know about *w libs.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
+@@ -9009,3 +9009,3 @@ return tgetent ();
+ _ACEOF
+-for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
++for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
+   if test -z "$ac_lib"; then

diff --git a/sys-devel/gdb/gdb-8.2-r1.ebuild b/sys-devel/gdb/gdb-8.2-r1.ebuild
new file mode 100644
index 00000000000..d7f7e1ef262
--- /dev/null
+++ b/sys-devel/gdb/gdb-8.2-r1.ebuild
@@ -0,0 +1,261 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit epatch eutils flag-o-matic python-single-r1
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+RPM=
+MY_PV=${PV}
+case ${PV} in
+9999*)
+	# live git tree
+	EGIT_REPO_URI="git://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"
+	;;
+*.*.*.*.*.*)
+	# fedora versions; note we swap the rpm & fedora core versions.
+	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
+	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
+	inherit versionator rpm
+	gvcr() { get_version_component_range "$@"; }
+	parse_fedora_ver() {
+		set -- $(get_version_components)
+		MY_PV=$(gvcr 1-$(( $# - 2 )))
+		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
+	}
+	parse_fedora_ver
+	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
+	;;
+*)
+	# Normal upstream release
+	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
+		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
+	;;
+esac
+
+PATCH_VER="1"
+PATCH_DEV="slyfox"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="https://sourceware.org/gdb/"
+SRC_URI="${SRC_URI}
+	${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PN}-8.1-patches-${PATCH_VER}.tar.xz}
+	${PATCH_VER:+mirror://gentoo/${PN}-8.1-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 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+IUSE="+client lzma multitarget nls +python +server test vanilla xml"
+REQUIRED_USE="
+	python? ( ${PYTHON_REQUIRED_USE} )
+	|| ( client server )
+"
+
+RDEPEND="
+	server? ( !dev-util/gdbserver )
+	client? (
+		dev-libs/mpfr:0=
+		>=sys-libs/ncurses-5.2-r2:0=
+		sys-libs/readline:0=
+		lzma? ( app-arch/xz-utils )
+		python? ( ${PYTHON_DEPS} )
+		xml? ( dev-libs/expat )
+		sys-libs/zlib
+	)"
+DEPEND="${RDEPEND}
+	app-arch/xz-utils
+	sys-apps/texinfo
+	client? (
+		virtual/yacc
+		test? ( dev-util/dejagnu )
+		nls? ( sys-devel/gettext )
+	)"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
+
+	# upstreamed
+	EPATCH_EXCLUDE+=" 01_all_ia64-TRAP_HWBKPT.patch"
+	EPATCH_EXCLUDE+=" 02_all_solaris-no-uuidsys.patch"
+	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+	eapply "${FILESDIR}"/${P}-tinfow.patch
+
+	default
+
+	strip-linguas -u bfd/po opcodes/po
+}
+
+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=(
+		--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}
+	)
+	local sysroot="${EPREFIX}/usr/${CTARGET}"
+	is_cross && myconf+=(
+		--with-sysroot="${sysroot}"
+		--includedir="${sysroot}/usr/include"
+		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
+	)
+
+	if use server && ! use client ; then
+		# just configure+build in the gdbserver subdir to speed things up
+		cd gdb/gdbserver
+		myconf+=( --program-transform-name='' )
+	else
+		# 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.
+		is_cross \
+			&& myconf+=( --disable-gdbserver ) \
+			|| myconf+=( $(use_enable server gdbserver auto) )
+	fi
+
+	if ! ( use server && ! use client ) ; then
+		# if we are configuring in the top level, then use all
+		# the additional global options
+		myconf+=(
+			--enable-64-bit-bfd
+			--disable-install-libbfd
+			--disable-install-libiberty
+			# Disable guile for now as it requires guile-2.x #562902
+			--without-guile
+			# 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 multitarget && echo --enable-targets=all)
+			$(use_with python python "${EPYTHON}")
+		)
+	fi
+	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
+
+	econf "${myconf[@]}"
+}
+
+src_test() {
+	nonfatal emake check || ewarn "tests failed"
+}
+
+src_install() {
+	if use server && ! use client; then
+		cd gdb/gdbserver || die
+	fi
+	default
+	if use client; then
+		find "${ED}"/usr -name libiberty.a -delete || die
+	fi
+	cd "${S}" || 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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
+
+	if use client ; then
+		docinto gdb
+		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+	fi
+	docinto sim
+	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
+	if use server ; then
+		docinto gdbserver
+		dodoc gdb/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*
+
+	# gcore is part of ubin on freebsd
+	if [[ ${CHOST} == *-freebsd* ]]; then
+		rm "${ED}"/usr/bin/gcore || die
+	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
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2019-01-28 22:01 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2019-01-28 22:01 UTC (permalink / raw
  To: gentoo-commits

commit:     46f7eccbcb65b1b4b6802480250c153d05854c35
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 28 22:00:25 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jan 28 22:00:53 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46f7eccb

sys-devel/gdb: pull aarch64-musl fix, bug #676620

Reported-by: eroen
Closes: https://bugs.gentoo.org/676620
Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/gdb/files/gdb-8.2.1-aarch64-musl.patch | 49 ++++++++++++++++++++++++
 sys-devel/gdb/gdb-8.2.1.ebuild                   |  3 +-
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/sys-devel/gdb/files/gdb-8.2.1-aarch64-musl.patch b/sys-devel/gdb/files/gdb-8.2.1-aarch64-musl.patch
new file mode 100644
index 00000000000..70f42df90a9
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-8.2.1-aarch64-musl.patch
@@ -0,0 +1,49 @@
+https://bugs.gentoo.org/676620
+
+From 51b4f73a37c2e7eec31e932fc3c8dae879735f63 Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <szabolcs.nagy@arm.com>
+Date: Thu, 13 Dec 2018 17:47:17 +0000
+Subject: [PATCH] AArch64: Fix the gdb build with musl libc
+
+Including asm/sigcontext.h together with libc headers is not valid. In
+general linux headers may not work with libc headers, so mixing them
+should be avoided, especially when the linux header defines types that
+are also exposed in libc headers.
+
+In case of asm/sigcontext.h glibc happens to work because glibc signal.h
+directly includes it, but e.g. in musl libc signal.h replicates the
+sigcontext.h definitions in an abi compatible way which are in conflict
+with the linux definitions when both headers are included.
+
+Since old linux headers or old libc headers may not have the necessary
+definitions, gdb has to replicate the definitions it relies on anyway.
+Which is fine since all definitions must be ABI stable. For linux apis
+that are not available via libc headers, replicating the definitions in
+gdb is the most reliable way to use them.
+
+Note: asm/ptrace.h includes asm/sigcontext.h in some versions of linux
+headers, which is just as problematic and should be fixed in linux.
+
+gdb/ChangeLog:
+
+	* nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
+	asm/sigcontext.h.
+---
+ gdb/ChangeLog                      | 5 +++++
+ gdb/nat/aarch64-sve-linux-ptrace.h | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+--- a/gdb/nat/aarch64-sve-linux-ptrace.h
++++ b/gdb/nat/aarch64-sve-linux-ptrace.h
+@@ -20,7 +20,7 @@
+ #ifndef AARCH64_SVE_LINUX_PTRACE_H
+ #define AARCH64_SVE_LINUX_PTRACE_H
+ 
+-#include <asm/sigcontext.h>
++#include <signal.h>
+ #include <sys/utsname.h>
+ #include <sys/ptrace.h>
+ #include <asm/ptrace.h>
+-- 
+2.20.1
+

diff --git a/sys-devel/gdb/gdb-8.2.1.ebuild b/sys-devel/gdb/gdb-8.2.1.ebuild
index c7a030aa640..57cee06eec9 100644
--- a/sys-devel/gdb/gdb-8.2.1.ebuild
+++ b/sys-devel/gdb/gdb-8.2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -93,6 +93,7 @@ S=${WORKDIR}/${PN}-${MY_PV}
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.2-tinfow.patch
 	"${FILESDIR}"/${PN}-8.2-sparc-fix-syntax.patch
+	"${FILESDIR}"/${PN}-8.2.1-aarch64-musl.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2019-03-14 22:49 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2019-03-14 22:49 UTC (permalink / raw
  To: gentoo-commits

commit:     890e99a6aef35c3e8c9a828bdf5ca9eafec6a1bb
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 14 22:49:20 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Mar 14 22:49:37 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=890e99a6

sys-devel/gdb: fix build against -std=c++17

Patch is proposed upstream as:
https://sourceware.org/ml/gdb-patches/2019-03/msg00306.html

Reported-by: Helmut Jarausch
Closes: https://bugs.gentoo.org/680232
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch | 19 +++++++++++++++++++
 sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild         |  1 +
 2 files changed, 20 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch b/sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch
new file mode 100644
index 00000000000..c134cbcae8d
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/680232
+
+--- a/gdb/unittests/string_view-selftests.c
++++ b/gdb/unittests/string_view-selftests.c
+@@ -170,10 +170,12 @@ run_tests ()
+ } /* namespace string_view */
+ } /* namespace selftests */
+ 
++#endif /* __cplusplus < 201703L */
++
+ void
+ _initialize_string_view_selftests ()
+ {
++#if defined(GDB_STRING_VIEW)
+   selftests::register_test ("string_view", selftests::string_view::run_tests);
++#endif
+ }
+-
+-#endif /* __cplusplus < 201703L */

diff --git a/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild b/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild
index eda29eb876a..3b02bda0bd9 100644
--- a/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild
+++ b/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild
@@ -95,6 +95,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${P}-source-highlight.patch
+	"${FILESDIR}"/${P}-c++17.patch
 )
 
 S=${WORKDIR}/${PN}-${MY_PV}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2019-08-09 20:50 Andreas K. Hüttel
  0 siblings, 0 replies; 18+ messages in thread
From: Andreas K. Hüttel @ 2019-08-09 20:50 UTC (permalink / raw
  To: gentoo-commits

commit:     929a060890bd8cd0ffd4eda91cab3682fd137a5e
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  9 20:50:10 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Aug  9 20:50:10 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=929a0608

sys-devel/gdb: Remove old

Versions prior to 8.3 cannot handle debug info built with
binutils 2.32 and later. Old binutils will be masked because
of CVEs.

Package-Manager: Portage-2.3.70, Repoman-2.3.16
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/gdb/Manifest                             |   8 -
 sys-devel/gdb/files/gdb-7.12.1-ia64-include.patch  |  26 --
 sys-devel/gdb/files/gdb-8.2-sparc-fix-syntax.patch |  10 -
 sys-devel/gdb/files/gdb-8.2-tinfow.patch           |  44 ----
 sys-devel/gdb/files/gdb-8.2.1-aarch64-musl.patch   |  49 ----
 sys-devel/gdb/gdb-7.10.1.ebuild                    | 235 ------------------
 sys-devel/gdb/gdb-7.12.1.ebuild                    | 236 ------------------
 sys-devel/gdb/gdb-7.9.1.ebuild                     | 221 -----------------
 sys-devel/gdb/gdb-8.1-r1.ebuild                    | 257 --------------------
 sys-devel/gdb/gdb-8.1-r2.ebuild                    | 256 --------------------
 sys-devel/gdb/gdb-8.1.1.ebuild                     | 256 --------------------
 sys-devel/gdb/gdb-8.2-r1.ebuild                    | 265 ---------------------
 sys-devel/gdb/gdb-8.2.1.ebuild                     | 262 --------------------
 sys-devel/gdb/gdb-8.2.ebuild                       | 260 --------------------
 14 files changed, 2385 deletions(-)

diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
index 9ca691037e8..6a9e27259f5 100644
--- a/sys-devel/gdb/Manifest
+++ b/sys-devel/gdb/Manifest
@@ -1,9 +1 @@
-DIST gdb-7.10.1.tar.xz 18531436 BLAKE2B b50a1b6b5b867e4a52943fdc4992c654ceec180099771381df78de5ba79086e822264356a762c61b89e986407d6f0cce336be216276545591e637131dc02f4a8 SHA512 17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010
-DIST gdb-7.12.1.tar.xz 19225392 BLAKE2B 2e4b7fe69c3cb11c04b505d1e110bf0a9ca65b6178f3e6a6ccc11fde1e8750b595016baf64adb2c22903d346cec1dab15574681de812ac8d260aebf4152a3027 SHA512 0ac8d0a495103611ef41167a08313a010dce6ca4c6d827cbe8558a0c1a1a8a6bfa53f1b7704251289cababbfaaf9e075550cdf741a54d6cd9ca3433d910efcd8
-DIST gdb-7.9.1.tar.xz 17867692 BLAKE2B f5de07a4ebf1a5112a1b40341b217d08f1eb6820eb2237a4be2cd289f832600b81b3c14f4632a762fdc13945a2fb65ffb58f13eb330f3d48892799e27bb62c87 SHA512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414
-DIST gdb-8.1-patches-1.tar.xz 8768 BLAKE2B 792ceddcb8eafd028db23d69ad5d9eb00223722520c6ff0a23a24fee1a33dceb02f05e61a1d6c3700835c480b38d66f43f71ef3c4af406d4ae1147eaaf8f311e SHA512 87a5c9d9207817245e1ffd07fdad2cb566de4fc11725aa0e49e58268c3ab1ae3b4b9f4b9faa55acc8cb4c3c7cb5a3875ea7da02abeb8f775953a8aed2e2c6403
-DIST gdb-8.1.1.tar.xz 20064728 BLAKE2B bd17a27a3974a34b94aa5898a97cf26dba9e91b815f25e6a0d67a7b4bc718ed2701a38cddbbfddce087c5d2d24c596daee4f06ea1acfe662f47a909409815311 SHA512 7dcd5e8c90de92f577834d887b5f54edb93a07083bfe661bc46c270a6cc4919f0b348e7e2fe8ae4511298a570ef150eeefdc667ef7cf527f0cf60943177ab6c9
-DIST gdb-8.1.tar.xz 20095080 BLAKE2B 9332058b8b723261ba215124f42a2d6ba916219efdfb3c23ae1f48fecf131c801bbd31b345f2c8339b23d74da690be0260ac31f8f2e79549b62f0880199bfdec SHA512 ffd82f415d7652d62dad1716c307836f594217a363429609beb7d70239e8bf06b73b393345b0e000796228e56681ed7656ac3c8be05e91d6d652ab0d5b1dc357
-DIST gdb-8.2.1.tar.xz 20170388 BLAKE2B 4008232de312ee71d379ac32a0ee6d63a828c0b58e84799ab9148760ce184400920f7b22c204b9878b09c452412b1b4db507a9185456dc973538de8b88483259 SHA512 2aa81cfd389bb48c35d7d9f95cc10e88b4f7ad4597bdde0f8f1fd312f60f10d9fb2cc6e5a9355227d89ff328f7feb0fc411a69394560cafeb9fa75d35d896d11
-DIST gdb-8.2.tar.xz 20173112 BLAKE2B 921fdc02f7192f0bd76eb176f857c9c041b7316dc10c5e800eb81deef82a3186d511ec431145f952e5fbd20a4b2c89c14652c42dc52e0d8152acd811f3ae44a7 SHA512 11cc481bebc51eb6db73249ecb62b8c07455cf3db169f4860b3a83114849fbd2b5860a2db64488ba6c5909cf07b255c04770f1e36059eae6bee16d2a3581be90
 DIST gdb-8.3.tar.xz 20490300 BLAKE2B 24b2a2a9bda7ae8093f757e42d6d0ab5642ff1d7e5a832896c28c5b17961166072c0dae158c04d7f7660cb059194c259bcff71ad5763960027b0ac3d7045eb1a SHA512 47ac074d20a09a3fac8f4a41dce0a0cbe6ef702f7dc21ba8b7d650d306128dcae481e9a16bf65e596b3a541dc82ae57c02bcbb786d551b4ef3e2917b9b6f0ae1

diff --git a/sys-devel/gdb/files/gdb-7.12.1-ia64-include.patch b/sys-devel/gdb/files/gdb-7.12.1-ia64-include.patch
deleted file mode 100644
index 3b910da4227..00000000000
--- a/sys-devel/gdb/files/gdb-7.12.1-ia64-include.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-fixes build failure on ia64
-
-It's a backport of upstream fix by Émeric Maschino
-https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8
-https://bugs.gentoo.org/658014
---- a/gdb/nat/linux-ptrace.c	2017-01-21 14:48:42.000000000 +0100
-+++ b/gdb/nat/linux-ptrace.c	2018-06-20 00:03:40.520317323 +0200
-@@ -21,8 +21,6 @@
- #include "linux-procfs.h"
- #include "linux-waitpid.h"
- #include "buffer.h"
--#include "gdb_wait.h"
--#include "gdb_ptrace.h"
- #include <sys/procfs.h>
- 
- /* Stores the ptrace options supported by the running kernel.
---- a/gdb/nat/linux-ptrace.h	2017-01-21 14:46:47.000000000 +0100
-+++ b/gdb/nat/linux-ptrace.h	2018-06-20 00:04:28.706220951 +0200
-@@ -21,6 +21,7 @@
- struct buffer;
- 
- #include "nat/gdb_ptrace.h"
-+#include "gdb_wait.h"
- 
- #ifdef __UCLIBC__
- #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))

diff --git a/sys-devel/gdb/files/gdb-8.2-sparc-fix-syntax.patch b/sys-devel/gdb/files/gdb-8.2-sparc-fix-syntax.patch
deleted file mode 100644
index 5ed32c04fd7..00000000000
--- a/sys-devel/gdb/files/gdb-8.2-sparc-fix-syntax.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-Fix invalid c++: https://bugs.gentoo.org/671726
---- a/gdb/sparc-linux-nat.c
-+++ b/gdb/sparc-linux-nat.c
-@@ -36,5 +36,5 @@ public:
-   { sparc_fetch_inferior_registers (regcache, regnum); }
- 
--  void store_registers (struct regcache *regcache, int regnum) override;
-+  void store_registers (struct regcache *regcache, int regnum) override
-   { sparc_store_inferior_registers (regcache, regnum); }
- };

diff --git a/sys-devel/gdb/files/gdb-8.2-tinfow.patch b/sys-devel/gdb/files/gdb-8.2-tinfow.patch
deleted file mode 100644
index 48f6109664a..00000000000
--- a/sys-devel/gdb/files/gdb-8.2-tinfow.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Try to link gdb against tinfow first, then tinfo.
-
-In bug #669096 gdb was directly linked both
-to libtinfo.so.6 and libncursesw.so.6:
-    $ lddtree /usr/bin/gdb
-    /usr/bin/gdb (interpreter => /lib64/ld-linux-x86-64.so.2)
-    libtinfo.so.6 => /lib64/libtinfo.so.6
-    libncursesw.so.6 => /lib64/libncursesw.so.6
-        libtinfow.so.6 => /lib64/libtinfow.so.6
-    ...
-and caused gdb to SIGSEGV at start.
-
-Let's consistently link against *w libraries.
-
-Note: the fix on it's own is not enough:
-- we don't pass include paths to ncursesw libraries
-- libreadline.so.7 is still linked against libtinfo.so.6 in Gentoo
-  and needs a separate fix.
-
-But it's enough to make immediate SIGSEGV to go away.
-
-Reported-by: Michał Górny
-Bug: https://bugs.gentoo.org/669096
---- a/gdb/configure.ac
-+++ b/gdb/configure.ac
-@@ -616,4 +616,4 @@ esac
- 
--# These are the libraries checked by Readline.
--AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses])
-+# These are the libraries checked by Readline. Not really: readline does not know about *w libs.
-+AC_SEARCH_LIBS(tgetent, [termcap tinfow tinfo curses ncursesw ncurses])
- 
---- a/gdb/configure
-+++ b/gdb/configure
-@@ -8984,3 +8984,3 @@ esac
- 
--# These are the libraries checked by Readline.
-+# These are the libraries checked by Readline. Not really: readline does not know about *w libs.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
-@@ -9009,3 +9009,3 @@ return tgetent ();
- _ACEOF
--for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
-+for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
-   if test -z "$ac_lib"; then

diff --git a/sys-devel/gdb/files/gdb-8.2.1-aarch64-musl.patch b/sys-devel/gdb/files/gdb-8.2.1-aarch64-musl.patch
deleted file mode 100644
index 70f42df90a9..00000000000
--- a/sys-devel/gdb/files/gdb-8.2.1-aarch64-musl.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-https://bugs.gentoo.org/676620
-
-From 51b4f73a37c2e7eec31e932fc3c8dae879735f63 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <szabolcs.nagy@arm.com>
-Date: Thu, 13 Dec 2018 17:47:17 +0000
-Subject: [PATCH] AArch64: Fix the gdb build with musl libc
-
-Including asm/sigcontext.h together with libc headers is not valid. In
-general linux headers may not work with libc headers, so mixing them
-should be avoided, especially when the linux header defines types that
-are also exposed in libc headers.
-
-In case of asm/sigcontext.h glibc happens to work because glibc signal.h
-directly includes it, but e.g. in musl libc signal.h replicates the
-sigcontext.h definitions in an abi compatible way which are in conflict
-with the linux definitions when both headers are included.
-
-Since old linux headers or old libc headers may not have the necessary
-definitions, gdb has to replicate the definitions it relies on anyway.
-Which is fine since all definitions must be ABI stable. For linux apis
-that are not available via libc headers, replicating the definitions in
-gdb is the most reliable way to use them.
-
-Note: asm/ptrace.h includes asm/sigcontext.h in some versions of linux
-headers, which is just as problematic and should be fixed in linux.
-
-gdb/ChangeLog:
-
-	* nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
-	asm/sigcontext.h.
----
- gdb/ChangeLog                      | 5 +++++
- gdb/nat/aarch64-sve-linux-ptrace.h | 2 +-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
---- a/gdb/nat/aarch64-sve-linux-ptrace.h
-+++ b/gdb/nat/aarch64-sve-linux-ptrace.h
-@@ -20,7 +20,7 @@
- #ifndef AARCH64_SVE_LINUX_PTRACE_H
- #define AARCH64_SVE_LINUX_PTRACE_H
- 
--#include <asm/sigcontext.h>
-+#include <signal.h>
- #include <sys/utsname.h>
- #include <sys/ptrace.h>
- #include <asm/ptrace.h>
--- 
-2.20.1
-

diff --git a/sys-devel/gdb/gdb-7.10.1.ebuild b/sys-devel/gdb/gdb-7.10.1.ebuild
deleted file mode 100644
index c257be6a84d..00000000000
--- a/sys-devel/gdb/gdb-7.10.1.ebuild
+++ /dev/null
@@ -1,235 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_5} )
-
-inherit flag-o-matic eutils python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-case ${PV} in
-9999*)
-	# live git tree
-	EGIT_REPO_URI="git://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"
-	;;
-*.*.*.*.*.*)
-	# fedora versions; note we swap the rpm & fedora core versions.
-	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
-	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
-	inherit versionator rpm
-	gvcr() { get_version_component_range "$@"; }
-	parse_fedora_ver() {
-		set -- $(get_version_components)
-		MY_PV=$(gvcr 1-$(( $# - 2 )))
-		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
-	}
-	parse_fedora_ver
-	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
-	;;
-*)
-	# Normal upstream release
-	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
-		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
-	;;
-esac
-
-PATCH_VER=""
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
-
-LICENSE="GPL-2 LGPL-2"
-SLOT="0"
-if [[ ${PV} != 9999* ]] ; then
-	# alpha #562128
-	KEYWORDS="-alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client expat lzma multitarget nls +python +server test vanilla"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-RDEPEND="server? ( !dev-util/gdbserver )
-	client? (
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		expat? ( dev-libs/expat )
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		sys-libs/zlib
-	)"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
-	epatch_user
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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=(
-		--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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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 expat)
-			$(use_with lzma)
-			$(use_enable nls)
-			$(use multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPYTHON}")
-		)
-	fi
-
-	econf "${myconf[@]}"
-}
-
-src_test() {
-	nonfatal emake check || ewarn "tests failed"
-}
-
-src_install() {
-	use server && ! use client && cd gdb/gdbserver
-	default
-	use client && find "${ED}"/usr -name libiberty.a -delete
-	cd "${S}"
-
-	# 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
-	fi
-
-	# Don't install docs when building a cross-gdb
-	if [[ ${CTARGET} != ${CHOST} ]] ; then
-		rm -r "${ED}"/usr/share/{doc,info,locale}
-		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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-}
-
-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-7.12.1.ebuild b/sys-devel/gdb/gdb-7.12.1.ebuild
deleted file mode 100644
index 5ca8e9079ae..00000000000
--- a/sys-devel/gdb/gdb-7.12.1.ebuild
+++ /dev/null
@@ -1,236 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_5} )
-
-inherit flag-o-matic eutils python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-case ${PV} in
-9999*)
-	# live git tree
-	EGIT_REPO_URI="git://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"
-	;;
-*.*.*.*.*.*)
-	# fedora versions; note we swap the rpm & fedora core versions.
-	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
-	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
-	inherit versionator rpm
-	gvcr() { get_version_component_range "$@"; }
-	parse_fedora_ver() {
-		set -- $(get_version_components)
-		MY_PV=$(gvcr 1-$(( $# - 2 )))
-		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
-	}
-	parse_fedora_ver
-	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
-	;;
-*)
-	# Normal upstream release
-	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
-		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
-	;;
-esac
-
-PATCH_VER=""
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
-
-LICENSE="GPL-2 LGPL-2"
-SLOT="0"
-if [[ ${PV} != 9999* ]] ; then
-	# alpha #562128
-	KEYWORDS="-alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client lzma multitarget nls +python +server test vanilla xml"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-RDEPEND="server? ( !dev-util/gdbserver )
-	client? (
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
-	epatch "${FILESDIR}"/${P}-ia64-include.patch #655270
-	epatch_user
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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=(
-		--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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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 multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPYTHON}")
-		)
-	fi
-
-	econf "${myconf[@]}"
-}
-
-src_test() {
-	nonfatal emake check || ewarn "tests failed"
-}
-
-src_install() {
-	use server && ! use client && cd gdb/gdbserver
-	default
-	use client && find "${ED}"/usr -name libiberty.a -delete
-	cd "${S}"
-
-	# 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
-	fi
-
-	# Don't install docs when building a cross-gdb
-	if [[ ${CTARGET} != ${CHOST} ]] ; then
-		rm -r "${ED}"/usr/share/{doc,info,locale}
-		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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-}
-
-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-7.9.1.ebuild b/sys-devel/gdb/gdb-7.9.1.ebuild
deleted file mode 100644
index 12d5daf6084..00000000000
--- a/sys-devel/gdb/gdb-7.9.1.ebuild
+++ /dev/null
@@ -1,221 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python2_7 )
-
-inherit flag-o-matic eutils python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-case ${PV} in
-9999*)
-	# live git tree
-	EGIT_REPO_URI="git://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"
-	;;
-*.*.*.*.*.*)
-	# fedora versions; note we swap the rpm & fedora core versions.
-	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
-	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
-	inherit versionator rpm
-	gvcr() { get_version_component_range "$@"; }
-	parse_fedora_ver() {
-		set -- $(get_version_components)
-		MY_PV=$(gvcr 1-$(( $# - 2 )))
-		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
-	}
-	parse_fedora_ver
-	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
-	;;
-*)
-	# Normal upstream release
-	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
-		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
-	;;
-esac
-
-PATCH_VER=""
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
-
-LICENSE="GPL-2 LGPL-2"
-SLOT="0"
-if [[ ${PV} != 9999* ]] ; then
-	KEYWORDS="alpha"
-fi
-IUSE="+client expat lzma multitarget nls +python +server test vanilla zlib"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-RDEPEND="server? ( !dev-util/gdbserver )
-	client? (
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		expat? ( dev-libs/expat )
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		zlib? ( sys-libs/zlib )
-	)"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
-	epatch_user
-	strip-linguas -u bfd/po opcodes/po
-}
-
-gdb_branding() {
-	printf "Gentoo ${PV} "
-	if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
-		printf "p${PATCH_VER}"
-	else
-		printf "vanilla"
-	fi
-}
-
-src_configure() {
-	strip-unsupported-flags
-
-	local myconf=(
-		--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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# This only disables building in the readline subdir.
-			# For gdb itself, it'll use the system version.
-			--disable-readline
-			--with-system-readline
-			--with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
-			$(use_with expat)
-			$(use_with lzma)
-			$(use_enable nls)
-			$(use multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPYTHON}")
-			$(use_with zlib)
-		)
-	fi
-
-	econf "${myconf[@]}"
-}
-
-src_test() {
-	nonfatal emake check || ewarn "tests failed"
-}
-
-src_install() {
-	use server && ! use client && cd gdb/gdbserver
-	default
-	use client && find "${ED}"/usr -name libiberty.a -delete
-	cd "${S}"
-
-	# Don't install docs when building a cross-gdb
-	if [[ ${CTARGET} != ${CHOST} ]] ; then
-		rm -r "${ED}"/usr/share/{doc,info,locale}
-		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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-}
-
-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-8.1-r1.ebuild b/sys-devel/gdb/gdb-8.1-r1.ebuild
deleted file mode 100644
index eb10f901b4a..00000000000
--- a/sys-devel/gdb/gdb-8.1-r1.ebuild
+++ /dev/null
@@ -1,257 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_5,3_6} )
-
-inherit epatch eutils flag-o-matic python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-case ${PV} in
-9999*)
-	# live git tree
-	EGIT_REPO_URI="git://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"
-	;;
-*.*.*.*.*.*)
-	# fedora versions; note we swap the rpm & fedora core versions.
-	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
-	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
-	inherit versionator rpm
-	gvcr() { get_version_component_range "$@"; }
-	parse_fedora_ver() {
-		set -- $(get_version_components)
-		MY_PV=$(gvcr 1-$(( $# - 2 )))
-		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
-	}
-	parse_fedora_ver
-	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
-	;;
-*)
-	# Normal upstream release
-	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
-		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
-	;;
-esac
-
-PATCH_VER="1"
-PATCH_DEV="slyfox"
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
-	${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PN}-8.1-patches-${PATCH_VER}.tar.xz}
-	${PATCH_VER:+mirror://gentoo/${PN}-8.1-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 ~s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client lzma multitarget nls +python +server test vanilla xml"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-RDEPEND="
-	dev-libs/mpfr:=
-	server? ( !dev-util/gdbserver )
-	client? (
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
-
-	default
-
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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=(
-		--with-pkgversion="$(gdb_branding)"
-		--with-bugurl='https://bugs.gentoo.org/'
-		--with-mpfr
-		--disable-werror
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{binutils,etc,gas,gold,gprof,ld}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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 multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPYTHON}")
-		)
-	fi
-	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
-
-	econf "${myconf[@]}"
-}
-
-src_test() {
-	nonfatal emake check || ewarn "tests failed"
-}
-
-src_install() {
-	if use server && ! use client; then
-		cd gdb/gdbserver || die
-	fi
-	default
-	if use client; then
-		find "${ED}"/usr -name libiberty.a -delete || die
-	fi
-	cd "${S}" || 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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-
-	# gcore is part of ubin on freebsd
-	if [[ ${CHOST} == *-freebsd* ]]; then
-		rm "${ED}"/usr/bin/gcore || die
-	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-8.1-r2.ebuild b/sys-devel/gdb/gdb-8.1-r2.ebuild
deleted file mode 100644
index 19b1e9074ca..00000000000
--- a/sys-devel/gdb/gdb-8.1-r2.ebuild
+++ /dev/null
@@ -1,256 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_5,3_6} )
-
-inherit epatch eutils flag-o-matic python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-case ${PV} in
-9999*)
-	# live git tree
-	EGIT_REPO_URI="git://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"
-	;;
-*.*.*.*.*.*)
-	# fedora versions; note we swap the rpm & fedora core versions.
-	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
-	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
-	inherit versionator rpm
-	gvcr() { get_version_component_range "$@"; }
-	parse_fedora_ver() {
-		set -- $(get_version_components)
-		MY_PV=$(gvcr 1-$(( $# - 2 )))
-		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
-	}
-	parse_fedora_ver
-	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
-	;;
-*)
-	# Normal upstream release
-	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
-		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
-	;;
-esac
-
-PATCH_VER="1"
-PATCH_DEV="slyfox"
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
-	${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PN}-8.1-patches-${PATCH_VER}.tar.xz}
-	${PATCH_VER:+mirror://gentoo/${PN}-8.1-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 s390 sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client lzma multitarget nls +python +server test vanilla xml"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-RDEPEND="
-	server? ( !dev-util/gdbserver )
-	client? (
-		dev-libs/mpfr:0=
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
-
-	default
-
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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=(
-		--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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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 multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPYTHON}")
-		)
-	fi
-	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
-
-	econf "${myconf[@]}"
-}
-
-src_test() {
-	nonfatal emake check || ewarn "tests failed"
-}
-
-src_install() {
-	if use server && ! use client; then
-		cd gdb/gdbserver || die
-	fi
-	default
-	if use client; then
-		find "${ED}"/usr -name libiberty.a -delete || die
-	fi
-	cd "${S}" || 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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-
-	# gcore is part of ubin on freebsd
-	if [[ ${CHOST} == *-freebsd* ]]; then
-		rm "${ED}"/usr/bin/gcore || die
-	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-8.1.1.ebuild b/sys-devel/gdb/gdb-8.1.1.ebuild
deleted file mode 100644
index 07f3c40d6f8..00000000000
--- a/sys-devel/gdb/gdb-8.1.1.ebuild
+++ /dev/null
@@ -1,256 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_5,3_6} )
-
-inherit epatch eutils flag-o-matic python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-case ${PV} in
-9999*)
-	# live git tree
-	EGIT_REPO_URI="git://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"
-	;;
-*.*.*.*.*.*)
-	# fedora versions; note we swap the rpm & fedora core versions.
-	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
-	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
-	inherit versionator rpm
-	gvcr() { get_version_component_range "$@"; }
-	parse_fedora_ver() {
-		set -- $(get_version_components)
-		MY_PV=$(gvcr 1-$(( $# - 2 )))
-		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
-	}
-	parse_fedora_ver
-	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
-	;;
-*)
-	# Normal upstream release
-	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
-		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
-	;;
-esac
-
-PATCH_VER="1"
-PATCH_DEV="slyfox"
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
-	${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PN}-8.1-patches-${PATCH_VER}.tar.xz}
-	${PATCH_VER:+mirror://gentoo/${PN}-8.1-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 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client lzma multitarget nls +python +server test vanilla xml"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-RDEPEND="
-	server? ( !dev-util/gdbserver )
-	client? (
-		dev-libs/mpfr:0=
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
-
-	default
-
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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=(
-		--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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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 multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPYTHON}")
-		)
-	fi
-	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
-
-	econf "${myconf[@]}"
-}
-
-src_test() {
-	nonfatal emake check || ewarn "tests failed"
-}
-
-src_install() {
-	if use server && ! use client; then
-		cd gdb/gdbserver || die
-	fi
-	default
-	if use client; then
-		find "${ED}"/usr -name libiberty.a -delete || die
-	fi
-	cd "${S}" || 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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-
-	# gcore is part of ubin on freebsd
-	if [[ ${CHOST} == *-freebsd* ]]; then
-		rm "${ED}"/usr/bin/gcore || die
-	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-8.2-r1.ebuild b/sys-devel/gdb/gdb-8.2-r1.ebuild
deleted file mode 100644
index df5d7e5091a..00000000000
--- a/sys-devel/gdb/gdb-8.2-r1.ebuild
+++ /dev/null
@@ -1,265 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
-
-inherit epatch eutils flag-o-matic python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-case ${PV} in
-9999*)
-	# live git tree
-	EGIT_REPO_URI="git://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"
-	;;
-*.*.*.*.*.*)
-	# fedora versions; note we swap the rpm & fedora core versions.
-	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
-	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
-	inherit versionator rpm
-	gvcr() { get_version_component_range "$@"; }
-	parse_fedora_ver() {
-		set -- $(get_version_components)
-		MY_PV=$(gvcr 1-$(( $# - 2 )))
-		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
-	}
-	parse_fedora_ver
-	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
-	;;
-*)
-	# Normal upstream release
-	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
-		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
-	;;
-esac
-
-PATCH_VER="1"
-PATCH_DEV="slyfox"
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
-	${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PN}-8.1-patches-${PATCH_VER}.tar.xz}
-	${PATCH_VER:+mirror://gentoo/${PN}-8.1-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 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client lzma multitarget nls +python +server test vanilla xml"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-RDEPEND="
-	server? ( !dev-util/gdbserver )
-	client? (
-		dev-libs/mpfr:0=
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-PATCHES=(
-	"${FILESDIR}"/${P}-tinfow.patch
-	"${FILESDIR}"/${P}-sparc-fix-syntax.patch
-)
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-
-	# upstreamed
-	EPATCH_EXCLUDE+=" 01_all_ia64-TRAP_HWBKPT.patch"
-	EPATCH_EXCLUDE+=" 02_all_solaris-no-uuidsys.patch"
-	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
-
-	default
-
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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=(
-		--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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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 multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPYTHON}")
-		)
-	fi
-	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
-
-	econf "${myconf[@]}"
-}
-
-src_test() {
-	nonfatal emake check || ewarn "tests failed"
-}
-
-src_install() {
-	if use server && ! use client; then
-		cd gdb/gdbserver || die
-	fi
-	default
-	if use client; then
-		find "${ED}"/usr -name libiberty.a -delete || die
-	fi
-	cd "${S}" || 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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-
-	# gcore is part of ubin on freebsd
-	if [[ ${CHOST} == *-freebsd* ]]; then
-		rm "${ED}"/usr/bin/gcore || die
-	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-8.2.1.ebuild b/sys-devel/gdb/gdb-8.2.1.ebuild
deleted file mode 100644
index 290a0081c16..00000000000
--- a/sys-devel/gdb/gdb-8.2.1.ebuild
+++ /dev/null
@@ -1,262 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
-
-inherit eutils flag-o-matic python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-case ${PV} in
-9999*)
-	# live git tree
-	EGIT_REPO_URI="git://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"
-	;;
-*.*.*.*.*.*)
-	# fedora versions; note we swap the rpm & fedora core versions.
-	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
-	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
-	inherit versionator rpm
-	gvcr() { get_version_component_range "$@"; }
-	parse_fedora_ver() {
-		set -- $(get_version_components)
-		MY_PV=$(gvcr 1-$(( $# - 2 )))
-		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
-	}
-	parse_fedora_ver
-	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
-	;;
-*)
-	# Normal upstream release
-	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
-		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
-	;;
-esac
-
-PATCH_VER="1"
-PATCH_DEV="slyfox"
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
-	${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PN}-8.1-patches-${PATCH_VER}.tar.xz}
-	${PATCH_VER:+mirror://gentoo/${PN}-8.1-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 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client lzma multitarget nls +python +server test vanilla xml"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-RDEPEND="
-	server? ( !dev-util/gdbserver )
-	client? (
-		dev-libs/mpfr:0=
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-8.2-tinfow.patch
-	"${FILESDIR}"/${PN}-8.2-sparc-fix-syntax.patch
-	"${FILESDIR}"/${PN}-8.2.1-aarch64-musl.patch
-)
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-
-	default
-
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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=(
-		--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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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 multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPYTHON}")
-		)
-	fi
-	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
-
-	econf "${myconf[@]}"
-}
-
-src_test() {
-	nonfatal emake check || ewarn "tests failed"
-}
-
-src_install() {
-	if use server && ! use client; then
-		cd gdb/gdbserver || die
-	fi
-	default
-	if use client; then
-		find "${ED}"/usr -name libiberty.a -delete || die
-	fi
-	cd "${S}" || 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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-
-	# gcore is part of ubin on freebsd
-	if [[ ${CHOST} == *-freebsd* ]]; then
-		rm "${ED}"/usr/bin/gcore || die
-	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-8.2.ebuild b/sys-devel/gdb/gdb-8.2.ebuild
deleted file mode 100644
index 6330d79ff8d..00000000000
--- a/sys-devel/gdb/gdb-8.2.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_5,3_6} )
-
-inherit epatch eutils flag-o-matic python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-case ${PV} in
-9999*)
-	# live git tree
-	EGIT_REPO_URI="git://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"
-	;;
-*.*.*.*.*.*)
-	# fedora versions; note we swap the rpm & fedora core versions.
-	# gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
-	# gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
-	inherit versionator rpm
-	gvcr() { get_version_component_range "$@"; }
-	parse_fedora_ver() {
-		set -- $(get_version_components)
-		MY_PV=$(gvcr 1-$(( $# - 2 )))
-		RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
-	}
-	parse_fedora_ver
-	SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
-	;;
-*)
-	# Normal upstream release
-	SRC_URI="mirror://gnu/gdb/${P}.tar.xz
-		ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
-	;;
-esac
-
-PATCH_VER="1"
-PATCH_DEV="slyfox"
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
-	${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PN}-8.1-patches-${PATCH_VER}.tar.xz}
-	${PATCH_VER:+mirror://gentoo/${PN}-8.1-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 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client lzma multitarget nls +python +server test vanilla xml"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-RDEPEND="
-	server? ( !dev-util/gdbserver )
-	client? (
-		dev-libs/mpfr:0=
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-
-	# upstreamed
-	EPATCH_EXCLUDE+=" 01_all_ia64-TRAP_HWBKPT.patch"
-	EPATCH_EXCLUDE+=" 02_all_solaris-no-uuidsys.patch"
-	! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
-
-	default
-
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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=(
-		--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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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 multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPYTHON}")
-		)
-	fi
-	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
-
-	econf "${myconf[@]}"
-}
-
-src_test() {
-	nonfatal emake check || ewarn "tests failed"
-}
-
-src_install() {
-	if use server && ! use client; then
-		cd gdb/gdbserver || die
-	fi
-	default
-	if use client; then
-		find "${ED}"/usr -name libiberty.a -delete || die
-	fi
-	cd "${S}" || 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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-
-	# gcore is part of ubin on freebsd
-	if [[ ${CHOST} == *-freebsd* ]]; then
-		rm "${ED}"/usr/bin/gcore || die
-	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
-}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2019-09-30 21:52 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2019-09-30 21:52 UTC (permalink / raw
  To: gentoo-commits

commit:     bb6538b02a7df594bb1e91745f153944156492cc
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 30 21:37:33 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Sep 30 21:52:02 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb6538b0

sys-devel/gdb: enable verbose gdb build, bug #695936

While tracing missing tinfo detection Victor noticed
lack of precise arguments to gdb's linker and compiler
commands.

Two issues fixed here:
- restore default V=1 build in custome Makefile snippet
- set --disable-dependency-tracking to top-level ./configure
  to reach ./configure files that actually define it.
  Top-level does not and thus tricks portage's econf()
  into not passing it on.

Reported-by: Victor Mataré
Bug: https://bugs.gentoo.org/695936
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch | 13 +++++++++++++
 sys-devel/gdb/gdb-8.3.1.ebuild                    |  9 +++++++++
 sys-devel/gdb/gdb-9999.ebuild                     |  9 +++++++++
 3 files changed, 31 insertions(+)

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
new file mode 100644
index 00000000000..06aa6084d2d
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch
@@ -0,0 +1,13 @@
+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-8.3.1.ebuild b/sys-devel/gdb/gdb-8.3.1.ebuild
index 34f58f16fba..41c20dc863f 100644
--- a/sys-devel/gdb/gdb-8.3.1.ebuild
+++ b/sys-devel/gdb/gdb-8.3.1.ebuild
@@ -88,6 +88,10 @@ BDEPEND="
 
 S=${WORKDIR}/${PN}-${MY_PV}
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+)
+
 pkg_setup() {
 	use python && python-single-r1_pkg_setup
 }
@@ -114,6 +118,11 @@ 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

diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild
index 34f58f16fba..41c20dc863f 100644
--- a/sys-devel/gdb/gdb-9999.ebuild
+++ b/sys-devel/gdb/gdb-9999.ebuild
@@ -88,6 +88,10 @@ BDEPEND="
 
 S=${WORKDIR}/${PN}-${MY_PV}
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+)
+
 pkg_setup() {
 	use python && python-single-r1_pkg_setup
 }
@@ -114,6 +118,11 @@ 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


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2020-01-21  8:24 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2020-01-21  8:24 UTC (permalink / raw
  To: gentoo-commits

commit:     85d40e7435139585667847feb0728c038676a028
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 21 08:24:37 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jan 21 08:24:52 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85d40e74

sys-devel/gdb: tweak for gcc-10

Pick upstream commit 851c0536c ("[ARM, sim] Fix build error and warnings").

Reported-by: Rolf Eike Beer
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/gdb/files/gdb-8.3.1-gcc-10.patch | 222 +++++++++++++++++++++++++++++
 sys-devel/gdb/gdb-8.3.1-r1.ebuild          |   4 +-
 2 files changed, 223 insertions(+), 3 deletions(-)

diff --git a/sys-devel/gdb/files/gdb-8.3.1-gcc-10.patch b/sys-devel/gdb/files/gdb-8.3.1-gcc-10.patch
new file mode 100644
index 00000000000..affc3b7392a
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-8.3.1-gcc-10.patch
@@ -0,0 +1,222 @@
+From 851c0536cabb661847c45c73ebd796eb3299066b Mon Sep 17 00:00:00 2001
+Date: Tue, 26 Nov 2019 12:52:56 -0300
+Subject: [PATCH] [ARM, sim] Fix build error and warnings
+From: Luis Machado <luis.machado@linaro.org>
+
+Newer GCC's have switched to -fno-common by default, and this breaks the build
+for the ARM sim, like this:
+
+binutils-gdb.git~gdb-8.3-release/sim/arm/maverick.c:65: multiple definition of `DSPsc'; libsim.a(wrapper.o):binutils-gdb.git~gdb-8.3-release/sim/arm/wrapper.c:134: first defined here
+binutils-gdb.git~gdb-8.3-release/sim/arm/maverick.c:64: multiple definition of `DSPacc'; libsim.a(wrapper.o):binutils-gdb.git~gdb-8.3-release/sim/arm/wrapper.c:133: first defined here
+binutils-gdb.git~gdb-8.3-release/sim/arm/maverick.c:63: multiple definition of `DSPregs'; libsim.a(wrapper.o):binutils-gdb.git~gdb-8.3-release/sim/arm/wrapper.c:132: first defined here
+
+I also noticed a few warnings due to mismatching types, as follows:
+
+../../../../repos/binutils-gdb/sim/arm/wrapper.c: In function ‘sim_create_inferior’:
+../../../../repos/binutils-gdb/sim/arm/wrapper.c:335:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
+       for (arg = argv; *arg != NULL; arg++)
+                ^
+../../../../repos/binutils-gdb/sim/arm/wrapper.c:342:8: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
+    arg = argv;
+        ^
+../../../../repos/binutils-gdb/sim/arm/wrapper.c:345:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
+    for (arg = argv; *arg != NULL; arg++)
+             ^
+The following patch fixes both of the above.
+
+Change-Id: I21db699d3b61b2de8c44053e47be4387285af28f
+---
+ sim/arm/armemu.c   |  4 ----
+ sim/arm/arminit.c  |  4 ++++
+ sim/arm/maverick.c | 35 +++++------------------------------
+ sim/arm/maverick.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
+ sim/arm/wrapper.c  | 35 ++---------------------------------
+ create mode 100644 sim/arm/maverick.h
+
+--- a/sim/arm/armemu.c
++++ b/sim/arm/armemu.c
+@@ -1140,10 +1140,6 @@ handle_VFP_move (ARMul_State * state, ARMword instr)
+ 
+ /* EMULATION of ARM6.  */
+ 
+-/* The PC pipeline value depends on whether ARM
+-   or Thumb instructions are being executed.  */
+-ARMword isize;
+-
+ ARMword
+ #ifdef MODE32
+ ARMul_Emulate32 (ARMul_State * state)
+--- a/sim/arm/arminit.c
++++ b/sim/arm/arminit.c
+@@ -40,6 +40,10 @@ unsigned ARMul_MultTable[32] =
+ ARMword ARMul_ImmedTable[4096];	/* immediate DP LHS values */
+ char ARMul_BitList[256];	/* number of bits in a byte table */
+ 
++/* The PC pipeline value depends on whether ARM
++   or Thumb instructions are being executed.  */
++ARMword isize;
++
+ /***************************************************************************\
+ *         Call this routine once to set up the emulator's tables.           *
+ \***************************************************************************/
+--- a/sim/arm/maverick.c
++++ b/sim/arm/maverick.c
+@@ -19,6 +19,7 @@
+ #include "armdefs.h"
+ #include "ansidecl.h"
+ #include "armemu.h"
++#include "maverick.h"
+ 
+ /*#define CIRRUS_DEBUG 1	*/
+ #if CIRRUS_DEBUG
+@@ -30,36 +31,10 @@
+ #define POS64(i) ( (~(i)) >> 63 )
+ #define NEG64(i) ( (i) >> 63 )
+ 
+-/* Define Co-Processor instruction handlers here.  */
+-
+-/* Here's ARMulator's DSP definition.  A few things to note:
+-   1) it has 16 64-bit registers and 4 72-bit accumulators
+-   2) you can only access its registers with MCR and MRC.  */
+-
+-/* We can't define these in here because this file might not be linked
+-   unless the target is arm9e-*.  They are defined in wrapper.c.
+-   Eventually the simulator should be made to handle any coprocessor
+-   at run time.  */
+-struct maverick_regs
+-{
+-  union
+-  {
+-    int i;
+-    float f;
+-  } upper;
+-
+-  union
+-  {
+-    int i;
+-    float f;
+-  } lower;
+-};
+-
+-union maverick_acc_regs
+-{
+-  long double ld;		/* Acc registers are 72-bits.  */
+-};
+-
++/* These variables are defined here and made extern in maverick.h for use
++   in wrapper.c for now.
++   Eventually the simulator should be made to handle any coprocessor at run
++   time.  */
+ struct maverick_regs DSPregs[16];
+ union maverick_acc_regs DSPacc[4];
+ ARMword DSPsc;
+--- /dev/null
++++ b/sim/arm/maverick.h
+@@ -0,0 +1,46 @@
++/*  maverick.h -- Cirrus/DSP co-processor interface header
++    Copyright (C) 2003-2019 Free Software Foundation, Inc.
++    Contributed by Aldy Hernandez (aldyh@redhat.com).
++
++    This program is free software; you can redistribute it and/or modify
++    it under the terms of the GNU General Public License as published by
++    the Free Software Foundation; either version 3 of the License, or
++    (at your option) any later version.
++
++    This program is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++    GNU General Public License for more details.
++
++    You should have received a copy of the GNU General Public License
++    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
++
++/* Define Co-Processor instruction handlers here.  */
++
++/* Here's ARMulator's DSP definition.  A few things to note:
++   1) it has 16 64-bit registers and 4 72-bit accumulators
++   2) you can only access its registers with MCR and MRC.  */
++
++struct maverick_regs
++{
++  union
++  {
++    int i;
++    float f;
++  } upper;
++
++  union
++  {
++    int i;
++    float f;
++  } lower;
++};
++
++union maverick_acc_regs
++{
++  long double ld;		/* Acc registers are 72-bits.  */
++};
++
++extern struct maverick_regs DSPregs[16];
++extern union maverick_acc_regs DSPacc[4];
++extern ARMword DSPsc;
+--- a/sim/arm/wrapper.c
++++ b/sim/arm/wrapper.c
+@@ -37,6 +37,7 @@
+ #include "gdb/signals.h"
+ #include "libiberty.h"
+ #include "iwmmxt.h"
++#include "maverick.h"
+ 
+ /* TODO: This should get pulled from the SIM_DESC.  */
+ host_callback *sim_callback;
+@@ -101,38 +102,6 @@ print_insn (ARMword instr)
+   fprintf (stderr, " %*s\n", size, opbuf);
+ }
+ 
+-/* Cirrus DSP registers.
+-
+-   We need to define these registers outside of maverick.c because
+-   maverick.c might not be linked in unless --target=arm9e-* in which
+-   case wrapper.c will not compile because it tries to access Cirrus
+-   registers.  This should all go away once we get the Cirrus and ARM
+-   Coprocessor to coexist in armcopro.c-- aldyh.  */
+-
+-struct maverick_regs
+-{
+-  union
+-  {
+-    int i;
+-    float f;
+-  } upper;
+-
+-  union
+-  {
+-    int i;
+-    float f;
+-  } lower;
+-};
+-
+-union maverick_acc_regs
+-{
+-  long double ld;		/* Acc registers are 72-bits.  */
+-};
+-
+-struct maverick_regs     DSPregs[16];
+-union maverick_acc_regs  DSPacc[4];
+-ARMword DSPsc;
+-
+ static void
+ init (void)
+ {
+@@ -236,7 +205,7 @@ sim_create_inferior (SIM_DESC sd ATTRIBUTE_UNUSED,
+ {
+   int argvlen = 0;
+   int mach;
+-  char **arg;
++  char * const *arg;
+ 
+   init ();
+ 
+-- 
+2.25.0
+

diff --git a/sys-devel/gdb/gdb-8.3.1-r1.ebuild b/sys-devel/gdb/gdb-8.3.1-r1.ebuild
index 6188f7eb4f5..b5cae39cf9b 100644
--- a/sys-devel/gdb/gdb-8.3.1-r1.ebuild
+++ b/sys-devel/gdb/gdb-8.3.1-r1.ebuild
@@ -14,7 +14,6 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
 fi
 is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
 
-RPM=
 MY_PV=${PV}
 case ${PV} in
 9999*)
@@ -91,6 +90,7 @@ S=${WORKDIR}/${PN}-${MY_PV}
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+	"${FILESDIR}"/${PN}-8.3.1-gcc-10.patch
 )
 
 pkg_setup() {
@@ -98,8 +98,6 @@ pkg_setup() {
 }
 
 src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-
 	default
 
 	strip-linguas -u bfd/po opcodes/po


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2020-03-29 10:11 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2020-03-29 10:11 UTC (permalink / raw
  To: gentoo-commits

commit:     3d246a8e7d1e202cc441001a27b358d79cd97366
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 29 10:10:58 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Mar 29 10:10:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d246a8e

sys-devel/gdb: drop 8.3.1, bug #690582

Bug: https://bugs.gentoo.org/690582
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/gdb/Manifest                     |   1 -
 sys-devel/gdb/files/gdb-8.3.1-gcc-10.patch | 222 ------------------------
 sys-devel/gdb/gdb-8.3.1-r1.ebuild          | 262 -----------------------------
 sys-devel/gdb/gdb-8.3.1.ebuild             | 260 ----------------------------
 4 files changed, 745 deletions(-)

diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
index 7770b5e8807..5c3fc0f0d88 100644
--- a/sys-devel/gdb/Manifest
+++ b/sys-devel/gdb/Manifest
@@ -1,2 +1 @@
-DIST gdb-8.3.1.tar.xz 20489528 BLAKE2B 5a671f620a2ed3337486a8ff53b93d65b3b6079e59ea07bc0f31e3ea6d459ced1d8549a76cfcf124762e0890e243eaabcf8b204bfc631002e759339a89b9bf9a SHA512 9053a2dc6b9eb921907afbc4cecc75d635aa76df5e8c4f0e5824ccf57cb206b299c19b127fff000b65c334826ff8304a54ff6098428365a8e997cca886c39e9a
 DIST gdb-9.1.tar.xz 20980824 BLAKE2B b84b1dc627d7ba697dfd76ba7c0f4f88f1725e1e1b83134d08cf53bf867ebfa07e1d01eff2acd9a57d22a779077bf6ed95d6098e8a58c4d86eaed034ca62ac30 SHA512 84cdd408d80a3fc5779de459c5b26154d31b329ebde7e3aa78799fb1eb245d8b64b8c8ee7242382a1dbd95b4e6f9d84fef41d12a0646aa75d3dee4709ea1f6e7

diff --git a/sys-devel/gdb/files/gdb-8.3.1-gcc-10.patch b/sys-devel/gdb/files/gdb-8.3.1-gcc-10.patch
deleted file mode 100644
index affc3b7392a..00000000000
--- a/sys-devel/gdb/files/gdb-8.3.1-gcc-10.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-From 851c0536cabb661847c45c73ebd796eb3299066b Mon Sep 17 00:00:00 2001
-Date: Tue, 26 Nov 2019 12:52:56 -0300
-Subject: [PATCH] [ARM, sim] Fix build error and warnings
-From: Luis Machado <luis.machado@linaro.org>
-
-Newer GCC's have switched to -fno-common by default, and this breaks the build
-for the ARM sim, like this:
-
-binutils-gdb.git~gdb-8.3-release/sim/arm/maverick.c:65: multiple definition of `DSPsc'; libsim.a(wrapper.o):binutils-gdb.git~gdb-8.3-release/sim/arm/wrapper.c:134: first defined here
-binutils-gdb.git~gdb-8.3-release/sim/arm/maverick.c:64: multiple definition of `DSPacc'; libsim.a(wrapper.o):binutils-gdb.git~gdb-8.3-release/sim/arm/wrapper.c:133: first defined here
-binutils-gdb.git~gdb-8.3-release/sim/arm/maverick.c:63: multiple definition of `DSPregs'; libsim.a(wrapper.o):binutils-gdb.git~gdb-8.3-release/sim/arm/wrapper.c:132: first defined here
-
-I also noticed a few warnings due to mismatching types, as follows:
-
-../../../../repos/binutils-gdb/sim/arm/wrapper.c: In function ‘sim_create_inferior’:
-../../../../repos/binutils-gdb/sim/arm/wrapper.c:335:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
-       for (arg = argv; *arg != NULL; arg++)
-                ^
-../../../../repos/binutils-gdb/sim/arm/wrapper.c:342:8: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
-    arg = argv;
-        ^
-../../../../repos/binutils-gdb/sim/arm/wrapper.c:345:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
-    for (arg = argv; *arg != NULL; arg++)
-             ^
-The following patch fixes both of the above.
-
-Change-Id: I21db699d3b61b2de8c44053e47be4387285af28f
----
- sim/arm/armemu.c   |  4 ----
- sim/arm/arminit.c  |  4 ++++
- sim/arm/maverick.c | 35 +++++------------------------------
- sim/arm/maverick.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
- sim/arm/wrapper.c  | 35 ++---------------------------------
- create mode 100644 sim/arm/maverick.h
-
---- a/sim/arm/armemu.c
-+++ b/sim/arm/armemu.c
-@@ -1140,10 +1140,6 @@ handle_VFP_move (ARMul_State * state, ARMword instr)
- 
- /* EMULATION of ARM6.  */
- 
--/* The PC pipeline value depends on whether ARM
--   or Thumb instructions are being executed.  */
--ARMword isize;
--
- ARMword
- #ifdef MODE32
- ARMul_Emulate32 (ARMul_State * state)
---- a/sim/arm/arminit.c
-+++ b/sim/arm/arminit.c
-@@ -40,6 +40,10 @@ unsigned ARMul_MultTable[32] =
- ARMword ARMul_ImmedTable[4096];	/* immediate DP LHS values */
- char ARMul_BitList[256];	/* number of bits in a byte table */
- 
-+/* The PC pipeline value depends on whether ARM
-+   or Thumb instructions are being executed.  */
-+ARMword isize;
-+
- /***************************************************************************\
- *         Call this routine once to set up the emulator's tables.           *
- \***************************************************************************/
---- a/sim/arm/maverick.c
-+++ b/sim/arm/maverick.c
-@@ -19,6 +19,7 @@
- #include "armdefs.h"
- #include "ansidecl.h"
- #include "armemu.h"
-+#include "maverick.h"
- 
- /*#define CIRRUS_DEBUG 1	*/
- #if CIRRUS_DEBUG
-@@ -30,36 +31,10 @@
- #define POS64(i) ( (~(i)) >> 63 )
- #define NEG64(i) ( (i) >> 63 )
- 
--/* Define Co-Processor instruction handlers here.  */
--
--/* Here's ARMulator's DSP definition.  A few things to note:
--   1) it has 16 64-bit registers and 4 72-bit accumulators
--   2) you can only access its registers with MCR and MRC.  */
--
--/* We can't define these in here because this file might not be linked
--   unless the target is arm9e-*.  They are defined in wrapper.c.
--   Eventually the simulator should be made to handle any coprocessor
--   at run time.  */
--struct maverick_regs
--{
--  union
--  {
--    int i;
--    float f;
--  } upper;
--
--  union
--  {
--    int i;
--    float f;
--  } lower;
--};
--
--union maverick_acc_regs
--{
--  long double ld;		/* Acc registers are 72-bits.  */
--};
--
-+/* These variables are defined here and made extern in maverick.h for use
-+   in wrapper.c for now.
-+   Eventually the simulator should be made to handle any coprocessor at run
-+   time.  */
- struct maverick_regs DSPregs[16];
- union maverick_acc_regs DSPacc[4];
- ARMword DSPsc;
---- /dev/null
-+++ b/sim/arm/maverick.h
-@@ -0,0 +1,46 @@
-+/*  maverick.h -- Cirrus/DSP co-processor interface header
-+    Copyright (C) 2003-2019 Free Software Foundation, Inc.
-+    Contributed by Aldy Hernandez (aldyh@redhat.com).
-+
-+    This program is free software; you can redistribute it and/or modify
-+    it under the terms of the GNU General Public License as published by
-+    the Free Software Foundation; either version 3 of the License, or
-+    (at your option) any later version.
-+
-+    This program is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+    GNU General Public License for more details.
-+
-+    You should have received a copy of the GNU General Public License
-+    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
-+
-+/* Define Co-Processor instruction handlers here.  */
-+
-+/* Here's ARMulator's DSP definition.  A few things to note:
-+   1) it has 16 64-bit registers and 4 72-bit accumulators
-+   2) you can only access its registers with MCR and MRC.  */
-+
-+struct maverick_regs
-+{
-+  union
-+  {
-+    int i;
-+    float f;
-+  } upper;
-+
-+  union
-+  {
-+    int i;
-+    float f;
-+  } lower;
-+};
-+
-+union maverick_acc_regs
-+{
-+  long double ld;		/* Acc registers are 72-bits.  */
-+};
-+
-+extern struct maverick_regs DSPregs[16];
-+extern union maverick_acc_regs DSPacc[4];
-+extern ARMword DSPsc;
---- a/sim/arm/wrapper.c
-+++ b/sim/arm/wrapper.c
-@@ -37,6 +37,7 @@
- #include "gdb/signals.h"
- #include "libiberty.h"
- #include "iwmmxt.h"
-+#include "maverick.h"
- 
- /* TODO: This should get pulled from the SIM_DESC.  */
- host_callback *sim_callback;
-@@ -101,38 +102,6 @@ print_insn (ARMword instr)
-   fprintf (stderr, " %*s\n", size, opbuf);
- }
- 
--/* Cirrus DSP registers.
--
--   We need to define these registers outside of maverick.c because
--   maverick.c might not be linked in unless --target=arm9e-* in which
--   case wrapper.c will not compile because it tries to access Cirrus
--   registers.  This should all go away once we get the Cirrus and ARM
--   Coprocessor to coexist in armcopro.c-- aldyh.  */
--
--struct maverick_regs
--{
--  union
--  {
--    int i;
--    float f;
--  } upper;
--
--  union
--  {
--    int i;
--    float f;
--  } lower;
--};
--
--union maverick_acc_regs
--{
--  long double ld;		/* Acc registers are 72-bits.  */
--};
--
--struct maverick_regs     DSPregs[16];
--union maverick_acc_regs  DSPacc[4];
--ARMword DSPsc;
--
- static void
- init (void)
- {
-@@ -236,7 +205,7 @@ sim_create_inferior (SIM_DESC sd ATTRIBUTE_UNUSED,
- {
-   int argvlen = 0;
-   int mach;
--  char **arg;
-+  char * const *arg;
- 
-   init ();
- 
--- 
-2.25.0
-

diff --git a/sys-devel/gdb/gdb-8.3.1-r1.ebuild b/sys-devel/gdb/gdb-8.3.1-r1.ebuild
deleted file mode 100644
index 2d2ec2e6952..00000000000
--- a/sys-devel/gdb/gdb-8.3.1-r1.ebuild
+++ /dev/null
@@ -1,262 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python{3_6,3_7} )
-
-inherit eutils flag-o-matic python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-MY_PV=${PV}
-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 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client lzma multitarget nls +python +server source-highlight test vanilla xml"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-# ia64 kernel crashes when gdb testsuite is running
-# hppa kernel crashes when gdb testsuite is running
-RESTRICT="
-	hppa? ( test )
-	ia64? ( test )
-
-	!test? ( test )
-"
-
-RDEPEND="
-	client? (
-		dev-libs/mpfr:0=
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)
-	source-highlight? (
-		dev-util/source-highlight
-	)
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
-	"${FILESDIR}"/${PN}-8.3.1-gcc-10.patch
-)
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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}")
-		)
-	fi
-	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
-
-	econf "${myconf[@]}"
-}
-
-src_install() {
-	if use server && ! use client; then
-		cd gdb/gdbserver || die
-	fi
-	default
-	if use client; then
-		find "${ED}"/usr -name libiberty.a -delete || die
-	fi
-	cd "${S}" || 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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-
-	# gcore is part of ubin on freebsd
-	if [[ ${CHOST} == *-freebsd* ]]; then
-		rm "${ED}"/usr/bin/gcore || die
-	fi
-
-	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-8.3.1.ebuild b/sys-devel/gdb/gdb-8.3.1.ebuild
deleted file mode 100644
index ac1ce8d7b8e..00000000000
--- a/sys-devel/gdb/gdb-8.3.1.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python{3_6,3_7} )
-
-inherit eutils flag-o-matic python-single-r1
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-RPM=
-MY_PV=${PV}
-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 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-IUSE="+client lzma multitarget nls +python +server source-highlight test vanilla xml"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-# ia64 kernel crashes when gdb testsuite is running
-# hppa kernel crashes when gdb testsuite is running
-RESTRICT="
-	hppa? ( test )
-	ia64? ( test )
-
-	!test? ( test )
-"
-
-RDEPEND="
-	client? (
-		dev-libs/mpfr:0=
-		>=sys-libs/ncurses-5.2-r2:0=
-		sys-libs/readline:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)
-	source-highlight? (
-		dev-util/source-highlight
-	)
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-S=${WORKDIR}/${PN}-${MY_PV}
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
-)
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
-
-	default
-
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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}")
-		)
-	fi
-	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
-
-	econf "${myconf[@]}"
-}
-
-src_install() {
-	if use server && ! use client; then
-		cd gdb/gdbserver || die
-	fi
-	default
-	if use client; then
-		find "${ED}"/usr -name libiberty.a -delete || die
-	fi
-	cd "${S}" || 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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-
-	# gcore is part of ubin on freebsd
-	if [[ ${CHOST} == *-freebsd* ]]; then
-		rm "${ED}"/usr/bin/gcore || die
-	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
-}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2020-08-21  7:21 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2020-08-21  7:21 UTC (permalink / raw
  To: gentoo-commits

commit:     c4b816a18ebce5dae2343694da3d24ca1a7f3cf3
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 21 07:21:05 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Aug 21 07:21:15 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4b816a1

sys-devel/gdb: backport -fno-common build for sim/ppc

Reported-by: Daniel Gurney
Closes: https://bugs.gentoo.org/738272
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../gdb/files/gdb-9.2-sim-ppc-fno-common.patch     | 97 ++++++++++++++++++++++
 sys-devel/gdb/gdb-9.2.ebuild                       |  1 +
 2 files changed, 98 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-9.2-sim-ppc-fno-common.patch b/sys-devel/gdb/files/gdb-9.2-sim-ppc-fno-common.patch
new file mode 100644
index 00000000000..76b29649ad2
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-9.2-sim-ppc-fno-common.patch
@@ -0,0 +1,97 @@
+https://bugs.gentoo.org/738272
+https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0
+
+From ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0 Mon Sep 17 00:00:00 2001
+From: Sebastian Huber <sebastian.huber@embedded-brains.de>
+Date: Wed, 1 Jul 2020 19:29:55 +0200
+Subject: [PATCH] sim/ppc: Fix linker error with -fno-common
+
+GCC 10 enables -fno-common by default.  This resulted in a multiple
+definition linker error since global variables were declared and defined
+in a header file:
+
+  ld: ld-insn.o:sim/ppc/ld-insn.h:221: multiple definition of
+  `max_model_fields_len'; igen.o:sim/ppc/ld-insn.h:221: first defined here
+
+sim/ppc
+
+	* ld-insn.h (last_model, last_model_data, last_model_function,
+	last_model_internal, last_model_macro, last_model_static):
+	Delete.
+	(max_model_fields_len, model_data, model_functions,
+	model_internal, model_macros, model_static, models): Declare, but do not
+	define.
+	* ld-insn.c (last_model, last_model_data, last_model_function,
+	last_model_internal, last_model_macro, last_model_static,
+	max_model_fields_len, model_data, model_functions,
+	model_internal, model_macros, model_static, models): Define.
+---
+ sim/ppc/ld-insn.c | 18 ++++++++++++++++++
+ sim/ppc/ld-insn.h | 24 +++++++-----------------
+ 3 files changed, 38 insertions(+), 17 deletions(-)
+
+--- a/sim/ppc/ld-insn.c
++++ b/sim/ppc/ld-insn.c
+@@ -28,6 +28,24 @@
+ 
+ #include "igen.h"
+ 
++static model *last_model;
++
++static insn *last_model_macro;
++static insn *last_model_function;
++static insn *last_model_internal;
++static insn *last_model_static;
++static insn *last_model_data;
++
++model *models;
++
++insn *model_macros;
++insn *model_functions;
++insn *model_internal;
++insn *model_static;
++insn *model_data;
++
++int max_model_fields_len;
++
+ static void
+ update_depth(insn_table *entry,
+ 	     lf *file,
+--- a/sim/ppc/ld-insn.h
++++ b/sim/ppc/ld-insn.h
+@@ -200,25 +200,15 @@ extern insn_table *load_insn_table
+  table_include *includes,
+  cache_table **cache_rules);
+ 
+-model *models;
+-model *last_model;
++extern model *models;
+ 
+-insn *model_macros;
+-insn *last_model_macro;
++extern insn *model_macros;
++extern insn *model_functions;
++extern insn *model_internal;
++extern insn *model_static;
++extern insn *model_data;
+ 
+-insn *model_functions;
+-insn *last_model_function;
+-
+-insn *model_internal;
+-insn *last_model_internal;
+-
+-insn *model_static;
+-insn *last_model_static;
+-
+-insn *model_data;
+-insn *last_model_data;
+-
+-int max_model_fields_len;
++extern int max_model_fields_len;
+ 
+ extern void insn_table_insert_insn
+ (insn_table *table,
+-- 
+2.28.0
+

diff --git a/sys-devel/gdb/gdb-9.2.ebuild b/sys-devel/gdb/gdb-9.2.ebuild
index a65d6cdd173..cc5393a1813 100644
--- a/sys-devel/gdb/gdb-9.2.ebuild
+++ b/sys-devel/gdb/gdb-9.2.ebuild
@@ -91,6 +91,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
 	"${FILESDIR}"/${PN}-9.1-ia64.patch
+	"${FILESDIR}"/${P}-sim-ppc-fno-common.patch
 )
 
 GDB_BUILD_DIR="${WORKDIR}"/${P}-build


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2021-01-09 11:55 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2021-01-09 11:55 UTC (permalink / raw
  To: gentoo-commits

commit:     b5cbad35c3944243711a32c2924a95f4dcb7bd4e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  9 11:50:31 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jan  9 11:50:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5cbad35

sys-devel/gdb: drop old

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/gdb/Manifest                             |   1 -
 sys-devel/gdb/files/gdb-9.1-ia64.patch             |  15 --
 .../gdb/files/gdb-9.2-sim-ppc-fno-common.patch     |  97 -------
 sys-devel/gdb/gdb-9.2.ebuild                       | 282 ---------------------
 4 files changed, 395 deletions(-)

diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
index 1bb96388c40..8fa3bb78990 100644
--- a/sys-devel/gdb/Manifest
+++ b/sys-devel/gdb/Manifest
@@ -1,2 +1 @@
 DIST gdb-10.1.tar.xz 21507112 BLAKE2B 69d79cd667ecb6e936b41a03817ade5dd9b761f97bc123d668b5f968d123c37d048fc8ec1289151e989f01bb01a43cc3d8b5b54f1807f1e3eb5f43e6bf0aa55b SHA512 0dc54380435c6853db60f1e388b94836d294dfa9ad7f518385a27db4edd03cb970f8717d5f1e9c9a0d4a33d7fcf91bc2e5d6c9cf9e4b561dcc74e65b806c1537
-DIST gdb-9.2.tar.xz 20979436 BLAKE2B e83468f2d2fdcf4a7eb2943564750c7e9e9fa19b00bd832a9c149ad06b199cc7d6e7b8808d552e5f0e9e4f701a9262faf6b0b46ed4e0b4ecd3a0303d873d6d9a SHA512 73635f00f343117aa5e2436f1e1597099e2bfb31ef7bb162b273fa1ea282c3fa9b0f52762e70bfc7ad0334addb8d159e9ac7cbe5998ca4f755ea8cf90714d274

diff --git a/sys-devel/gdb/files/gdb-9.1-ia64.patch b/sys-devel/gdb/files/gdb-9.1-ia64.patch
deleted file mode 100644
index 49a21e4cdd2..00000000000
--- a/sys-devel/gdb/files/gdb-9.1-ia64.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-https://sourceware.org/pipermail/gdb-patches/2020-May/168808.html
-
---- a/gdb/ia64-linux-nat.c
-+++ b/gdb/ia64-linux-nat.c
-@@ -21,6 +21,7 @@
- #include "defs.h"
- #include "inferior.h"
- #include "target.h"
-+#include "gdbarch.h"
- #include "gdbcore.h"
- #include "regcache.h"
- #include "ia64-tdep.h"
--- 
-2.26.2
-

diff --git a/sys-devel/gdb/files/gdb-9.2-sim-ppc-fno-common.patch b/sys-devel/gdb/files/gdb-9.2-sim-ppc-fno-common.patch
deleted file mode 100644
index 76b29649ad2..00000000000
--- a/sys-devel/gdb/files/gdb-9.2-sim-ppc-fno-common.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-https://bugs.gentoo.org/738272
-https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0
-
-From ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0 Mon Sep 17 00:00:00 2001
-From: Sebastian Huber <sebastian.huber@embedded-brains.de>
-Date: Wed, 1 Jul 2020 19:29:55 +0200
-Subject: [PATCH] sim/ppc: Fix linker error with -fno-common
-
-GCC 10 enables -fno-common by default.  This resulted in a multiple
-definition linker error since global variables were declared and defined
-in a header file:
-
-  ld: ld-insn.o:sim/ppc/ld-insn.h:221: multiple definition of
-  `max_model_fields_len'; igen.o:sim/ppc/ld-insn.h:221: first defined here
-
-sim/ppc
-
-	* ld-insn.h (last_model, last_model_data, last_model_function,
-	last_model_internal, last_model_macro, last_model_static):
-	Delete.
-	(max_model_fields_len, model_data, model_functions,
-	model_internal, model_macros, model_static, models): Declare, but do not
-	define.
-	* ld-insn.c (last_model, last_model_data, last_model_function,
-	last_model_internal, last_model_macro, last_model_static,
-	max_model_fields_len, model_data, model_functions,
-	model_internal, model_macros, model_static, models): Define.
----
- sim/ppc/ld-insn.c | 18 ++++++++++++++++++
- sim/ppc/ld-insn.h | 24 +++++++-----------------
- 3 files changed, 38 insertions(+), 17 deletions(-)
-
---- a/sim/ppc/ld-insn.c
-+++ b/sim/ppc/ld-insn.c
-@@ -28,6 +28,24 @@
- 
- #include "igen.h"
- 
-+static model *last_model;
-+
-+static insn *last_model_macro;
-+static insn *last_model_function;
-+static insn *last_model_internal;
-+static insn *last_model_static;
-+static insn *last_model_data;
-+
-+model *models;
-+
-+insn *model_macros;
-+insn *model_functions;
-+insn *model_internal;
-+insn *model_static;
-+insn *model_data;
-+
-+int max_model_fields_len;
-+
- static void
- update_depth(insn_table *entry,
- 	     lf *file,
---- a/sim/ppc/ld-insn.h
-+++ b/sim/ppc/ld-insn.h
-@@ -200,25 +200,15 @@ extern insn_table *load_insn_table
-  table_include *includes,
-  cache_table **cache_rules);
- 
--model *models;
--model *last_model;
-+extern model *models;
- 
--insn *model_macros;
--insn *last_model_macro;
-+extern insn *model_macros;
-+extern insn *model_functions;
-+extern insn *model_internal;
-+extern insn *model_static;
-+extern insn *model_data;
- 
--insn *model_functions;
--insn *last_model_function;
--
--insn *model_internal;
--insn *last_model_internal;
--
--insn *model_static;
--insn *last_model_static;
--
--insn *model_data;
--insn *last_model_data;
--
--int max_model_fields_len;
-+extern int max_model_fields_len;
- 
- extern void insn_table_insert_insn
- (insn_table *table,
--- 
-2.28.0
-

diff --git a/sys-devel/gdb/gdb-9.2.ebuild b/sys-devel/gdb/gdb-9.2.ebuild
deleted file mode 100644
index 78740b7e1b6..00000000000
--- a/sys-devel/gdb/gdb-9.2.ebuild
+++ /dev/null
@@ -1,282 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8,9} )
-
-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="+client lzma multitarget nls +python +server source-highlight test vanilla xml xxhash"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	|| ( client server )
-"
-
-# ia64 kernel crashes when gdb testsuite is running
-# hppa kernel crashes when gdb testsuite is running
-RESTRICT="
-	hppa? ( test )
-	ia64? ( test )
-
-	!test? ( test )
-"
-
-RDEPEND="
-	client? (
-		dev-libs/mpfr:0=
-		>=sys-libs/ncurses-5.2-r2:0=
-		>=sys-libs/readline-7:0=
-		lzma? ( app-arch/xz-utils )
-		python? ( ${PYTHON_DEPS} )
-		xml? ( dev-libs/expat )
-		sys-libs/zlib
-	)
-	source-highlight? (
-		dev-util/source-highlight
-	)
-	xxhash? (
-		dev-libs/xxhash
-	)
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	app-arch/xz-utils
-	sys-apps/texinfo
-	client? (
-		virtual/yacc
-		test? ( dev-util/dejagnu )
-		nls? ( sys-devel/gettext )
-	)"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
-	"${FILESDIR}"/${PN}-9.1-ia64.patch
-	"${FILESDIR}"/${P}-sim-ppc-fno-common.patch
-)
-
-GDB_BUILD_DIR="${WORKDIR}"/${P}-build
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-
-	strip-linguas -u bfd/po opcodes/po
-}
-
-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}
-	)
-	local sysroot="${EPREFIX}/usr/${CTARGET}"
-	is_cross && myconf+=(
-		--with-sysroot="${sysroot}"
-		--includedir="${sysroot}/usr/include"
-		--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
-	)
-
-	if use server && ! use client ; then
-		# just configure+build in the gdbserver subdir to speed things up
-		cd gdb/gdbserver
-		myconf+=( --program-transform-name='' )
-	else
-		# 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.
-		is_cross \
-			&& myconf+=( --disable-gdbserver ) \
-			|| myconf+=( $(use_enable server gdbserver auto) )
-	fi
-
-	if ! ( use server && ! use client ) ; then
-		# if we are configuring in the top level, then use all
-		# the additional global options
-		myconf+=(
-			--enable-64-bit-bfd
-			--disable-install-libbfd
-			--disable-install-libiberty
-			# Disable guile for now as it requires guile-2.x #562902
-			--without-guile
-			# 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)
-		)
-	fi
-	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)"
-
-	mkdir "${GDB_BUILD_DIR}" || die
-	pushd "${GDB_BUILD_DIR}" || die
-		ECONF_SOURCE=${S}
-		econf "${myconf[@]}"
-	popd
-}
-
-src_compile() {
-	emake -C "${GDB_BUILD_DIR}"
-}
-
-src_test() {
-	emake -C "${GDB_BUILD_DIR}" check
-}
-
-src_install() {
-	if use server && ! use client; then
-		emake -C "${GDB_BUILD_DIR}"/gdb/gdbserver DESTDIR="${D}" install
-	else
-		emake -C "${GDB_BUILD_DIR}" DESTDIR="${D}" install
-	fi
-
-	if use client; then
-		find "${ED}"/usr -name libiberty.a -delete || die
-	fi
-
-	# 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 "${GDB_BUILD_DIR}"/gdb/gdbserver/gdbreplay ]] && dobin "${GDB_BUILD_DIR}"/gdb/gdbserver/gdbreplay
-
-	if use client ; then
-		docinto gdb
-		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
-			gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
-	fi
-	docinto sim
-	dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-	if use server ; then
-		docinto gdbserver
-		dodoc gdb/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*
-
-	# gcore is part of ubin on freebsd
-	if [[ ${CHOST} == *-freebsd* ]]; then
-		rm "${ED}"/usr/bin/gcore || die
-	fi
-
-	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
-}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2021-04-25 20:57 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2021-04-25 20:57 UTC (permalink / raw
  To: gentoo-commits

commit:     e9d3ab7ee243c49191b72e042128dea375e67305
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 25 20:57:24 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Apr 25 20:57:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9d3ab7e

sys-devel/gdb: fix sparc-nat build

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/gdb/files/gdb-10.2-sparc-nat.patch | 47 ++++++++++++++++++++++++++++
 sys-devel/gdb/gdb-10.2.ebuild                |  1 +
 2 files changed, 48 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch b/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch
new file mode 100644
index 00000000000..5e71efa0d33
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch
@@ -0,0 +1,47 @@
+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/gdb-10.2.ebuild b/sys-devel/gdb/gdb-10.2.ebuild
index 520501f0023..f826ccb7083 100644
--- a/sys-devel/gdb/gdb-10.2.ebuild
+++ b/sys-devel/gdb/gdb-10.2.ebuild
@@ -86,6 +86,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
 	"${FILESDIR}"/${PN}-10.1-cet.patch
+	"${FILESDIR}"/${PN}-10.2-sparc-nat.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2021-07-30 15:25 Sergei Trofimovich
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Trofimovich @ 2021-07-30 15:25 UTC (permalink / raw
  To: gentoo-commits

commit:     da814d23d8c572f796fff850235402bf95d1d7aa
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 30 15:25:23 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jul 30 15:25:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da814d23

sys-devel/gdb: backport DW_LLE_start_end fix (for riscv64)

Reported-by: Marek Szuba
Closes: https://bugs.gentoo.org/805215
Bug: https://sourceware.org/PR27999
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch |  41 ++++
 sys-devel/gdb/gdb-10.2-r1.ebuild                  | 261 ++++++++++++++++++++++
 2 files changed, 302 insertions(+)

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
new file mode 100644
index 00000000000..0d3e8c5cb94
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch
@@ -0,0 +1,41 @@
+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/gdb-10.2-r1.ebuild b/sys-devel/gdb/gdb-10.2-r1.ebuild
new file mode 100644
index 00000000000..b5d5204d045
--- /dev/null
+++ b/sys-devel/gdb/gdb-10.2-r1.ebuild
@@ -0,0 +1,261 @@
+# Copyright 1999-2021 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 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} )
+	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
+		# Disable guile for now as it requires guile-2.x #562902
+		--without-guile
+		--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)
+	)
+	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)"
+
+	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*
+
+	# gcore is part of ubin on freebsd
+	if [[ ${CHOST} == *-freebsd* ]]; then
+		rm "${ED}"/usr/bin/gcore || die
+	fi
+
+	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
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2021-10-25 12:03 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2021-10-25 12:03 UTC (permalink / raw
  To: gentoo-commits

commit:     5c048cebb13af66c8e1d6306a5f5491552e3a44f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 25 12:02:58 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 25 12:03:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c048ceb

sys-devel/gdb: backport glibc-2.34 build failure patch

... although I don't actually recall hitting this.

Closes: https://bugs.gentoo.org/813831
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch | 110 ++++++++++++++++++++++
 sys-devel/gdb/gdb-11.1.ebuild                     |   1 +
 2 files changed, 111 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch b/sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch
new file mode 100644
index 00000000000..15ab45f278f
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch
@@ -0,0 +1,110 @@
+https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=39d53d04357606a15efd400147fa7369d71baf2c;hp=46039d3632e32d9a404c1f18cf55f14c894e4627
+https://bugs.gentoo.org/813831
+
+From 39d53d04357606a15efd400147fa7369d71baf2c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 3 Oct 2021 12:02:53 -0400
+Subject: [PATCH 1/1] sim: filter out SIGSTKSZ [PR sim/28302]
+
+We map target signals to host signals so we can propagate signals
+between the host & simulated worlds.  That means we need to know
+the symbolic names & values of all signals that might be sent.
+
+The tools that generate that list use signal.h and include all
+symbols that start with "SIG" so as to automatically include any
+new symbols that the C library might add.  Unfortunately, this
+also picks up "SIGSTKSZ" which is not actually a signal itself,
+but a signal related setting -- it's the size of the stack when
+a signal is handled.
+
+By itself this doesn't super matter as we will never see a signal
+with that same value (since the range of valid signals tend to be
+way less than 1024, and the size of the default signal stack will
+never be that small).  But with recent glibc changes that make this
+into a dynamic value instead of a compile-time constant, some users
+see build failures when building the sim.
+
+As suggested by Adam Sampson, update our scripts to ignore this
+symbol to simplify everything and avoid the build failure.
+
+Bug: https://sourceware.org/PR28302
+---
+ sim/bfin/linux-targ-map.h | 5 +----
+ sim/common/gennltvals.py  | 6 ++++--
+ sim/common/nltvals.def    | 1 -
+ 3 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/sim/bfin/linux-targ-map.h b/sim/bfin/linux-targ-map.h
+index e9c8c8f273b..0340ed54764 100644
+--- a/sim/bfin/linux-targ-map.h
++++ b/sim/bfin/linux-targ-map.h
+@@ -30,6 +30,7 @@ echo
+ # XXX: nothing uses this ?
+ echo '#include <signal.h>' | \
+ bfin-uclinux-gcc -E -dD -P - | \
++grep -v SIGSTKSZ | \
+ sed -r -n \
+     -e '1istatic CB_TARGET_DEFS_MAP cb_linux_signal_map[] = {' \
+     -e '$i\ \ { 0, -1, -1 }\n};' \
+@@ -1987,10 +1988,6 @@ static CB_TARGET_DEFS_MAP cb_linux_signal_map[] =
+ #ifdef SIG_SETMASK
+ # define TARGET_LINUX_SIG_SETMASK 2
+   { "SIG_SETMASK", SIG_SETMASK, TARGET_LINUX_SIG_SETMASK },
+-#endif
+-#ifdef SIGSTKSZ
+-# define TARGET_LINUX_SIGSTKSZ 8192
+-  { "SIGSTKSZ", SIGSTKSZ, TARGET_LINUX_SIGSTKSZ },
+ #endif
+   { 0, -1, -1 }
+ };
+diff --git a/sim/common/gennltvals.py b/sim/common/gennltvals.py
+index db3ff641d40..955ace34311 100755
+--- a/sim/common/gennltvals.py
++++ b/sim/common/gennltvals.py
+@@ -67,6 +67,7 @@ FILE_HEADER = f"""\
+ def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
+              headers: Iterable[str],
+              pattern: str,
++             filter: str = r'^$',
+              target: str = None):
+     """Extract constants from the specified files using a regular expression.
+ 
+@@ -94,12 +95,13 @@ def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
+     srcfile = ''.join(f'#include <{x}>\n' for x in headers)
+     syms = set()
+     define_pattern = re.compile(r'^#\s*define\s+(' + pattern + ')')
++    filter_pattern = re.compile(filter)
+     for header in headers:
+         with open(srcdir / header, 'r', encoding='utf-8') as fp:
+             data = fp.read()
+         for line in data.splitlines():
+             m = define_pattern.match(line)
+-            if m:
++            if m and not filter_pattern.search(line):
+                 syms.add(m.group(1))
+     for sym in sorted(syms):
+         srcfile += f'#ifdef {sym}\nDEFVAL {{ "{sym}", {sym} }},\n#endif\n'
+@@ -129,7 +131,7 @@ def gen_common(output: TextIO, newlib: Path, cpp: str):
+              ('errno.h', 'sys/errno.h'), 'E[A-Z0-9]*')
+ 
+     gentvals(output, cpp, 'signal', newlib / 'newlib/libc/include',
+-             ('signal.h', 'sys/signal.h'), r'SIG[A-Z0-9]*')
++             ('signal.h', 'sys/signal.h'), r'SIG[A-Z0-9]*', filter=r'SIGSTKSZ')
+ 
+     gentvals(output, cpp, 'open', newlib / 'newlib/libc/include',
+              ('fcntl.h', 'sys/fcntl.h', 'sys/_default_fcntl.h'), r'O_[A-Z0-9]*')
+diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def
+index 8ae88397249..8bc6ae59026 100644
+--- a/sim/common/nltvals.def
++++ b/sim/common/nltvals.def
+@@ -116,7 +116,6 @@
+  { "SIGPROF", 27 },
+  { "SIGQUIT", 3 },
+  { "SIGSEGV", 11 },
+- { "SIGSTKSZ", 8192 },
+  { "SIGSTOP", 17 },
+  { "SIGSYS", 12 },
+  { "SIGTERM", 15 },
+-- 
+2.27.0
+

diff --git a/sys-devel/gdb/gdb-11.1.ebuild b/sys-devel/gdb/gdb-11.1.ebuild
index 8b1a81f909e..bcd3ce89b95 100644
--- a/sys-devel/gdb/gdb-11.1.ebuild
+++ b/sys-devel/gdb/gdb-11.1.ebuild
@@ -88,6 +88,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+	"${FILESDIR}"/${P}-glibc-2.34-sim.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2022-04-17 18:20 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2022-04-17 18:20 UTC (permalink / raw
  To: gentoo-commits

commit:     89c775fccccb9b0aa95203d7e838d406490e48c2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 18:20:39 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 18:20:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89c775fc

sys-devel/gdb: fix USE=multitarget w/ glibc-2.35

Closes: https://bugs.gentoo.org/833590
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch      | 32 ++++++++++++++++++++++
 sys-devel/gdb/gdb-11.2.ebuild                      |  1 +
 2 files changed, 33 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch b/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch
new file mode 100644
index 000000000000..5e0121f85029
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch
@@ -0,0 +1,32 @@
+https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=a532eb7277ff64fb073e209d418b0a97f686c0e3
+https://bugs.gentoo.org/833590
+
+From: Sergei Trofimovich <siarheit@google.com>
+Date: Mon, 14 Feb 2022 17:12:41 +0000
+Subject: [PATCH] microblaze: fix fsqrt collicion to build on glibc-2.35
+
+	* microblaze-opcm.h: Renamed 'fsqrt' to 'microblaze_fsqrt'.
+	* microblaze-opc.h: Follow 'fsqrt' rename.
+--- a/opcodes/microblaze-opc.h
++++ b/opcodes/microblaze-opc.h
+@@ -268,7 +268,7 @@ const struct op_code_struct
+   {"fcmp.un", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000200, OPCODE_MASK_H4, fcmp_un, arithmetic_inst },
+   {"flt",   INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000280, OPCODE_MASK_H4, flt,   arithmetic_inst },
+   {"fint",  INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000300, OPCODE_MASK_H4, fint,  arithmetic_inst },
+-  {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, fsqrt, arithmetic_inst },
++  {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, microblaze_fsqrt, arithmetic_inst },
+   {"tget",   INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C001000, OPCODE_MASK_H32, tget,   anyware_inst },
+   {"tcget",  INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C003000, OPCODE_MASK_H32, tcget,  anyware_inst },
+   {"tnget",  INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C005000, OPCODE_MASK_H32, tnget,  anyware_inst },
+--- a/opcodes/microblaze-opcm.h
++++ b/opcodes/microblaze-opcm.h
+@@ -42,7 +42,8 @@ enum microblaze_instr
+   shr, sw, swr, swx, lbui, lhui, lwi,
+   sbi, shi, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv,
+   fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt,
+-  fint, fsqrt,
++  /* 'fsqrt' is a glibc:math.h symbol.  */
++  fint, microblaze_fsqrt,
+   tget, tcget, tnget, tncget, tput, tcput, tnput, tncput,
+   eget, ecget, neget, necget, eput, ecput, neput, necput,
+   teget, tecget, tneget, tnecget, teput, tecput, tneput, tnecput,

diff --git a/sys-devel/gdb/gdb-11.2.ebuild b/sys-devel/gdb/gdb-11.2.ebuild
index 869017994712..9b5d95603631 100644
--- a/sys-devel/gdb/gdb-11.2.ebuild
+++ b/sys-devel/gdb/gdb-11.2.ebuild
@@ -92,6 +92,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+	"${FILESDIR}"/${P}-glibc-2.35-fsqrt.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2022-05-03  0:01 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2022-05-03  0:01 UTC (permalink / raw
  To: gentoo-commits

commit:     a13326cd6745d107527beec8bc0d4fba09ab1cfb
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue May  3 00:00:41 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May  3 00:00:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a13326cd

sys-devel/gdb: fix build with sys-libs/readline-8.2*

Closes: https://bugs.gentoo.org/842252
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gdb/files/gdb-12.1-readline-8.2-build.patch    | 29 ++++++++++++++++++++++
 sys-devel/gdb/gdb-12.1.ebuild                      |  1 +
 2 files changed, 30 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch b/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch
new file mode 100644
index 000000000000..fad27ee4ca85
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch
@@ -0,0 +1,29 @@
+https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=1add37b567a7dee39d99f37b37802034c3fce9c4
+https://bugs.gentoo.org/842252
+
+From: Andreas Schwab <schwab@linux-m68k.org>
+Date: Sun, 20 Mar 2022 14:01:54 +0100
+Subject: [PATCH] Add support for readline 8.2
+
+In readline 8.2 the type of rl_completer_word_break_characters changed to
+include const.
+--- a/gdb/completer.c
++++ b/gdb/completer.c
+@@ -36,7 +36,7 @@
+    calling a hook instead so we eliminate the CLI dependency.  */
+ #include "gdbcmd.h"
+ 
+-/* Needed for rl_completer_word_break_characters() and for
++/* Needed for rl_completer_word_break_characters and for
+    rl_filename_completion_function.  */
+ #include "readline/readline.h"
+ 
+@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw ()
+       rl_basic_quote_characters = NULL;
+     }
+ 
+-  return rl_completer_word_break_characters;
++  return (char *) rl_completer_word_break_characters;
+ }
+ 
+ char *

diff --git a/sys-devel/gdb/gdb-12.1.ebuild b/sys-devel/gdb/gdb-12.1.ebuild
index 8e18279f8752..b7ca1edd1937 100644
--- a/sys-devel/gdb/gdb-12.1.ebuild
+++ b/sys-devel/gdb/gdb-12.1.ebuild
@@ -93,6 +93,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+	"${FILESDIR}"/${P}-readline-8.2-build.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2022-08-10  7:43 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2022-08-10  7:43 UTC (permalink / raw
  To: gentoo-commits

commit:     cb3146b4d97606591ae881ec19edebb9164b804c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 10 07:43:14 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 10 07:43:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb3146b4

sys-devel/gdb: backport core file detach fix

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gdb/files/gdb-12.1-core-file-detach.patch      | 155 +++++++++++
 sys-devel/gdb/gdb-12.1-r2.ebuild                   | 297 +++++++++++++++++++++
 2 files changed, 452 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-12.1-core-file-detach.patch b/sys-devel/gdb/files/gdb-12.1-core-file-detach.patch
new file mode 100644
index 000000000000..c0f8a8ee0269
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-12.1-core-file-detach.patch
@@ -0,0 +1,155 @@
+https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=0fe74cb9ad35add9c6da4df5c9879f254d918a6a
+
+From: Pedro Alves <pedro@palves.net>
+Date: Wed, 22 Jun 2022 18:44:37 +0100
+Subject: [PATCH] Fix core-file -> detach -> crash (corefiles/29275)
+
+After loading a core file, you're supposed to be able to use "detach"
+to unload the core file.  That unfortunately regressed starting with
+GDB 11, with these commits:
+
+ 1192f124a308 - gdb: generalize commit_resume, avoid commit-resuming when threads have pending statuses
+ 408f66864a1a - detach in all-stop with threads running
+
+resulting in a GDB crash:
+
+ ...
+ Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.
+ 0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899
+ 2899          if (proc_target->commit_resumed_state)
+ (top-gdb) bt
+ #0  0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899
+ #1  0x0000555555e848bf in scoped_disable_commit_resumed::reset (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3023
+ #2  0x0000555555e84a0c in scoped_disable_commit_resumed::reset_and_commit (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3049
+ #3  0x0000555555e739cd in detach_command (args=0x0, from_tty=1) at ../../src/gdb/infcmd.c:2791
+ #4  0x0000555555c0ba46 in do_simple_func (args=0x0, from_tty=1, c=0x55555662a600) at ../../src/gdb/cli/cli-decode.c:95
+ #5  0x0000555555c112b0 in cmd_func (cmd=0x55555662a600, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:2514
+ #6  0x0000555556173b1f in execute_command (p=0x5555565c5916 "", from_tty=1) at ../../src/gdb/top.c:699
+
+The code that crashes looks like:
+
+ static void
+ maybe_set_commit_resumed_all_targets ()
+ {
+   scoped_restore_current_thread restore_thread;
+
+   for (inferior *inf : all_non_exited_inferiors ())
+     {
+       process_stratum_target *proc_target = inf->process_target ();
+
+       if (proc_target->commit_resumed_state)
+           ^^^^^^^^^^^
+
+With 'proc_target' above being null.  all_non_exited_inferiors filters
+out inferiors that have pid==0.  We get here at the end of
+detach_command, after core_target::detach has already run, at which
+point the inferior _should_ have pid==0 and no process target.  It is
+clear it no longer has a process target, but, it still has a pid!=0
+somehow.
+
+The reason the inferior still has pid!=0, is that core_target::detach
+just unpushes, and relies on core_target::close to actually do the
+getting rid of the core and exiting the inferior.  The problem with
+that is that detach_command grabs an extra strong reference to the
+process stratum target, so the unpush_target inside
+core_target::detach doesn't actually result in a call to
+core_target::close.
+
+Fix this my moving the cleaning up the core inferior to a shared
+routine called by both core_target::close and core_target::detach.  We
+still need to cleanup the inferior from within core_file::close
+because there are paths to it that want to get rid of the core without
+going through detach.  E.g., "core-file" -> "run".
+
+This commit includes a new test added to gdb.base/corefile.exp to
+cover the "core-file core" -> "detach" scenario.
+
+Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29275
+
+Change-Id: Ic42bdd03182166b19f598428b0dbc2ce6f67c893
+--- a/gdb/corelow.c
++++ b/gdb/corelow.c
+@@ -120,6 +120,9 @@ public:
+ 
+ private: /* per-core data */
+ 
++  /* Get rid of the core inferior.  */
++  void clear_core ();
++
+   /* The core's section table.  Note that these target sections are
+      *not* mapped in the current address spaces' set of target
+      sections --- those should come only from pure executable or
+@@ -290,10 +293,8 @@ core_target::build_file_mappings ()
+ /* An arbitrary identifier for the core inferior.  */
+ #define CORELOW_PID 1
+ 
+-/* Close the core target.  */
+-
+ void
+-core_target::close ()
++core_target::clear_core ()
+ {
+   if (core_bfd)
+     {
+@@ -307,6 +308,14 @@ core_target::close ()
+ 
+       current_program_space->cbfd.reset (nullptr);
+     }
++}
++
++/* Close the core target.  */
++
++void
++core_target::close ()
++{
++  clear_core ();
+ 
+   /* Core targets are heap-allocated (see core_target_open), so here
+      we delete ourselves.  */
+@@ -592,9 +601,15 @@ core_target_open (const char *arg, int from_tty)
+ void
+ core_target::detach (inferior *inf, int from_tty)
+ {
+-  /* Note that 'this' is dangling after this call.  unpush_target
+-     closes the target, and our close implementation deletes
+-     'this'.  */
++  /* Get rid of the core.  Don't rely on core_target::close doing it,
++     because target_detach may be called with core_target's refcount > 1,
++     meaning core_target::close may not be called yet by the
++     unpush_target call below.  */
++  clear_core ();
++
++  /* Note that 'this' may be dangling after this call.  unpush_target
++     closes the target if the refcount reaches 0, and our close
++     implementation deletes 'this'.  */
+   inf->unpush_target (this);
+ 
+   /* Clear the register cache and the frame cache.  */
+--- a/gdb/testsuite/gdb.base/corefile.exp
++++ b/gdb/testsuite/gdb.base/corefile.exp
+@@ -207,6 +207,16 @@ gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (
+ 
+ gdb_test "core" "No core file now."
+ 
++# Test that we can unload the core with the "detach" command.
++
++proc_with_prefix corefile_detach {} {
++    clean_restart $::binfile
++
++    gdb_test "core-file $::corefile" "Core was generated by .*" "load core"
++    gdb_test "detach" "No core file now\\." "detach core"
++}
++
++corefile_detach
+ 
+ # Test a run (start) command will clear any loaded core file.
+ 
+@@ -222,6 +232,8 @@ proc corefile_test_run {} {
+ 	return
+     }
+ 
++    clean_restart $::binfile
++
+     gdb_test "core-file $corefile" "Core was generated by .*" "run: load core again"
+     gdb_test "info files" "\r\nLocal core dump file:\r\n.*" "run: sanity check we see the core file"
+ 

diff --git a/sys-devel/gdb/gdb-12.1-r2.ebuild b/sys-devel/gdb/gdb-12.1-r2.ebuild
new file mode 100644
index 000000000000..9da927c79e77
--- /dev/null
+++ b/sys-devel/gdb/gdb-12.1-r2.ebuild
@@ -0,0 +1,297 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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.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-3+ LGPL-2.1+"
+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} )"
+
+# 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"
+# ia64 kernel crashes when gdb testsuite is running
+# 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"
+RESTRICT="
+	ia64? ( test )
+	!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
+	elibc_glibc? ( net-libs/libnsl:= )
+	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}-readline-8.2-build.patch
+	"${FILESDIR}"/${P}-core-file-detach.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,ld}
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-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)
+
+		# We need to set both configure options, --with-sysroot and --libdir,
+		# to fix cross build issues that happen when configuring gmp.
+		# We explicitly need --libdir. Having only --with-sysroot without
+		# --libdir would not fix the build issues.
+		# For some reason, it is not enough to set only --with-sysroot,
+		# also not enough to pass --with-gmp-xxx options.
+		--with-sysroot="${ESYSROOT}"
+		--libdir="${ESYSROOT}/usr/$(get_libdir)"
+	)
+
+	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)"
+
+	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_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
+
+	if [[ -n ${PATCH_VER} ]] ; then
+		dodoc "${WORKDIR}"/extra/gdbinit.sample
+	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
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2022-12-03  6:06 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2022-12-03  6:06 UTC (permalink / raw
  To: gentoo-commits

commit:     6744186d10bceadab7c2a4f5bc5c616d655877f7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  3 05:01:15 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec  3 06:06:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6744186d

sys-devel/gdb: fix configure w/ clang 16

Doesn't fix the other build problems yet, but given that implicit. func.
decls can affect all compilers...

Bug: https://bugs.gentoo.org/871543
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gdb/files/gdb-12.1-configure-clang16.patch     | 112 ++++++++
 sys-devel/gdb/gdb-12.1-r3.ebuild                   | 295 +++++++++++++++++++++
 2 files changed, 407 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch b/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch
new file mode 100644
index 000000000000..3b2c15de4895
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch
@@ -0,0 +1,112 @@
+https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0075c53724f78c78aa1692cc8e3bf1433eeb0b9f
+https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=885b6660c17fb91980b5682514ef54668e544b02
+https://bugzilla.redhat.com/show_bug.cgi?id=2143992
+
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Keith Seitz <keiths@redhat.com>
+Date: Tue, 29 Nov 2022 13:43:34 -0800
+Subject: gdb-rhbz2143992-libiberty-fix-c89isms-in-configure.patch
+
+;; libiberty: Fix C89-isms in configure tests
+;; (Florian Weimer, RHBZ 2143992)
+
+    libiberty/
+
+            * acinclude.m4 (ac_cv_func_strncmp_works): Add missing
+            int return type and parameter list to the definition of main.
+            Include <stdlib.h> and <string.h> for prototypes.
+            (ac_cv_c_stack_direction): Add missing
+            int return type and parameter list to the definitions of
+            main, find_stack_direction.  Include <stdlib.h> for exit
+            prototype.
+            * configure: Regenerate.
+
+--- a/libiberty/acinclude.m4
++++ b/libiberty/acinclude.m4
+@@ -24,6 +24,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
+ [AC_TRY_RUN([
+ /* Test by Jim Wilson and Kaveh Ghazi.
+    Check whether strncmp reads past the end of its string parameters. */
++#include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+ 
+ #ifdef HAVE_FCNTL_H
+@@ -51,7 +53,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
+ 
+ #define MAP_LEN 0x10000
+ 
+-main ()
++int
++main (void)
+ {
+ #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
+   char *p;
+@@ -157,7 +160,10 @@ if test $ac_cv_os_cray = yes; then
+ fi
+ 
+ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
+-[AC_TRY_RUN([find_stack_direction ()
++[AC_TRY_RUN([#include <stdlib.h>
++
++int
++find_stack_direction (void)
+ {
+   static char *addr = 0;
+   auto char dummy;
+@@ -169,7 +175,9 @@ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
+   else
+     return (&dummy > addr) ? 1 : -1;
+ }
+-main ()
++
++int
++main (void)
+ {
+   exit (find_stack_direction() < 0);
+ }],
+--- a/libiberty/configure
++++ b/libiberty/configure
+@@ -6918,7 +6918,10 @@ else
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-find_stack_direction ()
++#include <stdlib.h>
++
++int
++find_stack_direction (void)
+ {
+   static char *addr = 0;
+   auto char dummy;
+@@ -6930,7 +6933,9 @@ find_stack_direction ()
+   else
+     return (&dummy > addr) ? 1 : -1;
+ }
+-main ()
++
++int
++main (void)
+ {
+   exit (find_stack_direction() < 0);
+ }
+@@ -7755,6 +7760,8 @@ else
+ 
+ /* Test by Jim Wilson and Kaveh Ghazi.
+    Check whether strncmp reads past the end of its string parameters. */
++#include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+ 
+ #ifdef HAVE_FCNTL_H
+@@ -7782,7 +7789,8 @@ else
+ 
+ #define MAP_LEN 0x10000
+ 
+-main ()
++int
++main (void)
+ {
+ #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
+   char *p;
+

diff --git a/sys-devel/gdb/gdb-12.1-r3.ebuild b/sys-devel/gdb/gdb-12.1-r3.ebuild
new file mode 100644
index 000000000000..d488fd670d9c
--- /dev/null
+++ b/sys-devel/gdb/gdb-12.1-r3.ebuild
@@ -0,0 +1,295 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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.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
+
+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-3+ LGPL-2.1+"
+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} )"
+
+# 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"
+# ia64 kernel crashes when gdb testsuite is running
+# 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"
+RESTRICT="
+	ia64? ( test )
+	!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
+	elibc_glibc? ( net-libs/libnsl:= )
+	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
+	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}-readline-8.2-build.patch
+	"${FILESDIR}"/${P}-core-file-detach.patch
+	"${FILESDIR}"/${P}-configure-clang16.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,ld}
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-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)
+
+		# We need to set both configure options, --with-sysroot and --libdir,
+		# to fix cross build issues that happen when configuring gmp.
+		# We explicitly need --libdir. Having only --with-sysroot without
+		# --libdir would not fix the build issues.
+		# For some reason, it is not enough to set only --with-sysroot,
+		# also not enough to pass --with-gmp-xxx options.
+		--with-sysroot="${ESYSROOT}"
+		--libdir="${ESYSROOT}/usr/$(get_libdir)"
+	)
+
+	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)"
+
+	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_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
+
+	if [[ -n ${PATCH_VER} ]] ; then
+		dodoc "${WORKDIR}"/extra/gdbinit.sample
+	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
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2023-03-19 21:52 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2023-03-19 21:52 UTC (permalink / raw
  To: gentoo-commits

commit:     572e86ac9b0838f4e227460fb482166bce46f961
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 19 21:51:59 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar 19 21:51:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=572e86ac

sys-devel/gdb: fix build w/ clang 16 (-Wenum-constexpr-conversion)

Closes: https://bugs.gentoo.org/894174
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...b-13.1-Wenum-constexpr-conversion-clang16.patch | 128 +++++++++++++++++++++
 sys-devel/gdb/gdb-13.1-r1.ebuild                   |   1 +
 2 files changed, 129 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-13.1-Wenum-constexpr-conversion-clang16.patch b/sys-devel/gdb/files/gdb-13.1-Wenum-constexpr-conversion-clang16.patch
new file mode 100644
index 000000000000..adc09f83ea68
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-13.1-Wenum-constexpr-conversion-clang16.patch
@@ -0,0 +1,128 @@
+https://bugs.gentoo.org/894174
+https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae61525fcf456ab395d55c45492a106d1275873a
+
+From ae61525fcf456ab395d55c45492a106d1275873a Mon Sep 17 00:00:00 2001
+From: Simon Marchi <simon.marchi@efficios.com>
+Date: Thu, 23 Feb 2023 12:35:40 -0500
+Subject: [PATCH] gdbsupport: ignore -Wenum-constexpr-conversion in
+ enum-flags.h
+
+When building with clang 16, we get:
+
+      CXX    gdb.o
+    In file included from /home/smarchi/src/binutils-gdb/gdb/gdb.c:19:
+    In file included from /home/smarchi/src/binutils-gdb/gdb/defs.h:65:
+    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
+        integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
+                                                       ^
+
+The error message does not make it clear in the context of which enum
+flag this fails (i.e. what is T in this context), but it doesn't really
+matter, we have similar warning/errors for many of them, if we let the
+build go through.
+
+clang is right that the value -1 is invalid for the enum type we cast -1
+to.  However, we do need this expression in order to select an integer
+type with the appropriate signedness.  That is, with the same signedness
+as the underlying type of the enum.
+
+I first wondered if that was really needed, if we couldn't use
+std::underlying_type for that.  It turns out that the comment just above
+says:
+
+    /* Note that std::underlying_type<enum_type> is not what we want here,
+       since that returns unsigned int even when the enum decays to signed
+       int.  */
+
+I was surprised, because std::is_signed<std::underlying_type<enum_type>>
+returns the right thing.  So I tried replacing all this with
+std::underlying_type, see if that would work.  Doing so causes some
+build failures in unittests/enum-flags-selftests.c:
+
+      CXX    unittests/enum-flags-selftests.o
+    /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:254:1: error: static assertion failed due to requirement 'gdb::is_same<selftests::enum_flags_tests::check_valid_expr254::archetype<enum_flags<s
+    elftests::enum_flags_tests::RE>, selftests::enum_flags_tests::RE, enum_flags<selftests::enum_flags_tests::RE2>, selftests::enum_flags_tests::RE2, enum_flags<selftests::enum_flags_tests::URE>, selftests::enum_fla
+    gs_tests::URE, int>, selftests::enum_flags_tests::check_valid_expr254::archetype<enum_flags<selftests::enum_flags_tests::RE>, selftests::enum_flags_tests::RE, enum_flags<selftests::enum_flags_tests::RE2>, selfte
+    sts::enum_flags_tests::RE2, enum_flags<selftests::enum_flags_tests::URE>, selftests::enum_flags_tests::URE, unsigned int>>::value == true':
+    CHECK_VALID (true,  int,  true ? EF () : EF2 ())
+    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:91:3: note: expanded from macro 'CHECK_VALID'
+      CHECK_VALID_EXPR_6 (EF, RE, EF2, RE2, UEF, URE, VALID, EXPR_TYPE, EXPR)
+      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:105:3: note: expanded from macro 'CHECK_VALID_EXPR_6'
+      CHECK_VALID_EXPR_INT (ESC_PARENS (typename T1, typename T2,           \
+      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:66:3: note: expanded from macro 'CHECK_VALID_EXPR_INT'
+      static_assert (gdb::is_detected_exact<archetype<TYPES, EXPR_TYPE>,    \
+      ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This is a bit hard to decode, but basically enumerations have the
+following funny property that they decay into a signed int, even if
+their implicit underlying type is unsigned.  This code:
+
+    enum A {};
+    enum B {};
+
+    int main() {
+      std::cout << std::is_signed<std::underlying_type<A>::type>::value
+                << std::endl;
+      std::cout << std::is_signed<std::underlying_type<B>::type>::value
+                << std::endl;
+      auto result = true ? A() : B();
+      std::cout << std::is_signed<decltype(result)>::value << std::endl;
+    }
+
+produces:
+
+    0
+    0
+    1
+
+So, the "CHECK_VALID" above checks that this property works for enum flags the
+same way as it would if you were using their underlying enum types.  And
+somehow, changing integer_for_size to use std::underlying_type breaks that.
+
+Since the current code does what we want, and I don't see any way of doing it
+differently, ignore -Wenum-constexpr-conversion around it.
+
+Change-Id: Ibc82ae7bbdb812102ae3f1dd099fc859dc6f3cc2
+--- a/gdbsupport/enum-flags.h
++++ b/gdbsupport/enum-flags.h
+@@ -91,9 +91,12 @@ template<> struct integer_for_size<8, 1> { typedef int64_t type; };
+ template<typename T>
+ struct enum_underlying_type
+ {
++  DIAGNOSTIC_PUSH
++  DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION
+   typedef typename
+     integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
+     type;
++  DIAGNOSTIC_POP
+ };
+ 
+ namespace enum_flags_detail
+--- a/include/diagnostics.h
++++ b/include/diagnostics.h
+@@ -76,6 +76,11 @@
+ # define DIAGNOSTIC_ERROR_SWITCH \
+   DIAGNOSTIC_ERROR ("-Wswitch")
+ 
++# if __has_warning ("-Wenum-constexpr-conversion")
++#  define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION \
++   DIAGNOSTIC_IGNORE ("-Wenum-constexpr-conversion")
++# endif
++
+ #elif defined (__GNUC__) /* GCC */
+ 
+ # define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS \
+@@ -155,4 +160,8 @@
+ # define DIAGNOSTIC_ERROR_SWITCH
+ #endif
+ 
++#ifndef DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION
++# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION
++#endif
++
+ #endif /* DIAGNOSTICS_H */
+-- 
+2.31.1

diff --git a/sys-devel/gdb/gdb-13.1-r1.ebuild b/sys-devel/gdb/gdb-13.1-r1.ebuild
index bc86849c6276..60adac18680f 100644
--- a/sys-devel/gdb/gdb-13.1-r1.ebuild
+++ b/sys-devel/gdb/gdb-13.1-r1.ebuild
@@ -101,6 +101,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+	"${FILESDIR}"/${P}-Wenum-constexpr-conversion-clang16.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-03-19 21:52 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-09 11:55 [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2023-03-19 21:52 Sam James
2022-12-03  6:06 Sam James
2022-08-10  7:43 Sam James
2022-05-03  0:01 Sam James
2022-04-17 18:20 Sam James
2021-10-25 12:03 Sam James
2021-07-30 15:25 Sergei Trofimovich
2021-04-25 20:57 Sergei Trofimovich
2020-08-21  7:21 Sergei Trofimovich
2020-03-29 10:11 Sergei Trofimovich
2020-01-21  8:24 Sergei Trofimovich
2019-09-30 21:52 Sergei Trofimovich
2019-08-09 20:50 Andreas K. Hüttel
2019-03-14 22:49 Sergei Trofimovich
2019-01-28 22:01 Sergei Trofimovich
2018-10-21 16:27 Sergei Trofimovich
2018-06-30 11:06 Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox