* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2015-12-24 7:58 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2015-12-24 7:58 UTC (permalink / raw
To: gentoo-commits
commit: 168a940f019e3466b14871221c244efce9845b29
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 24 07:58:37 2015 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Dec 24 07:58:37 2015 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=168a940f
sys-devel/binutils: drop patches which don't apply, bug #568636
Package-Manager: portage-2.2.20-prefix
RepoMan-Options: --force
sys-devel/binutils/binutils-2.24.51.0.2.ebuild | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sys-devel/binutils/binutils-2.24.51.0.2.ebuild b/sys-devel/binutils/binutils-2.24.51.0.2.ebuild
index 7c740fa..029838a 100644
--- a/sys-devel/binutils/binutils-2.24.51.0.2.ebuild
+++ b/sys-devel/binutils/binutils-2.24.51.0.2.ebuild
@@ -10,9 +10,10 @@ inherit toolchain-binutils
src_unpack() {
toolchain-binutils_src_unpack
- cd "${S}"
- epatch "${FILESDIR}"/${PN}-2.22-mint.patch
- epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
+# bug #568636
+# cd "${S}"
+# epatch "${FILESDIR}"/${PN}-2.22-mint.patch
+# epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
}
src_compile() {
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2018-10-04 11:45 Michael Haubenwallner
0 siblings, 0 replies; 10+ messages in thread
From: Michael Haubenwallner @ 2018-10-04 11:45 UTC (permalink / raw
To: gentoo-commits
commit: 743a6c48a754a71890bfb723cd394ccbe2eb1f1c
Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 4 11:45:34 2018 +0000
Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 4 11:45:34 2018 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=743a6c48
sys-devel/binutils: sync
Package-Manager: Portage-2.3.40.3-prefix, Repoman-2.3.9
RepoMan-Options: --force
sys-devel/binutils/Manifest | 2 +
sys-devel/binutils/binutils-2.31.1-r1.ebuild | 449 +++++++++++++++++++++++++++
2 files changed, 451 insertions(+)
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index f5bc42ca16..8e9fc88f0c 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -4,3 +4,5 @@ DIST binutils-2.28.1-patches-1.0.tar.xz 19772 BLAKE2B 146b393b49ba868c7c064c5827
DIST binutils-2.28.1.tar.bz2 28120394 BLAKE2B 3a0ed2bcf0c859638546b7460d9e6f0a55518402ff0c65c90ce462a318f5ae6690961616d188ce6cf0271c9f2fb8b7902782d32cf0e711068c53d3d06956d89e SHA512 5ec5212497b0fa8324f6a0884c284cb71c01942bbd39356d1ae745a5c9d97274c10f9d9c723f4bef6f0217662dfcd0c36e4e955a7599b11217658dc7b97553eb
DIST binutils-2.29.1-patches-3.tar.xz 20904 BLAKE2B 5549cb2412123e4ad3a13935762cc0dca46215950dbf38a149caf4c6416da382a0fd7ecffe97b10bce4dfdcef5edc2673d49bb21e9d37be37e33b454a8c2bc1a SHA512 ba54efaf9e9f668d2922972acd2cdf5c3e6f174cfcc73d29953ab4ba6e157ce0cb500c583568a4e3baaaa92c9d30c394a327f29b51292acc66f8d3f20f5eae2a
DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
+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/binutils-2.31.1-r1.ebuild b/sys-devel/binutils/binutils-2.31.1-r1.ebuild
new file mode 100644
index 0000000000..ae9497d18b
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.31.1-r1.ebuild
@@ -0,0 +1,449 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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)
+ 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="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ ;;
+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
+"
+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
+
+# Additional patches to apply in default src_prepare
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.22-solaris-anonymous-version-script-fix.patch
+ "${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
+)
+
+pkg_setup() {
+ [[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to ${P}" # 609274
+}
+
+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=()
+
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ # PREFIX LOCAL: Linux only (fails to compile on Solaris, MiNT #353410)
+ [[ ${CHOST} == *-linux* ]] &&
+ 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
+
+ [[ ${CHOST} == *"-solaris"* ]] && use nls && append-libs -lintl
+
+ 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() {
+ local makeargs=()
+ if has noinfo "${FEATURES}" \
+ || ! type -p makeinfo >/dev/null
+ then
+ # binutils >= 2.17 (accidentally?) requires 'makeinfo'
+ makeargs+=("MAKEINFO=true")
+ fi
+
+ cd "${MY_BUILDDIR}"
+ # see Note [tooldir hack for ldscripts]
+ emake tooldir="${EPREFIX}${TOOLPATH}" all "${makeargs[@]}"
+
+ # 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}"
+ # 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
+}
+
+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
+ env -i ROOT="${ROOT}" 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] 10+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2019-05-02 11:09 Michael Haubenwallner
0 siblings, 0 replies; 10+ messages in thread
From: Michael Haubenwallner @ 2019-05-02 11:09 UTC (permalink / raw
To: gentoo-commits
commit: 8259df57a50a6e2122f50dc3d0918c14288e7ff0
Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Thu May 2 10:55:20 2019 +0000
Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Thu May 2 11:09:19 2019 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=8259df57
sys-devel/binutils: sync
gold+cxx are p.use.masked in profile now except for linux,
not sure if plugins are linux only as well.
Package-Manager: Portage-2.3.62-prefix, Repoman-2.3.12
RepoMan-Options: --force
Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>
sys-devel/binutils/Manifest | 2 +
sys-devel/binutils/binutils-2.32-r1.ebuild | 449 +++++++++++++++++++++++++++++
sys-devel/binutils/metadata.xml | 23 +-
3 files changed, 464 insertions(+), 10 deletions(-)
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 8e9fc88f0c..f0b01a4653 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -6,3 +6,5 @@ DIST binutils-2.29.1-patches-3.tar.xz 20904 BLAKE2B 5549cb2412123e4ad3a13935762c
DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
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
+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/binutils-2.32-r1.ebuild b/sys-devel/binutils/binutils-2.32-r1.ebuild
new file mode 100644
index 0000000000..9ec2e77afe
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.32-r1.ebuild
@@ -0,0 +1,449 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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: dilfridge :)
+
+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="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ ;;
+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
+
+# Additional patches to apply in default src_prepare
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.22-solaris-anonymous-version-script-fix.patch
+ "${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
+)
+
+pkg_setup() {
+ [[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to ${P}" # 609274
+}
+
+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 )
+ [[ ${CHOST} == *"-solaris"* ]] && append-libs -lintl
+ 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
+
+ # enable verbose test run and result logging
+ emake -k check RUNTESTFLAGS='-a -v' VERBOSE=1
+}
+
+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
+}
+
+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
+ env -i ROOT="${ROOT}" 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/metadata.xml b/sys-devel/binutils/metadata.xml
index 3b4e0782a8..66f4f23df4 100644
--- a/sys-devel/binutils/metadata.xml
+++ b/sys-devel/binutils/metadata.xml
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
-<email>toolchain@gentoo.org</email>
-<name>Gentoo Toolchain Project</name>
-</maintainer>
-<use>
-<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>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
+ </maintainer>
+ <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>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
+ </upstream>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2020-03-13 8:45 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2020-03-13 8:45 UTC (permalink / raw
To: gentoo-commits
commit: cc05839872855cb94a610301445798a82ea2fdbc
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 13 08:45:31 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Mar 13 08:45:31 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=cc058398
sys-devel/binutils: cleanup and avoid toolchain-binutils usage
Package-Manager: Portage-2.3.84-prefix, Repoman-2.3.20
RepoMan-Options: --force
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
sys-devel/binutils/Manifest | 7 +-
sys-devel/binutils/binutils-2.27.ebuild | 30 --
sys-devel/binutils/binutils-2.28.1.ebuild | 31 --
sys-devel/binutils/binutils-2.29.1-r1.ebuild | 424 ++++++++++++++++++++++++++-
4 files changed, 419 insertions(+), 73 deletions(-)
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index f0b01a4653..997200674d 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,9 +1,4 @@
-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.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.29.1-patches-3.tar.xz 20904 BLAKE2B 5549cb2412123e4ad3a13935762cc0dca46215950dbf38a149caf4c6416da382a0fd7ecffe97b10bce4dfdcef5edc2673d49bb21e9d37be37e33b454a8c2bc1a SHA512 ba54efaf9e9f668d2922972acd2cdf5c3e6f174cfcc73d29953ab4ba6e157ce0cb500c583568a4e3baaaa92c9d30c394a327f29b51292acc66f8d3f20f5eae2a
-DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
+DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5 SHA512 d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
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
DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
diff --git a/sys-devel/binutils/binutils-2.27.ebuild b/sys-devel/binutils/binutils-2.27.ebuild
deleted file mode 100644
index 3aa9270a38..0000000000
--- a/sys-devel/binutils/binutils-2.27.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCHVER="1.0"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-PATCHES=(
-# "${FILESDIR}"/${PN}-2.22-mint.patch
-# "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
- "${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
-)
-pkg_setup() {
- [[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to ${P}" # 609274
-}
-
-src_compile() {
- if has noinfo "${FEATURES}" \
- || ! type -p makeinfo >/dev/null
- then
- # binutils >= 2.17 (accidentally?) requires 'makeinfo'
- export EXTRA_EMAKE="MAKEINFO=true"
- fi
-
- toolchain-binutils_src_compile
-}
diff --git a/sys-devel/binutils/binutils-2.28.1.ebuild b/sys-devel/binutils/binutils-2.28.1.ebuild
deleted file mode 100644
index bf51c569c2..0000000000
--- a/sys-devel/binutils/binutils-2.28.1.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCHVER="1.0"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.22-solaris-anonymous-version-script-fix.patch
-# "${FILESDIR}"/${PN}-2.22-mint.patch
-# "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
- "${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
-)
-pkg_setup() {
- [[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to ${P}" # 609274
-}
-
-src_compile() {
- if has noinfo "${FEATURES}" \
- || ! type -p makeinfo >/dev/null
- then
- # binutils >= 2.17 (accidentally?) requires 'makeinfo'
- export EXTRA_EMAKE="MAKEINFO=true"
- fi
-
- toolchain-binutils_src_compile
-}
diff --git a/sys-devel/binutils/binutils-2.29.1-r1.ebuild b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
index e799d64aad..733976fc38 100644
--- a/sys-devel/binutils/binutils-2.29.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
@@ -1,13 +1,86 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
+# NOTE: currently latest version on Solaris that works
+
+EAPI=6
+
+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"
PATCHVER="3"
ELF2FLT_VER=""
-inherit toolchain-binutils
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+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="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ ;;
+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
+"
+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
PATCHES=(
"${FILESDIR}/${P}-nogoldtest.patch"
@@ -19,13 +92,352 @@ pkg_setup() {
[[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to ${P}" # 609274
}
+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=()
+
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ # PREFIX LOCAL: Linux only (fails to compile on Solaris, MiNT #353410)
+ [[ ${CHOST} == *-linux* ]] &&
+ 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
+
+ [[ ${CHOST} == *"-solaris"* ]] && use nls && append-libs -lintl
+
+ 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() {
+ local makeargs=()
if has noinfo "${FEATURES}" \
|| ! type -p makeinfo >/dev/null
then
# binutils >= 2.17 (accidentally?) requires 'makeinfo'
- export EXTRA_EMAKE="MAKEINFO=true"
+ makeargs+=("MAKEINFO=true")
+ fi
+
+ cd "${MY_BUILDDIR}"
+ # see Note [tooldir hack for ldscripts]
+ emake tooldir="${EPREFIX}${TOOLPATH}" all "${makeargs[@]}"
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
fi
- toolchain-binutils_src_compile
+ # 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}"
+ # 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
+}
+
+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
+ env -i ROOT="${ROOT}" 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] 10+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2020-12-27 11:25 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2020-12-27 11:25 UTC (permalink / raw
To: gentoo-commits
commit: ad42be3bf92609a3eea443f7444c31e274b506ac
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 27 11:10:07 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 11:10:07 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ad42be3b
sys-devel/binutils: drop ~m68k-mint
Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
sys-devel/binutils/binutils-2.29.1-r1.ebuild | 6 +-----
sys-devel/binutils/binutils-2.34-r1.ebuild | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/sys-devel/binutils/binutils-2.29.1-r1.ebuild b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
index 733976fc38..2822dd7f5c 100644
--- a/sys-devel/binutils/binutils-2.29.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
*)
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
SLOT=$(get_version_component_range 1-2)
- KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
;;
esac
@@ -88,10 +88,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
)
-pkg_setup() {
- [[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to ${P}" # 609274
-}
-
src_unpack() {
case ${PV} in
*9999)
diff --git a/sys-devel/binutils/binutils-2.34-r1.ebuild b/sys-devel/binutils/binutils-2.34-r1.ebuild
index 39573b3f47..8c7d134cad 100644
--- a/sys-devel/binutils/binutils-2.34-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.34-r1.ebuild
@@ -42,7 +42,7 @@ case ${PV} in
*)
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
SLOT=$(ver_cut 1-2)
- KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
;;
esac
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2021-10-13 4:05 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2021-10-13 4:05 UTC (permalink / raw
To: gentoo-commits
commit: 40c41500b3d9676a21265f264a59c2fa2ab9b30d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 13 04:05:20 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 13 04:05:53 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=40c41500
sys-devel/binutils: update devspace location
slyfox has retired but I've got the distfiles
mirrored in my devspace.
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-devel/binutils/Manifest | 8 ++++++++
sys-devel/binutils/binutils-2.29.1-r1.ebuild | 4 ++--
sys-devel/binutils/binutils-2.34-r1.ebuild | 4 ++--
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 300ae6a9f4..6c24a4a8ab 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,3 +1,11 @@
+AUX binutils-2.22-solaris-anonymous-version-script-fix.patch 957 BLAKE2B ce83950cff5e22ea458479d54f0423f1b546c7192a50251f16ef3ebd9bf305147b7e55a9753b916db1e5880182e6165d806bc03dec42c9a930633b8625dc605a SHA512 8028ed6e93661a27c89ffd48022758af9cc968e8fb5b4e8027787a2c2c0978261f53aaaefd54eb032c437947496f4a48ef1b3c01c1529933af8876038938c492
+AUX binutils-2.24-cygwin-nointl.patch 1067 BLAKE2B f5459c75991dd4c66c17d2165563eefb81b162798ff66d07f904ae355765ba52a52fc6d3d1f3a697659081f13952836393f50d42354d9917c797263a662f1ad7 SHA512 8e5bc67dfb5c408299043fffa015978b066cae2cd634608cb72115ff1b26b60a2cae035e31b292ae7637be918742d5745f1654e2a0db4b8e5c68e0154312d3c9
+AUX binutils-2.29.1-nogoldtest.patch 730 BLAKE2B f4f5926511866e58566abc224d2bae1336eb2cbfb63ae6d2a8a3b1f455f24d31fe0ecaee616eb6075712b8d90c40495a639c413c7229c9dfa741a5d284ff2911 SHA512 dd94d947fd25a770990ebc711fba6f680c90677e726f7cdc5435dd121f57e28e3a19343805e514045513bb011094f3a1fe2c4178d1be73e5d38a24abcc2b88e5
+AUX binutils-2.33-gcc-10.patch 815 BLAKE2B 84cf88e34afea70ea3728e2a78f0ba004e24934f57ff53d42694c3fe6f1afd6fb091b70ca114ff539ae6274699f0e3584decbf1355d1d1cd720bb4aca31bcb33 SHA512 8c0cd37738d2d172aadf1df875d028538d9edca35b681d7faa7dc3ab64e2c214d9c33862795a51c0cba9a61aaea9c5bbf5f9f9fb4a01762aa266f32c97eaafbd
+AUX binutils-2.34-riscv-SEGV.patch 1297 BLAKE2B d21c99711f658e56a09705c25bda467ed1e2ee8ef1270ac276913da3dfc3457655f65f2ca09ee102ff9eb51d6f70c69bf1b4d4fd791beee7cf2ebc3e51735474 SHA512 4ba8c41c5051a16ff96512cf18a538dd780302923ee31b30ca586753bfe9e8a0fd8852adf3b5e0d92355ebfec0d8205c73e561a6778b2ccc156e83677492eefb
DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5 SHA512 d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a SHA512 e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
+EBUILD binutils-2.29.1-r1.ebuild 12443 BLAKE2B 09480b3ccd675612244fc5a26d5de6024ad861e86c40e43ce71cf811cc16da7a4712950400c1ea999f7993a8b3486f404ee0c1cbe7d490882c30191c480937f8 SHA512 f6d5dd3e73c8d385052791f685d6b7de5c0a83d5320753a12d60cd7443a1d2add3038fce980cd1f362ed6078faf5eecbc6d7da321b05010f9e1c1732bea58bf0
+EBUILD binutils-2.34-r1.ebuild 12555 BLAKE2B 789330edfc401ec1ad7146efa82dd623a78c78b81d09083bf9a353806eb7d981cb468f4bb2ec2be527974b47774da72dac1a70f4822fb8068b9faef882cd404b SHA512 d44cb143ace7fd292b857c280ee28c7d36d62a3155da38cc8fd54b2fde3577bea222da379f107a9f24ca75512fe2e0c4d8fa194112f12f8746fe9f3169ad97fb
+MISC metadata.xml 650 BLAKE2B 5f0547bb9a41a09f28afc7feb1d6f2da32205924d860a88f64a7970a5e24749b961531c023a8647720e119ffbf2bdcab9384f10726a3371a8ec750b808233eaf SHA512 9057a779adcdf1da85c7e26fdd134303e4fe53ba015dda84761f5e4894833ba50f1411c1e96102319479fb1becf6c02e23984737b3660a7c24101d0cf0d404b2
diff --git a/sys-devel/binutils/binutils-2.29.1-r1.ebuild b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
index 2822dd7f5c..435264c817 100644
--- a/sys-devel/binutils/binutils-2.29.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.29.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
# NOTE: currently latest version on Solaris that works
@@ -43,7 +43,7 @@ esac
# The Gentoo patchset
#
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
+PATCH_DEV=${PATCH_DEV:-sam}
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
diff --git a/sys-devel/binutils/binutils-2.34-r1.ebuild b/sys-devel/binutils/binutils-2.34-r1.ebuild
index 8c7d134cad..2dd1d18118 100644
--- a/sys-devel/binutils/binutils-2.34-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.34-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
@@ -50,7 +50,7 @@ esac
# The Gentoo patchset
#
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
+PATCH_DEV=${PATCH_DEV:-sam}
[[ -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] 10+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2021-10-13 6:46 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2021-10-13 6:46 UTC (permalink / raw
To: gentoo-commits
commit: e48a36111d30f831e0f5480a8b9a1b230f412758
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 13 06:46:14 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 13 06:46:40 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e48a3611
sys-devel/binutils: cleanup Manifest
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-devel/binutils/Manifest | 8 --------
1 file changed, 8 deletions(-)
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 6c24a4a8ab..300ae6a9f4 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,11 +1,3 @@
-AUX binutils-2.22-solaris-anonymous-version-script-fix.patch 957 BLAKE2B ce83950cff5e22ea458479d54f0423f1b546c7192a50251f16ef3ebd9bf305147b7e55a9753b916db1e5880182e6165d806bc03dec42c9a930633b8625dc605a SHA512 8028ed6e93661a27c89ffd48022758af9cc968e8fb5b4e8027787a2c2c0978261f53aaaefd54eb032c437947496f4a48ef1b3c01c1529933af8876038938c492
-AUX binutils-2.24-cygwin-nointl.patch 1067 BLAKE2B f5459c75991dd4c66c17d2165563eefb81b162798ff66d07f904ae355765ba52a52fc6d3d1f3a697659081f13952836393f50d42354d9917c797263a662f1ad7 SHA512 8e5bc67dfb5c408299043fffa015978b066cae2cd634608cb72115ff1b26b60a2cae035e31b292ae7637be918742d5745f1654e2a0db4b8e5c68e0154312d3c9
-AUX binutils-2.29.1-nogoldtest.patch 730 BLAKE2B f4f5926511866e58566abc224d2bae1336eb2cbfb63ae6d2a8a3b1f455f24d31fe0ecaee616eb6075712b8d90c40495a639c413c7229c9dfa741a5d284ff2911 SHA512 dd94d947fd25a770990ebc711fba6f680c90677e726f7cdc5435dd121f57e28e3a19343805e514045513bb011094f3a1fe2c4178d1be73e5d38a24abcc2b88e5
-AUX binutils-2.33-gcc-10.patch 815 BLAKE2B 84cf88e34afea70ea3728e2a78f0ba004e24934f57ff53d42694c3fe6f1afd6fb091b70ca114ff539ae6274699f0e3584decbf1355d1d1cd720bb4aca31bcb33 SHA512 8c0cd37738d2d172aadf1df875d028538d9edca35b681d7faa7dc3ab64e2c214d9c33862795a51c0cba9a61aaea9c5bbf5f9f9fb4a01762aa266f32c97eaafbd
-AUX binutils-2.34-riscv-SEGV.patch 1297 BLAKE2B d21c99711f658e56a09705c25bda467ed1e2ee8ef1270ac276913da3dfc3457655f65f2ca09ee102ff9eb51d6f70c69bf1b4d4fd791beee7cf2ebc3e51735474 SHA512 4ba8c41c5051a16ff96512cf18a538dd780302923ee31b30ca586753bfe9e8a0fd8852adf3b5e0d92355ebfec0d8205c73e561a6778b2ccc156e83677492eefb
DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5 SHA512 d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a SHA512 e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
-EBUILD binutils-2.29.1-r1.ebuild 12443 BLAKE2B 09480b3ccd675612244fc5a26d5de6024ad861e86c40e43ce71cf811cc16da7a4712950400c1ea999f7993a8b3486f404ee0c1cbe7d490882c30191c480937f8 SHA512 f6d5dd3e73c8d385052791f685d6b7de5c0a83d5320753a12d60cd7443a1d2add3038fce980cd1f362ed6078faf5eecbc6d7da321b05010f9e1c1732bea58bf0
-EBUILD binutils-2.34-r1.ebuild 12555 BLAKE2B 789330edfc401ec1ad7146efa82dd623a78c78b81d09083bf9a353806eb7d981cb468f4bb2ec2be527974b47774da72dac1a70f4822fb8068b9faef882cd404b SHA512 d44cb143ace7fd292b857c280ee28c7d36d62a3155da38cc8fd54b2fde3577bea222da379f107a9f24ca75512fe2e0c4d8fa194112f12f8746fe9f3169ad97fb
-MISC metadata.xml 650 BLAKE2B 5f0547bb9a41a09f28afc7feb1d6f2da32205924d860a88f64a7970a5e24749b961531c023a8647720e119ffbf2bdcab9384f10726a3371a8ec750b808233eaf SHA512 9057a779adcdf1da85c7e26fdd134303e4fe53ba015dda84761f5e4894833ba50f1411c1e96102319479fb1becf6c02e23984737b3660a7c24101d0cf0d404b2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2022-09-12 17:52 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2022-09-12 17:52 UTC (permalink / raw
To: gentoo-commits
commit: 067591a87843b997107dd4d48b72d1ddd37e4909
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 17:51:54 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 17:51:54 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=067591a8
sys-devel/binutils: sync 2.39-r2 from gx86
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
sys-devel/binutils/Manifest | 2 +
...ls-2.29.1-r1.ebuild => binutils-2.39-r2.ebuild} | 301 ++++++++++++---------
2 files changed, 182 insertions(+), 121 deletions(-)
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 300ae6a9f4..eba64a25c1 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,3 +1,5 @@
DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5 SHA512 d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
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.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/binutils-2.29.1-r1.ebuild b/sys-devel/binutils/binutils-2.39-r2.ebuild
similarity index 61%
rename from sys-devel/binutils/binutils-2.29.1-r1.ebuild
rename to sys-devel/binutils/binutils-2.39-r2.ebuild
index 435264c817..41f01bb583 100644
--- a/sys-devel/binutils/binutils-2.29.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r2.ebuild
@@ -1,52 +1,40 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# NOTE: currently latest version on Solaris that works
+EAPI=7
-EAPI=6
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+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="+cxx doc multitarget +nls static-libs test"
-
-PATCHVER="3"
-ELF2FLT_VER=""
-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="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
- ;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-sam}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+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="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
#
# The cross-compile logic
@@ -66,60 +54,77 @@ RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
"
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
doc? ( sys-apps/texinfo )
- test? ( dev-util/dejagnu )
+ test? (
+ dev-util/dejagnu
+ sys-devel/bc
+ )
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
+RESTRICT="!test? ( test )"
PATCHES=(
- "${FILESDIR}/${P}-nogoldtest.patch"
"${FILESDIR}"/${PN}-2.22-solaris-anonymous-version-script-fix.patch
- "${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
)
+MY_BUILDDIR=${WORKDIR}/build
+
src_unpack() {
- case ${PV} in
- *9999)
- git-r3_src_unpack
- ;;
- *)
- ;;
- esac
- default
- mkdir -p "${MY_BUILDDIR}"
+ 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() {
- if [[ ! -z ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
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 :("
+ 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
+ # 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
@@ -130,11 +135,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
@@ -152,6 +152,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
@@ -164,12 +169,14 @@ 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
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
@@ -177,34 +184,37 @@ src_configure() {
done
echo
- cd "${MY_BUILDDIR}"
+ 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
- # PREFIX LOCAL: Linux only (fails to compile on Solaris, MiNT #353410)
- [[ ${CHOST} == *-linux* ]] &&
- if use cxx ; then
+ if use gold ; then
myconf+=( --enable-gold )
- myconf+=( --enable-plugins )
+ if use default-gold; then
+ myconf+=( --enable-gold=default )
+ fi
fi
if use nls ; then
myconf+=( --without-included-gettext )
+ [[ ${CHOST} == *"-solaris"* ]] && append-libs -lintl
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
+ # 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
- [[ ${CHOST} == *"-solaris"* ]] && use nls && append-libs -lintl
-
use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
@@ -214,13 +224,11 @@ 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
+ # let's not do this on Solaris either
+ if [[ $(tc-arch) != mips && ${CHOST} != *-solaris* ]] ; then
myconf+=( --enable-default-hash-style=gnu )
fi
@@ -241,24 +249,69 @@ 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
+
+ # Available from 2.39 on
+ --enable-warn-execstack
+ --enable-warn-rwx-segments
+ # TODO: Available from 2.39+ on but let's try the warning on for a bit
+ # first... (--enable-warn-execstack)
+ # Could put it under USE=hardened?
+ #--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)
- ${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
+ # 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)
)
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
@@ -269,21 +322,14 @@ src_configure() {
}
src_compile() {
- local makeargs=()
- if has noinfo "${FEATURES}" \
- || ! type -p makeinfo >/dev/null
- then
- # binutils >= 2.17 (accidentally?) requires 'makeinfo'
- makeargs+=("MAKEINFO=true")
- fi
+ cd "${MY_BUILDDIR}" || die
- cd "${MY_BUILDDIR}"
# see Note [tooldir hack for ldscripts]
- emake tooldir="${EPREFIX}${TOOLPATH}" all "${makeargs[@]}"
+ 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
@@ -292,21 +338,26 @@ src_compile() {
}
src_test() {
- cd "${MY_BUILDDIR}"
- emake -k check
+ cd "${MY_BUILDDIR}" || die
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k V=1 check
}
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
+ 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} #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
@@ -317,9 +368,9 @@ 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
@@ -328,6 +379,7 @@ src_install() {
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.
@@ -339,10 +391,10 @@ src_install() {
objalloc.h
splay-tree.h
)
- doins "${libiberty_headers[@]/#/${S}/include/}" || die
+ 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
@@ -356,20 +408,27 @@ 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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2022-10-24 18:45 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2022-10-24 18:45 UTC (permalink / raw
To: gentoo-commits
commit: ff9951182f8ad7f741651d44bcdbfc8c3f8662c5
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 18:45:20 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 18:45:20 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ff995118
sys-devel/binutils-2.39-r4: sync from gx86
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
sys-devel/binutils/Manifest | 2 +-
sys-devel/binutils/binutils-2.39-r4.ebuild | 498 +++++++++++++++++++++++++++++
2 files changed, 499 insertions(+), 1 deletion(-)
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index eba64a25c1..3969b00779 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,5 +1,5 @@
-DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5 SHA512 d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
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.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/binutils-2.39-r4.ebuild b/sys-devel/binutils/binutils-2.39-r4.ebuild
new file mode 100644
index 0000000000..0254ffdfb7
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.39-r4.ebuild
@@ -0,0 +1,498 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet 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="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+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 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.22-solaris-anonymous-version-script-fix.patch
+)
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+ 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 )
+ [[ ${CHOST} == *"-solaris"* ]] && append-libs -lintl
+ 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 ...
+ # let's not do this on Solaris either
+ if [[ $(tc-arch) != mips && ${CHOST} != *-solaris* ]] ; 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
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake V=1 info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k V=1 check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ env -i ROOT="${ROOT}" 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] 10+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
@ 2023-01-05 10:56 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2023-01-05 10:56 UTC (permalink / raw
To: gentoo-commits
commit: e19b37379dc7017cd0d7f0793fbbae2c674ff16e
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 5 10:56:09 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 5 10:56:09 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e19b3737
sys-devel/binutils: use app-alternatives/yacc
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-devel/binutils/binutils-2.34-r1.ebuild | 2 +-
sys-devel/binutils/binutils-2.39-r2.ebuild | 2 +-
sys-devel/binutils/binutils-2.39-r4.ebuild | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys-devel/binutils/binutils-2.34-r1.ebuild b/sys-devel/binutils/binutils-2.34-r1.ebuild
index 2dd1d18118..e753578810 100644
--- a/sys-devel/binutils/binutils-2.34-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.34-r1.ebuild
@@ -79,7 +79,7 @@ BDEPEND="
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/binutils/binutils-2.39-r2.ebuild b/sys-devel/binutils/binutils-2.39-r2.ebuild
index 41f01bb583..7e118e3485 100644
--- a/sys-devel/binutils/binutils-2.39-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r2.ebuild
@@ -63,7 +63,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/binutils/binutils-2.39-r4.ebuild b/sys-devel/binutils/binutils-2.39-r4.ebuild
index 8f34b15b0e..5d73b5c780 100644
--- a/sys-devel/binutils/binutils-2.39-r4.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r4.ebuild
@@ -63,7 +63,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-01-05 10:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 18:45 [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/ Fabian Groffen
-- strict thread matches above, loose matches on Subject: below --
2023-01-05 10:56 Sam James
2022-09-12 17:52 Fabian Groffen
2021-10-13 6:46 Sam James
2021-10-13 4:05 Sam James
2020-12-27 11:25 Fabian Groffen
2020-03-13 8:45 Fabian Groffen
2019-05-02 11:09 Michael Haubenwallner
2018-10-04 11:45 Michael Haubenwallner
2015-12-24 7:58 Fabian Groffen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox