summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2014-11-24 15:50:14 +0900
committerBenda Xu <heroxbd@gentoo.org>2014-11-24 15:50:14 +0900
commitf997ed1017459a72f734565bba32d513380ffcc9 (patch)
tree8d6aa7b6a47ee59fbc9ac685698273111c185080
parentbump binutils to 2.24 for RAP (diff)
downloadandroid-f997ed1017459a72f734565bba32d513380ffcc9.tar.gz
android-f997ed1017459a72f734565bba32d513380ffcc9.tar.bz2
android-f997ed1017459a72f734565bba32d513380ffcc9.zip
bump binutils to 2.24 for RAP, again
-rw-r--r--eclass/toolchain-binutils.eclass115
-rw-r--r--sys-devel/binutils/Manifest2
-rw-r--r--sys-devel/binutils/binutils-2.24-r3.ebuild2
3 files changed, 75 insertions, 44 deletions
diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass
index d9197e0..e8ceca4 100644
--- a/eclass/toolchain-binutils.eclass
+++ b/eclass/toolchain-binutils.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.123 2013/02/09 04:32:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.137 2014/11/08 17:12:09 vapier Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
#
@@ -39,7 +39,7 @@ cvs)
git)
extra_eclass="git-2"
BVER="git"
- EGIT_REPO_URI="git://sourceware.org/git/binutils.git"
+ EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git"
;;
snap)
BVER=${PV/9999_pre}
@@ -50,7 +50,13 @@ snap)
esac
inherit eutils libtool flag-o-matic gnuconfig multilib versionator unpacker ${extra_eclass}
-EXPORT_FUNCTIONS src_unpack src_compile src_test src_install pkg_postinst pkg_postrm
+case ${EAPI:-0} in
+0|1)
+ EXPORT_FUNCTIONS src_unpack src_compile src_test src_install pkg_postinst pkg_postrm ;;
+2|3|4|5)
+ EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm ;;
+*) die "unsupported EAPI ${EAPI}" ;;
+esac
export CTARGET=${CTARGET:-${CHOST}}
if [[ ${CTARGET} == ${CHOST} ]] ; then
@@ -93,17 +99,17 @@ if version_is_at_least 2.18 ; then
else
LICENSE="|| ( GPL-2 LGPL-2 )"
fi
-IUSE="cxx nls multitarget multislot static-libs test vanilla"
+IUSE="cxx multislot multitarget nls static-libs test vanilla"
if version_is_at_least 2.19 ; then
IUSE+=" zlib"
fi
-if use multislot ; then
+if ! version_is_at_least 2.23.90 || [[ ${PV} == "9999" ]] || use multislot ; then
SLOT="${BVER}"
else
SLOT="0"
fi
-RDEPEND=">=sys-devel/binutils-config-1.9"
+RDEPEND=">=sys-devel/binutils-config-3"
in_iuse zlib && RDEPEND+=" zlib? ( sys-libs/zlib )"
DEPEND="${RDEPEND}
test? ( dev-util/dejagnu )
@@ -176,7 +182,7 @@ tc-binutils_apply_patches() {
# fix locale issues if possible #122216
if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
einfo "Fixing misc issues in configure files"
- for f in $(grep -l 'autoconf version 2.13' $(find "${S}" -name configure)) ; do
+ 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"
@@ -201,15 +207,30 @@ tc-binutils_apply_patches() {
toolchain-binutils_src_unpack() {
tc-binutils_unpack
+ case ${EAPI:-0} in
+ 0|1) toolchain-binutils_src_prepare ;;
+ esac
+}
+
+toolchain-binutils_src_prepare() {
tc-binutils_apply_patches
}
-toolchain-binutils_src_compile() {
- # prevent makeinfo from running in releases. it may not always be
- # installed, and older binutils may fail with newer texinfo.
- # besides, we never patch the doc files anyways, so regenerating
- # in the first place is useless. #193364
- find . '(' -name '*.info' -o -name '*.texi' ')' -print0 | xargs -0 touch -r .
+_eprefix_init() {
+ has "${EAPI:-0}" 0 1 2 && ED=${D} EPREFIX= EROOT=${ROOT}
+}
+
+# Intended for ebuilds to override to set their own versioning information.
+toolchain-binutils_bugurl() {
+ printf "http://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${BVER}"
+ [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
+}
+
+toolchain-binutils_src_configure() {
+ _eprefix_init
# make sure we filter $LINGUAS so that only ones that
# actually work make it through #42033
@@ -283,14 +304,42 @@ toolchain-binutils_src_compile() {
--enable-obsolete
--enable-shared
--enable-threads
+ # Newer versions (>=2.24) make this an explicit option. #497268
+ --enable-install-libiberty
--disable-werror
- --with-bugurl=http://bugs.gentoo.org/
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
${EXTRA_ECONF}
+ # Disable modules that are in a combined binutils/gdb tree. #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
)
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
+ # Prevent makeinfo from running in releases. It may not always be
+ # installed, and older binutils may fail with newer texinfo.
+ # Besides, we never patch the doc files anyways, so regenerating
+ # in the first place is useless. #193364
+ # For older versions, it means we don't get any info pages at all.
+ # Oh well, tough luck. #294617
+ if [[ -e ${S}/gas/doc/as.info ]] || ! version_is_at_least 2.24 ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+toolchain-binutils_src_compile() {
+ _eprefix_init
+ case ${EAPI:-0} in
+ 0|1) toolchain-binutils_src_configure ;;
+ esac
+
+ cd "${MY_BUILDDIR}"
emake all || die "emake failed"
# only build info pages if we user wants them, and if
@@ -300,7 +349,7 @@ toolchain-binutils_src_compile() {
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 | xargs rm -f
+ find . -name '*.1' -a -size 0 -delete
# elf2flt only works on some arches / targets
if [[ -n ${ELF2FLT_VER} ]] && [[ ${CTARGET} == *linux* || ${CTARGET} == *-elf* ]] ; then
@@ -332,10 +381,11 @@ toolchain-binutils_src_test() {
}
toolchain-binutils_src_install() {
+ _eprefix_init
local x d
cd "${MY_BUILDDIR}"
- emake DESTDIR="${D}" tooldir="${EPREFIX}/${LIBPATH}" install || die
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install || die
rm -rf "${ED}"/${LIBPATH}/bin
use static-libs || find "${ED}" -name '*.la' -delete
@@ -391,35 +441,14 @@ toolchain-binutils_src_install() {
newdoc README README.elf2flt
fi
- # Now, some binutils are tricky and actually provide
- # for multiple TARGETS. Really, we're talking just
- # 32bit/64bit support (like mips/ppc/sparc). Here
- # we want to tell binutils-config that it's cool if
- # it generates multiple sets of binutil symlinks.
- # e.g. sparc gets {sparc,sparc64}-unknown-linux-gnu
- local targ=${CTARGET/-*} src="" dst=""
- local FAKE_TARGETS=${CTARGET}
- case ${targ} in
- mips*) src="mips" dst="mips64";;
- powerpc*) src="powerpc" dst="powerpc64";;
- s390*) src="s390" dst="s390x";;
- sparc*) src="sparc" dst="sparc64";;
- esac
- case ${targ} in
- mips64*|powerpc64*|s390x*|sparc64*) targ=${src} src=${dst} dst=${targ};;
- esac
- [[ -n ${src}${dst} ]] && FAKE_TARGETS="${FAKE_TARGETS} ${CTARGET/${src}/${dst}}"
-
# Generate an env.d entry for this binutils
- cd "${S}"
insinto /etc/env.d/binutils
- cat <<-EOF > env.d
+ cat <<-EOF > "${T}"/env.d
TARGET="${CTARGET}"
VER="${BVER}"
- LIBPATH="${EPREFIX}/${LIBPATH}"
- FAKE_TARGETS="${FAKE_TARGETS}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
EOF
- newins env.d ${CTARGET}-${BVER}
+ newins "${T}"/env.d ${CTARGET}-${BVER}
# Handle documentation
if ! is_cross ; then
@@ -443,16 +472,18 @@ toolchain-binutils_src_install() {
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
# Trim all empty dirs
- find "${ED}" -type d | xargs rmdir >& /dev/null
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
}
toolchain-binutils_pkg_postinst() {
+ _eprefix_init
# Make sure this ${CTARGET} has a binutils version selected
[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
binutils-config ${CTARGET}-${BVER}
}
toolchain-binutils_pkg_postrm() {
+ _eprefix_init
local current_profile=$(binutils-config -c ${CTARGET})
# If no other versions exist, then uninstall for this
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 6bffe48..e3b9715 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -54,6 +54,6 @@ EBUILD binutils-2.23.51.0.5.ebuild 1926 SHA256 5acbc0b45224ef8cadfa29ab59dbf656d
EBUILD binutils-2.23.51.0.6.ebuild 1926 SHA256 dc592c519f9b3eae5587db82029c61f2377eff12680362d4c611895a21e259bd SHA512 2a3c053484c4edee75aeec65310088046ca53e978a23705a432db57f08ee2f064af7d71548f16dbb38c053586881b1d2d39497a892a31d7f7ab8e49b548108c0 WHIRLPOOL f1ee641ed30639264904d3fc0db5bca3ec9efb5c890eabff79fd400c92558ed6b5a80898bc6b349d110ac7290f39dcd23c8a7fc02533ebfe79896cb9b2a91636
EBUILD binutils-2.23.51.0.8.ebuild 1926 SHA256 108ad27215ebb8602193ead950a3962c724f1b24e5e14e05277b96a189d63876 SHA512 7a1b7840aa428ee2e52446c8082c16db07f61b7434ba9562d48e1b9e68e3bf449c0a54c31d250ece8fd371f09bb694162a6ed5bdf9f6c8539710c5295601ad20 WHIRLPOOL ed01c0234f6da5f75d700184ded119106d66462c5327b48b9d7ed6d0dd74aec70f866dbc043aaf6bc5bc2d9f98cf313eb11a7df96ae28f7f1ec6dccb9ba3b645
EBUILD binutils-2.23.ebuild 2145 SHA256 e5778981837d3b6b987ca26c9bf9d0f1d71b408b3ca444e7762c46c38e46885e SHA512 9e45acb3abcfd4ed126a24aacc500522f6c2ea7915c59f993e66db8b66fef96062fb97127fb22a044b424486e4a75228d16507c4eb599105c532b9d47eef7f96 WHIRLPOOL df268e60b3e2a9642faabaa16e92adda81064122a3d009087e7d260ecdf92403a189fee1ac4f749c91b542bb0313432e2cbd50f28c211532d20ec416e5e04633
-EBUILD binutils-2.24-r3.ebuild 624 SHA256 8624df7b2761adb3f2761bce950d472924fa1b3f759e15c61ac1f3fa181ba822 SHA512 30ee7f40c362384e69e699b933fa687ccf5539e373378cc47377500b21d38f691a47d3d84daeb6a7da62b4e988794e41c058c1a70f0144e358db83eb5225962c WHIRLPOOL 98a4fcd22edd78f208314699b3325e6ae1b8cb536abe76cde4656cdbca3848e74eb2675d559840873b73b7048c22f599cc158c4628e593c2802603206e958efa
+EBUILD binutils-2.24-r3.ebuild 536 SHA256 dcc2613071a77c2a3f7ff524bf2065919eeeee9ed5b37254e99a00095bb8f410 SHA512 763e33009ffd146d78deb511805e5458131aa512612ef12a5862172f8e21db1308b8d335a3648fe563fdc41db826c2f3e3daf2bac4f100072bebac203c501378 WHIRLPOOL e74e702d610869acc188ea872c3afc5b66c8f6cfbc3da3fdb55ffbd7d709f0ac0818a4bc0b868a6a45da18381485549be1ed3fdc20e0211310e445d7782ca313
MISC ChangeLog 79130 SHA256 eec9a2c9c8eaed424daddcbe78677d8512ebe8072ab5828d6c329cbaf4c74557 SHA512 c0b47a76155c56dcc25863cc8174a379470e1d2620602b34dd452c1b56b9b818af545bed30cabc8e8f4d68f019aa5c87bd10081784bb5c4c9cb6e2adaf1a9f44 WHIRLPOOL fbf0a664cd49d9faa29006768342890ff4906580aedbb4ebfeacba4dd32754badab6c941700f078a8bc020456c985dc255eeb26a9144d7f72a30bdd7b64398a9
MISC metadata.xml 386 SHA256 58db91727c014c22db0fde315c25cb22c59dc5c15af5d30ee4c01a248500b67c SHA512 f5c6d289f0018d0eeb4ebb2fbbfda7c08aa70a98771f1c0795838137a0e3b848fc9e2b2355cbc7367a72dc00dd5e0a946c0eb5349a86eb3796af43918961733a WHIRLPOOL 92b3371b27092dbaed212837f544b059d5b0b2c547ef8c965836ac1dab1cdee198bb6ab63ab495eccdd1be1c1f5ce9e93624722a9ffd433a7615be202134336a
diff --git a/sys-devel/binutils/binutils-2.24-r3.ebuild b/sys-devel/binutils/binutils-2.24-r3.ebuild
index 22a0d61..663eb8c 100644
--- a/sys-devel/binutils/binutils-2.24-r3.ebuild
+++ b/sys-devel/binutils/binutils-2.24-r3.ebuild
@@ -8,7 +8,7 @@ PATCHVER="1.4"
ELF2FLT_VER=""
inherit toolchain-binutils
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 -amd64-fbsd -sparc-fbsd ~x86-fbsd"
+KEYWORDS="~amd64 ~arm ~x86"
src_prepare() {
epatch "${FILESDIR}"/${P}-runtime-sysroot.patch