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

commit:     38ffc0e4fc6f5374776ded843f0d65c7fe31c77a
Author:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
AuthorDate: Sun Apr 11 08:35:55 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Apr 11 18:41:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38ffc0e4

sys-devel/binutils-hppa64: stable 2.35.2 for hppa, bug #779802

Package-Manager: Portage-3.0.17, Repoman-3.0.2
RepoMan-Options: --include-arches="hppa"
Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
index 97aa5834c6b..3da9b9ee993 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
+		KEYWORDS="-* hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-11-09 17:35 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-11-09 17:35 UTC (permalink / raw
  To: gentoo-commits

commit:     5d2ab353ae51037fd9e72f7e8ff0e402cb477ea5
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  9 17:31:07 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Nov  9 17:34:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d2ab353

sys-devel/binutils-hppa64: add 2.43-r2 (patchlevel 3)

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.43-r2.ebuild | 534 +++++++++++++++++++++
 2 files changed, 535 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 8f46cc08f4d0..29777418ad0b 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -11,4 +11,5 @@ DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba
 DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f
 DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6
 DIST binutils-2.43-patches-2.tar.xz 35184 BLAKE2B fa35c9f182c7ae0fed28614f47618d1563a58f223fd1805f348b618c1fbf039a444e44d88f46d040b6971e481e0da882e5c4492fd167d17bf39579d87a446434 SHA512 a7e167d3f6a2c08f19af4685d90a6160a1a52f1a87f5660fb6d80ec664033829c0eacad0d77b1306620e50ff89d1f9f63a7c2b064ad9775400f0cb0eba3159a4
+DIST binutils-2.43-patches-3.tar.xz 62692 BLAKE2B a189a01a6a99c4fdff124cf90ecc18f874812c17fc735376c855469c487b6a71489ad5c2f86c518d2e029cc83d65757144ff9abddbe7ec3fc06e22f9501c62f4 SHA512 99a30e18fdfd7bdce85bb903f8d61837cfbb639ead8a680ff1a85ad1d615b658e696bdf196c4a002d029f952d34aa441e09e861b22f5400c65f07cce5934cd8f
 DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild
new file mode 100644
index 000000000000..53e91ed47268
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r2.ebuild
@@ -0,0 +1,534 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=3
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+	debuginfod? (
+		dev-libs/elfutils[debuginfod(-)]
+	)
+	zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		app-alternatives/bc
+	)
+	nls? ( sys-devel/gettext )
+	zstd? ( virtual/pkgconfig )
+	app-alternatives/lex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+
+			# This is applied conditionally for now just out of caution.
+			# It should be okay on non-prefix systems though. See bug #892549.
+			if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
+				eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+					   "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+			fi
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+	use cet && filter-flags -mindirect-branch -mindirect-branch=*
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		# portage's econf() does not detect presence of --d-d-t
+		# because it greps only top-level ./configure. But not
+		# libiberty's or bfd's configure.
+		--disable-dependency-tracking
+		--disable-silent-rules
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		--enable-relro
+		--enable-install-libiberty
+		--enable-textrel-check=$(usex hardened error warning)
+		# Things to think about
+		#--enable-deterministic-archives
+		--enable-new-dtags
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		$(use_with zstd)
+
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags: https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		$(use_with debuginfod)
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	case ${CTARGET} in
+		x86_64-*|aarch64*|arm64*|i[3456]*)
+			# These hardening options are available from 2.39+ but
+			# they unconditionally enable the behaviour even on arches
+			# where e.g. execstacks can't be avoided.
+			# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+			#
+			# TODO: Get the logic for this fixed upstream so it doesn't
+			# create impossible broken combinations on some arches, like mips.
+			#
+			# TODO: Get the logic for this fixed upstream so --disable-* works
+			# as expected.
+			myconf+=(
+				--enable-warn-execstack=yes
+				--enable-warn-rwx-segments=yes
+			)
+
+			if use hardened ; then
+				myconf+=(
+					# TOOD: breaks glibc test suite
+					#--enable-error-execstack=yes
+					#--enable-error-rwx-segments=yes
+					--enable-default-execstack=no
+				)
+			fi
+			;;
+		*)
+			;;
+	esac
+
+	if use elibc_musl ; then
+		# Override our earlier setting for musl, as textrels don't
+		# work there at all. See bug #707660.
+		myconf+=(
+			--enable-textrel-check=error
+		)
+	fi
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	# see linker prefix patch
+	emake \
+		tooldir="${EPREFIX}${TOOLPATH}" \
+		gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+		all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	docompress "${DATAPATH}"/{info,man}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-11-09 17:35 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-11-09 17:35 UTC (permalink / raw
  To: gentoo-commits

commit:     9a0693fefac849f7b018987a00bb082598fc0966
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  9 17:30:18 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Nov  9 17:34:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a0693fe

sys-devel/binutils-hppa64: drop 2.42-r1, 2.43

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64/binutils-hppa64-2.42-r1.ebuild | 534 ---------------------
 .../binutils-hppa64/binutils-hppa64-2.43.ebuild    | 534 ---------------------
 3 files changed, 1070 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 2564051b856e..8f46cc08f4d0 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -8,9 +8,7 @@ DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd24
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
 DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
-DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d
 DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f
 DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6
-DIST binutils-2.43-patches-1.tar.xz 11644 BLAKE2B 578ee67c3c5e67f9191a31a5c83ffcc781f757f8aaee3eea14d052db427cdd2bc769977dba16e9a8c653dcc4a94f11c149898683945d5035d0beeac128045b1a SHA512 e6db4eaf4fbea366e607a7e9a56e20851fcc34664532fd6aa1f0818271c3e2687eada3daca482e211a2b3e36be85e7e0b23158caaa0fdf9785d13a9156e8c734
 DIST binutils-2.43-patches-2.tar.xz 35184 BLAKE2B fa35c9f182c7ae0fed28614f47618d1563a58f223fd1805f348b618c1fbf039a444e44d88f46d040b6971e481e0da882e5c4492fd167d17bf39579d87a446434 SHA512 a7e167d3f6a2c08f19af4685d90a6160a1a52f1a87f5660fb6d80ec664033829c0eacad0d77b1306620e50ff89d1f9f63a7c2b064ad9775400f0cb0eba3159a4
 DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
deleted file mode 100644
index fa9d8b2f4555..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
+++ /dev/null
@@ -1,534 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=3
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-	debuginfod? (
-		dev-libs/elfutils[debuginfod(-)]
-	)
-	zstd? ( app-arch/zstd:= )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		app-alternatives/bc
-	)
-	nls? ( sys-devel/gettext )
-	zstd? ( virtual/pkgconfig )
-	app-alternatives/lex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-
-			# This is applied conditionally for now just out of caution.
-			# It should be okay on non-prefix systems though. See bug #892549.
-			if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
-				eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
-					   "${FILESDIR}"/binutils-2.41-linker-prefix.patch
-			fi
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-	use cet && filter-flags -mindirect-branch -mindirect-branch=*
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		# portage's econf() does not detect presence of --d-d-t
-		# because it greps only top-level ./configure. But not
-		# libiberty's or bfd's configure.
-		--disable-dependency-tracking
-		--disable-silent-rules
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		--enable-relro
-		--enable-install-libiberty
-		--enable-textrel-check=$(usex hardened error warning)
-		# Things to think about
-		#--enable-deterministic-archives
-		--enable-new-dtags
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		$(use_with zstd)
-
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags: https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		$(use_with debuginfod)
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	case ${CTARGET} in
-		x86_64-*|aarch64*|arm64*|i[3456]*)
-			# These hardening options are available from 2.39+ but
-			# they unconditionally enable the behaviour even on arches
-			# where e.g. execstacks can't be avoided.
-			# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-			#
-			# TODO: Get the logic for this fixed upstream so it doesn't
-			# create impossible broken combinations on some arches, like mips.
-			#
-			# TODO: Get the logic for this fixed upstream so --disable-* works
-			# as expected.
-			myconf+=(
-				--enable-warn-execstack=yes
-				--enable-warn-rwx-segments=yes
-			)
-
-			if use hardened ; then
-				myconf+=(
-					# TOOD: breaks glibc test suite
-					#--enable-error-execstack=yes
-					#--enable-error-rwx-segments=yes
-					--enable-default-execstack=no
-				)
-			fi
-			;;
-		*)
-			;;
-	esac
-
-	if use elibc_musl ; then
-		# Override our earlier setting for musl, as textrels don't
-		# work there at all. See bug #707660.
-		myconf+=(
-			--enable-textrel-check=error
-		)
-	fi
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	# see linker prefix patch
-	emake \
-		tooldir="${EPREFIX}${TOOLPATH}" \
-		gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
-		all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	docompress "${DATAPATH}"/{info,man}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild
deleted file mode 100644
index 5207151d0d71..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild
+++ /dev/null
@@ -1,534 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-	debuginfod? (
-		dev-libs/elfutils[debuginfod(-)]
-	)
-	zstd? ( app-arch/zstd:= )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		app-alternatives/bc
-	)
-	nls? ( sys-devel/gettext )
-	zstd? ( virtual/pkgconfig )
-	app-alternatives/lex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-
-			# This is applied conditionally for now just out of caution.
-			# It should be okay on non-prefix systems though. See bug #892549.
-			if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
-				eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
-					   "${FILESDIR}"/binutils-2.41-linker-prefix.patch
-			fi
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-	use cet && filter-flags -mindirect-branch -mindirect-branch=*
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		# portage's econf() does not detect presence of --d-d-t
-		# because it greps only top-level ./configure. But not
-		# libiberty's or bfd's configure.
-		--disable-dependency-tracking
-		--disable-silent-rules
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		--enable-relro
-		--enable-install-libiberty
-		--enable-textrel-check=$(usex hardened error warning)
-		# Things to think about
-		#--enable-deterministic-archives
-		--enable-new-dtags
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		$(use_with zstd)
-
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags: https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		$(use_with debuginfod)
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	case ${CTARGET} in
-		x86_64-*|aarch64*|arm64*|i[3456]*)
-			# These hardening options are available from 2.39+ but
-			# they unconditionally enable the behaviour even on arches
-			# where e.g. execstacks can't be avoided.
-			# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-			#
-			# TODO: Get the logic for this fixed upstream so it doesn't
-			# create impossible broken combinations on some arches, like mips.
-			#
-			# TODO: Get the logic for this fixed upstream so --disable-* works
-			# as expected.
-			myconf+=(
-				--enable-warn-execstack=yes
-				--enable-warn-rwx-segments=yes
-			)
-
-			if use hardened ; then
-				myconf+=(
-					# TOOD: breaks glibc test suite
-					#--enable-error-execstack=yes
-					#--enable-error-rwx-segments=yes
-					--enable-default-execstack=no
-				)
-			fi
-			;;
-		*)
-			;;
-	esac
-
-	if use elibc_musl ; then
-		# Override our earlier setting for musl, as textrels don't
-		# work there at all. See bug #707660.
-		myconf+=(
-			--enable-textrel-check=error
-		)
-	fi
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	# see linker prefix patch
-	emake \
-		tooldir="${EPREFIX}${TOOLPATH}" \
-		gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
-		all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	docompress "${DATAPATH}"/{info,man}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-11-02  2:39 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2024-11-02  2:39 UTC (permalink / raw
  To: gentoo-commits

commit:     49c6b254782b47563e44d09dd8f510ffebda05af
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  2 02:38:22 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov  2 02:38:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49c6b254

sys-devel/binutils-hppa64: Stabilize 2.42-r2 hppa, #940684

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild
index 8e8b0a0d9ddc..73dc3ceeedb0 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild
@@ -34,7 +34,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-08-22 20:23 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-08-22 20:23 UTC (permalink / raw
  To: gentoo-commits

commit:     ef45ec14f58955380c19744ec59ca7171f0a6383
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 20:21:15 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 20:23:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef45ec14

sys-devel/binutils-hppa64: add 2.43 patchlevel 2, identical to upstream 2.43.1

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.43-r1.ebuild | 534 +++++++++++++++++++++
 2 files changed, 535 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 7277864621ad..2564051b856e 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -12,4 +12,5 @@ DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f5037
 DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f
 DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6
 DIST binutils-2.43-patches-1.tar.xz 11644 BLAKE2B 578ee67c3c5e67f9191a31a5c83ffcc781f757f8aaee3eea14d052db427cdd2bc769977dba16e9a8c653dcc4a94f11c149898683945d5035d0beeac128045b1a SHA512 e6db4eaf4fbea366e607a7e9a56e20851fcc34664532fd6aa1f0818271c3e2687eada3daca482e211a2b3e36be85e7e0b23158caaa0fdf9785d13a9156e8c734
+DIST binutils-2.43-patches-2.tar.xz 35184 BLAKE2B fa35c9f182c7ae0fed28614f47618d1563a58f223fd1805f348b618c1fbf039a444e44d88f46d040b6971e481e0da882e5c4492fd167d17bf39579d87a446434 SHA512 a7e167d3f6a2c08f19af4685d90a6160a1a52f1a87f5660fb6d80ec664033829c0eacad0d77b1306620e50ff89d1f9f63a7c2b064ad9775400f0cb0eba3159a4
 DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r1.ebuild
new file mode 100644
index 000000000000..a71d9243c9cc
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.43-r1.ebuild
@@ -0,0 +1,534 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+	debuginfod? (
+		dev-libs/elfutils[debuginfod(-)]
+	)
+	zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		app-alternatives/bc
+	)
+	nls? ( sys-devel/gettext )
+	zstd? ( virtual/pkgconfig )
+	app-alternatives/lex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+
+			# This is applied conditionally for now just out of caution.
+			# It should be okay on non-prefix systems though. See bug #892549.
+			if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
+				eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+					   "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+			fi
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+	use cet && filter-flags -mindirect-branch -mindirect-branch=*
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		# portage's econf() does not detect presence of --d-d-t
+		# because it greps only top-level ./configure. But not
+		# libiberty's or bfd's configure.
+		--disable-dependency-tracking
+		--disable-silent-rules
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		--enable-relro
+		--enable-install-libiberty
+		--enable-textrel-check=$(usex hardened error warning)
+		# Things to think about
+		#--enable-deterministic-archives
+		--enable-new-dtags
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		$(use_with zstd)
+
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags: https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		$(use_with debuginfod)
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	case ${CTARGET} in
+		x86_64-*|aarch64*|arm64*|i[3456]*)
+			# These hardening options are available from 2.39+ but
+			# they unconditionally enable the behaviour even on arches
+			# where e.g. execstacks can't be avoided.
+			# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+			#
+			# TODO: Get the logic for this fixed upstream so it doesn't
+			# create impossible broken combinations on some arches, like mips.
+			#
+			# TODO: Get the logic for this fixed upstream so --disable-* works
+			# as expected.
+			myconf+=(
+				--enable-warn-execstack=yes
+				--enable-warn-rwx-segments=yes
+			)
+
+			if use hardened ; then
+				myconf+=(
+					# TOOD: breaks glibc test suite
+					#--enable-error-execstack=yes
+					#--enable-error-rwx-segments=yes
+					--enable-default-execstack=no
+				)
+			fi
+			;;
+		*)
+			;;
+	esac
+
+	if use elibc_musl ; then
+		# Override our earlier setting for musl, as textrels don't
+		# work there at all. See bug #707660.
+		myconf+=(
+			--enable-textrel-check=error
+		)
+	fi
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	# see linker prefix patch
+	emake \
+		tooldir="${EPREFIX}${TOOLPATH}" \
+		gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+		all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	docompress "${DATAPATH}"/{info,man}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-08-05 10:26 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-08-05 10:26 UTC (permalink / raw
  To: gentoo-commits

commit:     b7d85e40c1e47adb50ee6ff698557455a1c0c316
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  5 10:24:33 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Aug  5 10:25:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7d85e40

sys-devel/binutils-hppa64: keyword 2.43 for -*, ~hppa

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild
index 165b99020180..5207151d0d71 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild
@@ -34,7 +34,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	#KEYWORDS="-* ~hppa"
+	KEYWORDS="-* ~hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-08-05  7:28 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-08-05  7:28 UTC (permalink / raw
  To: gentoo-commits

commit:     de65027391ce2d1932a631d5397f6b88401fcf47
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  5 07:26:12 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Aug  5 07:28:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de650273

sys-devel/binutils-hppa64: add 2.43

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.43.ebuild    | 534 +++++++++++++++++++++
 2 files changed, 536 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 15d8305725ef..7277864621ad 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -11,3 +11,5 @@ DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba
 DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d
 DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f
 DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6
+DIST binutils-2.43-patches-1.tar.xz 11644 BLAKE2B 578ee67c3c5e67f9191a31a5c83ffcc781f757f8aaee3eea14d052db427cdd2bc769977dba16e9a8c653dcc4a94f11c149898683945d5035d0beeac128045b1a SHA512 e6db4eaf4fbea366e607a7e9a56e20851fcc34664532fd6aa1f0818271c3e2687eada3daca482e211a2b3e36be85e7e0b23158caaa0fdf9785d13a9156e8c734
+DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild
new file mode 100644
index 000000000000..165b99020180
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.43.ebuild
@@ -0,0 +1,534 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	#KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+	debuginfod? (
+		dev-libs/elfutils[debuginfod(-)]
+	)
+	zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		app-alternatives/bc
+	)
+	nls? ( sys-devel/gettext )
+	zstd? ( virtual/pkgconfig )
+	app-alternatives/lex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+
+			# This is applied conditionally for now just out of caution.
+			# It should be okay on non-prefix systems though. See bug #892549.
+			if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
+				eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+					   "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+			fi
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+	use cet && filter-flags -mindirect-branch -mindirect-branch=*
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		# portage's econf() does not detect presence of --d-d-t
+		# because it greps only top-level ./configure. But not
+		# libiberty's or bfd's configure.
+		--disable-dependency-tracking
+		--disable-silent-rules
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		--enable-relro
+		--enable-install-libiberty
+		--enable-textrel-check=$(usex hardened error warning)
+		# Things to think about
+		#--enable-deterministic-archives
+		--enable-new-dtags
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		$(use_with zstd)
+
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags: https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		$(use_with debuginfod)
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	case ${CTARGET} in
+		x86_64-*|aarch64*|arm64*|i[3456]*)
+			# These hardening options are available from 2.39+ but
+			# they unconditionally enable the behaviour even on arches
+			# where e.g. execstacks can't be avoided.
+			# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+			#
+			# TODO: Get the logic for this fixed upstream so it doesn't
+			# create impossible broken combinations on some arches, like mips.
+			#
+			# TODO: Get the logic for this fixed upstream so --disable-* works
+			# as expected.
+			myconf+=(
+				--enable-warn-execstack=yes
+				--enable-warn-rwx-segments=yes
+			)
+
+			if use hardened ; then
+				myconf+=(
+					# TOOD: breaks glibc test suite
+					#--enable-error-execstack=yes
+					#--enable-error-rwx-segments=yes
+					--enable-default-execstack=no
+				)
+			fi
+			;;
+		*)
+			;;
+	esac
+
+	if use elibc_musl ; then
+		# Override our earlier setting for musl, as textrels don't
+		# work there at all. See bug #707660.
+		myconf+=(
+			--enable-textrel-check=error
+		)
+	fi
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	# see linker prefix patch
+	emake \
+		tooldir="${EPREFIX}${TOOLPATH}" \
+		gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+		all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	docompress "${DATAPATH}"/{info,man}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-06-29 23:09 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-06-29 23:09 UTC (permalink / raw
  To: gentoo-commits

commit:     a4675cd024584f877d506cd79b843abab240cc98
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 29 23:07:21 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jun 29 23:08:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4675cd0

sys-devel/binutils-hppa64: patchlevel 6 bump

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.42-r2.ebuild | 534 +++++++++++++++++++++
 2 files changed, 535 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 1ab98699a912..15d8305725ef 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -9,4 +9,5 @@ DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b830
 DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
 DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d
+DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f
 DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild
new file mode 100644
index 000000000000..8e8b0a0d9ddc
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r2.ebuild
@@ -0,0 +1,534 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=6
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+	debuginfod? (
+		dev-libs/elfutils[debuginfod(-)]
+	)
+	zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		app-alternatives/bc
+	)
+	nls? ( sys-devel/gettext )
+	zstd? ( virtual/pkgconfig )
+	app-alternatives/lex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+
+			# This is applied conditionally for now just out of caution.
+			# It should be okay on non-prefix systems though. See bug #892549.
+			if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
+				eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+					   "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+			fi
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+	use cet && filter-flags -mindirect-branch -mindirect-branch=*
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		# portage's econf() does not detect presence of --d-d-t
+		# because it greps only top-level ./configure. But not
+		# libiberty's or bfd's configure.
+		--disable-dependency-tracking
+		--disable-silent-rules
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		--enable-relro
+		--enable-install-libiberty
+		--enable-textrel-check=$(usex hardened error warning)
+		# Things to think about
+		#--enable-deterministic-archives
+		--enable-new-dtags
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		$(use_with zstd)
+
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags: https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		$(use_with debuginfod)
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	case ${CTARGET} in
+		x86_64-*|aarch64*|arm64*|i[3456]*)
+			# These hardening options are available from 2.39+ but
+			# they unconditionally enable the behaviour even on arches
+			# where e.g. execstacks can't be avoided.
+			# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+			#
+			# TODO: Get the logic for this fixed upstream so it doesn't
+			# create impossible broken combinations on some arches, like mips.
+			#
+			# TODO: Get the logic for this fixed upstream so --disable-* works
+			# as expected.
+			myconf+=(
+				--enable-warn-execstack=yes
+				--enable-warn-rwx-segments=yes
+			)
+
+			if use hardened ; then
+				myconf+=(
+					# TOOD: breaks glibc test suite
+					#--enable-error-execstack=yes
+					#--enable-error-rwx-segments=yes
+					--enable-default-execstack=no
+				)
+			fi
+			;;
+		*)
+			;;
+	esac
+
+	if use elibc_musl ; then
+		# Override our earlier setting for musl, as textrels don't
+		# work there at all. See bug #707660.
+		myconf+=(
+			--enable-textrel-check=error
+		)
+	fi
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	# see linker prefix patch
+	emake \
+		tooldir="${EPREFIX}${TOOLPATH}" \
+		gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+		all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	docompress "${DATAPATH}"/{info,man}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-06-28 18:05 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2024-06-28 18:05 UTC (permalink / raw
  To: gentoo-commits

commit:     befd3b2c2f62566e54e26b60e02cd358733f5fd0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 28 18:04:50 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 28 18:04:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=befd3b2c

sys-devel/binutils-hppa64: Stabilize 2.42-r1 hppa, #931298

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
index 53e91ed47268..fa9d8b2f4555 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
@@ -34,7 +34,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-04-26 11:49 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-04-26 11:49 UTC (permalink / raw
  To: gentoo-commits

commit:     ba270450cf6d80ce6299e18d5a4658b846e7707c
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 26 11:48:12 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Apr 26 11:49:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba270450

sys-devel/binutils-hppa64: drop 2.41-r3

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.41-r3.ebuild | 497 ---------------------
 2 files changed, 498 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 253059918a79..1ab98699a912 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -6,7 +6,6 @@ DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d31
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
 DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
-DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5
 DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
 DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
deleted file mode 100644
index cfe58c7c1e4f..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
+++ /dev/null
@@ -1,497 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=4
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		app-alternatives/bc
-	)
-	nls? ( sys-devel/gettext )
-	app-alternatives/lex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		# portage's econf() does not detect presence of --d-d-t
-		# because it greps only top-level ./configure. But not
-		# libiberty's or bfd's configure.
-		--disable-dependency-tracking
-		--disable-silent-rules
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-
-		# These hardening options are available from 2.39+ but
-		# they unconditionally enable the behaviour even on arches
-		# where e.g. execstacks can't be avoided.
-		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-		#--enable-warn-execstack
-		#--enable-warn-rwx-segments
-		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
-
-		# Things to think about
-		#--enable-deterministic-archives
-
-		# Works better than vapier's patch, bug #808787
-		--enable-new-dtags
-
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# Avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-03-23 16:02 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2024-03-23 16:02 UTC (permalink / raw
  To: gentoo-commits

commit:     cff065bdfa9310aaa6f8a7a86d711a7c133ad013
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 16:01:13 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 16:01:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cff065bd

sys-devel/binutils-hppa64: drop stale autoconf 2.13 handling

See 010b4be4c695d267514d7c8ea65590f22a4cf133.

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild | 11 -----------
 sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild    | 11 -----------
 sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild    | 11 -----------
 sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild    | 11 -----------
 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild    | 11 -----------
 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild    | 11 -----------
 sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild    | 11 -----------
 7 files changed, 77 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index 62687be11ca8..144ce57e1699 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
@@ -122,17 +122,6 @@ src_prepare() {
 		-e 's:@bfdincludedir@:@includedir@:g' \
 		{bfd,opcodes}/Makefile.in || die
 
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
 	# Fix conflicts with newer glibc #272594
 	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
 		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index 6e2caef9b99a..909ed7c262ce 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -123,17 +123,6 @@ src_prepare() {
 		-e 's:@bfdincludedir@:@includedir@:g' \
 		{bfd,opcodes}/Makefile.in || die
 
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
 	# Apply things from PATCHES and user dirs
 	default
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
index 7d9b8087884d..9b2ba15370d8 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
@@ -123,17 +123,6 @@ src_prepare() {
 		-e 's:@bfdincludedir@:@includedir@:g' \
 		{bfd,opcodes}/Makefile.in || die
 
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
 	# Apply things from PATCHES and user dirs
 	default
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
index 7d9b8087884d..9b2ba15370d8 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
@@ -123,17 +123,6 @@ src_prepare() {
 		-e 's:@bfdincludedir@:@includedir@:g' \
 		{bfd,opcodes}/Makefile.in || die
 
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
 	# Apply things from PATCHES and user dirs
 	default
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
index 2288c5a0186f..cfe58c7c1e4f 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
@@ -123,17 +123,6 @@ src_prepare() {
 		-e 's:@bfdincludedir@:@includedir@:g' \
 		{bfd,opcodes}/Makefile.in || die
 
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
 	# Apply things from PATCHES and user dirs
 	default
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
index b7c959c290e3..c4fc096afca6 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
@@ -123,17 +123,6 @@ src_prepare() {
 		-e 's:@bfdincludedir@:@includedir@:g' \
 		{bfd,opcodes}/Makefile.in || die
 
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
 	# Apply things from PATCHES and user dirs
 	default
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
index 9826f659b232..53e91ed47268 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
@@ -134,17 +134,6 @@ src_prepare() {
 		-e 's:@bfdincludedir@:@includedir@:g' \
 		{bfd,opcodes}/Makefile.in || die
 
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
 	# Apply things from PATCHES and user dirs
 	default
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-03-08 19:59 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2024-03-08 19:59 UTC (permalink / raw
  To: gentoo-commits

commit:     bd72dc1ebb02322e44ad919f8eeab73edafcf3be
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  8 19:58:57 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar  8 19:58:57 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd72dc1e

sys-devel/binutils-hppa64: don't apply prefix hack patch here

'is_cross' fires because of hppa64 vs hppa2.0.

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
index 0341625022de..9826f659b232 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
@@ -121,7 +121,7 @@ src_prepare() {
 
 			# This is applied conditionally for now just out of caution.
 			# It should be okay on non-prefix systems though. See bug #892549.
-			if is_cross || use prefix; then
+			if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
 				eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
 					   "${FILESDIR}"/binutils-2.41-linker-prefix.patch
 			fi


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-03-08 19:54 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2024-03-08 19:54 UTC (permalink / raw
  To: gentoo-commits

commit:     e9e8a9fd5296a6e2290d141ce36a6956b7ecb022
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  8 19:53:17 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar  8 19:53:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9e8a9fd

sys-devel/binutils-hppa64: Stabilize 2.41-r5 hppa, #916452

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
index 3f322c6559f0..b7c959c290e3 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
@@ -35,7 +35,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-02-18 14:33 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-02-18 14:33 UTC (permalink / raw
  To: gentoo-commits

commit:     531c2a6de35f66b8772c33e8d90d216a572ed8dc
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 18 14:31:04 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Feb 18 14:31:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=531c2a6d

sys-devel/binutils-hppa64: keyword 2.42-r1 for -*, ~hppa

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
index 3eb528d69dd5..0341625022de 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
@@ -34,7 +34,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	#KEYWORDS="-* ~hppa"
+	KEYWORDS="-* ~hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-02-18 14:33 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-02-18 14:33 UTC (permalink / raw
  To: gentoo-commits

commit:     f30343f4534e27db6c9048b195287c50c0e326b5
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 18 14:31:38 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Feb 18 14:31:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f30343f4

sys-devel/binutils-hppa64: drop 2.40-r5, 2.41-r1

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64/binutils-hppa64-2.40-r5.ebuild | 503 --------------------
 .../binutils-hppa64/binutils-hppa64-2.41-r1.ebuild | 508 ---------------------
 3 files changed, 1013 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index bc7ea7537578..253059918a79 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,10 +4,8 @@ DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a36
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
 DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
-DIST binutils-2.40-patches-5.tar.xz 293628 BLAKE2B b7ed1d1fbf38b420661f984b9519b3d863da45b2a873773a521310021b0c1d5d7c24c152adb3e8a999d40f5619c0e54962114590ec9528380089977af0c30b74 SHA512 6e6df932b18ca20fe245b3ff8d3d06dbdae4daadaec3b668fa44e086d4e8ff56439681b2d810ebc74173b6348020edacb176e8c3cbf20657cce04297b97f4f83
 DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
-DIST binutils-2.41-patches-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23798fe3017961ce079325c20f456b837cab11560d896065f70953b0bab55bf565288541579e9c3e0991a87083edf2a85fa5 SHA512 75619a5e17b75d72f9bdd9d5e5ee3b566c94de64410bfc074f1a9bfb9f08db9ecf8be216efa1053263468aa8ec99b8aa3b2b095e63cb95f3566500ac0c3b9432
 DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5
 DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
deleted file mode 100644
index 434ff692a37a..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
+++ /dev/null
@@ -1,503 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		app-alternatives/bc
-	)
-	nls? ( sys-devel/gettext )
-	app-alternatives/lex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-
-		# These hardening options are available from 2.39+ but
-		# they unconditionally enable the behaviour even on arches
-		# where e.g. execstacks can't be avoided.
-		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-		#--enable-warn-execstack
-		#--enable-warn-rwx-segments
-		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
-
-		# Things to think about
-		#--enable-deterministic-archives
-
-		# Works better than vapier's patch, bug #808787
-		--enable-new-dtags
-
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# Avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake V=1 info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k V=1 check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
deleted file mode 100644
index 3c95a2df7fa6..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
+++ /dev/null
@@ -1,508 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=2
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		app-alternatives/bc
-	)
-	nls? ( sys-devel/gettext )
-	app-alternatives/lex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		# portage's econf() does not detect presence of --d-d-t
-		# because it greps only top-level ./configure. But not
-		# libiberty's or bfd's configure.
-		--disable-dependency-tracking
-		--disable-silent-rules
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-
-		# These hardening options are available from 2.39+ but
-		# they unconditionally enable the behaviour even on arches
-		# where e.g. execstacks can't be avoided.
-		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-		#--enable-warn-execstack
-		#--enable-warn-rwx-segments
-		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
-
-		# Things to think about
-		#--enable-deterministic-archives
-
-		# Works better than vapier's patch, bug #808787
-		--enable-new-dtags
-
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# Avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-02-16  0:22 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-02-16  0:22 UTC (permalink / raw
  To: gentoo-commits

commit:     c70971933bcbf9e32d1ed528900c82c7076b6986
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 16 00:19:28 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Feb 16 00:21:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7097193

sys-devel/binutils-hppa64: add 2.42

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.42-r1.ebuild | 545 +++++++++++++++++++++
 sys-devel/binutils-hppa64/metadata.xml             |   1 +
 3 files changed, 548 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 178eafeba796..bc7ea7537578 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -11,3 +11,5 @@ DIST binutils-2.41-patches-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23
 DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5
 DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
+DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d
+DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
new file mode 100644
index 000000000000..3eb528d69dd5
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
@@ -0,0 +1,545 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=3
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	#KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+	debuginfod? (
+		dev-libs/elfutils[debuginfod(-)]
+	)
+	zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		app-alternatives/bc
+	)
+	nls? ( sys-devel/gettext )
+	zstd? ( virtual/pkgconfig )
+	app-alternatives/lex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+
+			# This is applied conditionally for now just out of caution.
+			# It should be okay on non-prefix systems though. See bug #892549.
+			if is_cross || use prefix; then
+				eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+					   "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+			fi
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+	use cet && filter-flags -mindirect-branch -mindirect-branch=*
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		# portage's econf() does not detect presence of --d-d-t
+		# because it greps only top-level ./configure. But not
+		# libiberty's or bfd's configure.
+		--disable-dependency-tracking
+		--disable-silent-rules
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		--enable-relro
+		--enable-install-libiberty
+		--enable-textrel-check=$(usex hardened error warning)
+		# Things to think about
+		#--enable-deterministic-archives
+		--enable-new-dtags
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		$(use_with zstd)
+
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags: https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		$(use_with debuginfod)
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	case ${CTARGET} in
+		x86_64-*|aarch64*|arm64*|i[3456]*)
+			# These hardening options are available from 2.39+ but
+			# they unconditionally enable the behaviour even on arches
+			# where e.g. execstacks can't be avoided.
+			# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+			#
+			# TODO: Get the logic for this fixed upstream so it doesn't
+			# create impossible broken combinations on some arches, like mips.
+			#
+			# TODO: Get the logic for this fixed upstream so --disable-* works
+			# as expected.
+			myconf+=(
+				--enable-warn-execstack=yes
+				--enable-warn-rwx-segments=yes
+			)
+
+			if use hardened ; then
+				myconf+=(
+					# TOOD: breaks glibc test suite
+					#--enable-error-execstack=yes
+					#--enable-error-rwx-segments=yes
+					--enable-default-execstack=no
+				)
+			fi
+			;;
+		*)
+			;;
+	esac
+
+	if use elibc_musl ; then
+		# Override our earlier setting for musl, as textrels don't
+		# work there at all. See bug #707660.
+		myconf+=(
+			--enable-textrel-check=error
+		)
+	fi
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	# see linker prefix patch
+	emake \
+		tooldir="${EPREFIX}${TOOLPATH}" \
+		gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+		all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	docompress "${DATAPATH}"/{info,man}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/metadata.xml b/sys-devel/binutils-hppa64/metadata.xml
index 3b4c9e9ea2e1..5e566060dac2 100644
--- a/sys-devel/binutils-hppa64/metadata.xml
+++ b/sys-devel/binutils-hppa64/metadata.xml
@@ -17,6 +17,7 @@
 		<flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
 		<flag name="plugins">Enable plugin support in tools</flag>
 		<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
+		<flag name="debuginfod">Enable debuginfod support via <pkg>dev-libs/elfutils</pkg> libdebuginfod</flag>
 	</use>
 	<upstream>
 		<remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-01-24 10:02 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2024-01-24 10:02 UTC (permalink / raw
  To: gentoo-commits

commit:     da4435a0de76f8d8f30d9e03fa26437c2c84b94e
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 24 10:01:00 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Jan 24 10:01:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da4435a0

sys-devel/binutils-hppa64: add 2.41 patchlevel 5

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.41-r5.ebuild | 508 +++++++++++++++++++++
 2 files changed, 509 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index eb0392e3eb5c..178eafeba796 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -9,4 +9,5 @@ DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd24
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
 DIST binutils-2.41-patches-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23798fe3017961ce079325c20f456b837cab11560d896065f70953b0bab55bf565288541579e9c3e0991a87083edf2a85fa5 SHA512 75619a5e17b75d72f9bdd9d5e5ee3b566c94de64410bfc074f1a9bfb9f08db9ecf8be216efa1053263468aa8ec99b8aa3b2b095e63cb95f3566500ac0c3b9432
 DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5
+DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
new file mode 100644
index 000000000000..3f322c6559f0
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
@@ -0,0 +1,508 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=5
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		app-alternatives/bc
+	)
+	nls? ( sys-devel/gettext )
+	app-alternatives/lex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		# portage's econf() does not detect presence of --d-d-t
+		# because it greps only top-level ./configure. But not
+		# libiberty's or bfd's configure.
+		--disable-dependency-tracking
+		--disable-silent-rules
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-01-08 12:03 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2024-01-08 12:03 UTC (permalink / raw
  To: gentoo-commits

commit:     99f074ea5c409c6b471b9182dce11ccc70714004
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  8 11:52:25 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan  8 12:03:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99f074ea

sys-devel/binutils-hppa64: sys-devel/flex -> app-alternatives/lex

All of these will be using app-alternatives/lex anyway as they're not unsetting

YACC or LEX, so make the dep reflect reality.

(Included both YACC and LEX out of conservatism.)

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild    | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild    | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild    | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild    | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild    | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild    | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index e46ce4921873..62687be11ca8 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
@@ -63,7 +63,7 @@ BDEPEND="
 		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
-	sys-devel/flex
+	app-alternatives/lex
 	app-alternatives/yacc
 "
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index bafa40990f2c..6e2caef9b99a 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -64,7 +64,7 @@ BDEPEND="
 		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
-	sys-devel/flex
+	app-alternatives/lex
 	app-alternatives/yacc
 "
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
index 402f02e4d639..7d9b8087884d 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
@@ -64,7 +64,7 @@ BDEPEND="
 		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
-	sys-devel/flex
+	app-alternatives/lex
 	app-alternatives/yacc
 "
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
index 0051c2834d03..434ff692a37a 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
@@ -64,7 +64,7 @@ BDEPEND="
 		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
-	sys-devel/flex
+	app-alternatives/lex
 	app-alternatives/yacc
 "
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
index 402f02e4d639..7d9b8087884d 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
@@ -64,7 +64,7 @@ BDEPEND="
 		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
-	sys-devel/flex
+	app-alternatives/lex
 	app-alternatives/yacc
 "
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
index f40b50c5f376..3c95a2df7fa6 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
@@ -64,7 +64,7 @@ BDEPEND="
 		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
-	sys-devel/flex
+	app-alternatives/lex
 	app-alternatives/yacc
 "
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
index b6628e176458..2288c5a0186f 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
@@ -64,7 +64,7 @@ BDEPEND="
 		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
-	sys-devel/flex
+	app-alternatives/lex
 	app-alternatives/yacc
 "
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-01-08  9:48 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2024-01-08  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     d56a1e5d5be1db1221c0b1554dc3b85509f7d260
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  8 09:40:20 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan  8 09:42:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d56a1e5d

sys-devel/binutils-hppa64: sys-devel/bc -> app-alternatives/bc

All of these will be using app-alternatives/bc anyway as they're not calling

bc-reference, so make the dep reflect reality.

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild | 4 ++--
 sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild    | 4 ++--
 sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild    | 4 ++--
 sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild    | 4 ++--
 sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild    | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild    | 4 ++--
 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild    | 2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index 559d2f8de6ce..e46ce4921873 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -60,7 +60,7 @@ BDEPEND="
 	doc? ( sys-apps/texinfo )
 	test? (
 		dev-util/dejagnu
-		sys-devel/bc
+		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
 	sys-devel/flex

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index 9bc8365ff2fb..bafa40990f2c 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -61,7 +61,7 @@ BDEPEND="
 	doc? ( sys-apps/texinfo )
 	test? (
 		dev-util/dejagnu
-		sys-devel/bc
+		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
 	sys-devel/flex

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
index b4db6a4faa9b..402f02e4d639 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -61,7 +61,7 @@ BDEPEND="
 	doc? ( sys-apps/texinfo )
 	test? (
 		dev-util/dejagnu
-		sys-devel/bc
+		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
 	sys-devel/flex

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
index 06a3dde3e097..0051c2834d03 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -61,7 +61,7 @@ BDEPEND="
 	doc? ( sys-apps/texinfo )
 	test? (
 		dev-util/dejagnu
-		sys-devel/bc
+		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
 	sys-devel/flex

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
index 781159f19416..402f02e4d639 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
@@ -61,7 +61,7 @@ BDEPEND="
 	doc? ( sys-apps/texinfo )
 	test? (
 		dev-util/dejagnu
-		sys-devel/bc
+		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
 	sys-devel/flex

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
index a55806e99391..f40b50c5f376 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -61,7 +61,7 @@ BDEPEND="
 	doc? ( sys-apps/texinfo )
 	test? (
 		dev-util/dejagnu
-		sys-devel/bc
+		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
 	sys-devel/flex

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
index 70b4db069d9f..b6628e176458 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
@@ -61,7 +61,7 @@ BDEPEND="
 	doc? ( sys-apps/texinfo )
 	test? (
 		dev-util/dejagnu
-		sys-devel/bc
+		app-alternatives/bc
 	)
 	nls? ( sys-devel/gettext )
 	sys-devel/flex


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-01-07  8:28 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2024-01-07  8:28 UTC (permalink / raw
  To: gentoo-commits

commit:     34eef6e355a850c04a4ae5b6c16bd066962b72e8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  7 08:27:37 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan  7 08:27:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34eef6e3

sys-devel/binutils-hppa64: Stabilize 2.41-r3 hppa, #916452

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
index b4008fdbbb7a..70b4db069d9f 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -35,7 +35,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2024-01-07  8:27 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2024-01-07  8:27 UTC (permalink / raw
  To: gentoo-commits

commit:     5fad02c0d0cfac9004fedf566c68c991d829b902
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  7 08:26:03 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan  7 08:26:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fad02c0

sys-devel/binutils-hppa64: Stabilize 2.40-r7 hppa, #916458

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
index ebf77c42f26b..781159f19416 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -35,7 +35,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-12-17 12:20 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-12-17 12:20 UTC (permalink / raw
  To: gentoo-commits

commit:     2db39c2751474a369002a28cf40327a5c2246c42
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 17 12:18:32 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Dec 17 12:20:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2db39c27

sys-devel/binutils-hppa64: revbump, patch level 2.41 4

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.41-r3.ebuild | 508 +++++++++++++++++++++
 2 files changed, 509 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 0892d32e0900..eb0392e3eb5c 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -8,4 +8,5 @@ DIST binutils-2.40-patches-5.tar.xz 293628 BLAKE2B b7ed1d1fbf38b420661f984b9519b
 DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
 DIST binutils-2.41-patches-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23798fe3017961ce079325c20f456b837cab11560d896065f70953b0bab55bf565288541579e9c3e0991a87083edf2a85fa5 SHA512 75619a5e17b75d72f9bdd9d5e5ee3b566c94de64410bfc074f1a9bfb9f08db9ecf8be216efa1053263468aa8ec99b8aa3b2b095e63cb95f3566500ac0c3b9432
+DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
new file mode 100644
index 000000000000..b4008fdbbb7a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
@@ -0,0 +1,508 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		# portage's econf() does not detect presence of --d-d-t
+		# because it greps only top-level ./configure. But not
+		# libiberty's or bfd's configure.
+		--disable-dependency-tracking
+		--disable-silent-rules
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-08-20 20:51 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-08-20 20:51 UTC (permalink / raw
  To: gentoo-commits

commit:     95e4e09f9bdca5e81c7c7224ff65b369909483da
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 20 20:50:48 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Aug 20 20:50:48 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95e4e09f

sys-devel/binutils-hppa64: drop 2.41

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.41.ebuild    | 508 ---------------------
 2 files changed, 509 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 09a3a5c5d409..0892d32e0900 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -7,6 +7,5 @@ DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79ed
 DIST binutils-2.40-patches-5.tar.xz 293628 BLAKE2B b7ed1d1fbf38b420661f984b9519b3d863da45b2a873773a521310021b0c1d5d7c24c152adb3e8a999d40f5619c0e54962114590ec9528380089977af0c30b74 SHA512 6e6df932b18ca20fe245b3ff8d3d06dbdae4daadaec3b668fa44e086d4e8ff56439681b2d810ebc74173b6348020edacb176e8c3cbf20657cce04297b97f4f83
 DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
-DIST binutils-2.41-patches-1.tar.xz 13260 BLAKE2B b7431ec92d5ce0e5d4438b31ca356c8d5366bee9aa8ff2f098a77c2add5b7539f733d0a18988337490af34c9192affbb6ccdf56b97413a8dca3192fb2125b313 SHA512 30548e4f3187444dbfa82587b5b8a0d2ab9d536aa06a572393a195649759149124d79c488c07919850c7ed4940481b852462d5a1aa52ed9162d81d6d3b290377
 DIST binutils-2.41-patches-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23798fe3017961ce079325c20f456b837cab11560d896065f70953b0bab55bf565288541579e9c3e0991a87083edf2a85fa5 SHA512 75619a5e17b75d72f9bdd9d5e5ee3b566c94de64410bfc074f1a9bfb9f08db9ecf8be216efa1053263468aa8ec99b8aa3b2b095e63cb95f3566500ac0c3b9432
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
deleted file mode 100644
index c94f482160a4..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
+++ /dev/null
@@ -1,508 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		# portage's econf() does not detect presence of --d-d-t
-		# because it greps only top-level ./configure. But not
-		# libiberty's or bfd's configure.
-		--disable-dependency-tracking
-		--disable-silent-rules
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-
-		# These hardening options are available from 2.39+ but
-		# they unconditionally enable the behaviour even on arches
-		# where e.g. execstacks can't be avoided.
-		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-		#--enable-warn-execstack
-		#--enable-warn-rwx-segments
-		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
-
-		# Things to think about
-		#--enable-deterministic-archives
-
-		# Works better than vapier's patch, bug #808787
-		--enable-new-dtags
-
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# Avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-08-08 16:31 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2023-08-08 16:31 UTC (permalink / raw
  To: gentoo-commits

commit:     4d6e66d95fb666111c3c1579dbf52a73a0196f1a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  8 06:02:52 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug  8 16:30:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d6e66d9

sys-devel/binutils-hppa64: cleanup more V=1

Oops, missed this. I only did 2.41, not 2.41-r1 before.

Fixes: 91736e72744ca4736f26c0331c8f4f3ffb8f5d8f
Fixes: dcdef53cc104310eb50e31e3a450cd54c22a18d0
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
index bc93b8c5f4f7..a55806e99391 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
@@ -328,11 +328,11 @@ src_compile() {
 	cd "${MY_BUILDDIR}" || die
 
 	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
 
 	# only build info pages if the user wants them
 	if use doc ; then
-		emake V=1 info
+		emake info
 	fi
 
 	# we nuke the manpages when we're left with junk
@@ -346,7 +346,7 @@ src_test() {
 	# bug #637066
 	filter-flags -Wall -Wreturn-type
 
-	emake -k V=1 check
+	emake -k check
 }
 
 src_install() {
@@ -355,7 +355,7 @@ src_install() {
 	cd "${MY_BUILDDIR}" || die
 
 	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
 	rm -rf "${ED}"/${LIBPATH}/bin || die
 	use static-libs || find "${ED}" -name '*.la' -delete
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-08-08  5:22 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2023-08-08  5:22 UTC (permalink / raw
  To: gentoo-commits

commit:     91736e72744ca4736f26c0331c8f4f3ffb8f5d8f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  8 05:21:53 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug  8 05:21:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91736e72

sys-devel/binutils-hppa64: cleanup obsolete V=1

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
index 983d7f522d26..c94f482160a4 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
@@ -328,11 +328,11 @@ src_compile() {
 	cd "${MY_BUILDDIR}" || die
 
 	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
 
 	# only build info pages if the user wants them
 	if use doc ; then
-		emake V=1 info
+		emake info
 	fi
 
 	# we nuke the manpages when we're left with junk
@@ -346,7 +346,7 @@ src_test() {
 	# bug #637066
 	filter-flags -Wall -Wreturn-type
 
-	emake -k V=1 check
+	emake -k check
 }
 
 src_install() {
@@ -355,7 +355,7 @@ src_install() {
 	cd "${MY_BUILDDIR}" || die
 
 	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
 	rm -rf "${ED}"/${LIBPATH}/bin || die
 	use static-libs || find "${ED}" -name '*.la' -delete
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-08-08  2:23 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2023-08-08  2:23 UTC (permalink / raw
  To: gentoo-commits

commit:     6b87290f0b9292739de653eba72c9e7a5c4c0011
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  8 02:23:20 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug  8 02:23:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b87290f

sys-devel/binutils-hppa64: Stabilize 2.40-r5 hppa, #909412

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
index 7fd42451e5aa..06a3dde3e097 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
@@ -35,7 +35,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-08-04 11:06 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-08-04 11:06 UTC (permalink / raw
  To: gentoo-commits

commit:     c2876f576c6e67f8443b277e727e60316c29d9a1
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  4 11:05:15 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Aug  4 11:06:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2876f57

sys-devel/binutils-hppa64: 2.41 patchlevel 2 bump (2.41-r1)

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.41-r1.ebuild | 508 +++++++++++++++++++++
 2 files changed, 509 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 647cf6a08c49..09a3a5c5d409 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -8,4 +8,5 @@ DIST binutils-2.40-patches-5.tar.xz 293628 BLAKE2B b7ed1d1fbf38b420661f984b9519b
 DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
 DIST binutils-2.41-patches-1.tar.xz 13260 BLAKE2B b7431ec92d5ce0e5d4438b31ca356c8d5366bee9aa8ff2f098a77c2add5b7539f733d0a18988337490af34c9192affbb6ccdf56b97413a8dca3192fb2125b313 SHA512 30548e4f3187444dbfa82587b5b8a0d2ab9d536aa06a572393a195649759149124d79c488c07919850c7ed4940481b852462d5a1aa52ed9162d81d6d3b290377
+DIST binutils-2.41-patches-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23798fe3017961ce079325c20f456b837cab11560d896065f70953b0bab55bf565288541579e9c3e0991a87083edf2a85fa5 SHA512 75619a5e17b75d72f9bdd9d5e5ee3b566c94de64410bfc074f1a9bfb9f08db9ecf8be216efa1053263468aa8ec99b8aa3b2b095e63cb95f3566500ac0c3b9432
 DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
new file mode 100644
index 000000000000..bc93b8c5f4f7
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r1.ebuild
@@ -0,0 +1,508 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		# portage's econf() does not detect presence of --d-d-t
+		# because it greps only top-level ./configure. But not
+		# libiberty's or bfd's configure.
+		--disable-dependency-tracking
+		--disable-silent-rules
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-08-04  1:53 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2023-08-04  1:53 UTC (permalink / raw
  To: gentoo-commits

commit:     dcdef53cc104310eb50e31e3a450cd54c22a18d0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  4 01:50:56 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug  4 01:51:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcdef53c

sys-devel/binutils-hppa64: pass --disable-dependency-tracking, --disable-silent-rules

We already do this for gdb, do the same for binutils. Portage/econf only greps
the top-level configure which has neither of these, but the subconfigure dirs
do.

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
index a02cbef8641b..d905d2bf2219 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
@@ -241,6 +241,11 @@ src_configure() {
 		--libdir="${EPREFIX}"${LIBPATH}
 		--libexecdir="${EPREFIX}"${LIBPATH}
 		--includedir="${EPREFIX}"${INCPATH}
+		# portage's econf() does not detect presence of --d-d-t
+		# because it greps only top-level ./configure. But not
+		# libiberty's or bfd's configure.
+		--disable-dependency-tracking
+		--disable-silent-rules
 		--enable-obsolete
 		--enable-shared
 		--enable-threads


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-08-04  1:53 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2023-08-04  1:53 UTC (permalink / raw
  To: gentoo-commits

commit:     8a700e916ca18f1341a8bad2921973dfecc5f3ac
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  4 01:52:42 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug  4 01:52:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a700e91

sys-devel/binutils-hppa64: drop redundant die

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
index d905d2bf2219..983d7f522d26 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
@@ -314,7 +314,7 @@ src_configure() {
 		fi
 	fi
 
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
 
 	# Prevent makeinfo from running if doc is unset.
 	if ! use doc ; then


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-08-02 22:48 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-08-02 22:48 UTC (permalink / raw
  To: gentoo-commits

commit:     5a00d2664fe3fcf83e53fd53f779edc3a8ccc677
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  2 18:53:06 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Aug  2 22:48:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a00d266

sys-devel/binutils-hppa64: add 2.41

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.41.ebuild    | 503 +++++++++++++++++++++
 2 files changed, 505 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 00cbbc0d9251..647cf6a08c49 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -7,3 +7,5 @@ DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79ed
 DIST binutils-2.40-patches-5.tar.xz 293628 BLAKE2B b7ed1d1fbf38b420661f984b9519b3d863da45b2a873773a521310021b0c1d5d7c24c152adb3e8a999d40f5619c0e54962114590ec9528380089977af0c30b74 SHA512 6e6df932b18ca20fe245b3ff8d3d06dbdae4daadaec3b668fa44e086d4e8ff56439681b2d810ebc74173b6348020edacb176e8c3cbf20657cce04297b97f4f83
 DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
+DIST binutils-2.41-patches-1.tar.xz 13260 BLAKE2B b7431ec92d5ce0e5d4438b31ca356c8d5366bee9aa8ff2f098a77c2add5b7539f733d0a18988337490af34c9192affbb6ccdf56b97413a8dca3192fb2125b313 SHA512 30548e4f3187444dbfa82587b5b8a0d2ab9d536aa06a572393a195649759149124d79c488c07919850c7ed4940481b852462d5a1aa52ed9162d81d6d3b290377
+DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
new file mode 100644
index 000000000000..a02cbef8641b
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41.ebuild
@@ -0,0 +1,503 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-07-30 10:26 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-07-30 10:26 UTC (permalink / raw
  To: gentoo-commits

commit:     b431789085272b7ce900d1320132e2549b778499
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 30 10:24:40 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 30 10:26:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4317890

sys-devel/binutils-hppa64: revbump, patch set 2.40 6

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.40-r7.ebuild | 503 +++++++++++++++++++++
 2 files changed, 504 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index cb9519586564..00cbbc0d9251 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -5,4 +5,5 @@ DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc505
 DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
 DIST binutils-2.40-patches-5.tar.xz 293628 BLAKE2B b7ed1d1fbf38b420661f984b9519b3d863da45b2a873773a521310021b0c1d5d7c24c152adb3e8a999d40f5619c0e54962114590ec9528380089977af0c30b74 SHA512 6e6df932b18ca20fe245b3ff8d3d06dbdae4daadaec3b668fa44e086d4e8ff56439681b2d810ebc74173b6348020edacb176e8c3cbf20657cce04297b97f4f83
+DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
new file mode 100644
index 000000000000..ebf77c42f26b
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
@@ -0,0 +1,503 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=6
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-06-26 22:50 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-06-26 22:50 UTC (permalink / raw
  To: gentoo-commits

commit:     736fcbec4e8de80c6b3d651e2f00228ec0ba1f33
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 26 22:49:46 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Jun 26 22:50:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=736fcbec

sys-devel/binutils-hppa64: drop 2.40-r3, 2.40-r4

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64/binutils-hppa64-2.40-r3.ebuild | 503 ---------------------
 .../binutils-hppa64/binutils-hppa64-2.40-r4.ebuild | 503 ---------------------
 3 files changed, 1008 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 90b4fc784588..cb9519586564 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,7 +4,5 @@ DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a36
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
 DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
-DIST binutils-2.40-patches-3.tar.xz 259432 BLAKE2B 03b9024e658a5860d54b9087f3e1cc4b417a2501d6a1744c44759bbc99cabd5938058ba2909b16cc999208187998094aa6ab5464e5ed54b87ea0b1eef007e85c SHA512 f2f3e38f5c0c2928ed0588ee42be74d43486d209b43249f73ae133c4c1f81491c86b14df2ddecbc37df6fe80b27b0eab6c3f319e44854e91596dfbd3ec37b8aa
-DIST binutils-2.40-patches-4.tar.xz 264420 BLAKE2B 70acdc15f64a45cda49ebd7c252d909db2fe659f5c2c0866c50fd710415fd34bd88f9c5cd5ba07beef1e7de7fe827bb40f835fb79ff10e00fc50451e3a8cab33 SHA512 5f0a080841cb3a032cbe7b135ba38bebeae0b0e444623887bdcb92a3adcf804701524eff840f108a9544293f5ac307b4a8d9509176abfeaea6c461b2ea5c0886
 DIST binutils-2.40-patches-5.tar.xz 293628 BLAKE2B b7ed1d1fbf38b420661f984b9519b3d863da45b2a873773a521310021b0c1d5d7c24c152adb3e8a999d40f5619c0e54962114590ec9528380089977af0c30b74 SHA512 6e6df932b18ca20fe245b3ff8d3d06dbdae4daadaec3b668fa44e086d4e8ff56439681b2d810ebc74173b6348020edacb176e8c3cbf20657cce04297b97f4f83
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r3.ebuild
deleted file mode 100644
index eff1e8238a1a..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r3.ebuild
+++ /dev/null
@@ -1,503 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=3
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-
-		# These hardening options are available from 2.39+ but
-		# they unconditionally enable the behaviour even on arches
-		# where e.g. execstacks can't be avoided.
-		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-		#--enable-warn-execstack
-		#--enable-warn-rwx-segments
-		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
-
-		# Things to think about
-		#--enable-deterministic-archives
-
-		# Works better than vapier's patch, bug #808787
-		--enable-new-dtags
-
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# Avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake V=1 info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k V=1 check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r4.ebuild
deleted file mode 100644
index 94f40a5347c1..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r4.ebuild
+++ /dev/null
@@ -1,503 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=4
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-
-		# These hardening options are available from 2.39+ but
-		# they unconditionally enable the behaviour even on arches
-		# where e.g. execstacks can't be avoided.
-		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-		#--enable-warn-execstack
-		#--enable-warn-rwx-segments
-		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
-
-		# Things to think about
-		#--enable-deterministic-archives
-
-		# Works better than vapier's patch, bug #808787
-		--enable-new-dtags
-
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# Avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake V=1 info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k V=1 check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-05-06 12:20 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-05-06 12:20 UTC (permalink / raw
  To: gentoo-commits

commit:     53c47863a2b178f6088f7ca6565e873ff768187a
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat May  6 12:18:24 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat May  6 12:20:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53c47863

sys-devel/binutils-hppa64: 2.40 patchlevel 5 bump

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.40-r5.ebuild | 503 +++++++++++++++++++++
 2 files changed, 504 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index f444f463e3c5..90b4fc784588 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -6,4 +6,5 @@ DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d31
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
 DIST binutils-2.40-patches-3.tar.xz 259432 BLAKE2B 03b9024e658a5860d54b9087f3e1cc4b417a2501d6a1744c44759bbc99cabd5938058ba2909b16cc999208187998094aa6ab5464e5ed54b87ea0b1eef007e85c SHA512 f2f3e38f5c0c2928ed0588ee42be74d43486d209b43249f73ae133c4c1f81491c86b14df2ddecbc37df6fe80b27b0eab6c3f319e44854e91596dfbd3ec37b8aa
 DIST binutils-2.40-patches-4.tar.xz 264420 BLAKE2B 70acdc15f64a45cda49ebd7c252d909db2fe659f5c2c0866c50fd710415fd34bd88f9c5cd5ba07beef1e7de7fe827bb40f835fb79ff10e00fc50451e3a8cab33 SHA512 5f0a080841cb3a032cbe7b135ba38bebeae0b0e444623887bdcb92a3adcf804701524eff840f108a9544293f5ac307b4a8d9509176abfeaea6c461b2ea5c0886
+DIST binutils-2.40-patches-5.tar.xz 293628 BLAKE2B b7ed1d1fbf38b420661f984b9519b3d863da45b2a873773a521310021b0c1d5d7c24c152adb3e8a999d40f5619c0e54962114590ec9528380089977af0c30b74 SHA512 6e6df932b18ca20fe245b3ff8d3d06dbdae4daadaec3b668fa44e086d4e8ff56439681b2d810ebc74173b6348020edacb176e8c3cbf20657cce04297b97f4f83
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
new file mode 100644
index 000000000000..7fd42451e5aa
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r5.ebuild
@@ -0,0 +1,503 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=5
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-05-05 17:23 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-05-05 17:23 UTC (permalink / raw
  To: gentoo-commits

commit:     51d20db15ce6db81dac0e361802115c31044f1c0
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri May  5 17:22:58 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri May  5 17:22:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51d20db1

sys-devel/binutils-hppa64: drop 2.39-r4, 2.40, 2.40-r2

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   3 -
 .../binutils-hppa64/binutils-hppa64-2.39-r4.ebuild | 503 ---------------------
 .../binutils-hppa64/binutils-hppa64-2.40-r2.ebuild | 503 ---------------------
 .../binutils-hppa64/binutils-hppa64-2.40.ebuild    | 503 ---------------------
 4 files changed, 1512 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index e75789b93199..f444f463e3c5 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -2,11 +2,8 @@ DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
 DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
-DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
 DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
-DIST binutils-2.40-patches-1.tar.xz 12260 BLAKE2B d525502e08012080417634fd41981550362d4d799952e89f388af2a6e5db5b80e88bfdb0b5b1d2a1bcf8ebda529eefbced8fa2ae84c7fe3ddb10184e98d4b369 SHA512 140f80be786511f63651e67bf25c2992de6a21bac00a3252dcf98becc3f9379c8070ef1380d5542bbf2e1908c50dab2c7ebb651d13bb97609594fe9fd9f1f079
-DIST binutils-2.40-patches-2.tar.xz 183760 BLAKE2B 447f1c40ac8212b1e91f6f2137f87958c3f4e2366b11b9979d9d09d52e9fcde9a9d74f0c1871616157e001f505849fceb2097a512f434b9c848885e367a07c35 SHA512 30efbfcbd2d936c74d9480e4f2f4b8dcd30abcd0f1b22d21d20558002fdb8c90bd2fe97e3f27c2905714dcfd1297cac2646ede1e2c3d9fbf159f93c8cf01a290
 DIST binutils-2.40-patches-3.tar.xz 259432 BLAKE2B 03b9024e658a5860d54b9087f3e1cc4b417a2501d6a1744c44759bbc99cabd5938058ba2909b16cc999208187998094aa6ab5464e5ed54b87ea0b1eef007e85c SHA512 f2f3e38f5c0c2928ed0588ee42be74d43486d209b43249f73ae133c4c1f81491c86b14df2ddecbc37df6fe80b27b0eab6c3f319e44854e91596dfbd3ec37b8aa
 DIST binutils-2.40-patches-4.tar.xz 264420 BLAKE2B 70acdc15f64a45cda49ebd7c252d909db2fe659f5c2c0866c50fd710415fd34bd88f9c5cd5ba07beef1e7de7fe827bb40f835fb79ff10e00fc50451e3a8cab33 SHA512 5f0a080841cb3a032cbe7b135ba38bebeae0b0e444623887bdcb92a3adcf804701524eff840f108a9544293f5ac307b4a8d9509176abfeaea6c461b2ea5c0886
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
deleted file mode 100644
index 5076d24dc8fc..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
+++ /dev/null
@@ -1,503 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-
-		# These hardening options are available from 2.39+ but
-		# they unconditionally enable the behaviour even on arches
-		# where e.g. execstacks can't be avoided.
-		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-		#--enable-warn-execstack
-		#--enable-warn-rwx-segments
-		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
-
-		# Things to think about
-		#--enable-deterministic-archives
-
-		# Works better than vapier's patch, bug #808787
-		--enable-new-dtags
-
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# Avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake V=1 info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k V=1 check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r2.ebuild
deleted file mode 100644
index 8e05e6ac617e..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r2.ebuild
+++ /dev/null
@@ -1,503 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=2
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-
-		# These hardening options are available from 2.39+ but
-		# they unconditionally enable the behaviour even on arches
-		# where e.g. execstacks can't be avoided.
-		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-		#--enable-warn-execstack
-		#--enable-warn-rwx-segments
-		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
-
-		# Things to think about
-		#--enable-deterministic-archives
-
-		# Works better than vapier's patch, bug #808787
-		--enable-new-dtags
-
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# Avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake V=1 info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k V=1 check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40.ebuild
deleted file mode 100644
index a02cbef8641b..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40.ebuild
+++ /dev/null
@@ -1,503 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	app-alternatives/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-
-		# These hardening options are available from 2.39+ but
-		# they unconditionally enable the behaviour even on arches
-		# where e.g. execstacks can't be avoided.
-		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
-		#--enable-warn-execstack
-		#--enable-warn-rwx-segments
-		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
-
-		# Things to think about
-		#--enable-deterministic-archives
-
-		# Works better than vapier's patch, bug #808787
-		--enable-new-dtags
-
-		--disable-jansson
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree, bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# Avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# Avoid automagic dev-libs/msgpack dep, bug #865875
-		--without-msgpack
-
-		# Allow user to opt into CET for host libraries.
-		# Ideally we would like automagic-or-disabled here.
-		# But the check does not quite work on i686: bug #760926.
-		$(use_enable cet)
-
-		# We can enable this by default in future, but it's brand new
-		# in 2.39 with several bugs:
-		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
-		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
-		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
-		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
-		$(use_enable gprofng)
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake V=1 info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k V=1 check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-04-29 15:44 Arthur Zamarin
  0 siblings, 0 replies; 172+ messages in thread
From: Arthur Zamarin @ 2023-04-29 15:44 UTC (permalink / raw
  To: gentoo-commits

commit:     e1d57a504ed7d8a8909566ee9c13993183cf3df6
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 29 15:43:02 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 29 15:43:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1d57a50

sys-devel/binutils-hppa64: Stabilize 2.39-r5 hppa, #904749

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
index ebf77c42f26b..b4db6a4faa9b 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
@@ -35,7 +35,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-04-02 20:07 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-04-02 20:07 UTC (permalink / raw
  To: gentoo-commits

commit:     dbf4d8b9e13eb5ddea581f24425d92173afbe6af
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  2 20:05:42 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Apr  2 20:07:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbf4d8b9

sys-devel/binutils-hppa64: patchset bump, 2.39 p6

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.39-r5.ebuild | 503 +++++++++++++++++++++
 2 files changed, 504 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 0361b3407b7e..e75789b93199 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -3,6 +3,7 @@ DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c22
 DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
 DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
+DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
 DIST binutils-2.40-patches-1.tar.xz 12260 BLAKE2B d525502e08012080417634fd41981550362d4d799952e89f388af2a6e5db5b80e88bfdb0b5b1d2a1bcf8ebda529eefbced8fa2ae84c7fe3ddb10184e98d4b369 SHA512 140f80be786511f63651e67bf25c2992de6a21bac00a3252dcf98becc3f9379c8070ef1380d5542bbf2e1908c50dab2c7ebb651d13bb97609594fe9fd9f1f079
 DIST binutils-2.40-patches-2.tar.xz 183760 BLAKE2B 447f1c40ac8212b1e91f6f2137f87958c3f4e2366b11b9979d9d09d52e9fcde9a9d74f0c1871616157e001f505849fceb2097a512f434b9c848885e367a07c35 SHA512 30efbfcbd2d936c74d9480e4f2f4b8dcd30abcd0f1b22d21d20558002fdb8c90bd2fe97e3f27c2905714dcfd1297cac2646ede1e2c3d9fbf159f93c8cf01a290

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
new file mode 100644
index 000000000000..ebf77c42f26b
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
@@ -0,0 +1,503 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=6
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-04-02 16:52 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-04-02 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     cbfb39a17dc719c19173a258dd1507af375db1cf
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  2 16:50:21 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Apr  2 16:51:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbfb39a1

sys-devel/binutils-hppa64: patchlevel bump, 2.40 p4

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.40-r4.ebuild | 503 +++++++++++++++++++++
 2 files changed, 504 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 5f13f2306706..0361b3407b7e 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -7,4 +7,5 @@ DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79ed
 DIST binutils-2.40-patches-1.tar.xz 12260 BLAKE2B d525502e08012080417634fd41981550362d4d799952e89f388af2a6e5db5b80e88bfdb0b5b1d2a1bcf8ebda529eefbced8fa2ae84c7fe3ddb10184e98d4b369 SHA512 140f80be786511f63651e67bf25c2992de6a21bac00a3252dcf98becc3f9379c8070ef1380d5542bbf2e1908c50dab2c7ebb651d13bb97609594fe9fd9f1f079
 DIST binutils-2.40-patches-2.tar.xz 183760 BLAKE2B 447f1c40ac8212b1e91f6f2137f87958c3f4e2366b11b9979d9d09d52e9fcde9a9d74f0c1871616157e001f505849fceb2097a512f434b9c848885e367a07c35 SHA512 30efbfcbd2d936c74d9480e4f2f4b8dcd30abcd0f1b22d21d20558002fdb8c90bd2fe97e3f27c2905714dcfd1297cac2646ede1e2c3d9fbf159f93c8cf01a290
 DIST binutils-2.40-patches-3.tar.xz 259432 BLAKE2B 03b9024e658a5860d54b9087f3e1cc4b417a2501d6a1744c44759bbc99cabd5938058ba2909b16cc999208187998094aa6ab5464e5ed54b87ea0b1eef007e85c SHA512 f2f3e38f5c0c2928ed0588ee42be74d43486d209b43249f73ae133c4c1f81491c86b14df2ddecbc37df6fe80b27b0eab6c3f319e44854e91596dfbd3ec37b8aa
+DIST binutils-2.40-patches-4.tar.xz 264420 BLAKE2B 70acdc15f64a45cda49ebd7c252d909db2fe659f5c2c0866c50fd710415fd34bd88f9c5cd5ba07beef1e7de7fe827bb40f835fb79ff10e00fc50451e3a8cab33 SHA512 5f0a080841cb3a032cbe7b135ba38bebeae0b0e444623887bdcb92a3adcf804701524eff840f108a9544293f5ac307b4a8d9509176abfeaea6c461b2ea5c0886
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r4.ebuild
new file mode 100644
index 000000000000..94f40a5347c1
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r4.ebuild
@@ -0,0 +1,503 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-03-09  4:03 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-03-09  4:03 UTC (permalink / raw
  To: gentoo-commits

commit:     1ed7731d8d51c229b6867a9e696062f9637b0895
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 04:01:29 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Mar  9 04:01:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ed7731d

sys-devel/binutils-hppa64: revbump, 2.40 patchlevel 3

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.40-r3.ebuild | 503 +++++++++++++++++++++
 2 files changed, 504 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 07a766c7a3fe..5f13f2306706 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -6,4 +6,5 @@ DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
 DIST binutils-2.40-patches-1.tar.xz 12260 BLAKE2B d525502e08012080417634fd41981550362d4d799952e89f388af2a6e5db5b80e88bfdb0b5b1d2a1bcf8ebda529eefbced8fa2ae84c7fe3ddb10184e98d4b369 SHA512 140f80be786511f63651e67bf25c2992de6a21bac00a3252dcf98becc3f9379c8070ef1380d5542bbf2e1908c50dab2c7ebb651d13bb97609594fe9fd9f1f079
 DIST binutils-2.40-patches-2.tar.xz 183760 BLAKE2B 447f1c40ac8212b1e91f6f2137f87958c3f4e2366b11b9979d9d09d52e9fcde9a9d74f0c1871616157e001f505849fceb2097a512f434b9c848885e367a07c35 SHA512 30efbfcbd2d936c74d9480e4f2f4b8dcd30abcd0f1b22d21d20558002fdb8c90bd2fe97e3f27c2905714dcfd1297cac2646ede1e2c3d9fbf159f93c8cf01a290
+DIST binutils-2.40-patches-3.tar.xz 259432 BLAKE2B 03b9024e658a5860d54b9087f3e1cc4b417a2501d6a1744c44759bbc99cabd5938058ba2909b16cc999208187998094aa6ab5464e5ed54b87ea0b1eef007e85c SHA512 f2f3e38f5c0c2928ed0588ee42be74d43486d209b43249f73ae133c4c1f81491c86b14df2ddecbc37df6fe80b27b0eab6c3f319e44854e91596dfbd3ec37b8aa
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r3.ebuild
new file mode 100644
index 000000000000..eff1e8238a1a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r3.ebuild
@@ -0,0 +1,503 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=3
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-02-22 22:26 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2023-02-22 22:26 UTC (permalink / raw
  To: gentoo-commits

commit:     3b11635c364b43cbf297866c357866cfce9ea89d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 22 22:26:09 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 22 22:26:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b11635c

sys-devel/binutils-hppa64: revbump to keep in sync with sys-devel/binutils

No-op.

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

 .../{binutils-hppa64-2.40-r1.ebuild => binutils-hppa64-2.40-r2.ebuild}    | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r2.ebuild
similarity index 100%
rename from sys-devel/binutils-hppa64/binutils-hppa64-2.40-r1.ebuild
rename to sys-devel/binutils-hppa64/binutils-hppa64-2.40-r2.ebuild


^ permalink raw reply	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-02-09 10:45 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-02-09 10:45 UTC (permalink / raw
  To: gentoo-commits

commit:     389783417aa2caac2e89ab1e127f798ba5d188aa
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  9 10:43:03 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Feb  9 10:45:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38978341

sys-devel/binutils-hppa64: 2.40 patchset 2 bump

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.40-r1.ebuild | 503 +++++++++++++++++++++
 2 files changed, 504 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 4a952e86bb1f..07a766c7a3fe 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -5,4 +5,5 @@ DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc505
 DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
 DIST binutils-2.40-patches-1.tar.xz 12260 BLAKE2B d525502e08012080417634fd41981550362d4d799952e89f388af2a6e5db5b80e88bfdb0b5b1d2a1bcf8ebda529eefbced8fa2ae84c7fe3ddb10184e98d4b369 SHA512 140f80be786511f63651e67bf25c2992de6a21bac00a3252dcf98becc3f9379c8070ef1380d5542bbf2e1908c50dab2c7ebb651d13bb97609594fe9fd9f1f079
+DIST binutils-2.40-patches-2.tar.xz 183760 BLAKE2B 447f1c40ac8212b1e91f6f2137f87958c3f4e2366b11b9979d9d09d52e9fcde9a9d74f0c1871616157e001f505849fceb2097a512f434b9c848885e367a07c35 SHA512 30efbfcbd2d936c74d9480e4f2f4b8dcd30abcd0f1b22d21d20558002fdb8c90bd2fe97e3f27c2905714dcfd1297cac2646ede1e2c3d9fbf159f93c8cf01a290
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r1.ebuild
new file mode 100644
index 000000000000..8e05e6ac617e
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r1.ebuild
@@ -0,0 +1,503 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2023-01-15  0:10 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2023-01-15  0:10 UTC (permalink / raw
  To: gentoo-commits

commit:     25a88880c0ea6570f708399a10f26ba4f7428e7f
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 15 00:06:25 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jan 15 00:09:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25a88880

sys-devel/binutils-hppa64: add 2.40

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.40.ebuild    | 503 +++++++++++++++++++++
 2 files changed, 505 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 55c5f7fef7f1..4a952e86bb1f 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,3 +4,5 @@ DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a36
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
 DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
+DIST binutils-2.40-patches-1.tar.xz 12260 BLAKE2B d525502e08012080417634fd41981550362d4d799952e89f388af2a6e5db5b80e88bfdb0b5b1d2a1bcf8ebda529eefbced8fa2ae84c7fe3ddb10184e98d4b369 SHA512 140f80be786511f63651e67bf25c2992de6a21bac00a3252dcf98becc3f9379c8070ef1380d5542bbf2e1908c50dab2c7ebb651d13bb97609594fe9fd9f1f079
+DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.40.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40.ebuild
new file mode 100644
index 000000000000..a02cbef8641b
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40.ebuild
@@ -0,0 +1,503 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-12-31 15:40 Arthur Zamarin
  0 siblings, 0 replies; 172+ messages in thread
From: Arthur Zamarin @ 2022-12-31 15:40 UTC (permalink / raw
  To: gentoo-commits

commit:     ccf1dadaa414561942c2b46150bc913c3948772e
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 31 15:39:26 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 31 15:39:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccf1dada

sys-devel/binutils-hppa64: Stabilize 2.39-r4 hppa, #880101

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
index cd5af5b432c4..5076d24dc8fc 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
@@ -35,7 +35,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-12-25 22:26 Ulrich Müller
  0 siblings, 0 replies; 172+ messages in thread
From: Ulrich Müller @ 2022-12-25 22:26 UTC (permalink / raw
  To: gentoo-commits

commit:     5fa2f971934f6d2ac9f7d508ca13ffbe6263467c
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 18:40:11 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 25 22:25:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fa2f971

sys-devel/binutils-hppa64: inherit strip-linguas for strip-linguas

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index b8973ce5f5a5..559d2f8de6ce 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 
 export CTARGET=hppa64-${CHOST#*-}
 
-inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-12-02 20:37 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-12-02 20:37 UTC (permalink / raw
  To: gentoo-commits

commit:     8b4a4c53036cf3bb9bbc431172b970c665063200
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  2 20:36:31 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Dec  2 20:36:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b4a4c53

sys-devel/binutils-hppa64: drop 2.39-r1, 2.39-r3

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.39-r1.ebuild | 479 ---------------------
 .../binutils-hppa64/binutils-hppa64-2.39-r3.ebuild | 479 ---------------------
 3 files changed, 959 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index bcef712c6975..55c5f7fef7f1 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -2,6 +2,5 @@ DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
 DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
-DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497 SHA512 ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee
 DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r1.ebuild
deleted file mode 100644
index b6e72448d384..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r1.ebuild
+++ /dev/null
@@ -1,479 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=4
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S="${WORKDIR}"/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-		# Works better than vapier's patch., bug #808787
-		--enable-new-dtags
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree. bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# 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)
-
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake V=1 info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k V=1 check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r3.ebuild
deleted file mode 100644
index e1508bce3ca7..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r3.ebuild
+++ /dev/null
@@ -1,479 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR="${WORKDIR}"/build
-S="${WORKDIR}"/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		S="${WORKDIR}"/binutils
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		EGIT_CHECKOUT_DIR="${S}"
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S="${WORKDIR}"/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered, bug #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible, bug #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
-	# Avoid really confusing logs from subconfigure spam, makes logs far
-	# more legible.
-	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through, bug #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}" || die
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches the bi-arch
-	# logic in toolchain.eclass. bug #446946
-	#
-	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option, bug #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-		# Works better than vapier's patch., bug #808787
-		--enable-new-dtags
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		# Disable modules that are in a combined binutils/gdb tree. bug #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. bug #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# 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)
-
-	)
-
-	if ! is_cross ; then
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		myconf+=( $(use_enable pgo pgo-build) )
-
-		if use pgo ; then
-			export BUILD_CFLAGS="${CFLAGS}"
-		fi
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake V=1 info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}" || die
-
-	# bug #637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k V=1 check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}" || die
-
-	# see Note [tooldir hack for ldscripts]
-	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin || die
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
-	cd "${ED}"/${LIBPATH} || die
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH} || die
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-} || die
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			# No die for now, dies on hppa?
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		# TODO: add || die here, fails on hppa?
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}" || die
-		dodoc README
-
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-11-20 16:14 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-11-20 16:14 UTC (permalink / raw
  To: gentoo-commits

commit:     6a40da4d3c85136d30e6235395f7dd7abfd68439
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 20 16:13:12 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Nov 20 16:14:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a40da4d

sys-devel/binutils-hppa64: Partially adapt ebuild to plain binutils

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 .../binutils-hppa64/binutils-hppa64-2.39-r4.ebuild | 503 +++++++++++++++++++++
 sys-devel/binutils-hppa64/metadata.xml             |   4 +
 2 files changed, 507 insertions(+)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
new file mode 100644
index 000000000000..01c6d25bfdf4
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
@@ -0,0 +1,503 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=5
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+
+		# These hardening options are available from 2.39+ but
+		# they unconditionally enable the behaviour even on arches
+		# where e.g. execstacks can't be avoided.
+		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+		#--enable-warn-execstack
+		#--enable-warn-rwx-segments
+		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+		# Things to think about
+		#--enable-deterministic-archives
+
+		# Works better than vapier's patch, bug #808787
+		--enable-new-dtags
+
+		--disable-jansson
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree, bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# Avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# Avoid automagic dev-libs/msgpack dep, bug #865875
+		--without-msgpack
+
+		# Allow user to opt into CET for host libraries.
+		# Ideally we would like automagic-or-disabled here.
+		# But the check does not quite work on i686: bug #760926.
+		$(use_enable cet)
+
+		# We can enable this by default in future, but it's brand new
+		# in 2.39 with several bugs:
+		# - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+		# - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+		# - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+		# - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+		$(use_enable gprofng)
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/metadata.xml b/sys-devel/binutils-hppa64/metadata.xml
index 575099e3071f..3b4c9e9ea2e1 100644
--- a/sys-devel/binutils-hppa64/metadata.xml
+++ b/sys-devel/binutils-hppa64/metadata.xml
@@ -13,8 +13,12 @@
 		<flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
 		<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
 		<flag name="gold">Build ld.gold linker</flag>
+		<flag name="gprofng">Enable the next-generation gprofng profiler</flag>
 		<flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
 		<flag name="plugins">Enable plugin support in tools</flag>
 		<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
 	</use>
+	<upstream>
+		<remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
+	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-10-09 11:53 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-10-09 11:53 UTC (permalink / raw
  To: gentoo-commits

commit:     1910f18059a74addd0372eabbe1ae8c207e60ded
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  9 11:52:00 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Oct  9 11:53:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1910f180

sys-devel/binutils-hppa64: patchset bump

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.39-r3.ebuild | 479 +++++++++++++++++++++
 2 files changed, 480 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 15748cfd21d1..bcef712c6975 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -3,4 +3,5 @@ DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c22
 DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
 DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497 SHA512 ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee
+DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r3.ebuild
new file mode 100644
index 000000000000..e1508bce3ca7
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r3.ebuild
@@ -0,0 +1,479 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=5
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S="${WORKDIR}"/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+		# Works better than vapier's patch., bug #808787
+		--enable-new-dtags
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree. bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# 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)
+
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-10-04  3:09 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-10-04  3:09 UTC (permalink / raw
  To: gentoo-commits

commit:     4743cb79027848faa9857dcd6d4acf894561aee2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  4 03:08:41 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  4 03:09:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4743cb79

sys-devel/binutils-hppa64: drop 2.35.2, 2.36.1-r2

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

 sys-devel/binutils-hppa64/Manifest                 |   4 -
 .../binutils-hppa64/binutils-hppa64-2.35.2.ebuild  | 432 ---------------------
 .../binutils-hppa64-2.36.1-r2.ebuild               | 432 ---------------------
 3 files changed, 868 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index b1e9dd5c11c2..15748cfd21d1 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,7 +1,3 @@
-DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
-DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
-DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
-DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
 DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
deleted file mode 100644
index d9ffb17a0c13..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
deleted file mode 100644
index 4350678795e6..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-09-16 20:29 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-09-16 20:29 UTC (permalink / raw
  To: gentoo-commits

commit:     2f485cb234032836dd2b099574b6a02c5ccca7c1
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 16 20:27:32 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Sep 16 20:29:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f485cb2

sys-devel/binutils-hppa64: remove old

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.38-r1.ebuild | 467 ---------------------
 2 files changed, 468 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 4a24bea7abe6..b1e9dd5c11c2 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,7 +4,6 @@ DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348a
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
-DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
 DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
 DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497 SHA512 ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild
deleted file mode 100644
index 6d45ceecacaf..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild
+++ /dev/null
@@ -1,467 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=3
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-		# Works better than vapier's patch... #808787
-		--enable-new-dtags
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		$(use_enable pgo pgo-build)
-	)
-
-	if use pgo ; then
-		export BUILD_CFLAGS="${CFLAGS}"
-	fi
-
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-09-04  8:14 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-09-04  8:14 UTC (permalink / raw
  To: gentoo-commits

commit:     0caee7e05d51db39630771b1d0b1b01f7a51a060
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  4 08:12:03 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Sep  4 08:12:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0caee7e0

sys-devel/binutils-hppa64: Add 2.39

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.39-r1.ebuild | 479 +++++++++++++++++++++
 2 files changed, 481 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index e7d9c044043c..4a24bea7abe6 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -7,3 +7,5 @@ DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c22
 DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
 DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
+DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497 SHA512 ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee
+DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r1.ebuild
new file mode 100644
index 000000000000..b6e72448d384
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r1.ebuild
@@ -0,0 +1,479 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		S="${WORKDIR}"/binutils
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		EGIT_CHECKOUT_DIR="${S}"
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S="${WORKDIR}"/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible, bug #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through, bug #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}" || die
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+		# Works better than vapier's patch., bug #808787
+		--enable-new-dtags
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		# Disable modules that are in a combined binutils/gdb tree. bug #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. bug #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# 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)
+
+	)
+
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake V=1 info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}" || die
+
+	# bug #637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k V=1 check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}" || die
+
+	# see Note [tooldir hack for ldscripts]
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin || die
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH} || die
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-} || die
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}" || die
+		dodoc README
+
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-08-27 18:07 Arthur Zamarin
  0 siblings, 0 replies; 172+ messages in thread
From: Arthur Zamarin @ 2022-08-27 18:07 UTC (permalink / raw
  To: gentoo-commits

commit:     73d03d72b25162af1d257a50c68349d3c2546ee9
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 27 18:06:52 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 27 18:06:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73d03d72

sys-devel/binutils-hppa64: Stabilize 2.38-r2 hppa, #856955

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index b6e72448d384..733c9ae1bf5c 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -35,7 +35,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-05-30  6:30 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-05-30  6:30 UTC (permalink / raw
  To: gentoo-commits

commit:     c4973cd064a63372fb5c107315673adb9b089499
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 30 06:23:56 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 30 06:29:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4973cd0

sys-devel/binutils-hppa64: sync output; more verbose logs

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index cfb3450416da..b6e72448d384 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -151,6 +151,11 @@ toolchain-binutils_pkgversion() {
 }
 
 src_configure() {
+	# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+	# Avoid really confusing logs from subconfigure spam, makes logs far
+	# more legible.
+	MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
 	# Setup some paths
 	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
 	INCPATH=${LIBPATH}/include
@@ -294,11 +299,11 @@ src_compile() {
 	cd "${MY_BUILDDIR}" || die
 
 	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
+	emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
 
 	# only build info pages if the user wants them
 	if use doc ; then
-		emake info
+		emake V=1 info
 	fi
 
 	# we nuke the manpages when we're left with junk
@@ -312,7 +317,7 @@ src_test() {
 	# bug #637066
 	filter-flags -Wall -Wreturn-type
 
-	emake -k check
+	emake -k V=1 check
 }
 
 src_install() {
@@ -321,7 +326,7 @@ src_install() {
 	cd "${MY_BUILDDIR}" || die
 
 	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
 	rm -rf "${ED}"/${LIBPATH}/bin || die
 	use static-libs || find "${ED}" -name '*.la' -delete
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-05-26  5:48 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-05-26  5:48 UTC (permalink / raw
  To: gentoo-commits

commit:     168e3783ac7ee8d1fd40e43cb9a0debc5585148a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 25 00:35:58 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 26 05:48:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=168e3783

sys-devel/binutils-hppa64: use econf

Sync more with binutils-libs by using econf instead of raw ./configure call;
means we benefit from some of the default arguments it passes, in particular
thinking of silent rules which upstream are starting to support more now too
(and enable by default) which econf disables.

Also, we use it fine in binutils-libs w/o issue.

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

 .../binutils-hppa64/binutils-hppa64-2.38-r2.ebuild   | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index abe6f85f3a2b..cfb3450416da 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -70,19 +70,19 @@ BDEPEND="
 
 RESTRICT="!test? ( test )"
 
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
 
 src_unpack() {
 	if [[ ${PV} == 9999* ]] ; then
 		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
 		git-r3_src_unpack
 		mv patches-git/9999 patch || die
 
+		S="${WORKDIR}"/binutils
 		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
+		EGIT_CHECKOUT_DIR="${S}"
 		git-r3_src_unpack
 	else
 		unpack ${P/-hppa64/}.tar.xz
@@ -94,7 +94,7 @@ src_unpack() {
 		local dir=${P%_p?}
 		dir=${dir/-hppa64/}
 
-		S=${WORKDIR}/${dir}
+		S="${WORKDIR}"/${dir}
 	fi
 
 	cd "${WORKDIR}" || die
@@ -178,7 +178,7 @@ src_configure() {
 	done
 	echo
 
-	cd "${MY_BUILDDIR}"
+	cd "${MY_BUILDDIR}" || die
 	local myconf=()
 
 	if use plugins ; then
@@ -251,7 +251,6 @@ src_configure() {
 		--with-bugurl="$(toolchain-binutils_bugurl)"
 		--with-pkgversion="$(toolchain-binutils_pkgversion)"
 		$(use_enable static-libs static)
-		${EXTRA_ECONF}
 		# Disable modules that are in a combined binutils/gdb tree. bug #490566
 		--disable-{gdb,libdecnumber,readline,sim}
 		# Strip out broken static link flags.
@@ -281,8 +280,7 @@ src_configure() {
 		fi
 	fi
 
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
 
 	# Prevent makeinfo from running if doc is unset.
 	if ! use doc ; then
@@ -309,7 +307,7 @@ src_compile() {
 }
 
 src_test() {
-	cd "${MY_BUILDDIR}"
+	cd "${MY_BUILDDIR}" || die
 
 	# bug #637066
 	filter-flags -Wall -Wreturn-type


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-04-25  3:35 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-04-25  3:35 UTC (permalink / raw
  To: gentoo-commits

commit:     d10b8d932f3e69c7cb8b1a588b516be969dfa9e2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 25 03:35:00 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 03:35:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d10b8d93

sys-devel/binutils-hppa64: more dies

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index 5444be5a7596..abe6f85f3a2b 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -410,7 +410,7 @@ src_install() {
 	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
 
 	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null || die
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
 
 	# the hppa64 hack; this should go into 9999 as a PN-conditional
 	# tweak the default fake list a little bit


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-04-25  3:20 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-04-25  3:20 UTC (permalink / raw
  To: gentoo-commits

commit:     bd7ef2cd0a3c4be20761bbc489f7f932ea8ac027
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 25 03:20:29 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 03:20:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd7ef2cd

sys-devel/binutils-hppa64: drop more dies for now

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index 10a4adb67c27..5444be5a7596 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -345,9 +345,10 @@ src_install() {
 		done
 
 		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} || die
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ || die
-			rm -r "${ED}"/usr/${CHOST}/{include,lib} || die
+			# No die for now, dies on hppa?
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
 		fi
 	fi
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-04-25  3:09 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-04-25  3:09 UTC (permalink / raw
  To: gentoo-commits

commit:     33d00f4536bc690cf1f93cd25daa62fd3a20157a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 25 03:09:15 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 03:09:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33d00f45

sys-devel/binutils-hppa64: drop some || die for now

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index eb08e66401b4..10a4adb67c27 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -364,8 +364,9 @@ src_install() {
 	)
 	doins "${libiberty_headers[@]/#/${S}/include/}"
 	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
-		rm -r "${ED}"/${LIBPATH}/lib || die
+		# TODO: add || die here, fails on hppa?
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
 	fi
 
 	# Generate an env.d entry for this binutils


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-04-19 22:52 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-04-19 22:52 UTC (permalink / raw
  To: gentoo-commits

commit:     223dd4ea27d8c7c6ae62c8ad0052433020c1a57f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 22:47:55 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 22:51:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=223dd4ea

sys-devel/binutils-hppa64: consistent style for 2.38-r2; sync with binutils

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

 .../binutils-hppa64/binutils-hppa64-2.38-r2.ebuild | 87 ++++++++++++----------
 1 file changed, 47 insertions(+), 40 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index e0fca58818e6..eb08e66401b4 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -5,10 +5,11 @@ EAPI=7
 
 export CTARGET=hppa64-${CHOST#*-}
 
-inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"
+
 LICENSE="GPL-3+"
 IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
 REQUIRED_USE="default-gold? ( gold )"
@@ -116,13 +117,13 @@ src_prepare() {
 		fi
 	fi
 
-	# Make sure our explicit libdir paths don't get clobbered. #562460
+	# Make sure our explicit libdir paths don't get clobbered, bug #562460
 	sed -i \
 		-e 's:@bfdlibdir@:@libdir@:g' \
 		-e 's:@bfdincludedir@:@includedir@:g' \
 		{bfd,opcodes}/Makefile.in || die
 
-	# Fix locale issues if possible #122216
+	# Fix locale issues if possible, bug #122216
 	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
 		einfo "Fixing misc issues in configure files"
 		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
@@ -133,11 +134,6 @@ src_prepare() {
 		done
 	fi
 
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
 	# Apply things from PATCHES and user dirs
 	default
 
@@ -167,7 +163,7 @@ src_configure() {
 	BINPATH=${TOOLPATH}/binutils-bin/${PV}
 
 	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
+	# actually work make it through, bug #42033
 	strip-linguas -u */po
 
 	# Keep things sane
@@ -204,9 +200,10 @@ src_configure() {
 
 	myconf+=( --with-system-zlib )
 
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	# For bi-arch systems, enable a 64bit bfd.  This matches the bi-arch
+	# logic in toolchain.eclass. bug #446946
+	#
+	# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
 	case $(tc-arch) in
 		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
 	esac
@@ -220,10 +217,7 @@ src_configure() {
 		--enable-poison-system-directories
 	)
 
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+	myconf+=( --enable-secureplt )
 
 	# mips can't do hash-style=gnu ...
 	if [[ $(tc-arch) != mips ]] ; then
@@ -247,24 +241,24 @@ src_configure() {
 		--enable-threads
 		# Newer versions (>=2.27) offer a configure flag now.
 		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
+		# Newer versions (>=2.24) make this an explicit option, bug #497268
 		--enable-install-libiberty
 		# Available from 2.35 on
 		--enable-textrel-check=warning
-		# Works better than vapier's patch... #808787
+		# Works better than vapier's patch., bug #808787
 		--enable-new-dtags
 		--disable-werror
 		--with-bugurl="$(toolchain-binutils_bugurl)"
 		--with-pkgversion="$(toolchain-binutils_pkgversion)"
 		$(use_enable static-libs static)
 		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
+		# Disable modules that are in a combined binutils/gdb tree. bug #490566
 		--disable-{gdb,libdecnumber,readline,sim}
 		# Strip out broken static link flags.
 		# https://gcc.gnu.org/PR56750
 		--without-stage1-ldflags
 		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
+		# {native,cross}/binutils, binutils-libs. bug #666100
 		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
 
 		# avoid automagic dependency on (currently prefix) systems
@@ -276,12 +270,15 @@ src_configure() {
 		# But the check does not quite work on i686: bug #760926.
 		$(use_enable cet)
 
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		$(use_enable pgo pgo-build)
 	)
 
-	if use pgo ; then
-		export BUILD_CFLAGS="${CFLAGS}"
+	if ! is_cross ; then
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		myconf+=( $(use_enable pgo pgo-build) )
+
+		if use pgo ; then
+			export BUILD_CFLAGS="${CFLAGS}"
+		fi
 	fi
 
 	echo ./configure "${myconf[@]}"
@@ -296,7 +293,8 @@ src_configure() {
 }
 
 src_compile() {
-	cd "${MY_BUILDDIR}"
+	cd "${MY_BUILDDIR}" || die
+
 	# see Note [tooldir hack for ldscripts]
 	emake tooldir="${EPREFIX}${TOOLPATH}" all
 
@@ -313,7 +311,7 @@ src_compile() {
 src_test() {
 	cd "${MY_BUILDDIR}"
 
-	# bug 637066
+	# bug #637066
 	filter-flags -Wall -Wreturn-type
 
 	emake -k check
@@ -322,14 +320,15 @@ src_test() {
 src_install() {
 	local x d
 
-	cd "${MY_BUILDDIR}"
+	cd "${MY_BUILDDIR}" || die
+
 	# see Note [tooldir hack for ldscripts]
 	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
+	rm -rf "${ED}"/${LIBPATH}/bin || die
 	use static-libs || find "${ED}" -name '*.la' -delete
 
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
+	# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+	cd "${ED}"/${LIBPATH} || die
 	for d in ../* ; do
 		[[ ${d} == ../${PV} ]] && continue
 		mv ${d}/* . || die
@@ -340,17 +339,18 @@ src_install() {
 	# When something is built to cross-compile, it installs into
 	# /usr/$CHOST/ by default ... we have to 'fix' that :)
 	if is_cross ; then
-		cd "${ED}"/${BINPATH}
+		cd "${ED}"/${BINPATH} || die
 		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
+			mv ${x} ${x/${CTARGET}-} || die
 		done
 
 		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} || die
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ || die
+			rm -r "${ED}"/usr/${CHOST}/{include,lib} || die
 		fi
 	fi
+
 	insinto ${INCPATH}
 	local libiberty_headers=(
 		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
@@ -364,8 +364,8 @@ src_install() {
 	)
 	doins "${libiberty_headers[@]/#/${S}/include/}"
 	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+		rm -r "${ED}"/${LIBPATH}/lib || die
 	fi
 
 	# Generate an env.d entry for this binutils
@@ -379,29 +379,36 @@ src_install() {
 
 	# Handle documentation
 	if ! is_cross ; then
-		cd "${S}"
+		cd "${S}" || die
 		dodoc README
+
 		docinto bfd
 		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
 		docinto binutils
 		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
 		docinto gas
 		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
 		docinto gprof
 		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
 		docinto ld
 		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
 		docinto libiberty
 		dodoc libiberty/ChangeLog* libiberty/README
+
 		docinto opcodes
 		dodoc opcodes/ChangeLog*
 	fi
 
 	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
 
 	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null || die
 
 	# the hppa64 hack; this should go into 9999 as a PN-conditional
 	# tweak the default fake list a little bit


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-04-16 18:09 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-04-16 18:09 UTC (permalink / raw
  To: gentoo-commits

commit:     6a815f59cd3ffa33616468cf1a3483f219db5134
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 16 18:08:30 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 18:09:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a815f59

sys-devel/binutils-hppa64: 2.38 patchlevel bump

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.38-r2.ebuild | 467 +++++++++++++++++++++
 2 files changed, 468 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 046744ec4910..e7d9c044043c 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -5,4 +5,5 @@ DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a5
 DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
 DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
+DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
new file mode 100644
index 000000000000..e0fca58818e6
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -0,0 +1,467 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+		# Works better than vapier's patch... #808787
+		--enable-new-dtags
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# 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)
+
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		$(use_enable pgo pgo-build)
+	)
+
+	if use pgo ; then
+		export BUILD_CFLAGS="${CFLAGS}"
+	fi
+
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-03-19  9:49 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-03-19  9:49 UTC (permalink / raw
  To: gentoo-commits

commit:     435d9401e363aaafc696c456d4c543a7bbc05054
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 19 09:48:06 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Mar 19 09:49:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=435d9401

sys-devel/binutils-hppa64: Rekeyword 2.38-r1

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild
index 1d80a7e31c8a..6d45ceecacaf 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild
@@ -34,7 +34,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	#KEYWORDS="-* ~hppa"
+	KEYWORDS="-* ~hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-03-18 23:54 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-03-18 23:54 UTC (permalink / raw
  To: gentoo-commits

commit:     c5f23d8fd0094b10d3c8e7372933d864bf07c19e
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 18 23:53:42 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 23:53:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5f23d8f

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.38.ebuild    | 467 ---------------------
 2 files changed, 468 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 074fa46e825f..046744ec4910 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,6 +4,5 @@ DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348a
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
-DIST binutils-2.38-patches-2.tar.xz 12488 BLAKE2B 971d3893d45a02a0d94d7f905355053e58d1acafc7692e0818af13e897e28977f0e1876a2ce3bab6242ba87ffd42013ad2492022eff8817c9e75687f7da1abfc SHA512 7457ac5004526316ceb034554467f63009f608593eb7eb24907029bb76c2573092b04d438bb886b0781e56af2070883b3c0084e7ded5e7111d53c745ccc7763c
 DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38.ebuild
deleted file mode 100644
index 1741130aeeeb..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38.ebuild
+++ /dev/null
@@ -1,467 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=2
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	#KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-		# Works better than vapier's patch... #808787
-		--enable-new-dtags
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-
-		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
-		$(use_enable pgo pgo-build)
-	)
-
-	if use pgo ; then
-		export BUILD_CFLAGS="${CFLAGS}"
-	fi
-
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-03-18 23:54 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-03-18 23:54 UTC (permalink / raw
  To: gentoo-commits

commit:     7ed2678ca91793f865412e9ec0dbaf1febe8193b
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 18 23:08:48 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 23:08:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ed2678c

sys-devel/binutils-hppa64: 2.38 patchlevel bump

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.38-r1.ebuild | 467 +++++++++++++++++++++
 2 files changed, 468 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 602eb61283ba..074fa46e825f 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -5,4 +5,5 @@ DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a5
 DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
 DIST binutils-2.38-patches-2.tar.xz 12488 BLAKE2B 971d3893d45a02a0d94d7f905355053e58d1acafc7692e0818af13e897e28977f0e1876a2ce3bab6242ba87ffd42013ad2492022eff8817c9e75687f7da1abfc SHA512 7457ac5004526316ceb034554467f63009f608593eb7eb24907029bb76c2573092b04d438bb886b0781e56af2070883b3c0084e7ded5e7111d53c745ccc7763c
+DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
 DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild
new file mode 100644
index 000000000000..1d80a7e31c8a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild
@@ -0,0 +1,467 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=3
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	#KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+		# Works better than vapier's patch... #808787
+		--enable-new-dtags
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# 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)
+
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		$(use_enable pgo pgo-build)
+	)
+
+	if use pgo ; then
+		export BUILD_CFLAGS="${CFLAGS}"
+	fi
+
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-03-18 22:38 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-03-18 22:38 UTC (permalink / raw
  To: gentoo-commits

commit:     d387959ba5a7e38311d670421d0de8018888ccf7
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 18 22:36:46 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 22:37:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d387959b

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64-2.37_p1-r1.ebuild              | 458 ---------------------
 .../binutils-hppa64/binutils-hppa64-2.37_p1.ebuild | 458 ---------------------
 3 files changed, 918 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index b58a05873121..602eb61283ba 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -2,8 +2,6 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
-DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
-DIST binutils-2.37_p1-patches-1.tar.xz 28956 BLAKE2B 3bc14fcc52a6d11992ad9ed88fa3347ca3d5facd59de094a178a5f720d0eed6297dadf9a8fea7189076eb81274612c0b71c01f15a8f58deeaed8c8f6135ef50d SHA512 f6b2a09bfc692cf90f6cd56be81f424a68831db48054dc150eb6ec28bfa18d35933203c2d3b502f0c80e38771353c373446aec2488469fe2df20d8066033f59e
 DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
 DIST binutils-2.38-patches-2.tar.xz 12488 BLAKE2B 971d3893d45a02a0d94d7f905355053e58d1acafc7692e0818af13e897e28977f0e1876a2ce3bab6242ba87ffd42013ad2492022eff8817c9e75687f7da1abfc SHA512 7457ac5004526316ceb034554467f63009f608593eb7eb24907029bb76c2573092b04d438bb886b0781e56af2070883b3c0084e7ded5e7111d53c745ccc7763c

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild
deleted file mode 100644
index 1e073a1a806a..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	# live ebuild
-	KEYWORDS="-* ~hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-		# Works better than vapier's patch... #808787
-		--enable-new-dtags
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
deleted file mode 100644
index 7607479c80a1..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here  (ignored for live ebuilds)
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=0
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
-	inherit git-r3
-	SLOT=${PV}
-else
-	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-	PATCH_DEV=${PATCH_DEV:-dilfridge}
-	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
-	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-	SLOT=$(ver_cut 1-2)
-	# live ebuild
-	KEYWORDS="-* hppa"
-fi
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? (
-		dev-util/dejagnu
-		sys-devel/bc
-	)
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	if [[ ${PV} == 9999* ]] ; then
-		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
-		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
-		git-r3_src_unpack
-		mv patches-git/9999 patch || die
-
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		git-r3_src_unpack
-	else
-		unpack ${P/-hppa64/}.tar.xz
-
-		cd "${WORKDIR}" || die
-		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
-		# _p patch versions are Gentoo specific tarballs ...
-		local dir=${P%_p?}
-		dir=${dir/-hppa64/}
-
-		S=${WORKDIR}/${dir}
-	fi
-
-	cd "${WORKDIR}" || die
-	mkdir -p "${MY_BUILDDIR}" || die
-}
-
-src_prepare() {
-	local patchsetname
-	if [[ ${PV} == 9999* ]] ; then
-		patchsetname="from git master"
-	else
-		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
-	fi
-
-	if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
-		if ! use vanilla; then
-			einfo "Applying binutils patchset ${patchsetname}"
-			eapply "${WORKDIR}/patch"
-			einfo "Done."
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		# Available from 2.35 on
-		--enable-textrel-check=warning
-		# Works better than vapier's patch... #808787
-		--enable-new-dtags
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-03-18  6:43 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-03-18  6:43 UTC (permalink / raw
  To: gentoo-commits

commit:     d9a2863db0f59c42aeba5860a3d8663a1eb8eedd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 18 06:43:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 06:43:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9a2863d

sys-devel/binutils-hppa64: Stabilize 2.37_p1-r2 hppa, #833210

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index 5b7776c9348f..d3f797079c97 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
@@ -34,7 +34,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-02-10 13:11 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-02-10 13:11 UTC (permalink / raw
  To: gentoo-commits

commit:     6956558f42e95b8c39b5f2850eab0050b36d4b36
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 10 12:20:50 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Feb 10 13:10:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6956558f

sys-devel/binutils-hppa64: Version bump (unkeyworded)

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.38.ebuild    | 467 +++++++++++++++++++++
 2 files changed, 469 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 3d82c09d70c9..b58a05873121 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -6,3 +6,5 @@ DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb069595
 DIST binutils-2.37_p1-patches-1.tar.xz 28956 BLAKE2B 3bc14fcc52a6d11992ad9ed88fa3347ca3d5facd59de094a178a5f720d0eed6297dadf9a8fea7189076eb81274612c0b71c01f15a8f58deeaed8c8f6135ef50d SHA512 f6b2a09bfc692cf90f6cd56be81f424a68831db48054dc150eb6ec28bfa18d35933203c2d3b502f0c80e38771353c373446aec2488469fe2df20d8066033f59e
 DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
+DIST binutils-2.38-patches-2.tar.xz 12488 BLAKE2B 971d3893d45a02a0d94d7f905355053e58d1acafc7692e0818af13e897e28977f0e1876a2ce3bab6242ba87ffd42013ad2492022eff8817c9e75687f7da1abfc SHA512 7457ac5004526316ceb034554467f63009f608593eb7eb24907029bb76c2573092b04d438bb886b0781e56af2070883b3c0084e7ded5e7111d53c745ccc7763c
+DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38.ebuild
new file mode 100644
index 000000000000..1741130aeeeb
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38.ebuild
@@ -0,0 +1,467 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	#KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+		# Works better than vapier's patch... #808787
+		--enable-new-dtags
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# 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)
+
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		$(use_enable pgo pgo-build)
+	)
+
+	if use pgo ; then
+		export BUILD_CFLAGS="${CFLAGS}"
+	fi
+
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-01-25 22:34 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2022-01-25 22:34 UTC (permalink / raw
  To: gentoo-commits

commit:     cd81ec12c5419c217075f389e4c79f3de4734248
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 25 22:32:36 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jan 25 22:33:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd81ec12

sys-devel/binutils-hppa64: Rekeyword 2.37_p1-r2

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index 1741130aeeeb..5b7776c9348f 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
@@ -34,7 +34,7 @@ else
 	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
-	#KEYWORDS="-* ~hppa"
+	KEYWORDS="-* ~hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-01-24 14:30 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-01-24 14:30 UTC (permalink / raw
  To: gentoo-commits

commit:     de88ea3fb13fbe7c574ba2131a03a9fd72e7e523
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 24 05:17:14 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 24 14:30:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de88ea3f

sys-devel/binutils-hppa64: disable LTO for PGO

We don't build kgcc64 with LTO support (for now?) so we can't
request it in HPPA64 binutils either.

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index 62f90e6f292a..1741130aeeeb 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
@@ -276,7 +276,8 @@ src_configure() {
 		# But the check does not quite work on i686: bug #760926.
 		$(use_enable cet)
 
-		$(use_enable pgo pgo-build lto)
+		# No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+		$(use_enable pgo pgo-build)
 	)
 
 	if use pgo ; then


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-01-22  3:06 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2022-01-22  3:06 UTC (permalink / raw
  To: gentoo-commits

commit:     d1e3d5940f56b23d7ff110b082e4eac5b682344a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 22 03:04:52 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 22 03:06:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1e3d594

sys-devel/binutils-hppa64: add 2.37_p1-r2; sync with binutils

Adds PGO (yay!) but otherwise no really interesting changes other
than just picking up what we had in binutils' 2.37_p1-r2 patchset.

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64-2.37_p1-r2.ebuild              | 466 +++++++++++++++++++++
 sys-devel/binutils-hppa64/metadata.xml             |   1 +
 3 files changed, 468 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index f724d39579b0..3d82c09d70c9 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,4 +4,5 @@ DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348a
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
 DIST binutils-2.37_p1-patches-1.tar.xz 28956 BLAKE2B 3bc14fcc52a6d11992ad9ed88fa3347ca3d5facd59de094a178a5f720d0eed6297dadf9a8fea7189076eb81274612c0b71c01f15a8f58deeaed8c8f6135ef50d SHA512 f6b2a09bfc692cf90f6cd56be81f424a68831db48054dc150eb6ec28bfa18d35933203c2d3b502f0c80e38771353c373446aec2488469fe2df20d8066033f59e
+DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
new file mode 100644
index 000000000000..62f90e6f292a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
@@ -0,0 +1,466 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	#KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+		# Works better than vapier's patch... #808787
+		--enable-new-dtags
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# 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)
+
+		$(use_enable pgo pgo-build lto)
+	)
+
+	if use pgo ; then
+		export BUILD_CFLAGS="${CFLAGS}"
+	fi
+
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/metadata.xml b/sys-devel/binutils-hppa64/metadata.xml
index cd664c3ca7f2..a5e5c11c9e15 100644
--- a/sys-devel/binutils-hppa64/metadata.xml
+++ b/sys-devel/binutils-hppa64/metadata.xml
@@ -13,6 +13,7 @@
 		<flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
 		<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
 		<flag name="gold">Build ld.gold linker</flag>
+		<flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
 		<flag name="plugins">Enable plugin support in tools</flag>
 		<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
 	</use>


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2022-01-01 20:08 David Seifert
  0 siblings, 0 replies; 172+ messages in thread
From: David Seifert @ 2022-01-01 20:08 UTC (permalink / raw
  To: gentoo-commits

commit:     329faceb6ec63be200f5fbd26a8efa6368e4e4e8
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  1 20:07:24 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jan  1 20:07:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=329faceb

sys-devel/binutils-hppa64: remove uclibc

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild     | 9 +--------
 sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild  | 9 +--------
 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild | 9 +--------
 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild    | 9 +--------
 4 files changed, 4 insertions(+), 32 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
index 3da9b9ee993e..d9ffb17a0c13 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -98,13 +98,6 @@ src_prepare() {
 		eapply "${WORKDIR}/patch"/*.patch
 	fi
 
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
 	# Make sure our explicit libdir paths don't get clobbered. #562460
 	sed -i \
 		-e 's:@bfdlibdir@:@libdir@:g' \

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
index e1769ee1b9b8..4350678795e6 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -98,13 +98,6 @@ src_prepare() {
 		eapply "${WORKDIR}/patch"/*.patch
 	fi
 
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
 	# Make sure our explicit libdir paths don't get clobbered. #562460
 	sed -i \
 		-e 's:@bfdlibdir@:@libdir@:g' \

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild
index afce858edb2a..1e073a1a806a 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -117,13 +117,6 @@ src_prepare() {
 		fi
 	fi
 
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
 	# Make sure our explicit libdir paths don't get clobbered. #562460
 	sed -i \
 		-e 's:@bfdlibdir@:@libdir@:g' \

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
index 6532ec4e9dd8..7607479c80a1 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -117,13 +117,6 @@ src_prepare() {
 		fi
 	fi
 
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
 	# Make sure our explicit libdir paths don't get clobbered. #562460
 	sed -i \
 		-e 's:@bfdlibdir@:@libdir@:g' \


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-11-14 22:20 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-11-14 22:20 UTC (permalink / raw
  To: gentoo-commits

commit:     b8e47925ec59e4f5fed872406dc0a50ec1c37d00
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 22:19:24 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 22:20:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8e47925

sys-devel/binutils-hppa64: patchlevel bump

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64-2.37_p1-r1.ebuild              | 465 +++++++++++++++++++++
 2 files changed, 466 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index ae9a22ee56fb..f724d39579b0 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -3,4 +3,5 @@ DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796
 DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
+DIST binutils-2.37_p1-patches-1.tar.xz 28956 BLAKE2B 3bc14fcc52a6d11992ad9ed88fa3347ca3d5facd59de094a178a5f720d0eed6297dadf9a8fea7189076eb81274612c0b71c01f15a8f58deeaed8c8f6135ef50d SHA512 f6b2a09bfc692cf90f6cd56be81f424a68831db48054dc150eb6ec28bfa18d35933203c2d3b502f0c80e38771353c373446aec2488469fe2df20d8066033f59e
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild
new file mode 100644
index 000000000000..afce858edb2a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild
@@ -0,0 +1,465 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	# live ebuild
+	KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P/-hppa64/}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+		# Works better than vapier's patch... #808787
+		--enable-new-dtags
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# 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)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-09-21 17:44 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2021-09-21 17:44 UTC (permalink / raw
  To: gentoo-commits

commit:     d131b8f885ca2134fdad5d72af68c25a31da8b0e
Author:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
AuthorDate: Tue Sep 21 17:39:53 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep 21 17:44:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d131b8f8

sys-devel/binutils-hppa64: stable 2.37_p1 for hppa, bug #813762

Package-Manager: Portage-3.0.20, Repoman-3.0.3
RepoMan-Options: --include-arches="hppa"
Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
index 3b073ef9b5c..6532ec4e9dd 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
@@ -35,7 +35,7 @@ else
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
 	# live ebuild
-	KEYWORDS="-* ~hppa"
+	KEYWORDS="-* hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-09-18  4:51 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2021-09-18  4:51 UTC (permalink / raw
  To: gentoo-commits

commit:     593525b33e21ed27e787734d2c2e5207f537fbb2
Author:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
AuthorDate: Fri Sep 17 14:52:58 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 18 04:26:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=593525b3

sys-devel/binutils-hppa64: stable 2.36.1-r2 for hppa, bug #809059

Package-Manager: Portage-3.0.20, Repoman-3.0.3
RepoMan-Options: --include-arches="hppa"
Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
index 9f5a705c45a..e1769ee1b9b 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
+		KEYWORDS="-* hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-09-15 22:40 Sam James
  0 siblings, 0 replies; 172+ messages in thread
From: Sam James @ 2021-09-15 22:40 UTC (permalink / raw
  To: gentoo-commits

commit:     e2d2448a60d4872646acbe9f1dd389e1f1950231
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 15 22:39:16 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep 15 22:39:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2d2448a

sys-devel/binutils-hppa64: fix unpack for HPPA in 2.37_p1

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
index 6477736ca7c..3b073ef9b5c 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
@@ -85,13 +85,16 @@ src_unpack() {
 		EGIT_CHECKOUT_DIR=${S}
 		git-r3_src_unpack
 	else
-		unpack ${P}.tar.xz
+		unpack ${P/-hppa64/}.tar.xz
 
 		cd "${WORKDIR}" || die
 		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
 
 		# _p patch versions are Gentoo specific tarballs ...
-		S=${WORKDIR}/${P%_p?}
+		local dir=${P%_p?}
+		dir=${dir/-hppa64/}
+
+		S=${WORKDIR}/${dir}
 	fi
 
 	cd "${WORKDIR}" || die


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-08-20 15:02 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-08-20 15:02 UTC (permalink / raw
  To: gentoo-commits

commit:     98ad6427bec9c37675815507b968868ade516e65
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 20 14:59:28 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Aug 20 14:59:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98ad6427

sys-devel/binutils-hppa64: Remove old

Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Andreas K. Huettel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64/binutils-hppa64-2.37.ebuild    | 439 ---------------------
 2 files changed, 441 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 34809a0e1f3..ae9a22ee56f 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -2,7 +2,5 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
-DIST binutils-2.37-patches-2.tar.xz 79304 BLAKE2B bdcbe29efba3582f2d1be9057a39aedb655cbc225abe8ea656c1bcf090a53930c74197505c8de2dcfd9a105f1b1cc8fa84a0d532547221d2df34a77b06e7fa15 SHA512 5cea876cfbdcd1409f5ef8ee138a8c29ad5b3d38b5d72ce312f2eb94fb8b2165e9a10018c46bdc36bc59ade2e2764e5da4ac653d15690bfc0bc9784202cc0164
-DIST binutils-2.37.tar.xz 22916924 BLAKE2B f5a374fdf0300f7734d1e462333296b16c9d5ed6eba167e1742a4da7082f4388c929e286bf76c3933b3e434937380340732a31790723654b491ea0c8ab5b9ba5 SHA512 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7
 DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild
deleted file mode 100644
index cb0769ff3b0..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild
+++ /dev/null
@@ -1,439 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=2
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		#KEYWORDS="-* ~hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-08-20 15:02 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-08-20 15:02 UTC (permalink / raw
  To: gentoo-commits

commit:     036c0a242758ae9c3d594cce875d1d77fb5dc2ce
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 20 14:59:55 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Aug 20 14:59:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=036c0a24

sys-devel/binutils-hppa64: Re-add keywords to 2.37_p1

Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Andreas K. Huettel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
index 21dfd6583a5..6477736ca7c 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
@@ -35,7 +35,7 @@ else
 		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
 	SLOT=$(ver_cut 1-2)
 	# live ebuild
-	#KEYWORDS="-* ~hppa"
+	KEYWORDS="-* ~hppa"
 fi
 
 #


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-08-17 21:42 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-08-17 21:42 UTC (permalink / raw
  To: gentoo-commits

commit:     9004eadd0e297200384853be54a14a09ee561f0b
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 17 21:37:27 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Aug 17 21:42:43 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9004eadd

sys-devel/binutils-hppa64: 2.37 patchset bump

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.37_p1.ebuild | 462 +++++++++++++++++++++
 2 files changed, 464 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index e6c6125d893..34809a0e1f3 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,3 +4,5 @@ DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348a
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.37-patches-2.tar.xz 79304 BLAKE2B bdcbe29efba3582f2d1be9057a39aedb655cbc225abe8ea656c1bcf090a53930c74197505c8de2dcfd9a105f1b1cc8fa84a0d532547221d2df34a77b06e7fa15 SHA512 5cea876cfbdcd1409f5ef8ee138a8c29ad5b3d38b5d72ce312f2eb94fb8b2165e9a10018c46bdc36bc59ade2e2764e5da4ac653d15690bfc0bc9784202cc0164
 DIST binutils-2.37.tar.xz 22916924 BLAKE2B f5a374fdf0300f7734d1e462333296b16c9d5ed6eba167e1742a4da7082f4388c929e286bf76c3933b3e434937380340732a31790723654b491ea0c8ab5b9ba5 SHA512 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7
+DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
+DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
new file mode 100644
index 00000000000..21dfd6583a5
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild
@@ -0,0 +1,462 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=0
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+	inherit git-r3
+	SLOT=${PV}
+else
+	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+	PATCH_DEV=${PATCH_DEV:-dilfridge}
+	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+	SLOT=$(ver_cut 1-2)
+	# live ebuild
+	#KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? (
+		dev-util/dejagnu
+		sys-devel/bc
+	)
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	if [[ ${PV} == 9999* ]] ; then
+		EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+		EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+		git-r3_src_unpack
+		mv patches-git/9999 patch || die
+
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		git-r3_src_unpack
+	else
+		unpack ${P}.tar.xz
+
+		cd "${WORKDIR}" || die
+		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+		# _p patch versions are Gentoo specific tarballs ...
+		S=${WORKDIR}/${P%_p?}
+	fi
+
+	cd "${WORKDIR}" || die
+	mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+	local patchsetname
+	if [[ ${PV} == 9999* ]] ; then
+		patchsetname="from git master"
+	else
+		patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+	fi
+
+	if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+		if ! use vanilla; then
+			einfo "Applying binutils patchset ${patchsetname}"
+			eapply "${WORKDIR}/patch"
+			einfo "Done."
+		fi
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		# Available from 2.35 on
+		--enable-textrel-check=warning
+		# Works better than vapier's patch... #808787
+		--enable-new-dtags
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# 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)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-08-13 21:40 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-08-13 21:40 UTC (permalink / raw
  To: gentoo-commits

commit:     f78b972d3757cc5d55893d9472330128c89b5af0
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 13 21:39:37 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Aug 13 21:40:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f78b972d

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64-2.36.1-r1.ebuild               | 439 ---------------------
 2 files changed, 440 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index d0f699ec0e5..e6c6125d893 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,6 +1,5 @@
 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
-DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54
 DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.37-patches-2.tar.xz 79304 BLAKE2B bdcbe29efba3582f2d1be9057a39aedb655cbc225abe8ea656c1bcf090a53930c74197505c8de2dcfd9a105f1b1cc8fa84a0d532547221d2df34a77b06e7fa15 SHA512 5cea876cfbdcd1409f5ef8ee138a8c29ad5b3d38b5d72ce312f2eb94fb8b2165e9a10018c46bdc36bc59ade2e2764e5da4ac653d15690bfc0bc9784202cc0164

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild
deleted file mode 100644
index d4683f9f817..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild
+++ /dev/null
@@ -1,439 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=3
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-07-31 10:03 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-07-31 10:03 UTC (permalink / raw
  To: gentoo-commits

commit:     37e7b26244fe2fac07d1fd315a35c9ed89ebde3b
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 31 09:54:15 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul 31 10:03:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37e7b262

sys-devel/binutils-hppa64: Bump to patchset 5, XFAIL gold tests only

Bug: https://bugs.gentoo.org/684046
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                         | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index f802743c4cd..d0f699ec0e5 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,7 +1,7 @@
 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54
-DIST binutils-2.36.1-patches-4.tar.xz 43508 BLAKE2B 116cefcbf4641f1ab649bb0345b80a23c29d1d3340d16f87068a1cffb911e4633f3e6da235534cd79c601cb4168bc78f9b7115185a49cdec78b6e7de7856b344 SHA512 3de95f1bb3787eeb7e942e2a9cf4a2bf967c5758158c3daf76b81a62ccefe5569b0a300cdc02e2e702c61a0cfc63d4209a7d306179cdddc3bc544d21b744eb82
+DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.37-patches-2.tar.xz 79304 BLAKE2B bdcbe29efba3582f2d1be9057a39aedb655cbc225abe8ea656c1bcf090a53930c74197505c8de2dcfd9a105f1b1cc8fa84a0d532547221d2df34a77b06e7fa15 SHA512 5cea876cfbdcd1409f5ef8ee138a8c29ad5b3d38b5d72ce312f2eb94fb8b2165e9a10018c46bdc36bc59ade2e2764e5da4ac653d15690bfc0bc9784202cc0164
 DIST binutils-2.37.tar.xz 22916924 BLAKE2B f5a374fdf0300f7734d1e462333296b16c9d5ed6eba167e1742a4da7082f4388c929e286bf76c3933b3e434937380340732a31790723654b491ea0c8ab5b9ba5 SHA512 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
index 10fc4993e5c..9f5a705c45a 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
@@ -21,7 +21,7 @@ REQUIRED_USE="default-gold? ( gold )"
 # PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
 #                      for the patchsets
 
-PATCH_VER=4
+PATCH_VER=5
 PATCH_DEV=dilfridge
 
 case ${PV} in


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-07-25 11:16 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-07-25 11:16 UTC (permalink / raw
  To: gentoo-commits

commit:     a761d2b640073dc57a8e43dbbf7b45b6d553c6fb
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 25 10:45:43 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 25 11:15:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a761d2b6

sys-devel/binutils-hppa64: Rekeyword 2.36.1-r2

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
index 50bbff890e1..10fc4993e5c 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-		#KEYWORDS="-* ~hppa"
+		KEYWORDS="-* ~hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-07-24 22:54 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-07-24 22:54 UTC (permalink / raw
  To: gentoo-commits

commit:     30845f7ac222de85e8cc17f6122d07a5bb8da1d1
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 24 22:51:30 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul 24 22:53:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30845f7a

sys-devel/binutils-hppa64: Bump 2.36.1 patchset to 4

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64-2.36.1-r2.ebuild               | 439 +++++++++++++++++++++
 2 files changed, 440 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 1543bc0e0d4..f802743c4cd 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,6 +1,7 @@
 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54
+DIST binutils-2.36.1-patches-4.tar.xz 43508 BLAKE2B 116cefcbf4641f1ab649bb0345b80a23c29d1d3340d16f87068a1cffb911e4633f3e6da235534cd79c601cb4168bc78f9b7115185a49cdec78b6e7de7856b344 SHA512 3de95f1bb3787eeb7e942e2a9cf4a2bf967c5758158c3daf76b81a62ccefe5569b0a300cdc02e2e702c61a0cfc63d4209a7d306179cdddc3bc544d21b744eb82
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.37-patches-2.tar.xz 79304 BLAKE2B bdcbe29efba3582f2d1be9057a39aedb655cbc225abe8ea656c1bcf090a53930c74197505c8de2dcfd9a105f1b1cc8fa84a0d532547221d2df34a77b06e7fa15 SHA512 5cea876cfbdcd1409f5ef8ee138a8c29ad5b3d38b5d72ce312f2eb94fb8b2165e9a10018c46bdc36bc59ade2e2764e5da4ac653d15690bfc0bc9784202cc0164
 DIST binutils-2.37.tar.xz 22916924 BLAKE2B f5a374fdf0300f7734d1e462333296b16c9d5ed6eba167e1742a4da7082f4388c929e286bf76c3933b3e434937380340732a31790723654b491ea0c8ab5b9ba5 SHA512 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
new file mode 100644
index 00000000000..50bbff890e1
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
@@ -0,0 +1,439 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		#KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# 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)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-07-24 21:15 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-07-24 21:15 UTC (permalink / raw
  To: gentoo-commits

commit:     857e7797fb209f2cfbf22e6a87535b58bb7664b4
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 24 21:14:37 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul 24 21:15:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=857e7797

sys-devel/binutils-hppa64: Bump 2.37 patchset to 2

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

 sys-devel/binutils-hppa64/Manifest                    | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 5b5085d915c..1543bc0e0d4 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -2,5 +2,5 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
-DIST binutils-2.37-patches-1.tar.xz 11960 BLAKE2B ea60d0db3b61d350a00626ab3ec76e919f15afcc52411c70cab4c5fda80bc0d250ef098847893724365b6c3e789f3f76fd84eda9d31d60295719da622533127f SHA512 608a600d977b9558054ed2278901f50d9d23c5786c271d7849ff884b4e268e1821db26b7c6f5e6cf0f57a7e44e88e4ce0f2441975f7d8401ada0d5451bdefc5f
+DIST binutils-2.37-patches-2.tar.xz 79304 BLAKE2B bdcbe29efba3582f2d1be9057a39aedb655cbc225abe8ea656c1bcf090a53930c74197505c8de2dcfd9a105f1b1cc8fa84a0d532547221d2df34a77b06e7fa15 SHA512 5cea876cfbdcd1409f5ef8ee138a8c29ad5b3d38b5d72ce312f2eb94fb8b2165e9a10018c46bdc36bc59ade2e2764e5da4ac653d15690bfc0bc9784202cc0164
 DIST binutils-2.37.tar.xz 22916924 BLAKE2B f5a374fdf0300f7734d1e462333296b16c9d5ed6eba167e1742a4da7082f4388c929e286bf76c3933b3e434937380340732a31790723654b491ea0c8ab5b9ba5 SHA512 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild
index 6f12e4dcbc4..cb0769ff3b0 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild
@@ -21,7 +21,7 @@ REQUIRED_USE="default-gold? ( gold )"
 # PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
 #                      for the patchsets
 
-PATCH_VER=1
+PATCH_VER=2
 PATCH_DEV=dilfridge
 
 case ${PV} in


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-07-20 21:52 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-07-20 21:52 UTC (permalink / raw
  To: gentoo-commits

commit:     a8fa4944befe172152632f0bafd3d989e8321fa2
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 20 21:50:33 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 20 21:52:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8fa4944

sys-devel/binutils-hppa64: Version bump 2.37, unkeyworded

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.37.ebuild    | 439 +++++++++++++++++++++
 2 files changed, 441 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index bd3fc8a6439..5b5085d915c 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -2,3 +2,5 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
+DIST binutils-2.37-patches-1.tar.xz 11960 BLAKE2B ea60d0db3b61d350a00626ab3ec76e919f15afcc52411c70cab4c5fda80bc0d250ef098847893724365b6c3e789f3f76fd84eda9d31d60295719da622533127f SHA512 608a600d977b9558054ed2278901f50d9d23c5786c271d7849ff884b4e268e1821db26b7c6f5e6cf0f57a7e44e88e4ce0f2441975f7d8401ada0d5451bdefc5f
+DIST binutils-2.37.tar.xz 22916924 BLAKE2B f5a374fdf0300f7734d1e462333296b16c9d5ed6eba167e1742a4da7082f4388c929e286bf76c3933b3e434937380340732a31790723654b491ea0c8ab5b9ba5 SHA512 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild
new file mode 100644
index 00000000000..6f12e4dcbc4
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37.ebuild
@@ -0,0 +1,439 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		#KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+
+		# 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)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-07-17 11:22 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2021-07-17 11:22 UTC (permalink / raw
  To: gentoo-commits

commit:     68c74e2ec19c6b5a24b8346183e7a0ffa4e03aae
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 17 11:00:34 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jul 17 11:22:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68c74e2e

sys-devel/binutils-hppa64: drop old

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

 sys-devel/binutils-hppa64/Manifest                 |   6 -
 .../binutils-hppa64/binutils-hppa64-2.32-r1.ebuild | 443 ---------------------
 .../binutils-hppa64/binutils-hppa64-2.33.1.ebuild  | 438 --------------------
 .../binutils-hppa64/binutils-hppa64-2.34-r2.ebuild | 443 ---------------------
 4 files changed, 1330 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index e6650c6b7a5..bd3fc8a6439 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,9 +1,3 @@
-DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
-DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a
-DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7
-DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
-DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
-DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
deleted file mode 100644
index d3887bea1c7..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
+++ /dev/null
@@ -1,443 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-# USE="+cxx" is a transitional flag until llvm migrates to new flags:
-#    bug #677888
-IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: slyfox
-
-PATCH_VER=2
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*.9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		EGIT_BRANCH=$(get_version_component_range 1-2)
-		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-		SLOT=$(get_version_component_range 1-2)
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(get_version_component_range 1-2)
-		KEYWORDS="-* hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		# Use upstream patch to enable development mode
-		rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
deleted file mode 100644
index ecd3f2f999b..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
+++ /dev/null
@@ -1,438 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*.9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		EGIT_BRANCH=$(ver_cut 1-2)
-		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-		SLOT=$(ver_cut 1-2)
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
deleted file mode 100644
index 9eace9459ce..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
+++ /dev/null
@@ -1,443 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=6
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*.9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		EGIT_BRANCH=$(ver_cut 1-2)
-		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-		SLOT=$(ver_cut 1-2)
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-04-20 18:39 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-04-20 18:39 UTC (permalink / raw
  To: gentoo-commits

commit:     ea420f59085f61a98fdb5d6e87501e7cb4ce5fc9
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 20 18:33:09 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Apr 20 18:39:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea420f59

sys-devel/binutils-hppa64: remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.36.1.ebuild  | 439 ---------------------
 2 files changed, 440 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index a0ba1ff7094..e6650c6b7a5 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -6,6 +6,5 @@ DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
-DIST binutils-2.36.1-patches-1.tar.xz 11392 BLAKE2B 8112dda3f000d29952cbf58101f842ca519054bf9de6e22908881fe4d46cc1ea9a26db74ab00c64aedd3746eb058c19a978b8dc025ad8de07b6365c70a1803b2 SHA512 c6f5645b09d0c149f2eef8e992ff7181716dfb961f1155207a1349168f2d2fb76857cc224c27b4d764cfbc4ddec0630ef8c0a91d7bac489896f28de64651b367
 DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
deleted file mode 100644
index 97aa5834c6b..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
+++ /dev/null
@@ -1,439 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-04-20 17:06 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-04-20 17:06 UTC (permalink / raw
  To: gentoo-commits

commit:     c01beda889f6964c04b72e82206df91894518492
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 20 17:03:18 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Apr 20 17:06:33 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c01beda8

sys-devel/binutils-hppa64: patchlevel bump 2.36.1-r1 pl 3

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

 sys-devel/binutils-hppa64/Manifest                         | 1 +
 sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild | 8 +-------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index c7ba7179158..a0ba1ff7094 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -7,4 +7,5 @@ DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fc
 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36.1-patches-1.tar.xz 11392 BLAKE2B 8112dda3f000d29952cbf58101f842ca519054bf9de6e22908881fe4d46cc1ea9a26db74ab00c64aedd3746eb058c19a978b8dc025ad8de07b6365c70a1803b2 SHA512 c6f5645b09d0c149f2eef8e992ff7181716dfb961f1155207a1349168f2d2fb76857cc224c27b4d764cfbc4ddec0630ef8c0a91d7bac489896f28de64651b367
+DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild
index 610b776d889..d4683f9f817 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild
@@ -21,7 +21,7 @@ REQUIRED_USE="default-gold? ( gold )"
 # PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
 #                      for the patchsets
 
-PATCH_VER=1
+PATCH_VER=3
 PATCH_DEV=dilfridge
 
 case ${PV} in
@@ -77,12 +77,6 @@ BDEPEND="
 
 RESTRICT="!test? ( test )"
 
-PATCHES=(
-	"${FILESDIR}"/${PN}-2.35.1-cet.patch
-	"${FILESDIR}"/${PN}-2.36.1-bfd-ctf.patch
-	"${FILESDIR}"/${PN}-2.36.1-ld-ctf.patch
-)
-
 MY_BUILDDIR=${WORKDIR}/build
 S=${WORKDIR}/${P/-hppa64/}
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-04-18  9:48 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-04-18  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     6aad22b5ba376bd9863f601b14f324964c7e21aa
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 18 09:46:41 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Apr 18 09:48:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6aad22b5

sys-devel/binutils-hppa64: Re-keyword 2.36

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
index e4ac93eb4d7..97aa5834c6b 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-		# KEYWORDS="-* ~hppa"
+		KEYWORDS="-* ~hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-04-18  9:48 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-04-18  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     853c98456a11885e06a807018d6a99353d48eae8
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 18 09:47:08 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Apr 18 09:48:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=853c9845

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64-2.35.1-r1.ebuild               | 439 ---------------------
 2 files changed, 441 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 5d49855081e..c7ba7179158 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,8 +4,6 @@ DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123e
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
 DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
-DIST binutils-2.35.1-patches-2.tar.xz 72236 BLAKE2B 584cb3edbda28c69171ed64e941535f992150d86f25201cadd07b63daaa36bf76b07dc0aa8a4837da17d1672feb47a7b15f83efdeec5409e695965a10142147a SHA512 b704ebe82c4402f058f9c96991a89256a6b369d28f844bf020ed2c77766894d9a2ca0596cd609de7b389fa8cd52bfab674b6deb10ea2096e50aa57921be2083e
-DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb
 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36.1-patches-1.tar.xz 11392 BLAKE2B 8112dda3f000d29952cbf58101f842ca519054bf9de6e22908881fe4d46cc1ea9a26db74ab00c64aedd3746eb058c19a978b8dc025ad8de07b6365c70a1803b2 SHA512 c6f5645b09d0c149f2eef8e992ff7181716dfb961f1155207a1349168f2d2fb76857cc224c27b4d764cfbc4ddec0630ef8c0a91d7bac489896f28de64651b367

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
deleted file mode 100644
index 303efe28c2d..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
+++ /dev/null
@@ -1,439 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=2
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-
-		# 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)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-02-11 20:22 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2021-02-11 20:22 UTC (permalink / raw
  To: gentoo-commits

commit:     d2f7c9935b63554f65183746c7460f211a803c79
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 11 20:17:51 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Feb 11 20:21:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2f7c993

sys-devel/binutils-hppa64: make CET optional (and disabled by default)

Reported-by: subzero_ro <AT> yahoo.com
Bug: https://bugs.gentoo.org/770061
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild | 7 ++++++-
 sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild    | 7 ++++++-
 sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild    | 7 ++++++-
 sys-devel/binutils-hppa64/metadata.xml                     | 1 +
 4 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
index 5a302e9061f..303efe28c2d 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
@@ -10,7 +10,7 @@ inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"
 LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
 REQUIRED_USE="default-gold? ( gold )"
 
 # Variables that can be set here:
@@ -253,6 +253,11 @@ src_configure() {
 		# 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)
 	)
 	echo ./configure "${myconf[@]}"
 	"${S}"/configure "${myconf[@]}" || die

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
index 27d0f88efc6..97aa5834c6b 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
@@ -10,7 +10,7 @@ inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"
 LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
 REQUIRED_USE="default-gold? ( gold )"
 
 # Variables that can be set here:
@@ -253,6 +253,11 @@ src_configure() {
 		# 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)
 	)
 	echo ./configure "${myconf[@]}"
 	"${S}"/configure "${myconf[@]}" || die

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
index f26da6552ae..e4ac93eb4d7 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
@@ -10,7 +10,7 @@ inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"
 LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
 REQUIRED_USE="default-gold? ( gold )"
 
 # Variables that can be set here:
@@ -253,6 +253,11 @@ src_configure() {
 		# 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)
 	)
 	echo ./configure "${myconf[@]}"
 	"${S}"/configure "${myconf[@]}" || die

diff --git a/sys-devel/binutils-hppa64/metadata.xml b/sys-devel/binutils-hppa64/metadata.xml
index 028ab8dc65c..35c85c00a3a 100644
--- a/sys-devel/binutils-hppa64/metadata.xml
+++ b/sys-devel/binutils-hppa64/metadata.xml
@@ -10,6 +10,7 @@
 		<name>Gentoo Toolchain Project</name>
 	</maintainer>
 	<use>
+		<flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
 		<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
 		<flag name="gold">Build ld.gold linker</flag>
 		<flag name="plugins">Enable plugin support in tools</flag>


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-02-09 21:46 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-02-09 21:46 UTC (permalink / raw
  To: gentoo-commits

commit:     f4cfc5895e6a79656dfd638c172dbfb92387b695
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  9 21:44:13 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 21:46:15 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4cfc589

sys-devel/binutils-hppa64: Re-keyword 2.35.2

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
index 091393055e7..27d0f88efc6 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-		# KEYWORDS="-* hppa"
+		KEYWORDS="-* ~hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-02-09 21:46 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-02-09 21:46 UTC (permalink / raw
  To: gentoo-commits

commit:     22e5f5b0d64a59f7f820210c7ef3e9c91cea3feb
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  9 21:44:30 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 21:46:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22e5f5b0

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64/binutils-hppa64-2.36.ebuild    | 434 ---------------------
 2 files changed, 436 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 0919089b858..5d49855081e 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -8,7 +8,5 @@ DIST binutils-2.35.1-patches-2.tar.xz 72236 BLAKE2B 584cb3edbda28c69171ed64e9415
 DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb
 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
-DIST binutils-2.36-patches-1.tar.xz 13200 BLAKE2B 82e8ef3c51984d4418466d7b838fa5c0a5a72c3bbe3e631b8aeb28503fd8b81e2b187908a2a4e1b286eba8af0db25eafadc5ffe42dd07677e6bd659cf5483b07 SHA512 88c5ac42d25d131c1507d94992fdd11a15700a0304da10cedd3b0db9bc689d3387189d6d97f847d77e8a5d053619b174695a0a6b3c6c1bb66ea8f122f0b38d63
 DIST binutils-2.36.1-patches-1.tar.xz 11392 BLAKE2B 8112dda3f000d29952cbf58101f842ca519054bf9de6e22908881fe4d46cc1ea9a26db74ab00c64aedd3746eb058c19a978b8dc025ad8de07b6365c70a1803b2 SHA512 c6f5645b09d0c149f2eef8e992ff7181716dfb961f1155207a1349168f2d2fb76857cc224c27b4d764cfbc4ddec0630ef8c0a91d7bac489896f28de64651b367
 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
-DIST binutils-2.36.tar.xz 22760136 BLAKE2B 6666841e26c89a07b7e6c1144d893bab112278906d7917f3ca6273aa78094951686f0d5893857cae1edde1e1ecd7c6798bc14eac88d03c5a1e6e3e480a788f9c SHA512 0b89b70d4ad5cfe5bd0011dc7e342ae9de96efdbfc3442a0d6b5f7660e38bbcad36f2c72ba8f074323f02bde022ff1cd723ae99f0ea55cf94ee2dbbc0e4efdb2

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.ebuild
deleted file mode 100644
index f26da6552ae..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.ebuild
+++ /dev/null
@@ -1,434 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		# KEYWORDS="-* ~hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-02-08 22:17 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-02-08 22:17 UTC (permalink / raw
  To: gentoo-commits

commit:     7bb5befd5e0de8dcde7d5db99966ef88a23dd27f
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  8 22:15:54 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Feb  8 22:17:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bb5befd

sys-devel/binutils-hppa64: Version bump

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.36.1.ebuild  | 434 +++++++++++++++++++++
 2 files changed, 436 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index cb25acc9135..0919089b858 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -9,4 +9,6 @@ DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc4
 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36-patches-1.tar.xz 13200 BLAKE2B 82e8ef3c51984d4418466d7b838fa5c0a5a72c3bbe3e631b8aeb28503fd8b81e2b187908a2a4e1b286eba8af0db25eafadc5ffe42dd07677e6bd659cf5483b07 SHA512 88c5ac42d25d131c1507d94992fdd11a15700a0304da10cedd3b0db9bc689d3387189d6d97f847d77e8a5d053619b174695a0a6b3c6c1bb66ea8f122f0b38d63
+DIST binutils-2.36.1-patches-1.tar.xz 11392 BLAKE2B 8112dda3f000d29952cbf58101f842ca519054bf9de6e22908881fe4d46cc1ea9a26db74ab00c64aedd3746eb058c19a978b8dc025ad8de07b6365c70a1803b2 SHA512 c6f5645b09d0c149f2eef8e992ff7181716dfb961f1155207a1349168f2d2fb76857cc224c27b4d764cfbc4ddec0630ef8c0a91d7bac489896f28de64651b367
+DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
 DIST binutils-2.36.tar.xz 22760136 BLAKE2B 6666841e26c89a07b7e6c1144d893bab112278906d7917f3ca6273aa78094951686f0d5893857cae1edde1e1ecd7c6798bc14eac88d03c5a1e6e3e480a788f9c SHA512 0b89b70d4ad5cfe5bd0011dc7e342ae9de96efdbfc3442a0d6b5f7660e38bbcad36f2c72ba8f074323f02bde022ff1cd723ae99f0ea55cf94ee2dbbc0e4efdb2

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
new file mode 100644
index 00000000000..f26da6552ae
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1.ebuild
@@ -0,0 +1,434 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		# KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-02-08 21:21 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-02-08 21:21 UTC (permalink / raw
  To: gentoo-commits

commit:     fa681564d7c0790538a9faaab939abed7205701b
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  8 21:19:30 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Feb  8 21:21:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa681564

sys-devel/binutils-hppa64: Version bump

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.35.2.ebuild  | 434 +++++++++++++++++++++
 2 files changed, 436 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index c50ff325728..cb25acc9135 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -6,5 +6,7 @@ DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils-2.35.1-patches-2.tar.xz 72236 BLAKE2B 584cb3edbda28c69171ed64e941535f992150d86f25201cadd07b63daaa36bf76b07dc0aa8a4837da17d1672feb47a7b15f83efdeec5409e695965a10142147a SHA512 b704ebe82c4402f058f9c96991a89256a6b369d28f844bf020ed2c77766894d9a2ca0596cd609de7b389fa8cd52bfab674b6deb10ea2096e50aa57921be2083e
 DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb
+DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
+DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
 DIST binutils-2.36-patches-1.tar.xz 13200 BLAKE2B 82e8ef3c51984d4418466d7b838fa5c0a5a72c3bbe3e631b8aeb28503fd8b81e2b187908a2a4e1b286eba8af0db25eafadc5ffe42dd07677e6bd659cf5483b07 SHA512 88c5ac42d25d131c1507d94992fdd11a15700a0304da10cedd3b0db9bc689d3387189d6d97f847d77e8a5d053619b174695a0a6b3c6c1bb66ea8f122f0b38d63
 DIST binutils-2.36.tar.xz 22760136 BLAKE2B 6666841e26c89a07b7e6c1144d893bab112278906d7917f3ca6273aa78094951686f0d5893857cae1edde1e1ecd7c6798bc14eac88d03c5a1e6e3e480a788f9c SHA512 0b89b70d4ad5cfe5bd0011dc7e342ae9de96efdbfc3442a0d6b5f7660e38bbcad36f2c72ba8f074323f02bde022ff1cd723ae99f0ea55cf94ee2dbbc0e4efdb2

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
new file mode 100644
index 00000000000..091393055e7
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
@@ -0,0 +1,434 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		# KEYWORDS="-* hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-01-28 17:38 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2021-01-28 17:38 UTC (permalink / raw
  To: gentoo-commits

commit:     5f5b4445e2bf6bf3d7d30a5cc4879f70596ca683
Author:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
AuthorDate: Thu Jan 28 17:10:36 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Jan 28 17:38:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5b4445

sys-devel/binutils-hppa64: stable 2.35.1-r1 for hppa, bug #766734

Package-Manager: Portage-3.0.13, Repoman-3.0.2
RepoMan-Options: --include-arches="hppa"
Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
index e007720179e..5a302e9061f 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
+		KEYWORDS="-* hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-01-24 15:34 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-01-24 15:34 UTC (permalink / raw
  To: gentoo-commits

commit:     409dc9d740daaacd81c95f728d36b4971aec2bc2
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 24 15:32:11 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jan 24 15:33:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=409dc9d7

sys-devel/binutils-hppa64: Version bump (unkeyworded)

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.36.ebuild    | 434 +++++++++++++++++++++
 2 files changed, 436 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index f66efb11b54..c50ff325728 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -6,3 +6,5 @@ DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils-2.35.1-patches-2.tar.xz 72236 BLAKE2B 584cb3edbda28c69171ed64e941535f992150d86f25201cadd07b63daaa36bf76b07dc0aa8a4837da17d1672feb47a7b15f83efdeec5409e695965a10142147a SHA512 b704ebe82c4402f058f9c96991a89256a6b369d28f844bf020ed2c77766894d9a2ca0596cd609de7b389fa8cd52bfab674b6deb10ea2096e50aa57921be2083e
 DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb
+DIST binutils-2.36-patches-1.tar.xz 13200 BLAKE2B 82e8ef3c51984d4418466d7b838fa5c0a5a72c3bbe3e631b8aeb28503fd8b81e2b187908a2a4e1b286eba8af0db25eafadc5ffe42dd07677e6bd659cf5483b07 SHA512 88c5ac42d25d131c1507d94992fdd11a15700a0304da10cedd3b0db9bc689d3387189d6d97f847d77e8a5d053619b174695a0a6b3c6c1bb66ea8f122f0b38d63
+DIST binutils-2.36.tar.xz 22760136 BLAKE2B 6666841e26c89a07b7e6c1144d893bab112278906d7917f3ca6273aa78094951686f0d5893857cae1edde1e1ecd7c6798bc14eac88d03c5a1e6e3e480a788f9c SHA512 0b89b70d4ad5cfe5bd0011dc7e342ae9de96efdbfc3442a0d6b5f7660e38bbcad36f2c72ba8f074323f02bde022ff1cd723ae99f0ea55cf94ee2dbbc0e4efdb2

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.ebuild
new file mode 100644
index 00000000000..f26da6552ae
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.ebuild
@@ -0,0 +1,434 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		# KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-01-23 19:28 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2021-01-23 19:28 UTC (permalink / raw
  To: gentoo-commits

commit:     cc1b85191cd06aafeb6f1c0c9fc66de7b71efa13
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 23 19:26:33 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jan 23 19:28:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc1b8519

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.35.1.ebuild  | 434 ---------------------
 2 files changed, 435 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 3a92df3667a..f66efb11b54 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,6 +4,5 @@ DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123e
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
 DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
-DIST binutils-2.35.1-patches-1.tar.xz 10088 BLAKE2B fa4b0c417b6452757f90243921c60b2406c9bf60d1aaa393654fb23ce52e32fb3e7ed90f6d59286786dd95398a10d008c75bfdca065d704025cc828ff65b225f SHA512 dccb4407f4f2a8b38488f9f42638c10777ee344239cf5d4fcc8f580df3e8ff15d03211dc51ef18d905c326a71771da4b38f47381d6d549422a8353b5da0e7b0b
 DIST binutils-2.35.1-patches-2.tar.xz 72236 BLAKE2B 584cb3edbda28c69171ed64e941535f992150d86f25201cadd07b63daaa36bf76b07dc0aa8a4837da17d1672feb47a7b15f83efdeec5409e695965a10142147a SHA512 b704ebe82c4402f058f9c96991a89256a6b369d28f844bf020ed2c77766894d9a2ca0596cd609de7b389fa8cd52bfab674b6deb10ea2096e50aa57921be2083e
 DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
deleted file mode 100644
index 27d0f88efc6..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
+++ /dev/null
@@ -1,434 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
-		# avoid automagic dependency on (currently prefix) systems
-		# systems with debuginfod library, bug #754753
-		--without-debuginfod
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2021-01-03 13:23 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2021-01-03 13:23 UTC (permalink / raw
  To: gentoo-commits

commit:     a3776a155ad89d1ed4b0c475c7467a6f10340f11
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 13:16:07 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jan  3 13:19:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3776a15

sys-devel/binutils-hppa64: expliictly disable debuginfod

Fixed-by: Fabian Groffen
Reported-by: Jason Cooper
Bug: https://bugs.gentoo.org/754753
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild   | 6 +++++-
 sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild | 6 +++++-
 sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild    | 6 +++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
index d7d459bca52..9eace9459ce 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -258,6 +258,10 @@ src_configure() {
 		# Change SONAME to avoid conflict across
 		# {native,cross}/binutils, binutils-libs. #666100
 		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
 	)
 	echo ./configure "${myconf[@]}"
 	"${S}"/configure "${myconf[@]}" || die

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
index 7fc606f9e34..e007720179e 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -249,6 +249,10 @@ src_configure() {
 		# Change SONAME to avoid conflict across
 		# {native,cross}/binutils, binutils-libs. #666100
 		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
 	)
 	echo ./configure "${myconf[@]}"
 	"${S}"/configure "${myconf[@]}" || die

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
index baeec28e343..27d0f88efc6 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -249,6 +249,10 @@ src_configure() {
 		# Change SONAME to avoid conflict across
 		# {native,cross}/binutils, binutils-libs. #666100
 		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+		# avoid automagic dependency on (currently prefix) systems
+		# systems with debuginfod library, bug #754753
+		--without-debuginfod
 	)
 	echo ./configure "${myconf[@]}"
 	"${S}"/configure "${myconf[@]}" || die


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-11-16 16:49 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-11-16 16:49 UTC (permalink / raw
  To: gentoo-commits

commit:     7d7556d5704584f1f8a7c06835b7d9149fc0303b
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 16 16:48:22 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Nov 16 16:48:22 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d7556d5

sys-devel/binutils-hppa64: Re-add keywords to 2.35.1-r1

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
index d277e1a234b..7fc606f9e34 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-		# KEYWORDS="-* ~hppa"
+		KEYWORDS="-* ~hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-11-03 22:47 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2020-11-03 22:47 UTC (permalink / raw
  To: gentoo-commits

commit:     8f6251ffbf10dc927361f8277e214745d7a10327
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  3 22:45:25 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Nov  3 22:45:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f6251ff

sys-devel/binutils-hppa64: stable 2.34-r2 for hppa

stable wrt bug #734598

Package-Manager: Portage-3.0.9, Repoman-3.0.2
RepoMan-Options: --include-arches="hppa"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
index 9fef7573cba..d7d459bca52 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
@@ -44,7 +44,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
+		KEYWORDS="-* hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-10-30 21:45 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-10-30 21:45 UTC (permalink / raw
  To: gentoo-commits

commit:     f0a55611c0ed6a9d77ee58d3f07b6018b2838f6a
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 30 21:43:09 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Oct 30 21:45:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0a55611

sys-devel/binutils-hppa64: 2.35.1 patchset bump

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64-2.35.1-r1.ebuild               | 430 +++++++++++++++++++++
 2 files changed, 431 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 089a85714e6..3a92df3667a 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -5,4 +5,5 @@ DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937
 DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils-2.35.1-patches-1.tar.xz 10088 BLAKE2B fa4b0c417b6452757f90243921c60b2406c9bf60d1aaa393654fb23ce52e32fb3e7ed90f6d59286786dd95398a10d008c75bfdca065d704025cc828ff65b225f SHA512 dccb4407f4f2a8b38488f9f42638c10777ee344239cf5d4fcc8f580df3e8ff15d03211dc51ef18d905c326a71771da4b38f47381d6d549422a8353b5da0e7b0b
+DIST binutils-2.35.1-patches-2.tar.xz 72236 BLAKE2B 584cb3edbda28c69171ed64e941535f992150d86f25201cadd07b63daaa36bf76b07dc0aa8a4837da17d1672feb47a7b15f83efdeec5409e695965a10142147a SHA512 b704ebe82c4402f058f9c96991a89256a6b369d28f844bf020ed2c77766894d9a2ca0596cd609de7b389fa8cd52bfab674b6deb10ea2096e50aa57921be2083e
 DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
new file mode 100644
index 00000000000..d277e1a234b
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1-r1.ebuild
@@ -0,0 +1,430 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		# KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-09-25 14:20 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-09-25 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     da9189e0994328bbd5ea546a36b441fe33cd65d0
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 25 14:14:42 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Sep 25 14:19:46 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da9189e0

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64/binutils-hppa64-2.35.ebuild    | 430 ---------------------
 2 files changed, 432 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 58e0817723b..089a85714e6 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,7 +4,5 @@ DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123e
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
 DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
-DIST binutils-2.35-patches-1.tar.xz 12216 BLAKE2B a811449da684e3501a7520a26639e04dda2f2d2fc8610974293eff3e4a1e23c4abeb97f52fe3b796679452bd6e3a5330fef4beb6f64b9ce2a1162076803390a0 SHA512 b8da16a4d97b264da925cc939b54bedbc148eb72a8d60f79d7ed222e9e299dca2a4f1fad4a6d60448d9d196c11331443eca0508dcbb85cb4c2da6c67bfaf4cd2
 DIST binutils-2.35.1-patches-1.tar.xz 10088 BLAKE2B fa4b0c417b6452757f90243921c60b2406c9bf60d1aaa393654fb23ce52e32fb3e7ed90f6d59286786dd95398a10d008c75bfdca065d704025cc828ff65b225f SHA512 dccb4407f4f2a8b38488f9f42638c10777ee344239cf5d4fcc8f580df3e8ff15d03211dc51ef18d905c326a71771da4b38f47381d6d549422a8353b5da0e7b0b
 DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb
-DIST binutils-2.35.tar.xz 22042160 BLAKE2B 72ea79edf3a77aa93dcf38274123abbae5ce8f800a95e6379b4c8807050b05c2dfec314f06c027b1343c5570f369324fa3e195d7e0db5f8a57c0579937c49d3f SHA512 9f222e4ab6720036402d03904fb11b73ab87714b85cd84997f7d357f405c7e10581d70202f9165a1ee0c70538632db27ecc9dfe627dddb1e6bc7edb1537cf786

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.ebuild
deleted file mode 100644
index 0a83fa18e4a..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.ebuild
+++ /dev/null
@@ -1,430 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-#		KEYWORDS="-* ~hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-09-25 14:20 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-09-25 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     8d33462fcbcfa451c99087c2010bf931318ead5a
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 25 14:14:23 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Sep 25 14:19:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d33462f

sys-devel/binutils-hppa64: Re-add keywords to 2.35.1

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
index 0a83fa18e4a..baeec28e343 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-#		KEYWORDS="-* ~hppa"
+		KEYWORDS="-* ~hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-09-23  9:10 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-09-23  9:10 UTC (permalink / raw
  To: gentoo-commits

commit:     a76a2187404c1b14f73a2b0791f1fa19365311ba
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 23 09:03:49 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Sep 23 09:10:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a76a2187

sys-devel/binutils-hppa64: Version bump

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.35.1.ebuild  | 430 +++++++++++++++++++++
 2 files changed, 432 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 4b742c149d0..58e0817723b 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -5,4 +5,6 @@ DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937
 DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils-2.35-patches-1.tar.xz 12216 BLAKE2B a811449da684e3501a7520a26639e04dda2f2d2fc8610974293eff3e4a1e23c4abeb97f52fe3b796679452bd6e3a5330fef4beb6f64b9ce2a1162076803390a0 SHA512 b8da16a4d97b264da925cc939b54bedbc148eb72a8d60f79d7ed222e9e299dca2a4f1fad4a6d60448d9d196c11331443eca0508dcbb85cb4c2da6c67bfaf4cd2
+DIST binutils-2.35.1-patches-1.tar.xz 10088 BLAKE2B fa4b0c417b6452757f90243921c60b2406c9bf60d1aaa393654fb23ce52e32fb3e7ed90f6d59286786dd95398a10d008c75bfdca065d704025cc828ff65b225f SHA512 dccb4407f4f2a8b38488f9f42638c10777ee344239cf5d4fcc8f580df3e8ff15d03211dc51ef18d905c326a71771da4b38f47381d6d549422a8353b5da0e7b0b
+DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb
 DIST binutils-2.35.tar.xz 22042160 BLAKE2B 72ea79edf3a77aa93dcf38274123abbae5ce8f800a95e6379b4c8807050b05c2dfec314f06c027b1343c5570f369324fa3e195d7e0db5f8a57c0579937c49d3f SHA512 9f222e4ab6720036402d03904fb11b73ab87714b85cd84997f7d357f405c7e10581d70202f9165a1ee0c70538632db27ecc9dfe627dddb1e6bc7edb1537cf786

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
new file mode 100644
index 00000000000..0a83fa18e4a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.1.ebuild
@@ -0,0 +1,430 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+#		KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-09-17 20:08 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-09-17 20:08 UTC (permalink / raw
  To: gentoo-commits

commit:     b1eac5dea827f76cb3475cd52ca4a2ffdbc3b00b
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 17 20:07:03 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Sep 17 20:07:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1eac5de

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.34-r1.ebuild | 442 ---------------------
 2 files changed, 443 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index b906ec41388..4b742c149d0 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -2,7 +2,6 @@ DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a
 DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
-DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a SHA512 e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
 DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils-2.35-patches-1.tar.xz 12216 BLAKE2B a811449da684e3501a7520a26639e04dda2f2d2fc8610974293eff3e4a1e23c4abeb97f52fe3b796679452bd6e3a5330fef4beb6f64b9ce2a1162076803390a0 SHA512 b8da16a4d97b264da925cc939b54bedbc148eb72a8d60f79d7ed222e9e299dca2a4f1fad4a6d60448d9d196c11331443eca0508dcbb85cb4c2da6c67bfaf4cd2

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r1.ebuild
deleted file mode 100644
index c848f55dace..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r1.ebuild
+++ /dev/null
@@ -1,442 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=4
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*.9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		EGIT_BRANCH=$(ver_cut 1-2)
-		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-		SLOT=$(ver_cut 1-2)
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		# Use upstream patch to enable development mode
-		rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
-
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-07-31 16:06 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-07-31 16:06 UTC (permalink / raw
  To: gentoo-commits

commit:     3b33e7cfa5c6a94411539df2768cd1d98e0cc697
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 31 15:52:13 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Jul 31 16:05:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b33e7cf

sys-devel/binutils-hppa64: Bump to 2.34 patchlevel 6

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.34-r2.ebuild | 439 +++++++++++++++++++++
 2 files changed, 440 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index fcb40a674c2..b906ec41388 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -3,6 +3,7 @@ DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7
 DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
 DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a SHA512 e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
+DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils-2.35-patches-1.tar.xz 12216 BLAKE2B a811449da684e3501a7520a26639e04dda2f2d2fc8610974293eff3e4a1e23c4abeb97f52fe3b796679452bd6e3a5330fef4beb6f64b9ce2a1162076803390a0 SHA512 b8da16a4d97b264da925cc939b54bedbc148eb72a8d60f79d7ed222e9e299dca2a4f1fad4a6d60448d9d196c11331443eca0508dcbb85cb4c2da6c67bfaf4cd2
 DIST binutils-2.35.tar.xz 22042160 BLAKE2B 72ea79edf3a77aa93dcf38274123abbae5ce8f800a95e6379b4c8807050b05c2dfec314f06c027b1343c5570f369324fa3e195d7e0db5f8a57c0579937c49d3f SHA512 9f222e4ab6720036402d03904fb11b73ab87714b85cd84997f7d357f405c7e10581d70202f9165a1ee0c70538632db27ecc9dfe627dddb1e6bc7edb1537cf786

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
new file mode 100644
index 00000000000..9fef7573cba
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild
@@ -0,0 +1,439 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=6
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*.9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		EGIT_BRANCH=$(ver_cut 1-2)
+		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+		SLOT=$(ver_cut 1-2)
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-07-25 17:57 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-07-25 17:57 UTC (permalink / raw
  To: gentoo-commits

commit:     93db8587ddc081264ad087c6f9c3dfe77d65b62f
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 25 17:56:56 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul 25 17:57:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93db8587

sys-devel/binutils-hppa64: Version bump, untested, no keywords

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.35.ebuild    | 430 +++++++++++++++++++++
 2 files changed, 432 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 66eba77cb3e..fcb40a674c2 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -4,3 +4,5 @@ DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123e
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
 DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a SHA512 e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
+DIST binutils-2.35-patches-1.tar.xz 12216 BLAKE2B a811449da684e3501a7520a26639e04dda2f2d2fc8610974293eff3e4a1e23c4abeb97f52fe3b796679452bd6e3a5330fef4beb6f64b9ce2a1162076803390a0 SHA512 b8da16a4d97b264da925cc939b54bedbc148eb72a8d60f79d7ed222e9e299dca2a4f1fad4a6d60448d9d196c11331443eca0508dcbb85cb4c2da6c67bfaf4cd2
+DIST binutils-2.35.tar.xz 22042160 BLAKE2B 72ea79edf3a77aa93dcf38274123abbae5ce8f800a95e6379b4c8807050b05c2dfec314f06c027b1343c5570f369324fa3e195d7e0db5f8a57c0579937c49d3f SHA512 9f222e4ab6720036402d03904fb11b73ab87714b85cd84997f7d357f405c7e10581d70202f9165a1ee0c70538632db27ecc9dfe627dddb1e6bc7edb1537cf786

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.ebuild
new file mode 100644
index 00000000000..0a83fa18e4a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.ebuild
@@ -0,0 +1,430 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+#		KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-07-25 17:57 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-07-25 17:57 UTC (permalink / raw
  To: gentoo-commits

commit:     e527e9d74468ab81102ff869e85ed927cbaa5cc7
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 25 17:54:22 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul 25 17:57:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e527e9d7

sys-devel/binutils-hppa64: remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.34.ebuild    | 442 ---------------------
 2 files changed, 443 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 885a0cb424c..66eba77cb3e 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -2,6 +2,5 @@ DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a
 DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
-DIST binutils-2.34-patches-1.tar.xz 20388 BLAKE2B 8828505f62259a307de445357320827e7f6bc416a7f4c72140add505f62eef3928c7daec13be158b52c2a7a1d989f539025e4be6ec27ef80ede81477a42c5042 SHA512 951dffcc30ad5706dc48e71995217655c5d96472446ab66a357f19486b57d1868143a9809887eab7ba8c42c33124f8b37d3bab6618388ea8a08b4399d348a645
 DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a SHA512 e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
deleted file mode 100644
index 526abae15db..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
+++ /dev/null
@@ -1,442 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=slyfox
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*.9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		EGIT_BRANCH=$(ver_cut 1-2)
-		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-		SLOT=$(ver_cut 1-2)
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		# Use upstream patch to enable development mode
-		rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
-
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-05-19 19:57 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2020-05-19 19:57 UTC (permalink / raw
  To: gentoo-commits

commit:     48dd086f3553a57c388f10b0d865dda06f562634
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue May 19 19:54:46 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue May 19 19:56:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48dd086f

sys-devel/binutils-hppa64: Patchset update

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.34-r1.ebuild | 442 +++++++++++++++++++++
 2 files changed, 443 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 28b2ca67f77..885a0cb424c 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -3,4 +3,5 @@ DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7
 DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
 DIST binutils-2.34-patches-1.tar.xz 20388 BLAKE2B 8828505f62259a307de445357320827e7f6bc416a7f4c72140add505f62eef3928c7daec13be158b52c2a7a1d989f539025e4be6ec27ef80ede81477a42c5042 SHA512 951dffcc30ad5706dc48e71995217655c5d96472446ab66a357f19486b57d1868143a9809887eab7ba8c42c33124f8b37d3bab6618388ea8a08b4399d348a645
+DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a SHA512 e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r1.ebuild
new file mode 100644
index 00000000000..c848f55dace
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r1.ebuild
@@ -0,0 +1,442 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*.9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		EGIT_BRANCH=$(ver_cut 1-2)
+		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+		SLOT=$(ver_cut 1-2)
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		# Use upstream patch to enable development mode
+		rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
+
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-04-01 11:12 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2020-04-01 11:12 UTC (permalink / raw
  To: gentoo-commits

commit:     fbd0b4fed9730de0465e7e90cda6960ebd9a664b
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  1 11:11:26 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Apr  1 11:12:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbd0b4fe

sys-devel/binutils-hppa64: Stable for HPPA

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
index 087fa9a6ac0..ecd3f2f999b 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
@@ -44,7 +44,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(ver_cut 1-2)
-		KEYWORDS="-* ~hppa"
+		KEYWORDS="-* hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-03-10  0:05 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2020-03-10  0:05 UTC (permalink / raw
  To: gentoo-commits

commit:     854abca0bdecb5efc0627aeb99f9f3e8299d8d65
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 10 00:01:07 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Mar 10 00:05:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=854abca0

sys-devel/binutils-hppa64: move deps to BDEPEND for EAPI 7, bug #700898

Tweak only latest ~arch binutils-hppa64-2.34.

Reported-by: David Michael
Bug: https://bugs.gentoo.org/700898
Package-Manager: Portage-2.3.93, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
index 97770ec57d6..526abae15db 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
@@ -75,7 +75,8 @@ RDEPEND="
 	>=sys-devel/binutils-config-3
 	sys-libs/zlib
 "
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
 	doc? ( sys-apps/texinfo )
 	test? ( dev-util/dejagnu )
 	nls? ( sys-devel/gettext )


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-03-09  7:56 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2020-03-09  7:56 UTC (permalink / raw
  To: gentoo-commits

commit:     a1d072e706ff8bd1059d97464d55371909c9498f
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  9 07:55:40 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Mar  9 07:56:39 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1d072e7

sys-devel/binutils-hppa64: drop old

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

 sys-devel/binutils-hppa64/Manifest                 |   4 -
 .../binutils-hppa64/binutils-hppa64-2.30-r4.ebuild | 399 ------------------
 .../binutils-hppa64-2.31.1-r6.ebuild               | 445 ---------------------
 3 files changed, 848 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 0f415ee0e0a..28b2ca67f77 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,7 +1,3 @@
-DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
-DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
-DIST binutils-2.31.1-patches-7.tar.xz 76828 BLAKE2B 354e7c3aa76c0cfe8fc6bb419a5b19294c0be09ebdff2fc4533dd16116fcd4f4a1b4c8db02233dabe33ca68347e0a30e542456988a4ead407edb47ed031e018c SHA512 c84ff9cd9f5b1e313e93d0f25bb4244950a73e0d97ec4dacb8763382219a08a01b16a8e93173032232ea4239098b29448331ed461f792e663e1117eb0811f85b
-DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a
 DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
deleted file mode 100644
index 86763d13f44..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
+++ /dev/null
@@ -1,399 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: dilfridge :)
-
-PATCH_VER=5
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT="${BVER}"
-KEYWORDS="-* hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-if is_cross ; then
-	# The build assumes the host has libiberty and such when cross-compiling
-	# its build tools.  We should probably make binutils itself build a local
-	# copy to use, but until then, be lazy.
-	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
-fi
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
deleted file mode 100644
index a06de11aeed..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
+++ /dev/null
@@ -1,445 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-# USE="+cxx" is a transitional flag until llvm migrates to new flags:
-#    bug #677888
-IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: slyfox
-
-PATCH_VER=7
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*.9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		EGIT_BRANCH=$(get_version_component_range 1-2)
-		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-		SLOT=$(get_version_component_range 1-2)
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(get_version_component_range 1-2)
-		;;
-esac
-SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}"
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-02-13 21:40 David Seifert
  0 siblings, 0 replies; 172+ messages in thread
From: David Seifert @ 2020-02-13 21:40 UTC (permalink / raw
  To: gentoo-commits

commit:     6d34127a18289f875d4aa0b49290e2964362f9bd
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 13 21:39:14 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Feb 13 21:39:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d34127a

sys-devel/binutils-hppa64: [QA] inherit toolchain-funcs.eclass directly

Package-Manager: Portage-2.3.88, Repoman-2.3.20
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild   | 4 ++--
 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild | 4 ++--
 sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild   | 4 ++--
 sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild    | 4 ++--
 sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild      | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
index a9281b7319d..86763d13f44 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
 export CTARGET=hppa64-${CHOST#*-}
 
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs versionator
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
index 33a031dfb6e..a06de11aeed 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
 export CTARGET=hppa64-${CHOST#*-}
 
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs versionator
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
index 3871f19978c..d3887bea1c7 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
 export CTARGET=hppa64-${CHOST#*-}
 
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs versionator
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
index 550e2c50474..087fa9a6ac0 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
 export CTARGET=hppa64-${CHOST#*-}
 
-inherit eutils libtool flag-o-matic gnuconfig multilib
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
index bccd8c08d70..97770ec57d6 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 
 export CTARGET=hppa64-${CHOST#*-}
 
-inherit eutils libtool flag-o-matic gnuconfig multilib
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-02-01 22:00 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2020-02-01 22:00 UTC (permalink / raw
  To: gentoo-commits

commit:     7c707bd585204b365176ba8e82f9139e77389462
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  1 21:10:55 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Feb  1 22:00:35 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c707bd5

sys-devel/binutils-hppa64: bump up to 2.34

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.34.ebuild    | 441 +++++++++++++++++++++
 2 files changed, 443 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index d7356275fe3..0f415ee0e0a 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -6,3 +6,5 @@ DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a
 DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
+DIST binutils-2.34-patches-1.tar.xz 20388 BLAKE2B 8828505f62259a307de445357320827e7f6bc416a7f4c72140add505f62eef3928c7daec13be158b52c2a7a1d989f539025e4be6ec27ef80ede81477a42c5042 SHA512 951dffcc30ad5706dc48e71995217655c5d96472446ab66a357f19486b57d1868143a9809887eab7ba8c42c33124f8b37d3bab6618388ea8a08b4399d348a645
+DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
new file mode 100644
index 00000000000..bccd8c08d70
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild
@@ -0,0 +1,441 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=slyfox
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*.9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		EGIT_BRANCH=$(ver_cut 1-2)
+		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+		SLOT=$(ver_cut 1-2)
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		# Use upstream patch to enable development mode
+		rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
+
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}"
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2020-01-24 15:51 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2020-01-24 15:51 UTC (permalink / raw
  To: gentoo-commits

commit:     e03a96e33322ceb20c6ac539b74407467e061839
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 24 15:50:53 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jan 24 15:51:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e03a96e3

sys-devel/binutils-hppa64: drop old

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

 sys-devel/binutils-hppa64/Manifest                 | 12 ----------
 .../binutils-hppa64/binutils-hppa64-2.26.1.ebuild  | 26 ----------------------
 .../binutils-hppa64/binutils-hppa64-2.27.ebuild    | 26 ----------------------
 .../binutils-hppa64/binutils-hppa64-2.28.1.ebuild  | 26 ----------------------
 .../binutils-hppa64/binutils-hppa64-2.28.ebuild    | 26 ----------------------
 .../binutils-hppa64-2.29.1-r1.ebuild               | 26 ----------------------
 .../binutils-hppa64/binutils-hppa64-2.29.ebuild    | 26 ----------------------
 7 files changed, 168 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 93b0852d745..d7356275fe3 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,15 +1,3 @@
-DIST binutils-2.26.1-patches-1.0.tar.xz 11212 BLAKE2B f785930a9bf994312f3a525ef46727c582e6cd3992b5648bdf4c787f55fed4b36c69be3ac7d9962dcd72b6dbe0155dbf23d1daa14be5c7ad5da1cf634f2522aa SHA512 c520967659c66f05f7ad795bb0bc2522e139977ab3ae8cfd9ec0d093a412a7291d1cabaa6b429c618fcf7253458a6fbe5a7dc3f62e0ac9762667308067db075c
-DIST binutils-2.26.1.tar.bz2 25595243 BLAKE2B 5114ab9ebfc1097f0ebfd1e134ea098b583724d2c822fb7365b6212be0edfd313961bcee8de1193f359b7e904b23146036bfa9e3e7bc0621160bf85f573a8d44 SHA512 9d9165609fd3b0f20d616f9891fc8e2b466eb13e2bfce40125e12427f8f201d20e2b8322bb6cb2b45e8df812f0e8ac059149f8a1f69ba3ed9d86a35c6a540b67
-DIST binutils-2.27-patches-1.0.tar.xz 8852 BLAKE2B 6cc15efef1fce0e287bd3d467053451f8d1f5a645d0588c872ea6b055f3479a507273f9374a8ce30131e8ff0437cab9e3eac2959682393d4685041265f3f10fc SHA512 489b5fff87886682d8e98eafa2f082e6dcf811d2a693b6c41d76bd1ac50815a6e7d26fb7c9e3811c2d8e0e1dc307557e6ffe46d1d0f7caeb581060cf14bda899
-DIST binutils-2.27.tar.bz2 26099568 BLAKE2B e9433b4dc28b0aeaa31d21fc039459e73c47050bb79dc0cf3f00e384604c37c0c1704ac6cba79c6b15edcbfd13f17b8013efeaca422d5b0e5a7f60c202fc5d18 SHA512 cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb
-DIST binutils-2.28-patches-1.1.tar.xz 14944 BLAKE2B 72d71df43d87870c9e6603d4fa34b2b967028c85b23370a8a2720b807c98bc80656f916ac297ecd9ebbebf55030d0e5d24c4e95ec7190b7b0a079f495d759dbe SHA512 dc9e639b98ba8cc4a5a535cde116c721ef90182b339cbe802f84bed1c034e0a0bfd74b160f486bd1ef387561d967e539dbfc22e883a4cc1c44ae92b7219b9bdd
-DIST binutils-2.28.1-patches-1.0.tar.xz 19772 BLAKE2B 146b393b49ba868c7c064c58275ba1af3b7cbc7e97cc55b03c80d8b391955c40dd4e81ac4eeabcdfb53e41ea334a377d86300e037f8ccb810555a48dfa9da878 SHA512 c2c7d22e1013e79040c4dcb4d70649e78a070976ba3a4bc2ceb4805827b9d93eea1805c85db4fcb6b31be5218c3d7b42a4990437a7c01dc01fd7e9dedb606828
-DIST binutils-2.28.1.tar.bz2 28120394 BLAKE2B 3a0ed2bcf0c859638546b7460d9e6f0a55518402ff0c65c90ce462a318f5ae6690961616d188ce6cf0271c9f2fb8b7902782d32cf0e711068c53d3d06956d89e SHA512 5ec5212497b0fa8324f6a0884c284cb71c01942bbd39356d1ae745a5c9d97274c10f9d9c723f4bef6f0217662dfcd0c36e4e955a7599b11217658dc7b97553eb
-DIST binutils-2.28.tar.bz2 26556365 BLAKE2B 62dcf26560ac368525864b21371f9d56c4a2a4b797326dfc166e40868aad9a2072cc9b9061cb284d455ea63c2230340baced875486bea709fd80a59012674021 SHA512 ede2e4e59a800260eea8c14eafbaee94e30abadafd5c419a3370f9f62213cf027d6400a1d4970b6958bd4d220e675dcd483a708107016e7abd5c99d7392ba8fd
-DIST binutils-2.29-patches-1.0.tar.xz 7548 BLAKE2B b5365ba6849f8809528ed13ce0b0e88d1cd87d13c9c4c2565c74cb91891ed087e9ec33207c97271e9bb205911fae47309c89f11e5075a9c81bf4e59e0e0969d2 SHA512 5375bfb1b796b7692cf2adfc41bd2ae2e6dc19ff497db5f6beb35a456981b3adb8552ef14f32382faf655aa40da86c2d44177a658ec71e1c0e228dc27a4f2e18
-DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecbe3fe617f96dfb86e174a80d0b9113cbd4fce9d760fa61660ba2cfafbe1e482e955391cb8d3ef78d2c166c82796416a7ee106 SHA512 b60a3af9cd6a681f32a59fc4a30602ee1290f75cc93c8ad38ab0de17a7f30538a751b801dbaf079e3d514b9671e34e91742c4c9c953a8c9794505b571b7e80f0
-DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
-DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
 DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-7.tar.xz 76828 BLAKE2B 354e7c3aa76c0cfe8fc6bb419a5b19294c0be09ebdff2fc4533dd16116fcd4f4a1b4c8db02233dabe33ca68347e0a30e542456988a4ead407edb47ed031e018c SHA512 c84ff9cd9f5b1e313e93d0f25bb4244950a73e0d97ec4dacb8763382219a08a01b16a8e93173032232ea4239098b29448331ed461f792e663e1117eb0811f85b

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild
deleted file mode 100644
index 5db0e861b19..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.0"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.27.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.27.ebuild
deleted file mode 100644
index a3bd6fbb8af..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.27.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.0"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* ~hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.28.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.28.1.ebuild
deleted file mode 100644
index 0b42b8bf205..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.28.1.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.0"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* ~hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild
deleted file mode 100644
index 6787e14a6c9..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.1"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* ~hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild
deleted file mode 100644
index bc227803a8d..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="2"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild
deleted file mode 100644
index 0b42b8bf205..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.0"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* ~hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-11-09 13:54 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2019-11-09 13:54 UTC (permalink / raw
  To: gentoo-commits

commit:     64e0764c36b1cfe5439765ed9c4bf3323384e746
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  9 13:53:41 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Nov  9 13:54:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64e0764c

sys-devel/binutils-hppa64: add RESTRICT="!test? ( test )"

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild   | 5 ++++-
 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild | 2 ++
 sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild   | 2 ++
 sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild    | 2 ++
 4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
index d4e225fa71d..400a9dd6eaa 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.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=6
@@ -73,6 +73,9 @@ DEPEND="${RDEPEND}
 	sys-devel/flex
 	virtual/yacc
 "
+
+RESTRICT="!test? ( test )"
+
 if is_cross ; then
 	# The build assumes the host has libiberty and such when cross-compiling
 	# its build tools.  We should probably make binutils itself build a local

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
index 79a2e1f7bd4..0d7844e4700 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
@@ -87,6 +87,8 @@ DEPEND="${RDEPEND}
 	virtual/yacc
 "
 
+RESTRICT="!test? ( test )"
+
 MY_BUILDDIR=${WORKDIR}/build
 S=${WORKDIR}/${P/-hppa64/}
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
index e2366d3c123..9cea689fb6a 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
@@ -86,6 +86,8 @@ DEPEND="${RDEPEND}
 	virtual/yacc
 "
 
+RESTRICT="!test? ( test )"
+
 MY_BUILDDIR=${WORKDIR}/build
 S=${WORKDIR}/${P/-hppa64/}
 

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
index c635fcbef7b..9c1e764963b 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
@@ -83,6 +83,8 @@ DEPEND="${RDEPEND}
 	virtual/yacc
 "
 
+RESTRICT="!test? ( test )"
+
 MY_BUILDDIR=${WORKDIR}/build
 S=${WORKDIR}/${P/-hppa64/}
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-11-09 13:02 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2019-11-09 13:02 UTC (permalink / raw
  To: gentoo-commits

commit:     da2934f206d25cd108871d0b72a8dd3cebdeb960
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  9 13:00:59 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Nov  9 13:01:59 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da2934f2

sys-devel/binutils-hppa64: bump up to 2.33.1

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

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.33.1.ebuild  | 436 +++++++++++++++++++++
 2 files changed, 438 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 5a3c71f6648..93b0852d745 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -16,3 +16,5 @@ DIST binutils-2.31.1-patches-7.tar.xz 76828 BLAKE2B 354e7c3aa76c0cfe8fc6bb419a5b
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a
+DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7
+DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
new file mode 100644
index 00000000000..c635fcbef7b
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild
@@ -0,0 +1,436 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*.9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		EGIT_BRANCH=$(ver_cut 1-2)
+		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+		SLOT=$(ver_cut 1-2)
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(ver_cut 1-2)
+		KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-08-09 21:09 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-08-09 21:09 UTC (permalink / raw
  To: gentoo-commits

commit:     49b6341758642dfbf8349b7a579575924bf82f23
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  9 21:09:29 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Aug  9 21:09:39 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49b63417

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |  2 --
 .../binutils-hppa64/binutils-hppa64-2.25.1.ebuild  | 26 ----------------------
 2 files changed, 28 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 626a31cfcec..5a3c71f6648 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,5 +1,3 @@
-DIST binutils-2.25.1-patches-1.1.tar.xz 18724 BLAKE2B 0a8380427247463340b28fa28171f127b9a3c8163ce63d103d1d15492c30df9cf24a5122ff271dc80425a0b212438f5d39f99783fda52e7b5e861a3f5f0e2992 SHA512 209c55bf26b51d8c513b40abd2d95f687159c4e964a6c732924f277d04c97323c427fe452c63d5ec6962dcd8892d6d5d807ba88826739425bce6812a31f573dd
-DIST binutils-2.25.1.tar.bz2 24163561 BLAKE2B 25fc879f99d6547fd0dc911e74c35cf52f3da2c0f9fd758031dda90da63cdd819345d0a69f692a40dee9f63895d816cee7910a9f48ce56e7b4251827768946f4 SHA512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d
 DIST binutils-2.26.1-patches-1.0.tar.xz 11212 BLAKE2B f785930a9bf994312f3a525ef46727c582e6cd3992b5648bdf4c787f55fed4b36c69be3ac7d9962dcd72b6dbe0155dbf23d1daa14be5c7ad5da1cf634f2522aa SHA512 c520967659c66f05f7ad795bb0bc2522e139977ab3ae8cfd9ec0d093a412a7291d1cabaa6b429c618fcf7253458a6fbe5a7dc3f62e0ac9762667308067db075c
 DIST binutils-2.26.1.tar.bz2 25595243 BLAKE2B 5114ab9ebfc1097f0ebfd1e134ea098b583724d2c822fb7365b6212be0edfd313961bcee8de1193f359b7e904b23146036bfa9e3e7bc0621160bf85f573a8d44 SHA512 9d9165609fd3b0f20d616f9891fc8e2b466eb13e2bfce40125e12427f8f201d20e2b8322bb6cb2b45e8df812f0e8ac059149f8a1f69ba3ed9d86a35c6a540b67
 DIST binutils-2.27-patches-1.0.tar.xz 8852 BLAKE2B 6cc15efef1fce0e287bd3d467053451f8d1f5a645d0588c872ea6b055f3479a507273f9374a8ce30131e8ff0437cab9e3eac2959682393d4685041265f3f10fc SHA512 489b5fff87886682d8e98eafa2f082e6dcf811d2a693b6c41d76bd1ac50815a6e7d26fb7c9e3811c2d8e0e1dc307557e6ffe46d1d0f7caeb581060cf14bda899

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild
deleted file mode 100644
index 97333d4a487..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.1"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-07-22 21:24 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2019-07-22 21:24 UTC (permalink / raw
  To: gentoo-commits

commit:     c0648558f66f0db04e5597a1c40aa8f257a4eaa7
Author:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
AuthorDate: Mon Jul 22 15:39:40 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jul 22 21:23:53 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0648558

sys-devel/binutils-hppa64: stable 2.32-r1 for hppa, bug #688904

Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>
Package-Manager: Portage-2.3.66, Repoman-2.3.11
RepoMan-Options: --include-arches="hppa"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
index a2955689dfc..e2366d3c123 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
@@ -47,7 +47,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(get_version_component_range 1-2)
-		KEYWORDS="-* ~hppa"
+		KEYWORDS="-* hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-06-23 16:40 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2019-06-23 16:40 UTC (permalink / raw
  To: gentoo-commits

commit:     3abdfa9f190360ea5e7ce54f620b5651918c6f93
Author:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
AuthorDate: Sun Jun 23 14:06:09 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jun 23 16:40:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3abdfa9f

sys-devel/binutils-hppa64: stable 2.31.1-r6 for hppa, bug #685416

Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>
Package-Manager: Portage-2.3.66, Repoman-2.3.11
RepoMan-Options: --include-arches="hppa"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
index 4db8f750bef..79a2e1f7bd4 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
@@ -50,7 +50,7 @@ case ${PV} in
 		;;
 esac
 SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* ~hppa"
+KEYWORDS="-* hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-06-06 14:27 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-06-06 14:27 UTC (permalink / raw
  To: gentoo-commits

commit:     331806524b81300e44e2aef087a911048e8de86e
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  6 14:25:55 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Jun  6 14:27:24 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33180652

sys-devel/binutils-hppa64: Remove old

Bug: https://bugs.gentoo.org/685416
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.29.1.ebuild  |  27 --
 .../binutils-hppa64-2.31.1-r4.ebuild               | 443 ---------------------
 3 files changed, 471 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 5726b989fde..626a31cfcec 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -14,7 +14,6 @@ DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7c
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
 DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
-DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c511ef7326f8196d8f3a57a6d56aed464953172eeb0755f020387739cf27f709d0bc3de9c3c8b972a94f1480639465158e180 SHA512 c254f22b8ca662cf49cd5fc076d3e9b82d7f421420408c960c54310fc49462600325e7bc50f863cab7c8c49caebac3ac353dc24ab5947e8f01b98c11f43f57d2
 DIST binutils-2.31.1-patches-7.tar.xz 76828 BLAKE2B 354e7c3aa76c0cfe8fc6bb419a5b19294c0be09ebdff2fc4533dd16116fcd4f4a1b4c8db02233dabe33ca68347e0a30e542456988a4ead407edb47ed031e018c SHA512 c84ff9cd9f5b1e313e93d0f25bb4244950a73e0d97ec4dacb8763382219a08a01b16a8e93173032232ea4239098b29448331ed461f792e663e1117eb0811f85b
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1.ebuild
deleted file mode 100644
index 46b29bfae89..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.0"
-PATCH_BINUTILS_VER="2.29"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* ~hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild
deleted file mode 100644
index 14f9ace11aa..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild
+++ /dev/null
@@ -1,443 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-# USE="+cxx" is a transitional flag until llvm migrates to new flags:
-#    bug #677888
-IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: slyfox
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*.9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		EGIT_BRANCH=$(get_version_component_range 1-2)
-		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-		SLOT=$(get_version_component_range 1-2)
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(get_version_component_range 1-2)
-		;;
-esac
-SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-05-15  6:36 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2019-05-15  6:36 UTC (permalink / raw
  To: gentoo-commits

commit:     f60404905fa41c5ddc68cb87dd73ec239683ca08
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed May 15 06:35:12 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed May 15 06:35:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6040490

sys-devel/binutils-hppa64: revert stable 2.31.1-r6 for sparc, bug #685416

sparc keywords while they work were unintentional.
This reverts commit 93bae53158685b85c128e902ffc3cd42559c9028.

Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
index 6303d64dc66..4db8f750bef 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
@@ -50,7 +50,7 @@ case ${PV} in
 		;;
 esac
 SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* ~hppa sparc"
+KEYWORDS="-* ~hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-05-14  8:08 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2019-05-14  8:08 UTC (permalink / raw
  To: gentoo-commits

commit:     93bae53158685b85c128e902ffc3cd42559c9028
Author:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
AuthorDate: Mon May 13 14:34:39 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue May 14 08:07:51 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93bae531

sys-devel/binutils-hppa64: stable 2.31.1-r6 for sparc, bug #685416

Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
RepoMan-Options: --include-arches="sparc"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
index 4db8f750bef..6303d64dc66 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
@@ -50,7 +50,7 @@ case ${PV} in
 		;;
 esac
 SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* ~hppa"
+KEYWORDS="-* ~hppa sparc"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-04-29 10:10 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2019-04-29 10:10 UTC (permalink / raw
  To: gentoo-commits

commit:     31766952684f872fb118d5bb0c36c63891de841a
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 29 10:09:04 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Apr 29 10:10:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31766952

sys-devel/binutils-hppa64: Stable for HPPA too.

Package-Manager: Portage-2.3.65, Repoman-2.3.12
RepoMan-Options: --ignore-arches
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild
index 4f4ddd92a53..14f9ace11aa 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild
@@ -50,7 +50,7 @@ case ${PV} in
 		;;
 esac
 SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* ~hppa"
+KEYWORDS="-* hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-04-26 12:45 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-04-26 12:45 UTC (permalink / raw
  To: gentoo-commits

commit:     e80dec28fff58e5191b0ff7627e3032f5083dad9
Author:     Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 26 12:44:52 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Apr 26 12:45:41 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e80dec28

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64-2.31.1-r3.ebuild               | 391 ------------------
 .../binutils-hppa64-2.31.1-r5.ebuild               | 443 ---------------------
 3 files changed, 835 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 269aadaa5b2..5726b989fde 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -15,7 +15,6 @@ DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f
 DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c511ef7326f8196d8f3a57a6d56aed464953172eeb0755f020387739cf27f709d0bc3de9c3c8b972a94f1480639465158e180 SHA512 c254f22b8ca662cf49cd5fc076d3e9b82d7f421420408c960c54310fc49462600325e7bc50f863cab7c8c49caebac3ac353dc24ab5947e8f01b98c11f43f57d2
-DIST binutils-2.31.1-patches-6.tar.xz 76196 BLAKE2B e3c8de07dad62bb3093846389bc1fae0921dd6e63ee2458a85051d298cd1dd52487f83affa33d899e4ddd34b6fd3e28c79a525854c0432d576f83f855d843588 SHA512 6ddfe7b0dc9f340fb1dde3bbc426d087241738b15a5f16a336569b45b2c8ac4077e81e19168c5b165bd4abbaed419e2f290291ef7438a0ecde1f8a6a72217d4c
 DIST binutils-2.31.1-patches-7.tar.xz 76828 BLAKE2B 354e7c3aa76c0cfe8fc6bb419a5b19294c0be09ebdff2fc4533dd16116fcd4f4a1b4c8db02233dabe33ca68347e0a30e542456988a4ead407edb47ed031e018c SHA512 c84ff9cd9f5b1e313e93d0f25bb4244950a73e0d97ec4dacb8763382219a08a01b16a8e93173032232ea4239098b29448331ed461f792e663e1117eb0811f85b
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
deleted file mode 100644
index c1874b7e156..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
+++ /dev/null
@@ -1,391 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: slyfox
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* ~hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild
deleted file mode 100644
index 7975b8d54c3..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild
+++ /dev/null
@@ -1,443 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-# USE="+cxx" is a transitional flag until llvm migrates to new flags:
-#    bug #677888
-IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: slyfox
-
-PATCH_VER=6
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*.9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		EGIT_BRANCH=$(get_version_component_range 1-2)
-		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-		SLOT=$(get_version_component_range 1-2)
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(get_version_component_range 1-2)
-		;;
-esac
-SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* ~hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-04-25 18:44 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-04-25 18:44 UTC (permalink / raw
  To: gentoo-commits

commit:     d07913c5ad5c66e666511c97d731136470f18c2f
Author:     Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 25 18:41:15 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Apr 25 18:42:33 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d07913c5

sys-devel/binutils-hppa64: Patchlevel bump

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
Closes: https://bugs.gentoo.org/683790
Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64-2.31.1-r6.ebuild               | 443 +++++++++++++++++++++
 2 files changed, 444 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index c0cef98ec28..269aadaa5b2 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -16,6 +16,7 @@ DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c511ef7326f8196d8f3a57a6d56aed464953172eeb0755f020387739cf27f709d0bc3de9c3c8b972a94f1480639465158e180 SHA512 c254f22b8ca662cf49cd5fc076d3e9b82d7f421420408c960c54310fc49462600325e7bc50f863cab7c8c49caebac3ac353dc24ab5947e8f01b98c11f43f57d2
 DIST binutils-2.31.1-patches-6.tar.xz 76196 BLAKE2B e3c8de07dad62bb3093846389bc1fae0921dd6e63ee2458a85051d298cd1dd52487f83affa33d899e4ddd34b6fd3e28c79a525854c0432d576f83f855d843588 SHA512 6ddfe7b0dc9f340fb1dde3bbc426d087241738b15a5f16a336569b45b2c8ac4077e81e19168c5b165bd4abbaed419e2f290291ef7438a0ecde1f8a6a72217d4c
+DIST binutils-2.31.1-patches-7.tar.xz 76828 BLAKE2B 354e7c3aa76c0cfe8fc6bb419a5b19294c0be09ebdff2fc4533dd16116fcd4f4a1b4c8db02233dabe33ca68347e0a30e542456988a4ead407edb47ed031e018c SHA512 c84ff9cd9f5b1e313e93d0f25bb4244950a73e0d97ec4dacb8763382219a08a01b16a8e93173032232ea4239098b29448331ed461f792e663e1117eb0811f85b
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
new file mode 100644
index 00000000000..4db8f750bef
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r6.ebuild
@@ -0,0 +1,443 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+# USE="+cxx" is a transitional flag until llvm migrates to new flags:
+#    bug #677888
+IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: slyfox
+
+PATCH_VER=7
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*.9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		EGIT_BRANCH=$(get_version_component_range 1-2)
+		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+		SLOT=$(get_version_component_range 1-2)
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(get_version_component_range 1-2)
+		;;
+esac
+SLOT=$(get_version_component_range 1-2)
+KEYWORDS="-* ~hppa"
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-04-24 21:02 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-04-24 21:02 UTC (permalink / raw
  To: gentoo-commits

commit:     9b5a9a8733b371ce8d1c2ec42758756584f932a2
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 24 21:00:36 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 21:01:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b5a9a87

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.32.ebuild    | 441 ---------------------
 2 files changed, 442 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index ac3df295499..c0cef98ec28 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -17,6 +17,5 @@ DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f59
 DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c511ef7326f8196d8f3a57a6d56aed464953172eeb0755f020387739cf27f709d0bc3de9c3c8b972a94f1480639465158e180 SHA512 c254f22b8ca662cf49cd5fc076d3e9b82d7f421420408c960c54310fc49462600325e7bc50f863cab7c8c49caebac3ac353dc24ab5947e8f01b98c11f43f57d2
 DIST binutils-2.31.1-patches-6.tar.xz 76196 BLAKE2B e3c8de07dad62bb3093846389bc1fae0921dd6e63ee2458a85051d298cd1dd52487f83affa33d899e4ddd34b6fd3e28c79a525854c0432d576f83f855d843588 SHA512 6ddfe7b0dc9f340fb1dde3bbc426d087241738b15a5f16a336569b45b2c8ac4077e81e19168c5b165bd4abbaed419e2f290291ef7438a0ecde1f8a6a72217d4c
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
-DIST binutils-2.32-patches-1.tar.xz 93252 BLAKE2B 80d229be60c3377fe52ff3e74ee911b5dcfb9456d3f42a57662fbda3184ac1c63e698e592f804ac05c459527d0cd4bae7d8c9ef8caef02fdf4f17aa783f4ff81 SHA512 69999f60d89589dcf9e3cb18e50f153ab4ce05bdf3f3758fa322b5c4cb468aeda46c416da540995ddff1ea5e96354c264fa5ff0156c53685816d35117eb481e0
 DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild
deleted file mode 100644
index f5b56078a4e..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild
+++ /dev/null
@@ -1,441 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-# USE="+cxx" is a transitional flag until llvm migrates to new flags:
-#    bug #677888
-IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: slyfox
-
-PATCH_VER=1
-PATCH_DEV=slyfox
-
-case ${PV} in
-	9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		SLOT=${PV}
-		;;
-	*.9999)
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		EGIT_BRANCH=$(get_version_component_range 1-2)
-		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-		SLOT=$(get_version_component_range 1-2)
-		;;
-	*)
-		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-		SLOT=$(get_version_component_range 1-2)
-		KEYWORDS="-* ~hppa"
-		;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		*9999)
-			git-r3_src_unpack
-			;;
-		*)
-			;;
-	esac
-	default
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		# Use upstream patch to enable development mode
-		rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${PV}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-	if is_cross ; then
-		TOOLPATH=/usr/${CHOST}/${CTARGET}
-	else
-		TOOLPATH=/usr/${CTARGET}
-	fi
-	BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	if use plugins ; then
-		myconf+=( --enable-plugins )
-	fi
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use gold ; then
-		myconf+=( --enable-gold )
-		if use default-gold; then
-			myconf+=( --enable-gold=default )
-		fi
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake tooldir="${EPREFIX}${TOOLPATH}" all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	# bug 637066
-	filter-flags -Wall -Wreturn-type
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	# see Note [tooldir hack for ldscripts]
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${PV} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${PV}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${PV}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
-		binutils-config ${CTARGET}-${PV}
-	fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-#    /usr/bin/${CTARGET}-<tool>
-#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-#    /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-04-19 12:20 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-04-19 12:20 UTC (permalink / raw
  To: gentoo-commits

commit:     ca66963b250d8cd309ec02878755427efdca32ca
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 19 12:19:49 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Apr 19 12:20:39 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca66963b

sys-devel/binutils-hppa64: Re-keyword 2.32-r1

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
index 9fa7387d6ab..a2955689dfc 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
@@ -47,7 +47,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(get_version_component_range 1-2)
-		#KEYWORDS="-* ~hppa"
+		KEYWORDS="-* ~hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-04-18 21:38 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-04-18 21:38 UTC (permalink / raw
  To: gentoo-commits

commit:     46e02f32cb3a49c669063670a6f0c0c8c68fa12c
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 18 21:36:20 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Apr 18 21:38:14 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46e02f32

sys-devel/binutils-hppa64: 2.32 patchlevel bump

Bug: https://bugs.gentoo.org/683790
Package-Manager: Portage-2.3.63, Repoman-2.3.12
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.32-r1.ebuild | 441 +++++++++++++++++++++
 2 files changed, 442 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 9570069b616..ac3df295499 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -18,4 +18,5 @@ DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c
 DIST binutils-2.31.1-patches-6.tar.xz 76196 BLAKE2B e3c8de07dad62bb3093846389bc1fae0921dd6e63ee2458a85051d298cd1dd52487f83affa33d899e4ddd34b6fd3e28c79a525854c0432d576f83f855d843588 SHA512 6ddfe7b0dc9f340fb1dde3bbc426d087241738b15a5f16a336569b45b2c8ac4077e81e19168c5b165bd4abbaed419e2f290291ef7438a0ecde1f8a6a72217d4c
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.32-patches-1.tar.xz 93252 BLAKE2B 80d229be60c3377fe52ff3e74ee911b5dcfb9456d3f42a57662fbda3184ac1c63e698e592f804ac05c459527d0cd4bae7d8c9ef8caef02fdf4f17aa783f4ff81 SHA512 69999f60d89589dcf9e3cb18e50f153ab4ce05bdf3f3758fa322b5c4cb468aeda46c416da540995ddff1ea5e96354c264fa5ff0156c53685816d35117eb481e0
+DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
new file mode 100644
index 00000000000..9fa7387d6ab
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild
@@ -0,0 +1,441 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+# USE="+cxx" is a transitional flag until llvm migrates to new flags:
+#    bug #677888
+IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: slyfox
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*.9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		EGIT_BRANCH=$(get_version_component_range 1-2)
+		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+		SLOT=$(get_version_component_range 1-2)
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(get_version_component_range 1-2)
+		#KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		# Use upstream patch to enable development mode
+		rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-04-09 14:09 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-04-09 14:09 UTC (permalink / raw
  To: gentoo-commits

commit:     fc1dd380f1f3f155be36969326c6d80e13e5a053
Author:     Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  9 14:07:52 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Apr  9 14:09:16 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc1dd380

sys-devel/binutils-hppa64: Re-keyword 2.31.1-r5

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild
index 23944e83a6f..7975b8d54c3 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild
@@ -50,7 +50,7 @@ case ${PV} in
 		;;
 esac
 SLOT=$(get_version_component_range 1-2)
-#KEYWORDS="-* ~hppa"
+KEYWORDS="-* ~hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-04-06 14:35 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-04-06 14:35 UTC (permalink / raw
  To: gentoo-commits

commit:     6457b000a288960e771f8cf445a62e092f53675f
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  6 14:35:20 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Apr  6 14:35:20 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6457b000

sys-devel/binutils-hppa64: 2.31.1 revbump, no keywords, needs testing

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64-2.31.1-r5.ebuild               | 443 +++++++++++++++++++++
 2 files changed, 444 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 576a005fc35..9570069b616 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -15,6 +15,7 @@ DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f
 DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c511ef7326f8196d8f3a57a6d56aed464953172eeb0755f020387739cf27f709d0bc3de9c3c8b972a94f1480639465158e180 SHA512 c254f22b8ca662cf49cd5fc076d3e9b82d7f421420408c960c54310fc49462600325e7bc50f863cab7c8c49caebac3ac353dc24ab5947e8f01b98c11f43f57d2
+DIST binutils-2.31.1-patches-6.tar.xz 76196 BLAKE2B e3c8de07dad62bb3093846389bc1fae0921dd6e63ee2458a85051d298cd1dd52487f83affa33d899e4ddd34b6fd3e28c79a525854c0432d576f83f855d843588 SHA512 6ddfe7b0dc9f340fb1dde3bbc426d087241738b15a5f16a336569b45b2c8ac4077e81e19168c5b165bd4abbaed419e2f290291ef7438a0ecde1f8a6a72217d4c
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.32-patches-1.tar.xz 93252 BLAKE2B 80d229be60c3377fe52ff3e74ee911b5dcfb9456d3f42a57662fbda3184ac1c63e698e592f804ac05c459527d0cd4bae7d8c9ef8caef02fdf4f17aa783f4ff81 SHA512 69999f60d89589dcf9e3cb18e50f153ab4ce05bdf3f3758fa322b5c4cb468aeda46c416da540995ddff1ea5e96354c264fa5ff0156c53685816d35117eb481e0
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild
new file mode 100644
index 00000000000..23944e83a6f
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r5.ebuild
@@ -0,0 +1,443 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+# USE="+cxx" is a transitional flag until llvm migrates to new flags:
+#    bug #677888
+IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: slyfox
+
+PATCH_VER=6
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*.9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		EGIT_BRANCH=$(get_version_component_range 1-2)
+		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+		SLOT=$(get_version_component_range 1-2)
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(get_version_component_range 1-2)
+		;;
+esac
+SLOT=$(get_version_component_range 1-2)
+#KEYWORDS="-* ~hppa"
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-03-26 21:32 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2019-03-26 21:32 UTC (permalink / raw
  To: gentoo-commits

commit:     207fc8d51cfae58142e4cf6d3955af44ef4bded9
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 26 21:31:48 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Mar 26 21:31:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=207fc8d5

sys-devel/binutils-hppa64: Revbump & sync with main binutils

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

 .../binutils-hppa64-2.31.1-r4.ebuild               | 443 +++++++++++++++++++++
 1 file changed, 443 insertions(+)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild
new file mode 100644
index 00000000000..4f4ddd92a53
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r4.ebuild
@@ -0,0 +1,443 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+# USE="+cxx" is a transitional flag until llvm migrates to new flags:
+#    bug #677888
+IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: slyfox
+
+PATCH_VER=5
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*.9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		EGIT_BRANCH=$(get_version_component_range 1-2)
+		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+		SLOT=$(get_version_component_range 1-2)
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(get_version_component_range 1-2)
+		;;
+esac
+SLOT=$(get_version_component_range 1-2)
+KEYWORDS="-* ~hppa"
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-02-17 21:21 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2019-02-17 21:21 UTC (permalink / raw
  To: gentoo-commits

commit:     3ca80135f9891a769fa064cdfe88b2e0beadcba5
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 17 21:20:53 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Feb 17 21:21:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ca80135

sys-devel/binutils-hppa64: Reinstate KEYWORDS

Package-Manager: Portage-2.3.60, Repoman-2.3.12
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild
index c4ccb4ffd3b..f5b56078a4e 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild
@@ -47,8 +47,7 @@ case ${PV} in
 	*)
 		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
 		SLOT=$(get_version_component_range 1-2)
-		# no keywords yet. Needs some testing
-		#KEYWORDS="-* ~hppa"
+		KEYWORDS="-* ~hppa"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2019-02-16 12:28 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2019-02-16 12:28 UTC (permalink / raw
  To: gentoo-commits

commit:     35565322d84de69e9af61fe8e752f7f1d83979f0
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 16 12:28:16 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Feb 16 12:28:34 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35565322

sys-devel/binutils-hppa64: bump up to 2.32, patchset 1

Initial patchset is based on current binutils-2.32 branch.

Reported-by: Lars Wendler
Bug: https://bugs.gentoo.org/677342
Package-Manager: Portage-2.3.60, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.32.ebuild    | 442 +++++++++++++++++++++
 sys-devel/binutils-hppa64/metadata.xml             |  27 +-
 3 files changed, 461 insertions(+), 10 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index e6a949ca441..576a005fc35 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -16,3 +16,5 @@ DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c511ef7326f8196d8f3a57a6d56aed464953172eeb0755f020387739cf27f709d0bc3de9c3c8b972a94f1480639465158e180 SHA512 c254f22b8ca662cf49cd5fc076d3e9b82d7f421420408c960c54310fc49462600325e7bc50f863cab7c8c49caebac3ac353dc24ab5947e8f01b98c11f43f57d2
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
+DIST binutils-2.32-patches-1.tar.xz 93252 BLAKE2B 80d229be60c3377fe52ff3e74ee911b5dcfb9456d3f42a57662fbda3184ac1c63e698e592f804ac05c459527d0cd4bae7d8c9ef8caef02fdf4f17aa783f4ff81 SHA512 69999f60d89589dcf9e3cb18e50f153ab4ce05bdf3f3758fa322b5c4cb468aeda46c416da540995ddff1ea5e96354c264fa5ff0156c53685816d35117eb481e0
+DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild
new file mode 100644
index 00000000000..c4ccb4ffd3b
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.32.ebuild
@@ -0,0 +1,442 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+# USE="+cxx" is a transitional flag until llvm migrates to new flags:
+#    bug #677888
+IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: slyfox
+
+PATCH_VER=1
+PATCH_DEV=slyfox
+
+case ${PV} in
+	9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		SLOT=${PV}
+		;;
+	*.9999)
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		EGIT_BRANCH=$(get_version_component_range 1-2)
+		EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+		SLOT=$(get_version_component_range 1-2)
+		;;
+	*)
+		SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+		SLOT=$(get_version_component_range 1-2)
+		# no keywords yet. Needs some testing
+		#KEYWORDS="-* ~hppa"
+		;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		*9999)
+			git-r3_src_unpack
+			;;
+		*)
+			;;
+	esac
+	default
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		# Use upstream patch to enable development mode
+		rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${PV}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+	if is_cross ; then
+		TOOLPATH=/usr/${CHOST}/${CTARGET}
+	else
+		TOOLPATH=/usr/${CTARGET}
+	fi
+	BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	if use plugins ; then
+		myconf+=( --enable-plugins )
+	fi
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use gold ; then
+		myconf+=( --enable-gold )
+		if use default-gold; then
+			myconf+=( --enable-gold=default )
+		fi
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	# bug 637066
+	filter-flags -Wall -Wreturn-type
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	# see Note [tooldir hack for ldscripts]
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${PV} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${PV}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${PV}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+		binutils-config ${CTARGET}-${PV}
+	fi
+}
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+#    /usr/bin/${CTARGET}-<tool>
+#    /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+#    /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+#   ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+#   ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

diff --git a/sys-devel/binutils-hppa64/metadata.xml b/sys-devel/binutils-hppa64/metadata.xml
index 40dbc384a3e..b8008c10fae 100644
--- a/sys-devel/binutils-hppa64/metadata.xml
+++ b/sys-devel/binutils-hppa64/metadata.xml
@@ -1,14 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="project">
-	<email>hppa@gentoo.org</email>
-	<name>Gentoo Linux HPPA Development</name>
-</maintainer>
-<longdescription>
-binutils for 64bit kernel on hppa.
-</longdescription>
-<use>
-	<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
-</use>
+	<maintainer type="project">
+		<email>hppa@gentoo.org</email>
+		<name>Gentoo Linux HPPA Development</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>toolchain@gentoo.org</email>
+		<name>Gentoo Toolchain Project</name>
+	</maintainer>
+	<longdescription>
+	binutils for 64bit kernel on hppa.
+	</longdescription>
+	<use>
+		<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
+		<flag name="gold">Build ld.gold linker</flag>
+		<flag name="plugins">Enable plugin support in tools</flag>
+		<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
+	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-12-28 23:13 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2018-12-28 23:13 UTC (permalink / raw
  To: gentoo-commits

commit:     797483954ed22351adca9ec38e3880dcfaddd238
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 28 23:11:01 2018 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Dec 28 23:11:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79748395

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.30-r2.ebuild | 393 ---------------------
 2 files changed, 394 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index f61755ea716..8a0141a8f96 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -12,7 +12,6 @@ DIST binutils-2.29-patches-1.0.tar.xz 7548 BLAKE2B b5365ba6849f8809528ed13ce0b0e
 DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecbe3fe617f96dfb86e174a80d0b9113cbd4fce9d760fa61660ba2cfafbe1e482e955391cb8d3ef78d2c166c82796416a7ee106 SHA512 b60a3af9cd6a681f32a59fc4a30602ee1290f75cc93c8ad38ab0de17a7f30538a751b801dbaf079e3d514b9671e34e91742c4c9c953a8c9794505b571b7e80f0
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
-DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
 DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-4.tar.xz 63460 BLAKE2B 6507d03a3b75fe4b65b3c58377baaf377e07aa3e5dee4f6f4cd25336f53a15b4249e72a107213062611c8674be2bcd478a8f1406940385e0b0e58ad5a7c61cc0 SHA512 aa9f2a5b9c2189c528f34c55cd2609eae5fb47e46b51a8f9aa595b0a1e2c3f103880dcc8f07e48b10971d669e4c2a7ce8a41be4763a1ebf9e956e3f1eade8f22

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
deleted file mode 100644
index 7f131bab5ea..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
+++ /dev/null
@@ -1,393 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: dilfridge :)
-
-PATCH_VER=2
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT="${BVER}"
-KEYWORDS="-* hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-if is_cross ; then
-	# The build assumes the host has libiberty and such when cross-compiling
-	# its build tools.  We should probably make binutils itself build a local
-	# copy to use, but until then, be lazy.
-	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
-fi
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-12-28 23:13 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2018-12-28 23:13 UTC (permalink / raw
  To: gentoo-commits

commit:     37412c580ed1c7351dc975576829c88dace895c7
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 28 23:12:22 2018 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Dec 28 23:12:22 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37412c58

sys-devel/binutils-hppa64: Remove old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64-2.31.1-r2.ebuild               | 391 ---------------------
 2 files changed, 392 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 8a0141a8f96..e6a949ca441 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -14,6 +14,5 @@ DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7c
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
 DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
-DIST binutils-2.31.1-patches-4.tar.xz 63460 BLAKE2B 6507d03a3b75fe4b65b3c58377baaf377e07aa3e5dee4f6f4cd25336f53a15b4249e72a107213062611c8674be2bcd478a8f1406940385e0b0e58ad5a7c61cc0 SHA512 aa9f2a5b9c2189c528f34c55cd2609eae5fb47e46b51a8f9aa595b0a1e2c3f103880dcc8f07e48b10971d669e4c2a7ce8a41be4763a1ebf9e956e3f1eade8f22
 DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c511ef7326f8196d8f3a57a6d56aed464953172eeb0755f020387739cf27f709d0bc3de9c3c8b972a94f1480639465158e180 SHA512 c254f22b8ca662cf49cd5fc076d3e9b82d7f421420408c960c54310fc49462600325e7bc50f863cab7c8c49caebac3ac353dc24ab5947e8f01b98c11f43f57d2
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r2.ebuild
deleted file mode 100644
index 4fd4d3e753a..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r2.ebuild
+++ /dev/null
@@ -1,391 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: slyfox
-
-PATCH_VER=4
-PATCH_DEV=dilfridge
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* ~hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-12-28 19:40 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2018-12-28 19:40 UTC (permalink / raw
  To: gentoo-commits

commit:     877a8ca2c4d1ef07c76050b9b9391bf9265af030
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 28 17:05:47 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Dec 28 19:40:39 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=877a8ca2

sys-devel/binutils-hppa64: stable 2.30-r4 for hppa, bug #667648

Package-Manager: Portage-2.3.53, Repoman-2.3.12
RepoMan-Options: --include-arches="hppa"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
index 1bba0f78e7a..d4e225fa71d 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
@@ -37,7 +37,7 @@ case ${PV} in
 		;;
 esac
 SLOT="${BVER}"
-KEYWORDS="-* ~hppa"
+KEYWORDS="-* hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-12-20 22:50 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2018-12-20 22:50 UTC (permalink / raw
  To: gentoo-commits

commit:     c697ea2175921af542050ba3429ef0792734398d
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 22:48:03 2018 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Dec 20 22:48:03 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c697ea21

sys-devel/binutils-hppa64: Re-keyword

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

 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
index af97a4d08f2..c1874b7e156 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
@@ -38,8 +38,7 @@ case ${PV} in
 		;;
 esac
 SLOT=$(get_version_component_range 1-2)
-#KEYWORDS="-* ~hppa"
-KEYWORDS=""
+KEYWORDS="-* ~hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-12-19 12:36 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2018-12-19 12:36 UTC (permalink / raw
  To: gentoo-commits

commit:     ff053e71df5380d834c6ea213ae6c60de8d1c2fa
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 19 12:36:18 2018 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Dec 19 12:36:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff053e71

sys-devel/binutils-hppa64: Fix patchlv oops. No revbump since unkeyworded.

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

 sys-devel/binutils-hppa64/Manifest                         | 1 +
 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 0b4610b3709..f61755ea716 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -16,4 +16,5 @@ DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6e
 DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-4.tar.xz 63460 BLAKE2B 6507d03a3b75fe4b65b3c58377baaf377e07aa3e5dee4f6f4cd25336f53a15b4249e72a107213062611c8674be2bcd478a8f1406940385e0b0e58ad5a7c61cc0 SHA512 aa9f2a5b9c2189c528f34c55cd2609eae5fb47e46b51a8f9aa595b0a1e2c3f103880dcc8f07e48b10971d669e4c2a7ce8a41be4763a1ebf9e956e3f1eade8f22
+DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c511ef7326f8196d8f3a57a6d56aed464953172eeb0755f020387739cf27f709d0bc3de9c3c8b972a94f1480639465158e180 SHA512 c254f22b8ca662cf49cd5fc076d3e9b82d7f421420408c960c54310fc49462600325e7bc50f863cab7c8c49caebac3ac353dc24ab5947e8f01b98c11f43f57d2
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
index 5f1a57b2c5c..af97a4d08f2 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
@@ -21,7 +21,7 @@ IUSE="+cxx doc multitarget +nls static-libs test"
 #                      for the patchsets
 #                      Default: slyfox
 
-PATCH_VER=
+PATCH_VER=5
 PATCH_DEV=dilfridge
 
 case ${PV} in


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-12-14 23:52 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2018-12-14 23:52 UTC (permalink / raw
  To: gentoo-commits

commit:     d5b1af364971210be82a8a48543ee3caebe0304f
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 14 23:51:38 2018 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Dec 14 23:52:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5b1af36

sys-devel/binutils-hppa64: Revbump, patchlevel 5

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

 .../binutils-hppa64-2.31.1-r3.ebuild               | 392 +++++++++++++++++++++
 1 file changed, 392 insertions(+)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
new file mode 100644
index 00000000000..5f1a57b2c5c
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r3.ebuild
@@ -0,0 +1,392 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: slyfox
+
+PATCH_VER=
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT=$(get_version_component_range 1-2)
+#KEYWORDS="-* ~hppa"
+KEYWORDS=""
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-12-09 13:58 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2018-12-09 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     ab0271665b2af2139b2da1b93b007fd8356fe238
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  9 13:55:14 2018 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Dec  9 13:57:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab027166

sys-devel/binutils-hppa64: Remove semi-broken old

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

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64-2.31.1-r1.ebuild               | 390 ---------------------
 2 files changed, 391 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 2c22887f693..0b4610b3709 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -15,6 +15,5 @@ DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f
 DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
 DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
-DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 3444b219dd02ad513e6c36214d649a8a74638382103c88ec8de76a579be0ee13f8d1450e3b8d82dfddad55f2f851b32aee910a99230c7d8673f8426fc79a4cd9 SHA512 67b23c17518305561d190a15cba4a1af18a0a3cf1d7e62583ac7667d2fa40e7c7ec024cc981009d5d1caf1939633ab55fc0a198b69af02dc7841be43ff1acd13
 DIST binutils-2.31.1-patches-4.tar.xz 63460 BLAKE2B 6507d03a3b75fe4b65b3c58377baaf377e07aa3e5dee4f6f4cd25336f53a15b4249e72a107213062611c8674be2bcd478a8f1406940385e0b0e58ad5a7c61cc0 SHA512 aa9f2a5b9c2189c528f34c55cd2609eae5fb47e46b51a8f9aa595b0a1e2c3f103880dcc8f07e48b10971d669e4c2a7ce8a41be4763a1ebf9e956e3f1eade8f22
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild
deleted file mode 100644
index a6fcd63079d..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild
+++ /dev/null
@@ -1,390 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: dilfridge :)
-
-PATCH_VER=3
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* ~hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-		# Change SONAME to avoid conflict across
-		# {native,cross}/binutils, binutils-libs. #666100
-		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-12-08 18:03 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2018-12-08 18:03 UTC (permalink / raw
  To: gentoo-commits

commit:     a2429266ec0588051085d0e1e074cc5fdc903621
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  8 17:57:43 2018 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Dec  8 18:03:11 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2429266

sys-devel/binutils-hppa64: patchlevel bump

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

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64-2.31.1-r2.ebuild               | 391 +++++++++++++++++++++
 2 files changed, 392 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 3f56ede6a0b..f23bed67be8 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -18,4 +18,5 @@ DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-2.tar.xz 11232 BLAKE2B b8ac65872017c063650d4e04855efa3fd3e9faa566e81fa9fb3ae777c1337627023c1af85b708a7933b577a69652451ff488340d7cc9f035d3a3a655da0fc8d6 SHA512 2d0ee2e727586fc39cdb8abc7251c12dd350d18dd84103ddacc08978db48d45445c05b7ea5f095842f6e0350db94d593270b23a38920a01ca59c363decaa2a58
 DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 3444b219dd02ad513e6c36214d649a8a74638382103c88ec8de76a579be0ee13f8d1450e3b8d82dfddad55f2f851b32aee910a99230c7d8673f8426fc79a4cd9 SHA512 67b23c17518305561d190a15cba4a1af18a0a3cf1d7e62583ac7667d2fa40e7c7ec024cc981009d5d1caf1939633ab55fc0a198b69af02dc7841be43ff1acd13
+DIST binutils-2.31.1-patches-4.tar.xz 63460 BLAKE2B 6507d03a3b75fe4b65b3c58377baaf377e07aa3e5dee4f6f4cd25336f53a15b4249e72a107213062611c8674be2bcd478a8f1406940385e0b0e58ad5a7c61cc0 SHA512 aa9f2a5b9c2189c528f34c55cd2609eae5fb47e46b51a8f9aa595b0a1e2c3f103880dcc8f07e48b10971d669e4c2a7ce8a41be4763a1ebf9e956e3f1eade8f22
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r2.ebuild
new file mode 100644
index 00000000000..4fd4d3e753a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r2.ebuild
@@ -0,0 +1,391 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: slyfox
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT=$(get_version_component_range 1-2)
+KEYWORDS="-* ~hppa"
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-12-08 18:03 Andreas K. Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas K. Hüttel @ 2018-12-08 18:03 UTC (permalink / raw
  To: gentoo-commits

commit:     8a8de3cb391b2ae420e75b310bd56d7ca40d01c6
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  8 17:58:25 2018 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Dec  8 18:03:11 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a8de3cb

sys-devel/binutils-hppa64: drop old

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

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64/binutils-hppa64-2.30-r3.ebuild | 393 ---------------------
 .../binutils-hppa64/binutils-hppa64-2.31.1.ebuild  | 393 ---------------------
 3 files changed, 788 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index f23bed67be8..2c22887f693 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -13,10 +13,8 @@ DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecb
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
 DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
-DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
 DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
-DIST binutils-2.31.1-patches-2.tar.xz 11232 BLAKE2B b8ac65872017c063650d4e04855efa3fd3e9faa566e81fa9fb3ae777c1337627023c1af85b708a7933b577a69652451ff488340d7cc9f035d3a3a655da0fc8d6 SHA512 2d0ee2e727586fc39cdb8abc7251c12dd350d18dd84103ddacc08978db48d45445c05b7ea5f095842f6e0350db94d593270b23a38920a01ca59c363decaa2a58
 DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 3444b219dd02ad513e6c36214d649a8a74638382103c88ec8de76a579be0ee13f8d1450e3b8d82dfddad55f2f851b32aee910a99230c7d8673f8426fc79a4cd9 SHA512 67b23c17518305561d190a15cba4a1af18a0a3cf1d7e62583ac7667d2fa40e7c7ec024cc981009d5d1caf1939633ab55fc0a198b69af02dc7841be43ff1acd13
 DIST binutils-2.31.1-patches-4.tar.xz 63460 BLAKE2B 6507d03a3b75fe4b65b3c58377baaf377e07aa3e5dee4f6f4cd25336f53a15b4249e72a107213062611c8674be2bcd478a8f1406940385e0b0e58ad5a7c61cc0 SHA512 aa9f2a5b9c2189c528f34c55cd2609eae5fb47e46b51a8f9aa595b0a1e2c3f103880dcc8f07e48b10971d669e4c2a7ce8a41be4763a1ebf9e956e3f1eade8f22
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild
deleted file mode 100644
index da743be6046..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild
+++ /dev/null
@@ -1,393 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: dilfridge :)
-
-PATCH_VER=3
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT="${BVER}"
-KEYWORDS="-* ~hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-if is_cross ; then
-	# The build assumes the host has libiberty and such when cross-compiling
-	# its build tools.  We should probably make binutils itself build a local
-	# copy to use, but until then, be lazy.
-	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
-fi
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
deleted file mode 100644
index 29675f0e5c2..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
+++ /dev/null
@@ -1,393 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: dilfridge :)
-
-PATCH_VER=2
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT=$(get_version_component_range 1-2)
-KEYWORDS="-* ~hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-if is_cross ; then
-	# The build assumes the host has libiberty and such when cross-compiling
-	# its build tools.  We should probably make binutils itself build a local
-	# copy to use, but until then, be lazy.
-	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
-fi
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-10-06 11:27 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2018-10-06 11:27 UTC (permalink / raw
  To: gentoo-commits

commit:     f0020501099f82340db4bcf6a50f9bc3e3a335b7
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  6 11:26:59 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct  6 11:27:14 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0020501

sys-devel/binutils-hppa64: drop DEPEND+=binutils-libs for cross case

Sync change from sys-devel/binutils:
"sys-devel/binutils: drop DEPEND+=binutils-libs for cross case"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11

 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild
index 47c79e64af9..a6fcd63079d 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -73,12 +73,6 @@ DEPEND="${RDEPEND}
 	sys-devel/flex
 	virtual/yacc
 "
-if is_cross ; then
-	# The build assumes the host has libiberty and such when cross-compiling
-	# its build tools.  We should probably make binutils itself build a local
-	# copy to use, but until then, be lazy.
-	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
-fi
 
 MY_BUILDDIR=${WORKDIR}/build
 S=${WORKDIR}/${P/-hppa64/}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-09-25  7:37 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2018-09-25  7:37 UTC (permalink / raw
  To: gentoo-commits

commit:     f7764cb4e0cf79ec433f488a7cc76f0f9da34285
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 25 07:32:10 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Sep 25 07:32:10 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7764cb4

sys-devel/binutils-hppa64: release patchset 5 for 2.30

One new main patch:
+ 0098-Gentoo-add-with-extra-soversion-suffix-option.patch

And four backports:
+ 0094-Replace-CET-bit-with-IBT-and-SHSTK-bits.patch
+ 0095-Fix-parens-in-ld-bootstrap.exp.patch
+ 0096-x86-64-Clear-the-R_X86_64_converted_reloc_bit-bit.patch
+ 0097-Fix-unwind-offset-for-call_info-start_symbol.patch

Changes SONAME from
    libopcodes-2.30.so
to
    libopcodes-2.30.gentoo-sys-devel-binutils-hppa64-st.so

SONAME now encodes USE=multilib and package name.

Bug: https://bugs.gentoo.org/663690
Bug: https://bugs.gentoo.org/666376
Bug: https://bugs.gentoo.org/666100
Package-Manager: Portage-2.3.49, Repoman-2.3.11

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.30-r4.ebuild | 396 +++++++++++++++++++++
 2 files changed, 397 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 7eb43530404..3f56ede6a0b 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -14,6 +14,7 @@ DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7c
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
 DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
 DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
+DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f955067cbbed543250888e0c5d51f4ef77d0d829049e9a835691cf2de03965fbcc9bcfa092eb304c03f9b885e7a3dadab286 SHA512 029b3be6ae9b8620f8580a35701bd4517b4e0232ff3cf9983b3808475c7443cbf500b6cace2c052df0bd1e47202838f4d2453238db28709a947117071d9ae804
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-2.tar.xz 11232 BLAKE2B b8ac65872017c063650d4e04855efa3fd3e9faa566e81fa9fb3ae777c1337627023c1af85b708a7933b577a69652451ff488340d7cc9f035d3a3a655da0fc8d6 SHA512 2d0ee2e727586fc39cdb8abc7251c12dd350d18dd84103ddacc08978db48d45445c05b7ea5f095842f6e0350db94d593270b23a38920a01ca59c363decaa2a58
 DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 3444b219dd02ad513e6c36214d649a8a74638382103c88ec8de76a579be0ee13f8d1450e3b8d82dfddad55f2f851b32aee910a99230c7d8673f8426fc79a4cd9 SHA512 67b23c17518305561d190a15cba4a1af18a0a3cf1d7e62583ac7667d2fa40e7c7ec024cc981009d5d1caf1939633ab55fc0a198b69af02dc7841be43ff1acd13

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
new file mode 100644
index 00000000000..1bba0f78e7a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r4.ebuild
@@ -0,0 +1,396 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: dilfridge :)
+
+PATCH_VER=5
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT="${BVER}"
+KEYWORDS="-* ~hppa"
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+if is_cross ; then
+	# The build assumes the host has libiberty and such when cross-compiling
+	# its build tools.  We should probably make binutils itself build a local
+	# copy to use, but until then, be lazy.
+	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
+fi
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-09-21  7:00 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2018-09-21  7:00 UTC (permalink / raw
  To: gentoo-commits

commit:     42a2033b9cdf87e13684dba32e70b4366e2fcdbb
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 20 22:14:39 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Sep 21 07:00:30 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42a2033b

sys-devel/binutils-hppa64: release patchset 3 for 2.31.1

One new patch:
+ 0014-Gentoo-add-with-extra-soversion-suffix-option.patch

Changes SONAME from
    libopcodes-2.31.1.so
to
    libopcodes-2.31.1.gentoo-sys-devel-binutils-hppa64-st.so

SONAME now encodes USE=multilib and package name.

Bug: https://bugs.gentoo.org/663690
Bug: https://bugs.gentoo.org/666376
Bug: https://bugs.gentoo.org/666100
Package-Manager: Portage-2.3.49, Repoman-2.3.10

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64-2.31.1-r1.ebuild               | 396 +++++++++++++++++++++
 2 files changed, 397 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 4a684ba01c3..7eb43530404 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -16,4 +16,5 @@ DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6e
 DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31.1-patches-2.tar.xz 11232 BLAKE2B b8ac65872017c063650d4e04855efa3fd3e9faa566e81fa9fb3ae777c1337627023c1af85b708a7933b577a69652451ff488340d7cc9f035d3a3a655da0fc8d6 SHA512 2d0ee2e727586fc39cdb8abc7251c12dd350d18dd84103ddacc08978db48d45445c05b7ea5f095842f6e0350db94d593270b23a38920a01ca59c363decaa2a58
+DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 3444b219dd02ad513e6c36214d649a8a74638382103c88ec8de76a579be0ee13f8d1450e3b8d82dfddad55f2f851b32aee910a99230c7d8673f8426fc79a4cd9 SHA512 67b23c17518305561d190a15cba4a1af18a0a3cf1d7e62583ac7667d2fa40e7c7ec024cc981009d5d1caf1939633ab55fc0a198b69af02dc7841be43ff1acd13
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild
new file mode 100644
index 00000000000..47c79e64af9
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1-r1.ebuild
@@ -0,0 +1,396 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: dilfridge :)
+
+PATCH_VER=3
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT=$(get_version_component_range 1-2)
+KEYWORDS="-* ~hppa"
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+if is_cross ; then
+	# The build assumes the host has libiberty and such when cross-compiling
+	# its build tools.  We should probably make binutils itself build a local
+	# copy to use, but until then, be lazy.
+	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
+fi
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+		# Change SONAME to avoid conflict across
+		# {native,cross}/binutils, binutils-libs. #666100
+		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-08-27 13:17 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2018-08-27 13:17 UTC (permalink / raw
  To: gentoo-commits

commit:     496fd5fe49c3995bdde031d6a2499bff2ff7bbe2
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 27 13:13:04 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Aug 27 13:17:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=496fd5fe

sys-devel/binutils-hppa64: cut 2 patchset for 2.31.1

Single new patch to fix build failure against llvm:
+ 0013-Fix-type-checking-errors.patch

Reported-by: David Carlos Manuelda
Closes: https://bugs.gentoo.org/663194
Package-Manager: Portage-2.3.48, Repoman-2.3.10

 sys-devel/binutils-hppa64/Manifest                      | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index b4bce3e7c8c..4a684ba01c3 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -15,5 +15,5 @@ DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f
 DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
 DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
-DIST binutils-2.31.1-patches-1.tar.xz 10644 BLAKE2B 3c2e09713593fc01d78d45ee4e4ac92020d5de781325c8ea98a5193a36a2a0a814f1b6730ae718ad92f92c5876e8e47d0eee7c42d2fce281cc0b37fadb85c42b SHA512 d701e6e2c9d22ca5c7ac4bf08d9206a6648b299b7b04a053aaabc34fa94d7c5fd074a08e3f3af66365069918d9000986c646430bf2adf94213cbf0d55d6e6c51
+DIST binutils-2.31.1-patches-2.tar.xz 11232 BLAKE2B b8ac65872017c063650d4e04855efa3fd3e9faa566e81fa9fb3ae777c1337627023c1af85b708a7933b577a69652451ff488340d7cc9f035d3a3a655da0fc8d6 SHA512 2d0ee2e727586fc39cdb8abc7251c12dd350d18dd84103ddacc08978db48d45445c05b7ea5f095842f6e0350db94d593270b23a38920a01ca59c363decaa2a58
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
index f885043c8a2..29675f0e5c2 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
@@ -21,7 +21,7 @@ IUSE="+cxx doc multitarget +nls static-libs test"
 #                      for the patchsets
 #                      Default: dilfridge :)
 
-PATCH_VER=1
+PATCH_VER=2
 
 case ${PV} in
 	9999)
@@ -43,7 +43,7 @@ KEYWORDS="-* ~hppa"
 # The Gentoo patchset
 #
 PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
+PATCH_DEV=${PATCH_DEV:-slyfox}
 
 [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
 	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-08-07  9:45 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-08-07  9:45 UTC (permalink / raw
  To: gentoo-commits

commit:     7be9d84838c53685848271f822a46bc059fa25a3
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  7 09:42:51 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Aug  7 09:45:12 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7be9d848

sys-devel/binutils-hppa64: Restore keywords of 2.31.1

Package-Manager: Portage-2.3.44, Repoman-2.3.10

 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
index 3abdfc717b0..f885043c8a2 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
@@ -37,7 +37,7 @@ case ${PV} in
 		;;
 esac
 SLOT=$(get_version_component_range 1-2)
-#KEYWORDS="-* ~hppa"
+KEYWORDS="-* ~hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-08-04 18:24 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-08-04 18:24 UTC (permalink / raw
  To: gentoo-commits

commit:     0e882fda059ed56bfcf3b696cd55a9a6ece42130
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  4 18:23:11 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Aug  4 18:24:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e882fda

sys-devel/binutils-hppa64: Remove old

Package-Manager: Portage-2.3.44, Repoman-2.3.10

 sys-devel/binutils-hppa64/Manifest                 |   2 -
 .../binutils-hppa64/binutils-hppa64-2.31.ebuild    | 393 ---------------------
 2 files changed, 395 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 0174afd5183..b4bce3e7c8c 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -15,7 +15,5 @@ DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f
 DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
 DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
-DIST binutils-2.31-patches-1.tar.xz 16692 BLAKE2B ee9c7b344b12073c881eaf6fa80e8cb3187add720a26b60e7ef7db9dc3eb8e6e2b83cd0afb3115c4846aa914f8957554bd010f67af34dc5ad81e676639cf361e SHA512 4004d52327babd00f946b199f71e9eca840e66c65a287730af80b5a69138fe5f946f33c13400e028088238314c644f00b858049f8923948d2e6144dc779c24c0
 DIST binutils-2.31.1-patches-1.tar.xz 10644 BLAKE2B 3c2e09713593fc01d78d45ee4e4ac92020d5de781325c8ea98a5193a36a2a0a814f1b6730ae718ad92f92c5876e8e47d0eee7c42d2fce281cc0b37fadb85c42b SHA512 d701e6e2c9d22ca5c7ac4bf08d9206a6648b299b7b04a053aaabc34fa94d7c5fd074a08e3f3af66365069918d9000986c646430bf2adf94213cbf0d55d6e6c51
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
-DIST binutils-2.31.tar.xz 20445772 BLAKE2B 02d9ef7f8ea0d24682716b6890916d507762b4672a3148192afbbc1d6323b3f3970eb630ec9af5e18c60ba1d4579d49d847e571bcd8b1236c24b04c9e3815481 SHA512 3448a71c42d790569c1159c1042aa520b2d8ac8af7506fb1f2a4199dfb13b39f1c2271a5cb3a643d10c7d8a388a73f190e90503d4793a016da7893473aa1c635

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.ebuild
deleted file mode 100644
index 463c8b77f7d..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.ebuild
+++ /dev/null
@@ -1,393 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: dilfridge :)
-
-PATCH_VER=1
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT="${BVER}"
-#KEYWORDS="-* ~hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-if is_cross ; then
-	# The build assumes the host has libiberty and such when cross-compiling
-	# its build tools.  We should probably make binutils itself build a local
-	# copy to use, but until then, be lazy.
-	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
-fi
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-07-18 15:04 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-07-18 15:04 UTC (permalink / raw
  To: gentoo-commits

commit:     e9c7429f9956177aa1b211ead697c94a5537fa82
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 18 14:49:51 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Jul 18 15:04:34 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9c7429f

sys-devel/binutils-hppa64: Version bump to point release 2.31.1

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.31.1.ebuild  | 393 +++++++++++++++++++++
 2 files changed, 395 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index a25f0b3ad7a..0174afd5183 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -16,4 +16,6 @@ DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6e
 DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
 DIST binutils-2.31-patches-1.tar.xz 16692 BLAKE2B ee9c7b344b12073c881eaf6fa80e8cb3187add720a26b60e7ef7db9dc3eb8e6e2b83cd0afb3115c4846aa914f8957554bd010f67af34dc5ad81e676639cf361e SHA512 4004d52327babd00f946b199f71e9eca840e66c65a287730af80b5a69138fe5f946f33c13400e028088238314c644f00b858049f8923948d2e6144dc779c24c0
+DIST binutils-2.31.1-patches-1.tar.xz 10644 BLAKE2B 3c2e09713593fc01d78d45ee4e4ac92020d5de781325c8ea98a5193a36a2a0a814f1b6730ae718ad92f92c5876e8e47d0eee7c42d2fce281cc0b37fadb85c42b SHA512 d701e6e2c9d22ca5c7ac4bf08d9206a6648b299b7b04a053aaabc34fa94d7c5fd074a08e3f3af66365069918d9000986c646430bf2adf94213cbf0d55d6e6c51
+DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.31.tar.xz 20445772 BLAKE2B 02d9ef7f8ea0d24682716b6890916d507762b4672a3148192afbbc1d6323b3f3970eb630ec9af5e18c60ba1d4579d49d847e571bcd8b1236c24b04c9e3815481 SHA512 3448a71c42d790569c1159c1042aa520b2d8ac8af7506fb1f2a4199dfb13b39f1c2271a5cb3a643d10c7d8a388a73f190e90503d4793a016da7893473aa1c635

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
new file mode 100644
index 00000000000..3abdfc717b0
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
@@ -0,0 +1,393 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: dilfridge :)
+
+PATCH_VER=1
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT=$(get_version_component_range 1-2)
+#KEYWORDS="-* ~hppa"
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-dilfridge}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+if is_cross ; then
+	# The build assumes the host has libiberty and such when cross-compiling
+	# its build tools.  We should probably make binutils itself build a local
+	# copy to use, but until then, be lazy.
+	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
+fi
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-07-15 12:59 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-07-15 12:59 UTC (permalink / raw
  To: gentoo-commits

commit:     2310cf83268b281c628ef1ecef970e63a0a81302
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 15 12:58:31 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 15 12:58:31 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2310cf83

sys-devel/binutils-hppa64: Zero-day 2.31 bump for the brave or stupid

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.31.ebuild    | 393 +++++++++++++++++++++
 2 files changed, 395 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 078c5bd4d7e..a25f0b3ad7a 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -15,3 +15,5 @@ DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f
 DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
 DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
+DIST binutils-2.31-patches-1.tar.xz 16692 BLAKE2B ee9c7b344b12073c881eaf6fa80e8cb3187add720a26b60e7ef7db9dc3eb8e6e2b83cd0afb3115c4846aa914f8957554bd010f67af34dc5ad81e676639cf361e SHA512 4004d52327babd00f946b199f71e9eca840e66c65a287730af80b5a69138fe5f946f33c13400e028088238314c644f00b858049f8923948d2e6144dc779c24c0
+DIST binutils-2.31.tar.xz 20445772 BLAKE2B 02d9ef7f8ea0d24682716b6890916d507762b4672a3148192afbbc1d6323b3f3970eb630ec9af5e18c60ba1d4579d49d847e571bcd8b1236c24b04c9e3815481 SHA512 3448a71c42d790569c1159c1042aa520b2d8ac8af7506fb1f2a4199dfb13b39f1c2271a5cb3a643d10c7d8a388a73f190e90503d4793a016da7893473aa1c635

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.ebuild
new file mode 100644
index 00000000000..463c8b77f7d
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.ebuild
@@ -0,0 +1,393 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: dilfridge :)
+
+PATCH_VER=1
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT="${BVER}"
+#KEYWORDS="-* ~hppa"
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-dilfridge}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+if is_cross ; then
+	# The build assumes the host has libiberty and such when cross-compiling
+	# its build tools.  We should probably make binutils itself build a local
+	# copy to use, but until then, be lazy.
+	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
+fi
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-06-29 22:10 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2018-06-29 22:10 UTC (permalink / raw
  To: gentoo-commits

commit:     8c6a764d37f8fc1e5ec0ab4538a08b826487f06b
Author:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
AuthorDate: Fri Jun 29 19:39:17 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jun 29 22:09:40 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c6a764d

sys-devel/binutils-hppa64: stable 2.30-r2 for hppa

Bug: https://bugs.gentoo.org/655574
Package-Manager: Portage-2.3.40, Repoman-2.3.9
RepoMan-Options: --include-arches="hppa"

 sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
index 9e8ee35a6d0..7f131bab5ea 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
@@ -37,7 +37,7 @@ case ${PV} in
 		;;
 esac
 SLOT="${BVER}"
-KEYWORDS="-* ~hppa"
+KEYWORDS="-* hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-06-13 22:10 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-06-13 22:10 UTC (permalink / raw
  To: gentoo-commits

commit:     13daf757813991b80cb01846e31586e6068c4854
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 13 22:09:20 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Jun 13 22:09:20 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13daf757

sys-devel/binutils-hppa64: Restore keywords

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild
index 4af12e10fb8..da743be6046 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild
@@ -37,8 +37,7 @@ case ${PV} in
 		;;
 esac
 SLOT="${BVER}"
-#KEYWORDS="-* ~hppa"
-KEYWORDS=""
+KEYWORDS="-* ~hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-06-12 21:06 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-06-12 21:06 UTC (permalink / raw
  To: gentoo-commits

commit:     7fb34b023f9fc8cb7eda70a628c2e4a16e0c15d8
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 12 21:06:00 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jun 12 21:06:37 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fb34b02

sys-devel/binutils-hppa64: Revision bump, patchset 3

Few upstream commits. Mostly a re-do of the Gentoo-specific
testsuite patches.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.30-r3.ebuild | 394 +++++++++++++++++++++
 2 files changed, 395 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 5b53fd263c4..078c5bd4d7e 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -13,4 +13,5 @@ DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecb
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
 DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
+DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild
new file mode 100644
index 00000000000..4af12e10fb8
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r3.ebuild
@@ -0,0 +1,394 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: dilfridge :)
+
+PATCH_VER=3
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT="${BVER}"
+#KEYWORDS="-* ~hppa"
+KEYWORDS=""
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-dilfridge}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+if is_cross ; then
+	# The build assumes the host has libiberty and such when cross-compiling
+	# its build tools.  We should probably make binutils itself build a local
+	# copy to use, but until then, be lazy.
+	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
+fi
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-05-19 17:21 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-05-19 17:21 UTC (permalink / raw
  To: gentoo-commits

commit:     dc88b8b6d8868b4e7d177b8ef3e340e669d68c99
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat May 19 17:20:13 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat May 19 17:20:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc88b8b6

sys-devel/binutils-hppa64: Remove old

Package-Manager: Portage-2.3.36, Repoman-2.3.9

 sys-devel/binutils-hppa64/Manifest                 |   1 -
 .../binutils-hppa64/binutils-hppa64-2.30.ebuild    | 393 ---------------------
 2 files changed, 394 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index d6f2e7ca842..5b53fd263c4 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -12,6 +12,5 @@ DIST binutils-2.29-patches-1.0.tar.xz 7548 BLAKE2B b5365ba6849f8809528ed13ce0b0e
 DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecbe3fe617f96dfb86e174a80d0b9113cbd4fce9d760fa61660ba2cfafbe1e482e955391cb8d3ef78d2c166c82796416a7ee106 SHA512 b60a3af9cd6a681f32a59fc4a30602ee1290f75cc93c8ad38ab0de17a7f30538a751b801dbaf079e3d514b9671e34e91742c4c9c953a8c9794505b571b7e80f0
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
-DIST binutils-2.30-patches-1.tar.xz 13884 BLAKE2B 86d160144e4ae3213838ccd07d008a96f210dbe8d894f2043420bd0003f8e0611564f77dadf60780da61278bbac41130922703fef69ba8ac451bcae5d9c65cf4 SHA512 cf38328bac920c1159e73727a9bb46bd462fa60650c90ee8a3d6221d447c678fdd79c6886efc52e35897d535dd717c1dc363bcb3f201aacd15ace078694456da
 DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
deleted file mode 100644
index 2bb4529fe8f..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
+++ /dev/null
@@ -1,393 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: dilfridge :)
-
-PATCH_VER=1
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT="${BVER}"
-KEYWORDS="-* ~hppa"
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-if is_cross ; then
-	# The build assumes the host has libiberty and such when cross-compiling
-	# its build tools.  We should probably make binutils itself build a local
-	# copy to use, but until then, be lazy.
-	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
-fi
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
-
-src_install() {
-	local x d
-
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-05-12 18:44 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2018-05-12 18:44 UTC (permalink / raw
  To: gentoo-commits

commit:     e483e5f315c0377bf44f34fba4031ce3416e7d65
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat May 12 18:41:54 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat May 12 18:44:22 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e483e5f3

sys-devel/binutils-hppa64: don't purge environment for binutils-config

Follow toolchain.eclass cleanup where gcc-config was broken due
to missing PATH= assignment:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6526608cbdb8202bc69aaaedd19f773ef651862c

This change removes environment cleansing for binutils-config

Reported-by: hiyuh
Bug: https://bugs.gentoo.org/588642
Package-Manager: Portage-2.3.36, Repoman-2.3.9

 sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
index ee0aeca4fc2..9e8ee35a6d0 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
@@ -383,7 +383,7 @@ pkg_postrm() {
 		choice=${choice//$'\n'/ }
 		choice=${choice/* }
 		if [[ -z ${choice} ]] ; then
-			env -i ROOT="${ROOT}" binutils-config -u ${CTARGET}
+			binutils-config -u ${CTARGET}
 		else
 			binutils-config ${choice}
 		fi

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
index 2d7dd1ef393..2bb4529fe8f 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
@@ -383,7 +383,7 @@ pkg_postrm() {
 		choice=${choice//$'\n'/ }
 		choice=${choice/* }
 		if [[ -z ${choice} ]] ; then
-			env -i ROOT="${ROOT}" binutils-config -u ${CTARGET}
+			binutils-config -u ${CTARGET}
 		else
 			binutils-config ${choice}
 		fi


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-05-01 20:24 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-05-01 20:24 UTC (permalink / raw
  To: gentoo-commits

commit:     fe1b21278b9fd44813240bc5fe618f4b121fce37
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue May  1 20:23:35 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue May  1 20:24:20 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe1b2127

sys-devel/binutils-hppa64: Restore keywords

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
index 6a94d773620..ee0aeca4fc2 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
@@ -37,8 +37,7 @@ case ${PV} in
 		;;
 esac
 SLOT="${BVER}"
-#KEYWORDS="-* ~hppa"
-KEYWORDS=""
+KEYWORDS="-* ~hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-04-30 11:35 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-04-30 11:35 UTC (permalink / raw
  To: gentoo-commits

commit:     f02d1b29f8c351b5d311c077818de3280467594c
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 30 11:33:33 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Apr 30 11:35:21 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f02d1b29

sys-devel/binutils-hppa64: Revision bump, patchset 2

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 sys-devel/binutils-hppa64/Manifest                 |   1 +
 .../binutils-hppa64/binutils-hppa64-2.30-r2.ebuild | 394 +++++++++++++++++++++
 2 files changed, 395 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 4dceb00bfc5..71ddaace2b5 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -25,4 +25,5 @@ DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecb
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
 DIST binutils-2.30-patches-1.tar.xz 13884 BLAKE2B 86d160144e4ae3213838ccd07d008a96f210dbe8d894f2043420bd0003f8e0611564f77dadf60780da61278bbac41130922703fef69ba8ac451bcae5d9c65cf4 SHA512 cf38328bac920c1159e73727a9bb46bd462fa60650c90ee8a3d6221d447c678fdd79c6886efc52e35897d535dd717c1dc363bcb3f201aacd15ace078694456da
+DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
 DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
new file mode 100644
index 00000000000..6a94d773620
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30-r2.ebuild
@@ -0,0 +1,394 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: dilfridge :)
+
+PATCH_VER=2
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT="${BVER}"
+#KEYWORDS="-* ~hppa"
+KEYWORDS=""
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-dilfridge}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+if is_cross ; then
+	# The build assumes the host has libiberty and such when cross-compiling
+	# its build tools.  We should probably make binutils itself build a local
+	# copy to use, but until then, be lazy.
+	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
+fi
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			env -i ROOT="${ROOT}" binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-04-30 11:35 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-04-30 11:35 UTC (permalink / raw
  To: gentoo-commits

commit:     d882e8561c436d9d496a135486022fd51d410e5f
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 30 11:34:46 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Apr 30 11:35:24 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d882e856

sys-devel/binutils-hppa64: Remove old

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 sys-devel/binutils-hppa64/Manifest                 | 12 ----------
 .../binutils-hppa64/binutils-hppa64-2.19.1.ebuild  | 22 ------------------
 .../binutils-hppa64/binutils-hppa64-2.20.1.ebuild  | 22 ------------------
 .../binutils-hppa64-2.21.1-r1.ebuild               | 22 ------------------
 .../binutils-hppa64/binutils-hppa64-2.22.ebuild    | 26 ----------------------
 .../binutils-hppa64/binutils-hppa64-2.23.2.ebuild  | 26 ----------------------
 .../binutils-hppa64/binutils-hppa64-2.24.ebuild    | 26 ----------------------
 7 files changed, 156 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 71ddaace2b5..d6f2e7ca842 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,15 +1,3 @@
-DIST binutils-2.19.1-patches-1.2.tar.bz2 10544 BLAKE2B 4844c64a5c59fd212336fcc2ec77b94e52858d30552d270b59ccd9794f7f0c634ff4d9e76abed9130ebf17389334be540a310fd06dd1a0ee79e9433b6e5f14a0 SHA512 6aa2c923748d5b80f8e495176f19d8df8defcaa53915835b57a1da7c7a78668cb63d3380dd027593c8909a35de61adf2ea3d0ace64eeb537171271a6c6cbf33e
-DIST binutils-2.19.1.tar.bz2 16306586 BLAKE2B a455918a3561a3c721f8e2801908e92c6794e1533a654aa09ece23b42987a6a333d202c40794528c8d7f1be5b271fdf88281f58f363d055e022385bed21f2d2c SHA512 22af3cf65ad2f76469440fb992e50a10895fcec1265b98781138db0fc40bf06565af86dc73ca0b97bee764ec797439a89b5dbca2a5da74f375af55383887c436
-DIST binutils-2.20.1-patches-1.1.tar.bz2 14913 BLAKE2B b46514765387a17751abf9400287d597c430fbcae2af51c3d6325d0ec0b6ff9e1b2da21835b0dcbe81a6333aa90260baa1ab17c8b0487c5e40ba91af2eb4a936 SHA512 e4e7c8729fb4d96ccfa79e1d3bbed8d1962fa7d512afb6a54655c86c71039e747f1c30165bcf0a8a14da5383498731c30fb361c8e0672820771082b5193e84e0
-DIST binutils-2.20.1.tar.bz2 17591527 BLAKE2B 3eb9b8fb7ed72202f6af9e351b508cd9ca9487129a3fc2fb348ef3738a3471f3cae6e3f678bc8fc66ecb16ed7544452f487776ab8a21b499dc6c977a67c34ccc SHA512 b05c93eb9ba8db344fbdee3c5b36ed5a7ad1366f948d41af43286715c7345a2477e0808d25f7bbf81b54ab06c4d46356d44318d56efcdbef42236d1a694411fc
-DIST binutils-2.21.1-patches-1.1.tar.bz2 9197 BLAKE2B 07601b75d9b8a039fd71c7a0240015f3d7330567f88533c9a1bf70c4f0ed7453fe48bff6499aedc73aa27c3c7a1d83766cfa07e61e1df76ce7310dcd5ed0c24c SHA512 6a0678504766961e77dd7960d86ea19e2eb17aea8c7b09e7fc507627021fb489c9e64a13f6e9025bf028a4f5afed26e5ee3390da20236a77d5c4e189795af8aa
-DIST binutils-2.21.1.tar.bz2 18997755 BLAKE2B fd65c7c6c10de0d7505c9f69cc1bc0020ecafa5395514e8b5c0a87fcc126b4a50c6ce966f6b329e0c980811f60ab60ad8a44d8e2b3d6fab5a1953fb1a32e7ff0 SHA512 3f550f6833a41e9b17d1f515eea0de8dc14aefb7dd69c65b821aa1336aea4c3f55b4457a1781ab7b32bda049798fef3cf989148e4acb0fca8baca5af74766f31
-DIST binutils-2.22-patches-1.2.tar.bz2 19283 BLAKE2B 5f7e9083bf28f7cf5c1d6e3b70f85c13ed080d07567eba2d4c00098f33420063f5c0b31717596686c08f8cad8f88053d1b7df867d071ea13e34505b961c9ddc4 SHA512 02b8820eee2d1cc3d28f89100f0718f9a4c2821c176b6c47974d23b8f25124a7f6f500b4a42eda55c2846912e91c6577444fad114e0ec11f475dc52402d63136
-DIST binutils-2.22.tar.bz2 19973532 BLAKE2B 3b82bde4d4fe8ad564f449be89a63e5a158967797c06821d0bbf3968630b807d1f393fd9cb33e062420e998f37e4ac00d03b424b05a5dff7c350c8ac13a9d375 SHA512 ffe8ef263ef99183e8cc823fe8487ff7d0f7bf9a8efd2853b5f4636aca0023850d13de4eac7d77a5f69413d8a50e6f95bb14569be53df86c0bce38034525ab74
-DIST binutils-2.23.2-patches-1.0.tar.xz 10884 BLAKE2B 6604bc909f905b9e85e1c612a74df44b9351f881d5ece20793309d4560d77ab7904207435ed87fb9ee4b3413c8daca0b1e6aa6ac29abc86c51e27c6f32c6287c SHA512 25d52694e653dd2642eb643ef3bd48a099876515d66b0b1ed8dfa5f60cadaa1bb92a589e370528ec52add7571c0ea1a98859bfde0821c73ec0ded492fff0915c
-DIST binutils-2.23.2.tar.bz2 21440347 BLAKE2B 9e85ae032d27b75fd5a868c2d59da470849a67016170b549550f28ae0aeed938e9d887d80de0e3354aa3e9956783e68ce9c0a32e9fce8783620601fb96b57599 SHA512 dec753bbba008f1526b89cf1bd85feba78f362f5333ffdf93953fd131eb755976dec82a0a4ba38c43d2434da007137780cfe674de5414be5cf7ce7fbc6af6d16
-DIST binutils-2.24-patches-1.4.tar.xz 17488 BLAKE2B 23807d8f267e52da42629e10c985f6f8c29b50e02a7ed2e0dacba5edc43deecc367a206c7fe77de7b40d1990b1443ce23701867393885976f5f1bc66119c32d4 SHA512 dfd7c38cd978b7d6627579c338bf67641c799ce39936e3475dca3ecf5bade417e3f090253a2326582c64d5743a24f9078794f44e8fd41b6af728f1f375c91d3b
-DIST binutils-2.24.tar.bz2 22716802 BLAKE2B d60cd370498f54429facb94bca60e8d2356dc0be394f54a1daad946730be414db83bef66e7adada936513cea9f0e315149fc41ba5338d2f9471cc6ce53f7f949 SHA512 5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12
 DIST binutils-2.25.1-patches-1.1.tar.xz 18724 BLAKE2B 0a8380427247463340b28fa28171f127b9a3c8163ce63d103d1d15492c30df9cf24a5122ff271dc80425a0b212438f5d39f99783fda52e7b5e861a3f5f0e2992 SHA512 209c55bf26b51d8c513b40abd2d95f687159c4e964a6c732924f277d04c97323c427fe452c63d5ec6962dcd8892d6d5d807ba88826739425bce6812a31f573dd
 DIST binutils-2.25.1.tar.bz2 24163561 BLAKE2B 25fc879f99d6547fd0dc911e74c35cf52f3da2c0f9fd758031dda90da63cdd819345d0a69f692a40dee9f63895d816cee7910a9f48ce56e7b4251827768946f4 SHA512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d
 DIST binutils-2.26.1-patches-1.0.tar.xz 11212 BLAKE2B f785930a9bf994312f3a525ef46727c582e6cd3992b5648bdf4c787f55fed4b36c69be3ac7d9962dcd72b6dbe0155dbf23d1daa14be5c7ad5da1cf634f2522aa SHA512 c520967659c66f05f7ad795bb0bc2522e139977ab3ae8cfd9ec0d093a412a7291d1cabaa6b429c618fcf7253458a6fbe5a7dc3f62e0ac9762667308067db075c

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.19.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.19.1.ebuild
deleted file mode 100644
index d30bc0ef146..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.19.1.ebuild
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.2"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* hppa"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.20.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.20.1.ebuild
deleted file mode 100644
index d9dbc163249..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.20.1.ebuild
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.1"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* hppa"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.21.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.21.1-r1.ebuild
deleted file mode 100644
index 4428c3a5c3d..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.21.1-r1.ebuild
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.1"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* ~hppa"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.22.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.22.ebuild
deleted file mode 100644
index 2a7bf01537f..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.22.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.2"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.23.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.23.2.ebuild
deleted file mode 100644
index 5297e3df26e..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.23.2.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.0"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.24.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.24.ebuild
deleted file mode 100644
index 14e21026f9e..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.24.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.4"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-02-11 21:10 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2018-02-11 21:10 UTC (permalink / raw
  To: gentoo-commits

commit:     6bfe62378c19d3c9e133d272eaacc12cb32587c9
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 11 21:10:17 2018 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Feb 11 21:10:33 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bfe6237

sys-devel/binutils-hppa64: Second try at an updated ebuild.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 sys-devel/binutils-hppa64/Manifest                 |   2 +-
 .../binutils-hppa64/binutils-hppa64-2.30.ebuild    | 385 ++++++++++++++++++++-
 2 files changed, 377 insertions(+), 10 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index fa1dc6f3019..4dceb00bfc5 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -25,4 +25,4 @@ DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecb
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
 DIST binutils-2.30-patches-1.tar.xz 13884 BLAKE2B 86d160144e4ae3213838ccd07d008a96f210dbe8d894f2043420bd0003f8e0611564f77dadf60780da61278bbac41130922703fef69ba8ac451bcae5d9c65cf4 SHA512 cf38328bac920c1159e73727a9bb46bd462fa60650c90ee8a3d6221d447c678fdd79c6886efc52e35897d535dd717c1dc363bcb3f201aacd15ace078694456da
-DIST binutils-2.30.tar.bz2 29541188 BLAKE2B 10d3988e8cd7fad549b0f42e1cdf7ca5d6be13325fcea316f80dfd760ff7f1b7b13243dd47f2f8b14697219563ef75099c842960607e3dc05afb1a7b18acdb9b SHA512 c3ce91aa20f058ec589bf18c722bf651331b394db6378900cc813cc0eea3a331a96584d5ae090630b627369510397dccc9edfcd43d4aeefc99579f277a05c72c
+DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
index e34fd3087ab..2d7dd1ef393 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
@@ -1,26 +1,393 @@
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="5"
+EAPI=6
 
 export CTARGET=hppa64-${CHOST#*-}
 
-PATCHVER="1"
-ELF2FLT_VER=""
-inherit toolchain-binutils
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
 
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
 
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: dilfridge :)
+
+PATCH_VER=1
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT="${BVER}"
 KEYWORDS="-* ~hppa"
 
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-dilfridge}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+if is_cross ; then
+	# The build assumes the host has libiberty and such when cross-compiling
+	# its build tools.  We should probably make binutils itself build a local
+	# copy to use, but until then, be lazy.
+	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
+fi
+
+MY_BUILDDIR=${WORKDIR}/build
+S=${WORKDIR}/${P/-hppa64/}
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
 
 src_install() {
-	toolchain-binutils_src_install
+	local x d
 
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
 	# tweak the default fake list a little bit
 	cd "${D}"/etc/env.d/binutils
 	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
 }
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			env -i ROOT="${ROOT}" binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-02-11 17:55 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2018-02-11 17:55 UTC (permalink / raw
  To: gentoo-commits

commit:     47fb35c76dcc9817569374de8d3c66ac69fccef6
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 11 17:41:26 2018 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Feb 11 17:55:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47fb35c7

sys-devel/binutils-hppa64: Fix 2.30 (bug #647318).

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 sys-devel/binutils-hppa64/Manifest                 |   2 +-
 .../binutils-hppa64/binutils-hppa64-2.30.ebuild    | 384 +--------------------
 2 files changed, 10 insertions(+), 376 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 4dceb00bfc5..fa1dc6f3019 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -25,4 +25,4 @@ DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecb
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
 DIST binutils-2.30-patches-1.tar.xz 13884 BLAKE2B 86d160144e4ae3213838ccd07d008a96f210dbe8d894f2043420bd0003f8e0611564f77dadf60780da61278bbac41130922703fef69ba8ac451bcae5d9c65cf4 SHA512 cf38328bac920c1159e73727a9bb46bd462fa60650c90ee8a3d6221d447c678fdd79c6886efc52e35897d535dd717c1dc363bcb3f201aacd15ace078694456da
-DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
+DIST binutils-2.30.tar.bz2 29541188 BLAKE2B 10d3988e8cd7fad549b0f42e1cdf7ca5d6be13325fcea316f80dfd760ff7f1b7b13243dd47f2f8b14697219563ef75099c842960607e3dc05afb1a7b18acdb9b SHA512 c3ce91aa20f058ec589bf18c722bf651331b394db6378900cc813cc0eea3a331a96584d5ae090630b627369510397dccc9edfcd43d4aeefc99579f277a05c72c

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
index 36883ada0ff..e34fd3087ab 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
@@ -1,392 +1,26 @@
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI="5"
 
 export CTARGET=hppa64-${CHOST#*-}
 
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+PATCHVER="1"
+ELF2FLT_VER=""
+inherit toolchain-binutils
 
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
+DESCRIPTION="binutils package for building 64bit kernels on HPPA"
 
-# Variables that can be set here:
-# PATCH_VER          - the patchset version
-#                      Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#                    - Default: PV
-# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#                      for the patchsets
-#                      Default: dilfridge :)
-
-PATCH_VER=1
-
-case ${PV} in
-	9999)
-		BVER="git"
-		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
-		inherit git-r3
-		S=${WORKDIR}/binutils
-		EGIT_CHECKOUT_DIR=${S}
-		;;
-	*)
-		BVER=${PV}
-		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
-		;;
-esac
-SLOT="${BVER}"
 KEYWORDS="-* ~hppa"
 
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
-	if [[ ${CATEGORY} == cross-* ]] ; then
-		export CTARGET=${CATEGORY#cross-}
-	fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
-	>=sys-devel/binutils-config-3
-	sys-libs/zlib
-"
-DEPEND="${RDEPEND}
-	doc? ( sys-apps/texinfo )
-	test? ( dev-util/dejagnu )
-	nls? ( sys-devel/gettext )
-	sys-devel/flex
-	virtual/yacc
-"
-if is_cross ; then
-	# The build assumes the host has libiberty and such when cross-compiling
-	# its build tools.  We should probably make binutils itself build a local
-	# copy to use, but until then, be lazy.
-	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
-fi
-
-MY_BUILDDIR=${WORKDIR}/build
-
-src_unpack() {
-	case ${PV} in
-		9999)
-			git-r3_src_unpack;
-			;;
-		*)
-			default
-			;;
-	esac
-	mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
-	if [[ ! -z ${PATCH_VER} ]] ; then
-		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
-		eapply "${WORKDIR}/patch"/*.patch
-	fi
-
-	# This check should probably go somewhere else, like pkg_pretend.
-	if [[ ${CTARGET} == *-uclibc* ]] ; then
-		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
-			die "sorry, but this binutils doesn't yet support uClibc :("
-		fi
-	fi
-
-	# Make sure our explicit libdir paths don't get clobbered. #562460
-	sed -i \
-		-e 's:@bfdlibdir@:@libdir@:g' \
-		-e 's:@bfdincludedir@:@includedir@:g' \
-		{bfd,opcodes}/Makefile.in || die
-
-	# Fix locale issues if possible #122216
-	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
-		einfo "Fixing misc issues in configure files"
-		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
-			ebegin "  Updating ${f/${S}\/}"
-			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-				|| eerror "Please file a bug about this"
-			eend $?
-		done
-	fi
-
-	# Fix conflicts with newer glibc #272594
-	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
-		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
-	fi
-
-	# Apply things from PATCHES and user dirs
-	default
-
-	# Run misc portage update scripts
-	gnuconfig_update
-	elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
-	printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
-	printf "Gentoo ${BVER}"
-	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
-	# Setup some paths
-	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
-	INCPATH=${LIBPATH}/include
-	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
-	if is_cross ; then
-		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
-	else
-		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
-	fi
-
-	# Make sure we filter $LINGUAS so that only ones that
-	# actually work make it through #42033
-	strip-linguas -u */po
-
-	# Keep things sane
-	strip-flags
-
-	local x
-	echo
-	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
-		einfo "$(printf '%10s' ${x}:) ${!x}"
-	done
-	echo
-
-	cd "${MY_BUILDDIR}"
-	local myconf=()
-
-	# enable gold (installed as ld.gold) and ld's plugin architecture
-	if use cxx ; then
-		myconf+=( --enable-gold )
-		myconf+=( --enable-plugins )
-	fi
-
-	if use nls ; then
-		myconf+=( --without-included-gettext )
-	else
-		myconf+=( --disable-nls )
-	fi
-
-	myconf+=( --with-system-zlib )
-
-	# For bi-arch systems, enable a 64bit bfd.  This matches
-	# the bi-arch logic in toolchain.eclass. #446946
-	# We used to do it for everyone, but it's slow on 32bit arches. #438522
-	case $(tc-arch) in
-		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
-	esac
-
-	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
-	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
-	is_cross && myconf+=(
-		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
-		--enable-poison-system-directories
-	)
-
-	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
-	# on everyone in alpha (for now), we'll just enable it when possible
-	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
-	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
-	# mips can't do hash-style=gnu ...
-	if [[ $(tc-arch) != mips ]] ; then
-		myconf+=( --enable-default-hash-style=gnu )
-	fi
-
-	myconf+=(
-		--prefix="${EPREFIX}"/usr
-		--host=${CHOST}
-		--target=${CTARGET}
-		--datadir="${EPREFIX}"${DATAPATH}
-		--datarootdir="${EPREFIX}"${DATAPATH}
-		--infodir="${EPREFIX}"${DATAPATH}/info
-		--mandir="${EPREFIX}"${DATAPATH}/man
-		--bindir="${EPREFIX}"${BINPATH}
-		--libdir="${EPREFIX}"${LIBPATH}
-		--libexecdir="${EPREFIX}"${LIBPATH}
-		--includedir="${EPREFIX}"${INCPATH}
-		--enable-obsolete
-		--enable-shared
-		--enable-threads
-		# Newer versions (>=2.27) offer a configure flag now.
-		--enable-relro
-		# Newer versions (>=2.24) make this an explicit option. #497268
-		--enable-install-libiberty
-		--disable-werror
-		--with-bugurl="$(toolchain-binutils_bugurl)"
-		--with-pkgversion="$(toolchain-binutils_pkgversion)"
-		$(use_enable static-libs static)
-		${EXTRA_ECONF}
-		# Disable modules that are in a combined binutils/gdb tree. #490566
-		--disable-{gdb,libdecnumber,readline,sim}
-		# Strip out broken static link flags.
-		# https://gcc.gnu.org/PR56750
-		--without-stage1-ldflags
-	)
-	echo ./configure "${myconf[@]}"
-	"${S}"/configure "${myconf[@]}" || die
-
-	# Prevent makeinfo from running if doc is unset.
-	if ! use doc ; then
-		sed -i \
-			-e '/^MAKEINFO/s:=.*:= true:' \
-			Makefile || die
-	fi
-}
-
-src_compile() {
-	cd "${MY_BUILDDIR}"
-	emake all
-
-	# only build info pages if the user wants them
-	if use doc ; then
-		emake info
-	fi
-
-	# we nuke the manpages when we're left with junk
-	# (like when we bootstrap, no perl -> no manpages)
-	find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
-	cd "${MY_BUILDDIR}"
-	emake -k check
-}
+# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
+# patch-2.5.9, so require a version that for sure works
+DEPEND+=" >=sys-devel/patch-2.6.1"
 
 src_install() {
-	local x d
+	toolchain-binutils_src_install
 
-	cd "${MY_BUILDDIR}"
-	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-	rm -rf "${ED}"/${LIBPATH}/bin
-	use static-libs || find "${ED}" -name '*.la' -delete
-
-	# Newer versions of binutils get fancy with ${LIBPATH} #171905
-	cd "${ED}"/${LIBPATH}
-	for d in ../* ; do
-		[[ ${d} == ../${BVER} ]] && continue
-		mv ${d}/* . || die
-		rmdir ${d} || die
-	done
-
-	# Now we collect everything intp the proper SLOT-ed dirs
-	# When something is built to cross-compile, it installs into
-	# /usr/$CHOST/ by default ... we have to 'fix' that :)
-	if is_cross ; then
-		cd "${ED}"/${BINPATH}
-		for x in * ; do
-			mv ${x} ${x/${CTARGET}-}
-		done
-
-		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
-			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
-			rm -r "${ED}"/usr/${CHOST}/{include,lib}
-		fi
-	fi
-	insinto ${INCPATH}
-	local libiberty_headers=(
-		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
-		demangle.h
-		dyn-string.h
-		fibheap.h
-		hashtab.h
-		libiberty.h
-		objalloc.h
-		splay-tree.h
-	)
-	doins "${libiberty_headers[@]/#/${S}/include/}" || die
-	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
-		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
-		rm -r "${ED}"/${LIBPATH}/lib
-	fi
-
-	# Generate an env.d entry for this binutils
-	insinto /etc/env.d/binutils
-	cat <<-EOF > "${T}"/env.d
-		TARGET="${CTARGET}"
-		VER="${BVER}"
-		LIBPATH="${EPREFIX}${LIBPATH}"
-	EOF
-	newins "${T}"/env.d ${CTARGET}-${BVER}
-
-	# Handle documentation
-	if ! is_cross ; then
-		cd "${S}"
-		dodoc README
-		docinto bfd
-		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
-		docinto binutils
-		dodoc binutils/ChangeLog binutils/NEWS binutils/README
-		docinto gas
-		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
-		docinto gprof
-		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
-		docinto ld
-		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
-		docinto libiberty
-		dodoc libiberty/ChangeLog* libiberty/README
-		docinto opcodes
-		dodoc opcodes/ChangeLog*
-	fi
-
-	# Remove shared info pages
-	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
-	# Trim all empty dirs
-	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
-	# the hppa64 hack; this should go into 9999 as a PN-conditional
 	# tweak the default fake list a little bit
 	cd "${D}"/etc/env.d/binutils
 	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
 }
-
-pkg_postinst() {
-	# Make sure this ${CTARGET} has a binutils version selected
-	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-	binutils-config ${CTARGET}-${BVER}
-}
-
-pkg_postrm() {
-	local current_profile=$(binutils-config -c ${CTARGET})
-
-	# If no other versions exist, then uninstall for this
-	# target ... otherwise, switch to the newest version
-	# Note: only do this if this version is unmerged.  We
-	#       rerun binutils-config if this is a remerge, as
-	#       we want the mtimes on the symlinks updated (if
-	#       it is the same as the current selected profile)
-	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
-		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
-		choice=${choice//$'\n'/ }
-		choice=${choice/* }
-		if [[ -z ${choice} ]] ; then
-			env -i ROOT="${ROOT}" binutils-config -u ${CTARGET}
-		else
-			binutils-config ${choice}
-		fi
-	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
-		binutils-config ${CTARGET}-${BVER}
-	fi
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-01-29 20:11 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-01-29 20:11 UTC (permalink / raw
  To: gentoo-commits

commit:     051942f930d303aa4958843bb7e746945eac5679
Author:     Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 29 20:10:27 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Jan 29 20:10:52 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=051942f9

sys-devel/binutils-hppa64: Restore keywords of 2.30

Package-Manager: Portage-2.3.20, Repoman-2.3.6

 sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
index d0aeded72c5..36883ada0ff 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
@@ -37,7 +37,7 @@ case ${PV} in
 		;;
 esac
 SLOT="${BVER}"
-#KEYWORDS="-* ~hppa"
+KEYWORDS="-* ~hppa"
 
 #
 # The Gentoo patchset


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2018-01-28 14:23 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2018-01-28 14:23 UTC (permalink / raw
  To: gentoo-commits

commit:     0354a974002823c2a8e987d49607fc0cdcf79ad1
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 28 13:44:55 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jan 28 14:23:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0354a974

sys-devel/binutils-hppa64: Version bump

Package-Manager: Portage-2.3.20, Repoman-2.3.6

 sys-devel/binutils-hppa64/Manifest                 |   2 +
 .../binutils-hppa64/binutils-hppa64-2.30.ebuild    | 392 +++++++++++++++++++++
 2 files changed, 394 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 2144a9c9b22..4dceb00bfc5 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -24,3 +24,5 @@ DIST binutils-2.29-patches-1.0.tar.xz 7548 BLAKE2B b5365ba6849f8809528ed13ce0b0e
 DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecbe3fe617f96dfb86e174a80d0b9113cbd4fce9d760fa61660ba2cfafbe1e482e955391cb8d3ef78d2c166c82796416a7ee106 SHA512 b60a3af9cd6a681f32a59fc4a30602ee1290f75cc93c8ad38ab0de17a7f30538a751b801dbaf079e3d514b9671e34e91742c4c9c953a8c9794505b571b7e80f0
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337
+DIST binutils-2.30-patches-1.tar.xz 13884 BLAKE2B 86d160144e4ae3213838ccd07d008a96f210dbe8d894f2043420bd0003f8e0611564f77dadf60780da61278bbac41130922703fef69ba8ac451bcae5d9c65cf4 SHA512 cf38328bac920c1159e73727a9bb46bd462fa60650c90ee8a3d6221d447c678fdd79c6886efc52e35897d535dd717c1dc363bcb3f201aacd15ace078694456da
+DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
new file mode 100644
index 00000000000..d0aeded72c5
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild
@@ -0,0 +1,392 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER          - the patchset version
+#                      Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#                    - Default: PV
+# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#                      for the patchsets
+#                      Default: dilfridge :)
+
+PATCH_VER=1
+
+case ${PV} in
+	9999)
+		BVER="git"
+		EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+		inherit git-r3
+		S=${WORKDIR}/binutils
+		EGIT_CHECKOUT_DIR=${S}
+		;;
+	*)
+		BVER=${PV}
+		SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz"
+		;;
+esac
+SLOT="${BVER}"
+#KEYWORDS="-* ~hppa"
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
+PATCH_DEV=${PATCH_DEV:-dilfridge}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+	https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY} == cross-* ]] ; then
+		export CTARGET=${CATEGORY#cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+	>=sys-devel/binutils-config-3
+	sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+	doc? ( sys-apps/texinfo )
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )
+	sys-devel/flex
+	virtual/yacc
+"
+if is_cross ; then
+	# The build assumes the host has libiberty and such when cross-compiling
+	# its build tools.  We should probably make binutils itself build a local
+	# copy to use, but until then, be lazy.
+	DEPEND+=" >=sys-libs/binutils-libs-${PV}"
+fi
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+	case ${PV} in
+		9999)
+			git-r3_src_unpack;
+			;;
+		*)
+			default
+			;;
+	esac
+	mkdir -p "${MY_BUILDDIR}"
+}
+
+src_prepare() {
+	if [[ ! -z ${PATCH_VER} ]] ; then
+		einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+		eapply "${WORKDIR}/patch"/*.patch
+	fi
+
+	# This check should probably go somewhere else, like pkg_pretend.
+	if [[ ${CTARGET} == *-uclibc* ]] ; then
+		if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
+			die "sorry, but this binutils doesn't yet support uClibc :("
+		fi
+	fi
+
+	# Make sure our explicit libdir paths don't get clobbered. #562460
+	sed -i \
+		-e 's:@bfdlibdir@:@libdir@:g' \
+		-e 's:@bfdincludedir@:@includedir@:g' \
+		{bfd,opcodes}/Makefile.in || die
+
+	# Fix locale issues if possible #122216
+	if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+		einfo "Fixing misc issues in configure files"
+		for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+			ebegin "  Updating ${f/${S}\/}"
+			patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+				|| eerror "Please file a bug about this"
+			eend $?
+		done
+	fi
+
+	# Fix conflicts with newer glibc #272594
+	if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+		sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
+	fi
+
+	# Apply things from PATCHES and user dirs
+	default
+
+	# Run misc portage update scripts
+	gnuconfig_update
+	elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+	printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+	printf "Gentoo ${BVER}"
+	[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+	# Setup some paths
+	LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
+	INCPATH=${LIBPATH}/include
+	DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
+	if is_cross ; then
+		BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
+	else
+		BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
+	fi
+
+	# Make sure we filter $LINGUAS so that only ones that
+	# actually work make it through #42033
+	strip-linguas -u */po
+
+	# Keep things sane
+	strip-flags
+
+	local x
+	echo
+	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+		einfo "$(printf '%10s' ${x}:) ${!x}"
+	done
+	echo
+
+	cd "${MY_BUILDDIR}"
+	local myconf=()
+
+	# enable gold (installed as ld.gold) and ld's plugin architecture
+	if use cxx ; then
+		myconf+=( --enable-gold )
+		myconf+=( --enable-plugins )
+	fi
+
+	if use nls ; then
+		myconf+=( --without-included-gettext )
+	else
+		myconf+=( --disable-nls )
+	fi
+
+	myconf+=( --with-system-zlib )
+
+	# For bi-arch systems, enable a 64bit bfd.  This matches
+	# the bi-arch logic in toolchain.eclass. #446946
+	# We used to do it for everyone, but it's slow on 32bit arches. #438522
+	case $(tc-arch) in
+		ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+	esac
+
+	use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+	[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+	is_cross && myconf+=(
+		--with-sysroot="${EPREFIX}"/usr/${CTARGET}
+		--enable-poison-system-directories
+	)
+
+	# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+	# on everyone in alpha (for now), we'll just enable it when possible
+	has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+	has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+	# mips can't do hash-style=gnu ...
+	if [[ $(tc-arch) != mips ]] ; then
+		myconf+=( --enable-default-hash-style=gnu )
+	fi
+
+	myconf+=(
+		--prefix="${EPREFIX}"/usr
+		--host=${CHOST}
+		--target=${CTARGET}
+		--datadir="${EPREFIX}"${DATAPATH}
+		--datarootdir="${EPREFIX}"${DATAPATH}
+		--infodir="${EPREFIX}"${DATAPATH}/info
+		--mandir="${EPREFIX}"${DATAPATH}/man
+		--bindir="${EPREFIX}"${BINPATH}
+		--libdir="${EPREFIX}"${LIBPATH}
+		--libexecdir="${EPREFIX}"${LIBPATH}
+		--includedir="${EPREFIX}"${INCPATH}
+		--enable-obsolete
+		--enable-shared
+		--enable-threads
+		# Newer versions (>=2.27) offer a configure flag now.
+		--enable-relro
+		# Newer versions (>=2.24) make this an explicit option. #497268
+		--enable-install-libiberty
+		--disable-werror
+		--with-bugurl="$(toolchain-binutils_bugurl)"
+		--with-pkgversion="$(toolchain-binutils_pkgversion)"
+		$(use_enable static-libs static)
+		${EXTRA_ECONF}
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{gdb,libdecnumber,readline,sim}
+		# Strip out broken static link flags.
+		# https://gcc.gnu.org/PR56750
+		--without-stage1-ldflags
+	)
+	echo ./configure "${myconf[@]}"
+	"${S}"/configure "${myconf[@]}" || die
+
+	# Prevent makeinfo from running if doc is unset.
+	if ! use doc ; then
+		sed -i \
+			-e '/^MAKEINFO/s:=.*:= true:' \
+			Makefile || die
+	fi
+}
+
+src_compile() {
+	cd "${MY_BUILDDIR}"
+	emake all
+
+	# only build info pages if the user wants them
+	if use doc ; then
+		emake info
+	fi
+
+	# we nuke the manpages when we're left with junk
+	# (like when we bootstrap, no perl -> no manpages)
+	find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+	cd "${MY_BUILDDIR}"
+	emake -k check
+}
+
+src_install() {
+	local x d
+
+	cd "${MY_BUILDDIR}"
+	emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+	rm -rf "${ED}"/${LIBPATH}/bin
+	use static-libs || find "${ED}" -name '*.la' -delete
+
+	# Newer versions of binutils get fancy with ${LIBPATH} #171905
+	cd "${ED}"/${LIBPATH}
+	for d in ../* ; do
+		[[ ${d} == ../${BVER} ]] && continue
+		mv ${d}/* . || die
+		rmdir ${d} || die
+	done
+
+	# Now we collect everything intp the proper SLOT-ed dirs
+	# When something is built to cross-compile, it installs into
+	# /usr/$CHOST/ by default ... we have to 'fix' that :)
+	if is_cross ; then
+		cd "${ED}"/${BINPATH}
+		for x in * ; do
+			mv ${x} ${x/${CTARGET}-}
+		done
+
+		if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+			mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+			rm -r "${ED}"/usr/${CHOST}/{include,lib}
+		fi
+	fi
+	insinto ${INCPATH}
+	local libiberty_headers=(
+		# Not all the libiberty headers.  See libiberty/Makefile.in:install_to_libdir.
+		demangle.h
+		dyn-string.h
+		fibheap.h
+		hashtab.h
+		libiberty.h
+		objalloc.h
+		splay-tree.h
+	)
+	doins "${libiberty_headers[@]/#/${S}/include/}" || die
+	if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+		mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+		rm -r "${ED}"/${LIBPATH}/lib
+	fi
+
+	# Generate an env.d entry for this binutils
+	insinto /etc/env.d/binutils
+	cat <<-EOF > "${T}"/env.d
+		TARGET="${CTARGET}"
+		VER="${BVER}"
+		LIBPATH="${EPREFIX}${LIBPATH}"
+	EOF
+	newins "${T}"/env.d ${CTARGET}-${BVER}
+
+	# Handle documentation
+	if ! is_cross ; then
+		cd "${S}"
+		dodoc README
+		docinto bfd
+		dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+		docinto binutils
+		dodoc binutils/ChangeLog binutils/NEWS binutils/README
+		docinto gas
+		dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+		docinto gprof
+		dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+		docinto ld
+		dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+		docinto libiberty
+		dodoc libiberty/ChangeLog* libiberty/README
+		docinto opcodes
+		dodoc opcodes/ChangeLog*
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+	# Trim all empty dirs
+	find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+	# the hppa64 hack; this should go into 9999 as a PN-conditional
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}
+
+pkg_postinst() {
+	# Make sure this ${CTARGET} has a binutils version selected
+	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+	binutils-config ${CTARGET}-${BVER}
+}
+
+pkg_postrm() {
+	local current_profile=$(binutils-config -c ${CTARGET})
+
+	# If no other versions exist, then uninstall for this
+	# target ... otherwise, switch to the newest version
+	# Note: only do this if this version is unmerged.  We
+	#       rerun binutils-config if this is a remerge, as
+	#       we want the mtimes on the symlinks updated (if
+	#       it is the same as the current selected profile)
+	if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
+		local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+		choice=${choice//$'\n'/ }
+		choice=${choice/* }
+		if [[ -z ${choice} ]] ; then
+			env -i ROOT="${ROOT}" binutils-config -u ${CTARGET}
+		else
+			binutils-config ${choice}
+		fi
+	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
+		binutils-config ${CTARGET}-${BVER}
+	fi
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2017-12-27 22:30 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2017-12-27 22:30 UTC (permalink / raw
  To: gentoo-commits

commit:     a8f3cd3895069b4aaeaf3633c8b717e842952953
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 27 22:30:09 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Dec 27 22:30:21 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8f3cd38

sys-devel/binutils-hppa64: stable 2.29.1-r1 for hppa, bug #627166

Package-Manager: Portage-2.3.19, Repoman-2.3.6
RepoMan-Options: --include-arches="hppa"

 sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild
index 1e3b4a3273a..bc227803a8d 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild
@@ -11,7 +11,7 @@ inherit toolchain-binutils
 
 DESCRIPTION="binutils package for building 64bit kernels on HPPA"
 
-KEYWORDS="-* ~hppa"
+KEYWORDS="-* hppa"
 
 # 66_all_binutils-2.22-warn-textrel.patch fails to apply with
 # patch-2.5.9, so require a version that for sure works


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2017-10-19 21:23 Andreas Hüttel
  0 siblings, 0 replies; 172+ messages in thread
From: Andreas Hüttel @ 2017-10-19 21:23 UTC (permalink / raw
  To: gentoo-commits

commit:     8cad1a3c2fafdb49ac127bd39a9fce36ddb9d791
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 19 21:22:53 2017 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Oct 19 21:23:34 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cad1a3c

sys-devel/binutils-hppa64: Also revbump here...

Package-Manager: Portage-2.3.11, Repoman-2.3.3

 sys-devel/binutils-hppa64/Manifest                 |  1 +
 .../binutils-hppa64-2.29.1-r1.ebuild               | 26 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 524972d5680..cad76acc0f0 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -21,5 +21,6 @@ DIST binutils-2.28.1-patches-1.0.tar.xz 19772 SHA256 50cfce6ef7f546dcdb983a8b632
 DIST binutils-2.28.1.tar.bz2 28120394 SHA256 6924999be62d4464458eb53c11f27277cfb63755df8c1cd47b8d15d02c1942ea SHA512 5ec5212497b0fa8324f6a0884c284cb71c01942bbd39356d1ae745a5c9d97274c10f9d9c723f4bef6f0217662dfcd0c36e4e955a7599b11217658dc7b97553eb WHIRLPOOL 5c616f719827e5da7db23e89c761323cd4828b4779e79c3983d3ea429bce57ed40219982c478237b4dd728b77bae0a6447d912d96490ed1f5fc279ba5fd73bc6
 DIST binutils-2.28.tar.bz2 26556365 SHA256 6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72 SHA512 ede2e4e59a800260eea8c14eafbaee94e30abadafd5c419a3370f9f62213cf027d6400a1d4970b6958bd4d220e675dcd483a708107016e7abd5c99d7392ba8fd WHIRLPOOL 7fb876668c4fd8b10641fb8d831e7d23723ccb9b1051650c76a3a99696d37d120ef969e3c1cc144b0ffd765ef8e8698fe553c39cc65d0b9499a87d4886d6419d
 DIST binutils-2.29-patches-1.0.tar.xz 7548 SHA256 8ce4d1ea1224a305c4e36529e02dba87306075638ba0415b69ceeccedc77cd6e SHA512 5375bfb1b796b7692cf2adfc41bd2ae2e6dc19ff497db5f6beb35a456981b3adb8552ef14f32382faf655aa40da86c2d44177a658ec71e1c0e228dc27a4f2e18 WHIRLPOOL 73d2b78ea18e3427442bcb24440f671c1d35c0b559bf2141f30052b2bb8d6a8a6e29994cac741e4e50071c716d761f32b36358487a176d67e8cd226dfaaeafc2
+DIST binutils-2.29.1-patches-2.tar.xz 18528 SHA256 e50774626a1860a91aef58815cee187dd3206a2612f6e6315dee0d8c39128316 SHA512 b60a3af9cd6a681f32a59fc4a30602ee1290f75cc93c8ad38ab0de17a7f30538a751b801dbaf079e3d514b9671e34e91742c4c9c953a8c9794505b571b7e80f0 WHIRLPOOL be24896a10f90701ad3056477f8fc0df25b16a05cae5eda466a05a93b96e47c5809641b8f3af3720d8e8dea521c4b27c66c5d716d8f9c8a54dfb7c3dc87839e3
 DIST binutils-2.29.1.tar.bz2 29123355 SHA256 1509dff41369fb70aed23682351b663b56db894034773e6dbf7d5d6071fc55cc SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592 WHIRLPOOL 55bf62434bb00b9a355f8d7138c97b6d984eed3a83d7eb37137cf3ab8efcc8e536415d68eba375ae0ab30743f5b3014a664f7d3c773ed55da40c8814691e04d8
 DIST binutils-2.29.tar.bz2 29073316 SHA256 29a29549869039aad75fdf507ac30366da5ad0b974fbff4a8e7148dbf4f40ebf SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337 WHIRLPOOL 62b3e9ff6f85f8f4a13b71361f5abc4081a70de560931dcaaece1daef04c6bc7d3e0085cbacff0abbb750c4779863d45bc0d8d17273965472992c6b61b5cab20

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild
new file mode 100644
index 00000000000..1e3b4a3273a
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+export CTARGET=hppa64-${CHOST#*-}
+
+PATCHVER="2"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+DESCRIPTION="binutils package for building 64bit kernels on HPPA"
+
+KEYWORDS="-* ~hppa"
+
+# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
+# patch-2.5.9, so require a version that for sure works
+DEPEND+=" >=sys-devel/patch-2.6.1"
+
+src_install() {
+	toolchain-binutils_src_install
+
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2017-09-25 23:18 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2017-09-25 23:18 UTC (permalink / raw
  To: gentoo-commits

commit:     de2ce41d168f7f86bf9e997c3f29a1bd85efec37
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 25 23:15:36 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Sep 25 23:18:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de2ce41d

sys-devel/binutils-hppa64: bump up to 2.29.1

Package-Manager: Portage-2.3.10, Repoman-2.3.3

 sys-devel/binutils-hppa64/Manifest                 |  1 +
 .../binutils-hppa64/binutils-hppa64-2.29.1.ebuild  | 27 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index c4936b8afd3..524972d5680 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -21,4 +21,5 @@ DIST binutils-2.28.1-patches-1.0.tar.xz 19772 SHA256 50cfce6ef7f546dcdb983a8b632
 DIST binutils-2.28.1.tar.bz2 28120394 SHA256 6924999be62d4464458eb53c11f27277cfb63755df8c1cd47b8d15d02c1942ea SHA512 5ec5212497b0fa8324f6a0884c284cb71c01942bbd39356d1ae745a5c9d97274c10f9d9c723f4bef6f0217662dfcd0c36e4e955a7599b11217658dc7b97553eb WHIRLPOOL 5c616f719827e5da7db23e89c761323cd4828b4779e79c3983d3ea429bce57ed40219982c478237b4dd728b77bae0a6447d912d96490ed1f5fc279ba5fd73bc6
 DIST binutils-2.28.tar.bz2 26556365 SHA256 6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72 SHA512 ede2e4e59a800260eea8c14eafbaee94e30abadafd5c419a3370f9f62213cf027d6400a1d4970b6958bd4d220e675dcd483a708107016e7abd5c99d7392ba8fd WHIRLPOOL 7fb876668c4fd8b10641fb8d831e7d23723ccb9b1051650c76a3a99696d37d120ef969e3c1cc144b0ffd765ef8e8698fe553c39cc65d0b9499a87d4886d6419d
 DIST binutils-2.29-patches-1.0.tar.xz 7548 SHA256 8ce4d1ea1224a305c4e36529e02dba87306075638ba0415b69ceeccedc77cd6e SHA512 5375bfb1b796b7692cf2adfc41bd2ae2e6dc19ff497db5f6beb35a456981b3adb8552ef14f32382faf655aa40da86c2d44177a658ec71e1c0e228dc27a4f2e18 WHIRLPOOL 73d2b78ea18e3427442bcb24440f671c1d35c0b559bf2141f30052b2bb8d6a8a6e29994cac741e4e50071c716d761f32b36358487a176d67e8cd226dfaaeafc2
+DIST binutils-2.29.1.tar.bz2 29123355 SHA256 1509dff41369fb70aed23682351b663b56db894034773e6dbf7d5d6071fc55cc SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592 WHIRLPOOL 55bf62434bb00b9a355f8d7138c97b6d984eed3a83d7eb37137cf3ab8efcc8e536415d68eba375ae0ab30743f5b3014a664f7d3c773ed55da40c8814691e04d8
 DIST binutils-2.29.tar.bz2 29073316 SHA256 29a29549869039aad75fdf507ac30366da5ad0b974fbff4a8e7148dbf4f40ebf SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337 WHIRLPOOL 62b3e9ff6f85f8f4a13b71361f5abc4081a70de560931dcaaece1daef04c6bc7d3e0085cbacff0abbb750c4779863d45bc0d8d17273965472992c6b61b5cab20

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1.ebuild
new file mode 100644
index 00000000000..46b29bfae89
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+export CTARGET=hppa64-${CHOST#*-}
+
+PATCHVER="1.0"
+PATCH_BINUTILS_VER="2.29"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+DESCRIPTION="binutils package for building 64bit kernels on HPPA"
+
+KEYWORDS="-* ~hppa"
+
+# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
+# patch-2.5.9, so require a version that for sure works
+DEPEND+=" >=sys-devel/patch-2.6.1"
+
+src_install() {
+	toolchain-binutils_src_install
+
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2017-09-16  9:47 Sergei Trofimovich
  0 siblings, 0 replies; 172+ messages in thread
From: Sergei Trofimovich @ 2017-09-16  9:47 UTC (permalink / raw
  To: gentoo-commits

commit:     9ff19832f4611fc723553de2171d38a6618a6358
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 16 09:46:51 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep 16 09:46:51 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ff19832

sys-devel/binutils-hppa64: restore keywords for 2.29

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild
index ed0a305a68d..0b42b8bf205 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild
@@ -11,7 +11,7 @@ inherit toolchain-binutils
 
 DESCRIPTION="binutils package for building 64bit kernels on HPPA"
 
-KEYWORDS="-*"
+KEYWORDS="-* ~hppa"
 
 # 66_all_binutils-2.22-warn-textrel.patch fails to apply with
 # patch-2.5.9, so require a version that for sure works


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2017-08-15  9:52 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2017-08-15  9:52 UTC (permalink / raw
  To: gentoo-commits

commit:     09ac994426d7443beacb890542e0ed8cb58b2ba1
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 15 09:51:14 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Aug 15 09:52:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09ac9944

sys-devel/binutils-hppa64: Version bump.

Package-Manager: Portage-2.3.7, Repoman-2.3.3

 sys-devel/binutils-hppa64/Manifest                 |  4 ++++
 .../binutils-hppa64/binutils-hppa64-2.28.1.ebuild  | 26 ++++++++++++++++++++++
 .../binutils-hppa64/binutils-hppa64-2.29.ebuild    | 26 ++++++++++++++++++++++
 3 files changed, 56 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 4fde3996b91..c4936b8afd3 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -17,4 +17,8 @@ DIST binutils-2.26.1.tar.bz2 25595243 SHA256 39c346c87aa4fb14b2f786560aec1d29411
 DIST binutils-2.27-patches-1.0.tar.xz 8852 SHA256 07be45786e1e56498aad2c52a43d4104ccd0ded3c6a84a930486bc418d7fa36d SHA512 489b5fff87886682d8e98eafa2f082e6dcf811d2a693b6c41d76bd1ac50815a6e7d26fb7c9e3811c2d8e0e1dc307557e6ffe46d1d0f7caeb581060cf14bda899 WHIRLPOOL cf73342292a6dd8450a420f62a6a28e1ae38eed2c0b62643619ac002f3e9233ba5a0df19deb862167e88bd2c4a7ef4e002fe4d76f971eba876014d145dc30171
 DIST binutils-2.27.tar.bz2 26099568 SHA256 369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 SHA512 cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb WHIRLPOOL d3204b4900529f697285fb1fe622ecc949c43f064e6b83a1cecb1ea8810a214842c729266c9a44537dc0a86d6d2b3ac100f54c721cc284e54f9d6feb90930d15
 DIST binutils-2.28-patches-1.1.tar.xz 14944 SHA256 a37c0cbbccdf7c7b85521f9ca429e6dd99da6a2103234fa1eaa27c34f3f1e489 SHA512 dc9e639b98ba8cc4a5a535cde116c721ef90182b339cbe802f84bed1c034e0a0bfd74b160f486bd1ef387561d967e539dbfc22e883a4cc1c44ae92b7219b9bdd WHIRLPOOL af81ec47375cd4eb2643c133755c4041a5f042d9a2fb131b58f2c35de436121d45a73f6a0061ff19241e71bf4ec167f26aa22bfead58ac34840bd787515505a0
+DIST binutils-2.28.1-patches-1.0.tar.xz 19772 SHA256 50cfce6ef7f546dcdb983a8b632507b5cdd51095e4acf1f15bfcd68027d438a4 SHA512 c2c7d22e1013e79040c4dcb4d70649e78a070976ba3a4bc2ceb4805827b9d93eea1805c85db4fcb6b31be5218c3d7b42a4990437a7c01dc01fd7e9dedb606828 WHIRLPOOL 2369fce643cc9b83724b486521621d744de0eaf3d95fdd34c7f1c785bc400f3ed31ae6105001870f33539664d84dd9caae854725e20007f136929d2ece755247
+DIST binutils-2.28.1.tar.bz2 28120394 SHA256 6924999be62d4464458eb53c11f27277cfb63755df8c1cd47b8d15d02c1942ea SHA512 5ec5212497b0fa8324f6a0884c284cb71c01942bbd39356d1ae745a5c9d97274c10f9d9c723f4bef6f0217662dfcd0c36e4e955a7599b11217658dc7b97553eb WHIRLPOOL 5c616f719827e5da7db23e89c761323cd4828b4779e79c3983d3ea429bce57ed40219982c478237b4dd728b77bae0a6447d912d96490ed1f5fc279ba5fd73bc6
 DIST binutils-2.28.tar.bz2 26556365 SHA256 6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72 SHA512 ede2e4e59a800260eea8c14eafbaee94e30abadafd5c419a3370f9f62213cf027d6400a1d4970b6958bd4d220e675dcd483a708107016e7abd5c99d7392ba8fd WHIRLPOOL 7fb876668c4fd8b10641fb8d831e7d23723ccb9b1051650c76a3a99696d37d120ef969e3c1cc144b0ffd765ef8e8698fe553c39cc65d0b9499a87d4886d6419d
+DIST binutils-2.29-patches-1.0.tar.xz 7548 SHA256 8ce4d1ea1224a305c4e36529e02dba87306075638ba0415b69ceeccedc77cd6e SHA512 5375bfb1b796b7692cf2adfc41bd2ae2e6dc19ff497db5f6beb35a456981b3adb8552ef14f32382faf655aa40da86c2d44177a658ec71e1c0e228dc27a4f2e18 WHIRLPOOL 73d2b78ea18e3427442bcb24440f671c1d35c0b559bf2141f30052b2bb8d6a8a6e29994cac741e4e50071c716d761f32b36358487a176d67e8cd226dfaaeafc2
+DIST binutils-2.29.tar.bz2 29073316 SHA256 29a29549869039aad75fdf507ac30366da5ad0b974fbff4a8e7148dbf4f40ebf SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337 WHIRLPOOL 62b3e9ff6f85f8f4a13b71361f5abc4081a70de560931dcaaece1daef04c6bc7d3e0085cbacff0abbb750c4779863d45bc0d8d17273965472992c6b61b5cab20

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.28.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.28.1.ebuild
new file mode 100644
index 00000000000..0b42b8bf205
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.28.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+export CTARGET=hppa64-${CHOST#*-}
+
+PATCHVER="1.0"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+DESCRIPTION="binutils package for building 64bit kernels on HPPA"
+
+KEYWORDS="-* ~hppa"
+
+# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
+# patch-2.5.9, so require a version that for sure works
+DEPEND+=" >=sys-devel/patch-2.6.1"
+
+src_install() {
+	toolchain-binutils_src_install
+
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild
new file mode 100644
index 00000000000..ed0a305a68d
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.29.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+export CTARGET=hppa64-${CHOST#*-}
+
+PATCHVER="1.0"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+DESCRIPTION="binutils package for building 64bit kernels on HPPA"
+
+KEYWORDS="-*"
+
+# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
+# patch-2.5.9, so require a version that for sure works
+DEPEND+=" >=sys-devel/patch-2.6.1"
+
+src_install() {
+	toolchain-binutils_src_install
+
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2017-06-07 14:33 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2017-06-07 14:33 UTC (permalink / raw
  To: gentoo-commits

commit:     128cf687bd97a50bf8da37683dc1fbad1c156eea
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  7 14:30:58 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Jun  7 14:33:02 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=128cf687

sys-devel/binutils-hppa64: Raise patch level.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 sys-devel/binutils-hppa64/Manifest                    | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index afc6e5e624b..4fde3996b91 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -16,5 +16,5 @@ DIST binutils-2.26.1-patches-1.0.tar.xz 11212 SHA256 e56e2a6b64b8abe2f4aed1a9b15
 DIST binutils-2.26.1.tar.bz2 25595243 SHA256 39c346c87aa4fb14b2f786560aec1d29411b6ec34dce3fe7309fe3dd56949fd8 SHA512 9d9165609fd3b0f20d616f9891fc8e2b466eb13e2bfce40125e12427f8f201d20e2b8322bb6cb2b45e8df812f0e8ac059149f8a1f69ba3ed9d86a35c6a540b67 WHIRLPOOL c33eecdf855dd17314c3b7bbb0060399148d4dba867eb038bfb7555010fd003ba8b5b86480e4df389e19bba7b1fd0b9264291e6af20be4ffd4ff504d2255d003
 DIST binutils-2.27-patches-1.0.tar.xz 8852 SHA256 07be45786e1e56498aad2c52a43d4104ccd0ded3c6a84a930486bc418d7fa36d SHA512 489b5fff87886682d8e98eafa2f082e6dcf811d2a693b6c41d76bd1ac50815a6e7d26fb7c9e3811c2d8e0e1dc307557e6ffe46d1d0f7caeb581060cf14bda899 WHIRLPOOL cf73342292a6dd8450a420f62a6a28e1ae38eed2c0b62643619ac002f3e9233ba5a0df19deb862167e88bd2c4a7ef4e002fe4d76f971eba876014d145dc30171
 DIST binutils-2.27.tar.bz2 26099568 SHA256 369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 SHA512 cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb WHIRLPOOL d3204b4900529f697285fb1fe622ecc949c43f064e6b83a1cecb1ea8810a214842c729266c9a44537dc0a86d6d2b3ac100f54c721cc284e54f9d6feb90930d15
-DIST binutils-2.28-patches-1.0.tar.xz 8860 SHA256 4349c2fb3a351b57cf9403b2a97e5f89a43d94af6d9666ede27dc5fdfcbaa12a SHA512 4dea18c47b393cb764981a5c5e41131f03ff1d48ad97d806a6d9e20353b34edd6818903dc7e9d386778e0d2df0a664f78272e60b83c10b818319e3978ff5391d WHIRLPOOL f742438e00bd5862f6501e5aac7ea93c64f5a7f493b880d0cfd0b79e6f357781b6e317cd87e3100038426708c24a8e2c077ed2ae46e54fcf0172509da5950c09
+DIST binutils-2.28-patches-1.1.tar.xz 14944 SHA256 a37c0cbbccdf7c7b85521f9ca429e6dd99da6a2103234fa1eaa27c34f3f1e489 SHA512 dc9e639b98ba8cc4a5a535cde116c721ef90182b339cbe802f84bed1c034e0a0bfd74b160f486bd1ef387561d967e539dbfc22e883a4cc1c44ae92b7219b9bdd WHIRLPOOL af81ec47375cd4eb2643c133755c4041a5f042d9a2fb131b58f2c35de436121d45a73f6a0061ff19241e71bf4ec167f26aa22bfead58ac34840bd787515505a0
 DIST binutils-2.28.tar.bz2 26556365 SHA256 6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72 SHA512 ede2e4e59a800260eea8c14eafbaee94e30abadafd5c419a3370f9f62213cf027d6400a1d4970b6958bd4d220e675dcd483a708107016e7abd5c99d7392ba8fd WHIRLPOOL 7fb876668c4fd8b10641fb8d831e7d23723ccb9b1051650c76a3a99696d37d120ef969e3c1cc144b0ffd765ef8e8698fe553c39cc65d0b9499a87d4886d6419d

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild
index 0b42b8bf205..6787e14a6c9 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild
@@ -5,7 +5,7 @@ EAPI="5"
 
 export CTARGET=hppa64-${CHOST#*-}
 
-PATCHVER="1.0"
+PATCHVER="1.1"
 ELF2FLT_VER=""
 inherit toolchain-binutils
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2017-04-18 12:36 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2017-04-18 12:36 UTC (permalink / raw
  To: gentoo-commits

commit:     801e6807b0ba1aa1344f8e36c4914ca2b134289c
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 18 07:15:55 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Apr 18 12:35:54 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=801e6807

sys-devel/binutils-hppa64: Stable for HPPA too.

Package-Manager: Portage-2.3.5, Repoman-2.3.2
RepoMan-Options: --ignore-arches

 sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild
index a3bd6fbb8af..5db0e861b19 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -11,7 +11,7 @@ inherit toolchain-binutils
 
 DESCRIPTION="binutils package for building 64bit kernels on HPPA"
 
-KEYWORDS="-* ~hppa"
+KEYWORDS="-* hppa"
 
 # 66_all_binutils-2.22-warn-textrel.patch fails to apply with
 # patch-2.5.9, so require a version that for sure works


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2017-03-05  0:54 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2017-03-05  0:54 UTC (permalink / raw
  To: gentoo-commits

commit:     4e24a27679829b0d14e6a04d8db97adf0f5ea335
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  5 00:54:18 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Mar  5 00:54:43 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e24a276

sys-devel/binutils-hppa64: Version bump.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 sys-devel/binutils-hppa64/Manifest                 |  2 ++
 .../binutils-hppa64/binutils-hppa64-2.28.ebuild    | 26 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 4c4701c9db1..afc6e5e624b 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -16,3 +16,5 @@ DIST binutils-2.26.1-patches-1.0.tar.xz 11212 SHA256 e56e2a6b64b8abe2f4aed1a9b15
 DIST binutils-2.26.1.tar.bz2 25595243 SHA256 39c346c87aa4fb14b2f786560aec1d29411b6ec34dce3fe7309fe3dd56949fd8 SHA512 9d9165609fd3b0f20d616f9891fc8e2b466eb13e2bfce40125e12427f8f201d20e2b8322bb6cb2b45e8df812f0e8ac059149f8a1f69ba3ed9d86a35c6a540b67 WHIRLPOOL c33eecdf855dd17314c3b7bbb0060399148d4dba867eb038bfb7555010fd003ba8b5b86480e4df389e19bba7b1fd0b9264291e6af20be4ffd4ff504d2255d003
 DIST binutils-2.27-patches-1.0.tar.xz 8852 SHA256 07be45786e1e56498aad2c52a43d4104ccd0ded3c6a84a930486bc418d7fa36d SHA512 489b5fff87886682d8e98eafa2f082e6dcf811d2a693b6c41d76bd1ac50815a6e7d26fb7c9e3811c2d8e0e1dc307557e6ffe46d1d0f7caeb581060cf14bda899 WHIRLPOOL cf73342292a6dd8450a420f62a6a28e1ae38eed2c0b62643619ac002f3e9233ba5a0df19deb862167e88bd2c4a7ef4e002fe4d76f971eba876014d145dc30171
 DIST binutils-2.27.tar.bz2 26099568 SHA256 369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 SHA512 cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb WHIRLPOOL d3204b4900529f697285fb1fe622ecc949c43f064e6b83a1cecb1ea8810a214842c729266c9a44537dc0a86d6d2b3ac100f54c721cc284e54f9d6feb90930d15
+DIST binutils-2.28-patches-1.0.tar.xz 8860 SHA256 4349c2fb3a351b57cf9403b2a97e5f89a43d94af6d9666ede27dc5fdfcbaa12a SHA512 4dea18c47b393cb764981a5c5e41131f03ff1d48ad97d806a6d9e20353b34edd6818903dc7e9d386778e0d2df0a664f78272e60b83c10b818319e3978ff5391d WHIRLPOOL f742438e00bd5862f6501e5aac7ea93c64f5a7f493b880d0cfd0b79e6f357781b6e317cd87e3100038426708c24a8e2c077ed2ae46e54fcf0172509da5950c09
+DIST binutils-2.28.tar.bz2 26556365 SHA256 6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72 SHA512 ede2e4e59a800260eea8c14eafbaee94e30abadafd5c419a3370f9f62213cf027d6400a1d4970b6958bd4d220e675dcd483a708107016e7abd5c99d7392ba8fd WHIRLPOOL 7fb876668c4fd8b10641fb8d831e7d23723ccb9b1051650c76a3a99696d37d120ef969e3c1cc144b0ffd765ef8e8698fe553c39cc65d0b9499a87d4886d6419d

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild
new file mode 100644
index 00000000000..0b42b8bf205
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.28.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+export CTARGET=hppa64-${CHOST#*-}
+
+PATCHVER="1.0"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+DESCRIPTION="binutils package for building 64bit kernels on HPPA"
+
+KEYWORDS="-* ~hppa"
+
+# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
+# patch-2.5.9, so require a version that for sure works
+DEPEND+=" >=sys-devel/patch-2.6.1"
+
+src_install() {
+	toolchain-binutils_src_install
+
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2016-11-19 12:49 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2016-11-19 12:49 UTC (permalink / raw
  To: gentoo-commits

commit:     c9d35add51dc7da383e9f5356638b95378392a96
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 19 12:49:21 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Nov 19 12:49:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9d35add

sys-devel/binutils-hppa64: Version bump.

Package-Manager: portage-2.3.2

 sys-devel/binutils-hppa64/Manifest                 |  2 ++
 .../binutils-hppa64/binutils-hppa64-2.27.ebuild    | 27 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 2dbe237..4c4701c 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -14,3 +14,5 @@ DIST binutils-2.25.1-patches-1.1.tar.xz 18724 SHA256 3d4c0ab2d45d3a952f60246fa5a
 DIST binutils-2.25.1.tar.bz2 24163561 SHA256 b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22 SHA512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d WHIRLPOOL daa804331ee880296c2fe29fd9b8a52cc695629d4bbe0b9889d96ffc54d330f00fac3f3cb12b3aaf6b7505521ef499c53760912cd7c9bb54f2d5e288224bd1eb
 DIST binutils-2.26.1-patches-1.0.tar.xz 11212 SHA256 e56e2a6b64b8abe2f4aed1a9b1517fc8cbb5fd661f40118d0163d93943870e77 SHA512 c520967659c66f05f7ad795bb0bc2522e139977ab3ae8cfd9ec0d093a412a7291d1cabaa6b429c618fcf7253458a6fbe5a7dc3f62e0ac9762667308067db075c WHIRLPOOL 027b6a864134e2690d309922009740338bbd927581c6657c640d3061447f308c2e27a8c06a9202ae3f4aac4bcbf9e28303b52f81745d4062bf5b8c638cd1a9b7
 DIST binutils-2.26.1.tar.bz2 25595243 SHA256 39c346c87aa4fb14b2f786560aec1d29411b6ec34dce3fe7309fe3dd56949fd8 SHA512 9d9165609fd3b0f20d616f9891fc8e2b466eb13e2bfce40125e12427f8f201d20e2b8322bb6cb2b45e8df812f0e8ac059149f8a1f69ba3ed9d86a35c6a540b67 WHIRLPOOL c33eecdf855dd17314c3b7bbb0060399148d4dba867eb038bfb7555010fd003ba8b5b86480e4df389e19bba7b1fd0b9264291e6af20be4ffd4ff504d2255d003
+DIST binutils-2.27-patches-1.0.tar.xz 8852 SHA256 07be45786e1e56498aad2c52a43d4104ccd0ded3c6a84a930486bc418d7fa36d SHA512 489b5fff87886682d8e98eafa2f082e6dcf811d2a693b6c41d76bd1ac50815a6e7d26fb7c9e3811c2d8e0e1dc307557e6ffe46d1d0f7caeb581060cf14bda899 WHIRLPOOL cf73342292a6dd8450a420f62a6a28e1ae38eed2c0b62643619ac002f3e9233ba5a0df19deb862167e88bd2c4a7ef4e002fe4d76f971eba876014d145dc30171
+DIST binutils-2.27.tar.bz2 26099568 SHA256 369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 SHA512 cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb WHIRLPOOL d3204b4900529f697285fb1fe622ecc949c43f064e6b83a1cecb1ea8810a214842c729266c9a44537dc0a86d6d2b3ac100f54c721cc284e54f9d6feb90930d15

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.27.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.27.ebuild
new file mode 100644
index 00000000..ffa35f5
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.27.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+export CTARGET=hppa64-${CHOST#*-}
+
+PATCHVER="1.0"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+DESCRIPTION="binutils package for building 64bit kernels on HPPA"
+
+KEYWORDS="-* ~hppa"
+
+# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
+# patch-2.5.9, so require a version that for sure works
+DEPEND+=" >=sys-devel/patch-2.6.1"
+
+src_install() {
+	toolchain-binutils_src_install
+
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2016-07-24 16:45 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2016-07-24 16:45 UTC (permalink / raw
  To: gentoo-commits

commit:     f2bac4295bd4e63bbd5650775e81b2689e603784
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 24 16:41:57 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jul 24 16:44:53 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2bac429

sys-devel/binutils-hppa64: Version bump.

Package-Manager: portage-2.3.0

 sys-devel/binutils-hppa64/Manifest                 |  2 ++
 .../binutils-hppa64/binutils-hppa64-2.26.1.ebuild  | 27 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 2079c9e..2a23193 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -16,3 +16,5 @@ DIST binutils-2.25-patches-1.2.tar.xz 16480 SHA256 c5a65aefaf561e592961d22cf88e5
 DIST binutils-2.25.1-patches-1.1.tar.xz 18724 SHA256 3d4c0ab2d45d3a952f60246fa5a4353f057c03110130b50e3b2103bd49c345fa SHA512 209c55bf26b51d8c513b40abd2d95f687159c4e964a6c732924f277d04c97323c427fe452c63d5ec6962dcd8892d6d5d807ba88826739425bce6812a31f573dd WHIRLPOOL 2b650af352183d2b58abaee955b223606d63bd5f22a73360e79af1d3b575c5ea385f90be92348ec850534d96f7b6632b1e494f314ec1655eedc26108e849aab7
 DIST binutils-2.25.1.tar.bz2 24163561 SHA256 b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22 SHA512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d WHIRLPOOL daa804331ee880296c2fe29fd9b8a52cc695629d4bbe0b9889d96ffc54d330f00fac3f3cb12b3aaf6b7505521ef499c53760912cd7c9bb54f2d5e288224bd1eb
 DIST binutils-2.25.tar.bz2 24049133 SHA256 22defc65cfa3ef2a3395faaea75d6331c6e62ea5dfacfed3e2ec17b08c882923 SHA512 49438970642f379978aba988e3d2e7b63dab6fd0b46d91f4100f083e87a84d242089daca58572245fe620457a77bbbe2d78588ff3fb79314e500d1a39bf96f30 WHIRLPOOL 92f963d6ffe7d2378726cb080e893f8c58c8b6de030e78da488d8c3fd157e064a90b62d9bd2f305707758aa016a9e48f0953425828a2a0432ddee8ffae89585f
+DIST binutils-2.26.1-patches-1.0.tar.xz 11212 SHA256 e56e2a6b64b8abe2f4aed1a9b1517fc8cbb5fd661f40118d0163d93943870e77 SHA512 c520967659c66f05f7ad795bb0bc2522e139977ab3ae8cfd9ec0d093a412a7291d1cabaa6b429c618fcf7253458a6fbe5a7dc3f62e0ac9762667308067db075c WHIRLPOOL 027b6a864134e2690d309922009740338bbd927581c6657c640d3061447f308c2e27a8c06a9202ae3f4aac4bcbf9e28303b52f81745d4062bf5b8c638cd1a9b7
+DIST binutils-2.26.1.tar.bz2 25595243 SHA256 39c346c87aa4fb14b2f786560aec1d29411b6ec34dce3fe7309fe3dd56949fd8 SHA512 9d9165609fd3b0f20d616f9891fc8e2b466eb13e2bfce40125e12427f8f201d20e2b8322bb6cb2b45e8df812f0e8ac059149f8a1f69ba3ed9d86a35c6a540b67 WHIRLPOOL c33eecdf855dd17314c3b7bbb0060399148d4dba867eb038bfb7555010fd003ba8b5b86480e4df389e19bba7b1fd0b9264291e6af20be4ffd4ff504d2255d003

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild
new file mode 100644
index 0000000..ffa35f5
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.26.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+export CTARGET=hppa64-${CHOST#*-}
+
+PATCHVER="1.0"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+DESCRIPTION="binutils package for building 64bit kernels on HPPA"
+
+KEYWORDS="-* ~hppa"
+
+# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
+# patch-2.5.9, so require a version that for sure works
+DEPEND+=" >=sys-devel/patch-2.6.1"
+
+src_install() {
+	toolchain-binutils_src_install
+
+	# tweak the default fake list a little bit
+	cd "${D}"/etc/env.d/binutils
+	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
+}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2016-07-24 16:45 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2016-07-24 16:45 UTC (permalink / raw
  To: gentoo-commits

commit:     56ba2e5a5fcd676512a419df26dc364ebb23626b
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 24 16:44:14 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jul 24 16:45:03 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56ba2e5a

sys-devel/binutils-hppa64: Old.

Package-Manager: portage-2.3.0

 sys-devel/binutils-hppa64/Manifest                 |  4 ----
 .../binutils-hppa64/binutils-hppa64-2.23.1.ebuild  | 27 ----------------------
 .../binutils-hppa64/binutils-hppa64-2.25.ebuild    | 27 ----------------------
 3 files changed, 58 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 2a23193..2dbe237 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -6,15 +6,11 @@ DIST binutils-2.21.1-patches-1.1.tar.bz2 9197 SHA256 2dcfdec5f18a5bf391a973b0802
 DIST binutils-2.21.1.tar.bz2 18997755 SHA256 cdecfa69f02aa7b05fbcdf678e33137151f361313b2f3e48aba925f64eabf654 SHA512 3f550f6833a41e9b17d1f515eea0de8dc14aefb7dd69c65b821aa1336aea4c3f55b4457a1781ab7b32bda049798fef3cf989148e4acb0fca8baca5af74766f31 WHIRLPOOL 1025ac3714f2406ee5afcda3f7a23f788a35e354b928f4b11c7448150a5613f793c2aa471f4612c5015e89d5abbb61522a7a0265286fcf2788fbf1194fb60201
 DIST binutils-2.22-patches-1.2.tar.bz2 19283 SHA256 441a490f515fd2c9a8103114b16baba65f88eb02c754ad57ec0e86f3286729c1 SHA512 02b8820eee2d1cc3d28f89100f0718f9a4c2821c176b6c47974d23b8f25124a7f6f500b4a42eda55c2846912e91c6577444fad114e0ec11f475dc52402d63136 WHIRLPOOL 3e8faf1aea87d129f4acb2d7fa8891adde296ff3e99b60123f1b4b111d96e82743ead3e57d7ed9e8bb660789c2e37ef0e3cbace61d5e636993e08260ebdcc959
 DIST binutils-2.22.tar.bz2 19973532 SHA256 6c7af8ed1c8cf9b4b9d6e6fe09a3e1d3d479fe63984ba8b9b26bf356b6313ca9 SHA512 ffe8ef263ef99183e8cc823fe8487ff7d0f7bf9a8efd2853b5f4636aca0023850d13de4eac7d77a5f69413d8a50e6f95bb14569be53df86c0bce38034525ab74 WHIRLPOOL 8bea2f2082600587649a5f9fffada9c6cf14f42ebddd1e6a4b4d7be25446d7ad76e1335cf8cefe30c812ced408c9dacb55d0033e4b0eaff83efbbfb5ea5f60dc
-DIST binutils-2.23.1-patches-1.0.tar.xz 13396 SHA256 6d2ac4f83588e57968ce0e8e4450effb5aa79d46b9025ed2779cf91c8f99ec01 SHA512 f8a708798d32f81aceb3291411f7ef461a4f5b91ff204519799f3051789b1cbcac79bc282819227cf8dee875f47b727c51aba6f3a2ac73f53b132430c0fe9bdd WHIRLPOOL fbbcf9040047d5411ef002dd4e8079b6555b4ef2c079534f19ea8d105b2d62a8fce98eaf9b217d733414d0ddde1ab64b55d0c16bd142375a28187febde0c76eb
-DIST binutils-2.23.1.tar.bz2 21455321 SHA256 2ab2e5b03e086d12c6295f831adad46b3e1410a3a234933a2e8fac66cb2e7a19 SHA512 effecc9e6ef943055815a83dea546f2fe5b5d4483dadeda5753aae239bd7095d4696239240613a051d18011ed2521ae75c48292f970ba82b02e97bc72b0fa51f WHIRLPOOL 48f99ba30f0f7085cd7d889b727ba615be3aceb9da6a836d676eecee65c16e36257110d84bfe82a739064741b6b5279f97e43c93a08ca90896a10474b4ea65e8
 DIST binutils-2.23.2-patches-1.0.tar.xz 10884 SHA256 47df1338ee285548630dabb6e414cd7ffffaf068a56ea22a185608fcbd091703 SHA512 25d52694e653dd2642eb643ef3bd48a099876515d66b0b1ed8dfa5f60cadaa1bb92a589e370528ec52add7571c0ea1a98859bfde0821c73ec0ded492fff0915c WHIRLPOOL 2aba579641a1b8e701b25c9d0094c9991e151ddd0b02fae7273ca8c9e31fd344cbf3782c5a5f9960a9bee16b41bc898c8ad0ec76ba8ee396d28e878dac47ffc7
 DIST binutils-2.23.2.tar.bz2 21440347 SHA256 fe914e56fed7a9ec2eb45274b1f2e14b0d8b4f41906a5194eac6883cfe5c1097 SHA512 dec753bbba008f1526b89cf1bd85feba78f362f5333ffdf93953fd131eb755976dec82a0a4ba38c43d2434da007137780cfe674de5414be5cf7ce7fbc6af6d16 WHIRLPOOL 1be65f03569d599899c5b57ac7aedbf90b311f9a47c1883dc62c0717b0757ebfb33e17ab3def8d0b805daabba67cf554463f88675c9f552a6fd8dbe7ca77b442
 DIST binutils-2.24-patches-1.4.tar.xz 17488 SHA256 f018f140a52cddb1e4619b5caf4b4a37a27dfb29e8bf29ea5161ab13b33eed13 SHA512 dfd7c38cd978b7d6627579c338bf67641c799ce39936e3475dca3ecf5bade417e3f090253a2326582c64d5743a24f9078794f44e8fd41b6af728f1f375c91d3b WHIRLPOOL d6b414d5e5607fd8b2d0f52b508763110448cfbdcc08be6d7c1412043797bde8ed5fbd9a5ea4c141b7394b2cae0ac2ef24827f67813231129a507f49cbc40245
 DIST binutils-2.24.tar.bz2 22716802 SHA256 e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137 SHA512 5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12 WHIRLPOOL 619634dfdc73b8f6e9933b4642f5f9faf147c388a6d39283cd7639d83f3d7a601981cf49a787c43c17a942c563f24dc8dcc682138b5d3102a5650e1b9d15bd50
-DIST binutils-2.25-patches-1.2.tar.xz 16480 SHA256 c5a65aefaf561e592961d22cf88e57dd304a73d3643581414b5a7c14667eef30 SHA512 5a8072c57ce393a50de8770885d6740b8835d656e357a12caf67c4ffbfce228f9a53ea0861199a1a08e2ca724702d0e013f3a9787b15de21178e99263fc43292 WHIRLPOOL 691cf14bfb2c1bb144db29917dea791c18eeb192f61325ef3265fed6c4ad870e23485c3505f74a688158bf862d6539aa5f036400dcf14b9c05a09327ab871133
 DIST binutils-2.25.1-patches-1.1.tar.xz 18724 SHA256 3d4c0ab2d45d3a952f60246fa5a4353f057c03110130b50e3b2103bd49c345fa SHA512 209c55bf26b51d8c513b40abd2d95f687159c4e964a6c732924f277d04c97323c427fe452c63d5ec6962dcd8892d6d5d807ba88826739425bce6812a31f573dd WHIRLPOOL 2b650af352183d2b58abaee955b223606d63bd5f22a73360e79af1d3b575c5ea385f90be92348ec850534d96f7b6632b1e494f314ec1655eedc26108e849aab7
 DIST binutils-2.25.1.tar.bz2 24163561 SHA256 b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22 SHA512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d WHIRLPOOL daa804331ee880296c2fe29fd9b8a52cc695629d4bbe0b9889d96ffc54d330f00fac3f3cb12b3aaf6b7505521ef499c53760912cd7c9bb54f2d5e288224bd1eb
-DIST binutils-2.25.tar.bz2 24049133 SHA256 22defc65cfa3ef2a3395faaea75d6331c6e62ea5dfacfed3e2ec17b08c882923 SHA512 49438970642f379978aba988e3d2e7b63dab6fd0b46d91f4100f083e87a84d242089daca58572245fe620457a77bbbe2d78588ff3fb79314e500d1a39bf96f30 WHIRLPOOL 92f963d6ffe7d2378726cb080e893f8c58c8b6de030e78da488d8c3fd157e064a90b62d9bd2f305707758aa016a9e48f0953425828a2a0432ddee8ffae89585f
 DIST binutils-2.26.1-patches-1.0.tar.xz 11212 SHA256 e56e2a6b64b8abe2f4aed1a9b1517fc8cbb5fd661f40118d0163d93943870e77 SHA512 c520967659c66f05f7ad795bb0bc2522e139977ab3ae8cfd9ec0d093a412a7291d1cabaa6b429c618fcf7253458a6fbe5a7dc3f62e0ac9762667308067db075c WHIRLPOOL 027b6a864134e2690d309922009740338bbd927581c6657c640d3061447f308c2e27a8c06a9202ae3f4aac4bcbf9e28303b52f81745d4062bf5b8c638cd1a9b7
 DIST binutils-2.26.1.tar.bz2 25595243 SHA256 39c346c87aa4fb14b2f786560aec1d29411b6ec34dce3fe7309fe3dd56949fd8 SHA512 9d9165609fd3b0f20d616f9891fc8e2b466eb13e2bfce40125e12427f8f201d20e2b8322bb6cb2b45e8df812f0e8ac059149f8a1f69ba3ed9d86a35c6a540b67 WHIRLPOOL c33eecdf855dd17314c3b7bbb0060399148d4dba867eb038bfb7555010fd003ba8b5b86480e4df389e19bba7b1fd0b9264291e6af20be4ffd4ff504d2255d003

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.23.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.23.1.ebuild
deleted file mode 100644
index e017c53..0000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.23.1.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.0"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.25.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.25.ebuild
deleted file mode 100644
index c3edacf..0000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.25.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-export CTARGET=hppa64-${CHOST#*-}
-
-PATCHVER="1.2"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-DESCRIPTION="binutils package for building 64bit kernels on HPPA"
-
-KEYWORDS="-* ~hppa"
-
-# 66_all_binutils-2.22-warn-textrel.patch fails to apply with
-# patch-2.5.9, so require a version that for sure works
-DEPEND+=" >=sys-devel/patch-2.6.1"
-
-src_install() {
-	toolchain-binutils_src_install
-
-	# tweak the default fake list a little bit
-	cd "${D}"/etc/env.d/binutils
-	sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die
-}


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2015-09-30  3:50 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2015-09-30  3:50 UTC (permalink / raw
  To: gentoo-commits

commit:     4c78ba815c05a52f9e2f720556b5d3f7dcf725ee
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 30 03:47:09 2015 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Sep 30 03:47:09 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c78ba81

sys-devel/binutils-hppa64: Bump PATCHVER.

Package-Manager: portage-2.2.20.1

 sys-devel/binutils-hppa64/Manifest                      | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 2f926d7..2079c9e 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -13,6 +13,6 @@ DIST binutils-2.23.2.tar.bz2 21440347 SHA256 fe914e56fed7a9ec2eb45274b1f2e14b0d8
 DIST binutils-2.24-patches-1.4.tar.xz 17488 SHA256 f018f140a52cddb1e4619b5caf4b4a37a27dfb29e8bf29ea5161ab13b33eed13 SHA512 dfd7c38cd978b7d6627579c338bf67641c799ce39936e3475dca3ecf5bade417e3f090253a2326582c64d5743a24f9078794f44e8fd41b6af728f1f375c91d3b WHIRLPOOL d6b414d5e5607fd8b2d0f52b508763110448cfbdcc08be6d7c1412043797bde8ed5fbd9a5ea4c141b7394b2cae0ac2ef24827f67813231129a507f49cbc40245
 DIST binutils-2.24.tar.bz2 22716802 SHA256 e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137 SHA512 5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12 WHIRLPOOL 619634dfdc73b8f6e9933b4642f5f9faf147c388a6d39283cd7639d83f3d7a601981cf49a787c43c17a942c563f24dc8dcc682138b5d3102a5650e1b9d15bd50
 DIST binutils-2.25-patches-1.2.tar.xz 16480 SHA256 c5a65aefaf561e592961d22cf88e57dd304a73d3643581414b5a7c14667eef30 SHA512 5a8072c57ce393a50de8770885d6740b8835d656e357a12caf67c4ffbfce228f9a53ea0861199a1a08e2ca724702d0e013f3a9787b15de21178e99263fc43292 WHIRLPOOL 691cf14bfb2c1bb144db29917dea791c18eeb192f61325ef3265fed6c4ad870e23485c3505f74a688158bf862d6539aa5f036400dcf14b9c05a09327ab871133
-DIST binutils-2.25.1-patches-1.0.tar.xz 16472 SHA256 51ae9e098d7cfd0ae6db4971939062d4051077b1d743263f2d4c621591303e14 SHA512 1743969d531d18e5d458a165f1b05b3c3253b062a8908b722e11ed82144598eef0983d8e1bb4f132ad80b534a0d6b37cc2ffa0575e1ec303219d1e43d5f30f26 WHIRLPOOL 1afcde32383213cce48116dc5161da535372d9104acfb9b3b893859f58800d0833dc3d041492250e4ec9d981a98c2af4fa9f07aba3ca1f1770d334199bf34855
+DIST binutils-2.25.1-patches-1.1.tar.xz 18724 SHA256 3d4c0ab2d45d3a952f60246fa5a4353f057c03110130b50e3b2103bd49c345fa SHA512 209c55bf26b51d8c513b40abd2d95f687159c4e964a6c732924f277d04c97323c427fe452c63d5ec6962dcd8892d6d5d807ba88826739425bce6812a31f573dd WHIRLPOOL 2b650af352183d2b58abaee955b223606d63bd5f22a73360e79af1d3b575c5ea385f90be92348ec850534d96f7b6632b1e494f314ec1655eedc26108e849aab7
 DIST binutils-2.25.1.tar.bz2 24163561 SHA256 b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22 SHA512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d WHIRLPOOL daa804331ee880296c2fe29fd9b8a52cc695629d4bbe0b9889d96ffc54d330f00fac3f3cb12b3aaf6b7505521ef499c53760912cd7c9bb54f2d5e288224bd1eb
 DIST binutils-2.25.tar.bz2 24049133 SHA256 22defc65cfa3ef2a3395faaea75d6331c6e62ea5dfacfed3e2ec17b08c882923 SHA512 49438970642f379978aba988e3d2e7b63dab6fd0b46d91f4100f083e87a84d242089daca58572245fe620457a77bbbe2d78588ff3fb79314e500d1a39bf96f30 WHIRLPOOL 92f963d6ffe7d2378726cb080e893f8c58c8b6de030e78da488d8c3fd157e064a90b62d9bd2f305707758aa016a9e48f0953425828a2a0432ddee8ffae89585f

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild
index 8151a91..0345e3f 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild
@@ -6,7 +6,7 @@ EAPI="4"
 
 export CTARGET=hppa64-${CHOST#*-}
 
-PATCHVER="1.0"
+PATCHVER="1.1"
 ELF2FLT_VER=""
 inherit toolchain-binutils
 


^ permalink raw reply related	[flat|nested] 172+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/
@ 2015-09-30  3:41 Jeroen Roovers
  0 siblings, 0 replies; 172+ messages in thread
From: Jeroen Roovers @ 2015-09-30  3:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f34e5c550bc8c5463bb74d913627190a9889a583
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 30 03:40:48 2015 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Sep 30 03:40:48 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f34e5c55

sys-devel/binutils-hppa64: Stable for HPPA (bug #560792).

Package-Manager: portage-2.2.20.1
RepoMan-Options: --ignore-arches

 sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild
index a0420ac..8151a91 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.25.1.ebuild
@@ -12,7 +12,7 @@ inherit toolchain-binutils
 
 DESCRIPTION="binutils package for building 64bit kernels on HPPA"
 
-KEYWORDS="-* ~hppa"
+KEYWORDS="-* hppa"
 
 # 66_all_binutils-2.22-warn-textrel.patch fails to apply with
 # patch-2.5.9, so require a version that for sure works


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

end of thread, other threads:[~2024-11-09 17:35 UTC | newest]

Thread overview: 172+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-11 18:41 [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-hppa64/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2024-11-09 17:35 Andreas K. Hüttel
2024-11-09 17:35 Andreas K. Hüttel
2024-11-02  2:39 Sam James
2024-08-22 20:23 Andreas K. Hüttel
2024-08-05 10:26 Andreas K. Hüttel
2024-08-05  7:28 Andreas K. Hüttel
2024-06-29 23:09 Andreas K. Hüttel
2024-06-28 18:05 Sam James
2024-04-26 11:49 Andreas K. Hüttel
2024-03-23 16:02 Sam James
2024-03-08 19:59 Sam James
2024-03-08 19:54 Sam James
2024-02-18 14:33 Andreas K. Hüttel
2024-02-18 14:33 Andreas K. Hüttel
2024-02-16  0:22 Andreas K. Hüttel
2024-01-24 10:02 Andreas K. Hüttel
2024-01-08 12:03 Sam James
2024-01-08  9:48 Sam James
2024-01-07  8:28 Sam James
2024-01-07  8:27 Sam James
2023-12-17 12:20 Andreas K. Hüttel
2023-08-20 20:51 Andreas K. Hüttel
2023-08-08 16:31 Sam James
2023-08-08  5:22 Sam James
2023-08-08  2:23 Sam James
2023-08-04 11:06 Andreas K. Hüttel
2023-08-04  1:53 Sam James
2023-08-04  1:53 Sam James
2023-08-02 22:48 Andreas K. Hüttel
2023-07-30 10:26 Andreas K. Hüttel
2023-06-26 22:50 Andreas K. Hüttel
2023-05-06 12:20 Andreas K. Hüttel
2023-05-05 17:23 Andreas K. Hüttel
2023-04-29 15:44 Arthur Zamarin
2023-04-02 20:07 Andreas K. Hüttel
2023-04-02 16:52 Andreas K. Hüttel
2023-03-09  4:03 Andreas K. Hüttel
2023-02-22 22:26 Sam James
2023-02-09 10:45 Andreas K. Hüttel
2023-01-15  0:10 Andreas K. Hüttel
2022-12-31 15:40 Arthur Zamarin
2022-12-25 22:26 Ulrich Müller
2022-12-02 20:37 Andreas K. Hüttel
2022-11-20 16:14 Andreas K. Hüttel
2022-10-09 11:53 Andreas K. Hüttel
2022-10-04  3:09 Sam James
2022-09-16 20:29 Andreas K. Hüttel
2022-09-04  8:14 Andreas K. Hüttel
2022-08-27 18:07 Arthur Zamarin
2022-05-30  6:30 Sam James
2022-05-26  5:48 Sam James
2022-04-25  3:35 Sam James
2022-04-25  3:20 Sam James
2022-04-25  3:09 Sam James
2022-04-19 22:52 Sam James
2022-04-16 18:09 Andreas K. Hüttel
2022-03-19  9:49 Andreas K. Hüttel
2022-03-18 23:54 Andreas K. Hüttel
2022-03-18 23:54 Andreas K. Hüttel
2022-03-18 22:38 Andreas K. Hüttel
2022-03-18  6:43 Sam James
2022-02-10 13:11 Andreas K. Hüttel
2022-01-25 22:34 Andreas K. Hüttel
2022-01-24 14:30 Sam James
2022-01-22  3:06 Sam James
2022-01-01 20:08 David Seifert
2021-11-14 22:20 Andreas K. Hüttel
2021-09-21 17:44 Sam James
2021-09-18  4:51 Sam James
2021-09-15 22:40 Sam James
2021-08-20 15:02 Andreas K. Hüttel
2021-08-20 15:02 Andreas K. Hüttel
2021-08-17 21:42 Andreas K. Hüttel
2021-08-13 21:40 Andreas K. Hüttel
2021-07-31 10:03 Andreas K. Hüttel
2021-07-25 11:16 Andreas K. Hüttel
2021-07-24 22:54 Andreas K. Hüttel
2021-07-24 21:15 Andreas K. Hüttel
2021-07-20 21:52 Andreas K. Hüttel
2021-07-17 11:22 Sergei Trofimovich
2021-04-20 18:39 Andreas K. Hüttel
2021-04-20 17:06 Andreas K. Hüttel
2021-04-18  9:48 Andreas K. Hüttel
2021-04-18  9:48 Andreas K. Hüttel
2021-02-11 20:22 Sergei Trofimovich
2021-02-09 21:46 Andreas K. Hüttel
2021-02-09 21:46 Andreas K. Hüttel
2021-02-08 22:17 Andreas K. Hüttel
2021-02-08 21:21 Andreas K. Hüttel
2021-01-28 17:38 Sergei Trofimovich
2021-01-24 15:34 Andreas K. Hüttel
2021-01-23 19:28 Andreas K. Hüttel
2021-01-03 13:23 Sergei Trofimovich
2020-11-16 16:49 Andreas K. Hüttel
2020-11-03 22:47 Sergei Trofimovich
2020-10-30 21:45 Andreas K. Hüttel
2020-09-25 14:20 Andreas K. Hüttel
2020-09-25 14:20 Andreas K. Hüttel
2020-09-23  9:10 Andreas K. Hüttel
2020-09-17 20:08 Andreas K. Hüttel
2020-07-31 16:06 Andreas K. Hüttel
2020-07-25 17:57 Andreas K. Hüttel
2020-07-25 17:57 Andreas K. Hüttel
2020-05-19 19:57 Andreas K. Hüttel
2020-04-01 11:12 Jeroen Roovers
2020-03-10  0:05 Sergei Trofimovich
2020-03-09  7:56 Sergei Trofimovich
2020-02-13 21:40 David Seifert
2020-02-01 22:00 Sergei Trofimovich
2020-01-24 15:51 Sergei Trofimovich
2019-11-09 13:54 Sergei Trofimovich
2019-11-09 13:02 Sergei Trofimovich
2019-08-09 21:09 Andreas K. Hüttel
2019-07-22 21:24 Sergei Trofimovich
2019-06-23 16:40 Sergei Trofimovich
2019-06-06 14:27 Andreas K. Hüttel
2019-05-15  6:36 Sergei Trofimovich
2019-05-14  8:08 Sergei Trofimovich
2019-04-29 10:10 Jeroen Roovers
2019-04-26 12:45 Andreas K. Hüttel
2019-04-25 18:44 Andreas K. Hüttel
2019-04-24 21:02 Andreas K. Hüttel
2019-04-19 12:20 Andreas K. Hüttel
2019-04-18 21:38 Andreas K. Hüttel
2019-04-09 14:09 Andreas K. Hüttel
2019-04-06 14:35 Andreas K. Hüttel
2019-03-26 21:32 Andreas K. Hüttel
2019-02-17 21:21 Jeroen Roovers
2019-02-16 12:28 Sergei Trofimovich
2018-12-28 23:13 Andreas K. Hüttel
2018-12-28 23:13 Andreas K. Hüttel
2018-12-28 19:40 Sergei Trofimovich
2018-12-20 22:50 Andreas K. Hüttel
2018-12-19 12:36 Andreas K. Hüttel
2018-12-14 23:52 Andreas K. Hüttel
2018-12-09 13:58 Andreas K. Hüttel
2018-12-08 18:03 Andreas K. Hüttel
2018-12-08 18:03 Andreas K. Hüttel
2018-10-06 11:27 Sergei Trofimovich
2018-09-25  7:37 Sergei Trofimovich
2018-09-21  7:00 Sergei Trofimovich
2018-08-27 13:17 Sergei Trofimovich
2018-08-07  9:45 Andreas Hüttel
2018-08-04 18:24 Andreas Hüttel
2018-07-18 15:04 Andreas Hüttel
2018-07-15 12:59 Andreas Hüttel
2018-06-29 22:10 Sergei Trofimovich
2018-06-13 22:10 Andreas Hüttel
2018-06-12 21:06 Andreas Hüttel
2018-05-19 17:21 Andreas Hüttel
2018-05-12 18:44 Sergei Trofimovich
2018-05-01 20:24 Andreas Hüttel
2018-04-30 11:35 Andreas Hüttel
2018-04-30 11:35 Andreas Hüttel
2018-02-11 21:10 Jeroen Roovers
2018-02-11 17:55 Jeroen Roovers
2018-01-29 20:11 Andreas Hüttel
2018-01-28 14:23 Andreas Hüttel
2017-12-27 22:30 Sergei Trofimovich
2017-10-19 21:23 Andreas Hüttel
2017-09-25 23:18 Sergei Trofimovich
2017-09-16  9:47 Sergei Trofimovich
2017-08-15  9:52 Jeroen Roovers
2017-06-07 14:33 Jeroen Roovers
2017-04-18 12:36 Jeroen Roovers
2017-03-05  0:54 Jeroen Roovers
2016-11-19 12:49 Jeroen Roovers
2016-07-24 16:45 Jeroen Roovers
2016-07-24 16:45 Jeroen Roovers
2015-09-30  3:50 Jeroen Roovers
2015-09-30  3:41 Jeroen Roovers

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