summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2016-06-28 22:25:59 -0400
committerMike Gilbert <floppym@gentoo.org>2016-06-28 22:25:59 -0400
commit0475287b1eb40bb052bb2c5e5ac5da1019e165e5 (patch)
tree0b8ca236dd4fb298da3c7a33a6a1d01ac810dfd6 /sys-boot
parentsys-boot/grub: add xen-32 platform (diff)
downloadgentoo-0475287b1eb40bb052bb2c5e5ac5da1019e165e5.tar.gz
gentoo-0475287b1eb40bb052bb2c5e5ac5da1019e165e5.tar.bz2
gentoo-0475287b1eb40bb052bb2c5e5ac5da1019e165e5.zip
sys-boot/grub: refactor platform logic
Package-Manager: portage-2.3.0_p7
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/grub/grub-2.02_beta3-r1.ebuild29
-rw-r--r--sys-boot/grub/grub-9999-r1.ebuild29
2 files changed, 26 insertions, 32 deletions
diff --git a/sys-boot/grub/grub-2.02_beta3-r1.ebuild b/sys-boot/grub/grub-2.02_beta3-r1.ebuild
index fd6f5f2d802f..51efcb7db16d 100644
--- a/sys-boot/grub/grub-2.02_beta3-r1.ebuild
+++ b/sys-boot/grub/grub-2.02_beta3-r1.ebuild
@@ -168,26 +168,23 @@ grub_configure() {
local platform
case ${MULTIBUILD_VARIANT} in
- efi-32)
- platform=efi
+ efi*) platform=efi ;;
+ xen*) platform=xen ;;
+ guessed) ;;
+ *) platform=${MULTIBUILD_VARIANT} ;;
+ esac
+
+ case ${MULTIBUILD_VARIANT} in
+ *-32)
if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
- local CTARGET=${CTARGET:-i386}
+ local CTARGET=i386
fi ;;
- efi-64)
- platform=efi
+ *-64)
if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
- local CTARGET=${CTARGET:-x86_64}
- local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
- local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
- export TARGET_CFLAGS TARGET_CPPFLAGS
- fi ;;
- xen-32)
- platform=xen
- if [[ ${CHOST} == x86_64* ]]; then
- local CTARGET=i386
+ local CTARGET=x86_64
+ local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
+ local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
fi ;;
- guessed) ;;
- *) platform=${MULTIBUILD_VARIANT} ;;
esac
local myeconfargs=(
diff --git a/sys-boot/grub/grub-9999-r1.ebuild b/sys-boot/grub/grub-9999-r1.ebuild
index b0c7084c38c5..ad5762439cbb 100644
--- a/sys-boot/grub/grub-9999-r1.ebuild
+++ b/sys-boot/grub/grub-9999-r1.ebuild
@@ -169,26 +169,23 @@ grub_configure() {
local platform
case ${MULTIBUILD_VARIANT} in
- efi-32)
- platform=efi
+ efi*) platform=efi ;;
+ xen*) platform=xen ;;
+ guessed) ;;
+ *) platform=${MULTIBUILD_VARIANT} ;;
+ esac
+
+ case ${MULTIBUILD_VARIANT} in
+ *-32)
if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
- local CTARGET=${CTARGET:-i386}
+ local CTARGET=i386
fi ;;
- efi-64)
- platform=efi
+ *-64)
if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
- local CTARGET=${CTARGET:-x86_64}
- local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
- local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
- export TARGET_CFLAGS TARGET_CPPFLAGS
- fi ;;
- xen-32)
- platform=xen
- if [[ ${CHOST} == x86_64* ]]; then
- local CTARGET=i386
+ local CTARGET=x86_64
+ local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
+ local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
fi ;;
- guessed) ;;
- *) platform=${MULTIBUILD_VARIANT} ;;
esac
local myeconfargs=(