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
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')
-rw-r--r--sys-boot/grub/ChangeLog8
-rw-r--r--sys-boot/grub/grub-2.00_beta2.ebuild29
-rw-r--r--sys-boot/grub/grub-9999.ebuild29
3 files changed, 45 insertions, 21 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog
index 6814d0846d3a..eb021250d098 100644
--- a/sys-boot/grub/ChangeLog
+++ b/sys-boot/grub/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-boot/grub
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.189 2012/03/17 22:30:14 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.190 2012/03/18 06:41:10 floppym Exp $
+
+ 18 Mar 2012; Mike Gilbert <floppym@gentoo.org> grub-2.00_beta2.ebuild,
+ grub-9999.ebuild:
+ 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.
17 Mar 2012; Mike Gilbert <floppym@gentoo.org> grub-9999.ebuild:
Sync live ebuild.
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() {
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() {