summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2012-03-18 06:41:10 +0000
committerMike Gilbert <floppym@gentoo.org>2012-03-18 06:41:10 +0000
commit1e7cb94fe4c495aa80f134bda7decd8a0daa25cd (patch)
treea27f73537a4a58ae2ab756ebf843925bb881d9f9 /sys-boot/grub/grub-9999.ebuild
parentBug #408679: Move ntfsprogs blocker from DEPEND to RDEPEND, as required due t... (diff)
downloadgentoo-2-1e7cb94fe4c495aa80f134bda7decd8a0daa25cd.tar.gz
gentoo-2-1e7cb94fe4c495aa80f134bda7decd8a0daa25cd.tar.bz2
gentoo-2-1e7cb94fe4c495aa80f134bda7decd8a0daa25cd.zip
Pass -Os in TARGET_CFLAGS for efi-64 on x86. Don't clobber TARGET variables in case the user wants to play with them. Set CTARGET to pass --target option to configure.
(Portage version: 2.2.0_alpha91/cvs/Linux x86_64)
Diffstat (limited to 'sys-boot/grub/grub-9999.ebuild')
-rw-r--r--sys-boot/grub/grub-9999.ebuild29
1 files changed, 19 insertions, 10 deletions
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 60a14c3df010..441fca77806a 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.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-9999.ebuild,v 1.58 2012/03/17 22:30:14 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.59 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() {