summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-boot/grub/grub-2.00_beta2.ebuild')
-rw-r--r--sys-boot/grub/grub-2.00_beta2.ebuild29
1 files changed, 19 insertions, 10 deletions
diff --git a/sys-boot/grub/grub-2.00_beta2.ebuild b/sys-boot/grub/grub-2.00_beta2.ebuild
index 350490500b89..9818c2cb2685 100644
--- a/sys-boot/grub/grub-2.00_beta2.ebuild
+++ b/sys-boot/grub/grub-2.00_beta2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00_beta2.ebuild,v 1.2 2012/03/17 07:58:43 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00_beta2.ebuild,v 1.3 2012/03/18 06:41:10 floppym Exp $
EAPI=4
@@ -117,29 +117,34 @@ grub_run_phase() {
grub_src_configure() {
local platform=$1
- local target=
local with_platform=
[[ -z ${platform} ]] && die "${FUNCNAME} [platform]"
# Used below for efi cross-building
tc-export CC NM OBJCOPY STRIP
- unset TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS
+
+ estack_push CTARGET "${CTARGET}"
+ estack_push TARGET_CC "${TARGET_CC}"
+ estack_push TARGET_CFLAGS "${TARGET_CFLAGS}"
+ estack_push TARGET_CPPFLAGS "${TARGET_CPPFLAGS}"
case ${platform} in
efi-32)
if [[ ${CHOST} == x86_64* ]]; then
- target="--target=i386"
- export TARGET_CC="${CC}"
+ CTARGET="${CTARGET:-i386}"
+ TARGET_CC="${TARGET_CC:-${CC}}"
+ export TARGET_CC
fi
with_platform="--with-platform=efi"
;;
efi-64)
if [[ ${CHOST} == i?86* ]]; then
- target="--target=x86_64"
- export TARGET_CC="${CC}"
- export TARGET_CFLAGS="-march=x86-64"
- export TARGET_CPPFLAGS="-march=x86-64"
+ CTARGET="${CTARGET:-x86_64}"
+ TARGET_CC="${TARGET_CC:-${CC}}"
+ TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
+ TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
+ export TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS
fi
with_platform="--with-platform=efi"
;;
@@ -153,7 +158,6 @@ grub_src_configure() {
--program-prefix= \
--program-transform-name="s,grub,grub2," \
--with-grubdir=grub2 \
- ${target} \
${with_platform} \
$(use_enable debug mm-debug) \
$(use_enable debug grub-emu-usb) \
@@ -164,6 +168,11 @@ grub_src_configure() {
$(use_enable truetype grub-mkfont) \
$(use_enable libzfs) \
$(use sdl && use_enable debug grub-emu-sdl)
+
+ estack_pop CTARGET CTARGET || die
+ estack_pop TARGET_CC TARGET_CC || die
+ estack_pop TARGET_CFLAGS TARGET_CFLAGS || die
+ estack_pop TARGET_CPPFLAGS TARGET_CPPFLAGS || die
}
grub_src_compile() {