diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-12-29 20:13:58 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-12-29 20:13:58 +0000 |
commit | bd195f1e0d49e664119adb29100dbd7a094bd008 (patch) | |
tree | c2b07d6849750aebf4836fe65ae867ef197d6020 /sys-devel/binutils-config/binutils-config-5.2.ebuild | |
parent | dev-python/pretend: stable 1.0.9 for hppa, bug #700596 (diff) | |
download | gentoo-bd195f1e0d49e664119adb29100dbd7a094bd008.tar.gz gentoo-bd195f1e0d49e664119adb29100dbd7a094bd008.tar.bz2 gentoo-bd195f1e0d49e664119adb29100dbd7a094bd008.zip |
sys-devel/binutils-config: drop runtime linker switch selection
Before this change there were 3 ways to switch default linker:
1. via LDFLAGS=-fuse-ld=gold LD=${CHOST}-ld.gold
2. via binutils' USE flags: USE="default-gold gold"
3. via *FLAGS=-B/path-to-own-tools
4. via 'binutils-config --linker'
This change drops [3.] entirely in favour of [1.] and [2.].
[1.] should be preferred.
Reported-by: Andrzej Korwin-Mikke
Closes: https://bugs.gentoo.org/658054
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-devel/binutils-config/binutils-config-5.2.ebuild')
-rw-r--r-- | sys-devel/binutils-config/binutils-config-5.2.ebuild | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sys-devel/binutils-config/binutils-config-5.2.ebuild b/sys-devel/binutils-config/binutils-config-5.2.ebuild new file mode 100644 index 000000000000..152af30c9117 --- /dev/null +++ b/sys-devel/binutils-config/binutils-config-5.2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit prefix + +DESCRIPTION="Utility to change the binutils version being used" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Toolchain" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" +IUSE="" + +# We also RDEPEND on sys-apps/findutils which is in base @system +RDEPEND="sys-apps/gentoo-functions" + +S=${WORKDIR} + +src_install() { + newbin "${FILESDIR}"/${PN}-${PV} ${PN} + use prefix && eprefixify "${ED}"/usr/bin/${PN} + sed -i "s:@PV@:${PVR}:g" "${ED}"/usr/bin/${PN} || die + doman "${FILESDIR}"/${PN}.8 + + insinto /usr/share/eselect/modules + doins "${FILESDIR}"/binutils.eselect +} + +pkg_preinst() { + # Force a refresh when upgrading from an older version that symlinked + # in all the libs & includes that binutils-libs handles. #528088 + if has_version "<${CATEGORY}/${PN}-5" ; then + local bc current + bc="${ED}/usr/bin/binutils-config" + if current=$("${bc}" -c) ; then + "${bc}" "${current}" + fi + fi +} |