summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2014-10-22 16:59:39 +0000
committerIan Stakenvicius <axs@gentoo.org>2014-10-22 16:59:39 +0000
commit482c6573c0928677491742b235a05da2e9ef2edd (patch)
treea3102e0f4cccc44a1c34682fb35820578e425b44 /sys-boot
parentVersion bump (diff)
downloadgentoo-2-482c6573c0928677491742b235a05da2e9ef2edd.tar.gz
gentoo-2-482c6573c0928677491742b235a05da2e9ef2edd.tar.bz2
gentoo-2-482c6573c0928677491742b235a05da2e9ef2edd.zip
grub:0 - Only apply -fuse-ld=bfd when gcc is new enough to support it, bug 526348
(Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/grub/ChangeLog6
-rw-r--r--sys-boot/grub/grub-0.97-r14.ebuild22
2 files changed, 24 insertions, 4 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog
index 4fa4f93454cc..25163d2e484d 100644
--- a/sys-boot/grub/ChangeLog
+++ b/sys-boot/grub/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-boot/grub
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.323 2014/10/20 17:29:22 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.324 2014/10/22 16:59:39 axs Exp $
+
+ 22 Oct 2014; Ian Stakenvicius (_AxS_) <axs@gentoo.org> grub-0.97-r14.ebuild:
+ grub:0 - Only apply -fuse-ld=bfd when gcc is new enough to support it, bug
+ 526348
20 Oct 2014; Ian Stakenvicius (_AxS_) <axs@gentoo.org> grub-0.97-r14.ebuild:
A quick fix regarding amd64 static building without ncurses
diff --git a/sys-boot/grub/grub-0.97-r14.ebuild b/sys-boot/grub/grub-0.97-r14.ebuild
index 9cd6dfacdcea..807aea67abfd 100644
--- a/sys-boot/grub/grub-0.97-r14.ebuild
+++ b/sys-boot/grub/grub-0.97-r14.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r14.ebuild,v 1.2 2014/10/20 17:29:22 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r14.ebuild,v 1.3 2014/10/22 16:59:39 axs Exp $
# XXX: we need to review menu.lst vs grub.conf handling. We've been converting
# all systems to grub.conf (and symlinking menu.lst to grub.conf), but
@@ -44,6 +44,18 @@ RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)\]/} )"
DEPEND="${RDEPEND}
static? ( ${LIB_DEPEND} )"
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ # Bugs 526348 , 466536
+ if ! version_is_at_least 4.8 "$(gcc-version)" &&
+ $(tc-getLD) --version | grep -q "GNU gold"; then
+ eerror "GRUB does not function correctly when built with the gold linker."
+ eerror "Please select the bfd linker with binutils-config."
+ die "GNU gold detected"
+ fi
+ fi
+}
+
pkg_setup() {
case $(tc-arch) in
amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;;
@@ -75,10 +87,14 @@ src_prepare() {
EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
rm -f "${S}"/aclocal.m4 # seems to keep bug 418287 away
+
# Force ld.bfd via configure.ac so as to not mess up the CFLAGS stuff in src_configure()
# Note: NOT adding this to the patchset because it's a hack that I don't like.
- # bug 466536
- epatch "${FILESDIR}"/${P}-force-ld.bfd.patch
+ # (bug 466536)
+ # Conditionally epatch (*yuck*) so gcc-4.7 and earlier don't fail, bug 526348
+ if version_is_at_least 4.8 "$(gcc-version)"; then
+ epatch "${FILESDIR}"/${P}-force-ld.bfd.patch
+ fi
eautoreconf
}