]> git.proxmox.com Git - grub2.git/commitdiff
2008-07-17 Pavel Roskin <proski@gnu.org>
authorproski <proski@localhost>
Thu, 17 Jul 2008 18:13:57 +0000 (18:13 +0000)
committerproski <proski@localhost>
Thu, 17 Jul 2008 18:13:57 +0000 (18:13 +0000)
* configure.ac: Default to efi platform for x86_64-apple.  Allow
powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
adjustments from the rest, only do them if target is not
explicitly given.  Merge other adjustments with the final sanity
check.  Remove an extraneous check for supported CPU.  Be
specific which CPU and which platform is not supported.

ChangeLog
configure
configure.ac

index e8243693f829b32e4077b5e7cdf4143ff648a21f..cef28b90b9922868c6b381d3f7915e8784817844 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-07-17  Pavel Roskin  <proski@gnu.org>
 
+       * configure.ac: Default to efi platform for x86_64-apple.  Allow
+       powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
+       adjustments from the rest, only do them if target is not
+       explicitly given.  Merge other adjustments with the final sanity
+       check.  Remove an extraneous check for supported CPU.  Be
+       specific which CPU and which platform is not supported.
+
        * configure.ac: Default to pc platform for x86_64.
 
 2008-07-17  Robert Millan  <rmh@aybabtu.com>
index dfa2b1d16d7f476c810706a366e9de2a3e29f658..cc92328ac47a71c659d0e61266a19a253f901d63 100644 (file)
--- a/configure
+++ b/configure
@@ -1945,53 +1945,40 @@ if test "x$with_platform" = x; then
   case "$target_cpu"-"$target_vendor" in
     i386-apple) platform=efi ;;
     i386-*) platform=pc ;;
+    x86_64-apple) platform=efi ;;
     x86_64-*) platform=pc ;;
     powerpc-*) platform=ieee1275 ;;
+    powerpc64-*) platform=ieee1275 ;;
     sparc64-*) platform=ieee1275 ;;
-    *) { { echo "$as_me:$LINENO: error: unsupported machine type" >&5
-echo "$as_me: error: unsupported machine type" >&2;}
+    *) { { echo "$as_me:$LINENO: error: unsupported CPU: \"$target_cpu\"" >&5
+echo "$as_me: error: unsupported CPU: \"$target_cpu\"" >&2;}
    { (exit 1); exit 1; }; } ;;
   esac
 else
   platform="$with_platform"
 fi
 
-case "$platform" in
-  linuxbios) platform=coreboot ;;
-esac
-
-if test "x$platform" = "xefi" ; then
-  case "$target_cpu" in
-    i386) ;;
-    x86_64) target_m64=1 ;;
-    *) { { echo "$as_me:$LINENO: error: unsupported CPU type for EFI" >&5
-echo "$as_me: error: unsupported CPU type for EFI" >&2;}
-   { (exit 1); exit 1; }; } ;;
-  esac
-else
-  case "$target_cpu" in
-    i386) ;;
-    x86_64) target_cpu=i386 target_m32=1 ;;
-    powerpc) ;;
-    powerpc64) target_cpu=powerpc target_m32=1;;
-    sparc64) ;;
-    *) { { echo "$as_me:$LINENO: error: unsupported CPU type" >&5
-echo "$as_me: error: unsupported CPU type" >&2;}
-   { (exit 1); exit 1; }; } ;;
+# Adjust CPU unless target was explicitly specified.
+if test -z "$target_alias"; then
+  case "$target_cpu"-"$platform" in
+    x86_64-efi) ;;
+    x86_64-*) target_cpu=i386 target_m32=1 ;;
+    powerpc64-ieee1275) target_cpu=powerpc target_m32=1 ;;
   esac
 fi
 
-# Sanity check.
+# Check if the platform is supported, make final adjustments.
 case "$target_cpu"-"$platform" in
   i386-efi) ;;
-  x86_64-efi) ;;
+  x86_64-efi) target_m64=1 ;;
   i386-pc) ;;
   i386-coreboot) ;;
+  i386-linuxbios) platform=coreboot ;;
   i386-ieee1275) ;;
   powerpc-ieee1275) ;;
   sparc64-ieee1275) ;;
-  *) { { echo "$as_me:$LINENO: error: unsupported machine type" >&5
-echo "$as_me: error: unsupported machine type" >&2;}
+  *) { { echo "$as_me:$LINENO: error: platform \"$platform\" is not supported for target CPU \"$target_cpu\"" >&5
+echo "$as_me: error: platform \"$platform\" is not supported for target CPU \"$target_cpu\"" >&2;}
    { (exit 1); exit 1; }; } ;;
 esac
 
index 7d1782bbb4b7e89528b0277c0d8b9101efe9b0e0..164f760492fc57195362584138101e62b07a3699 100644 (file)
@@ -61,46 +61,37 @@ if test "x$with_platform" = x; then
   case "$target_cpu"-"$target_vendor" in
     i386-apple) platform=efi ;;
     i386-*) platform=pc ;;
+    x86_64-apple) platform=efi ;;
     x86_64-*) platform=pc ;;
     powerpc-*) platform=ieee1275 ;;
+    powerpc64-*) platform=ieee1275 ;;
     sparc64-*) platform=ieee1275 ;;
-    *) AC_MSG_ERROR([unsupported machine type]) ;;
+    *) AC_MSG_ERROR([unsupported CPU: "$target_cpu"]) ;;
   esac
 else
   platform="$with_platform"
 fi
 
-case "$platform" in
-  linuxbios) platform=coreboot ;;
-esac
-
-if test "x$platform" = "xefi" ; then
-  case "$target_cpu" in
-    i386) ;;
-    x86_64) target_m64=1 ;;
-    *) AC_MSG_ERROR([unsupported CPU type for EFI]) ;;
-  esac
-else
-  case "$target_cpu" in
-    i386) ;;
-    x86_64) target_cpu=i386 target_m32=1 ;;
-    powerpc) ;;
-    powerpc64) target_cpu=powerpc target_m32=1;;
-    sparc64) ;;
-    *) AC_MSG_ERROR([unsupported CPU type]) ;;
+# Adjust CPU unless target was explicitly specified.
+if test -z "$target_alias"; then
+  case "$target_cpu"-"$platform" in
+    x86_64-efi) ;;
+    x86_64-*) target_cpu=i386 target_m32=1 ;;
+    powerpc64-ieee1275) target_cpu=powerpc target_m32=1 ;;
   esac
 fi
 
-# Sanity check.
+# Check if the platform is supported, make final adjustments.
 case "$target_cpu"-"$platform" in
   i386-efi) ;;
-  x86_64-efi) ;;
+  x86_64-efi) target_m64=1 ;;
   i386-pc) ;;
   i386-coreboot) ;;
+  i386-linuxbios) platform=coreboot ;;
   i386-ieee1275) ;;
   powerpc-ieee1275) ;;
   sparc64-ieee1275) ;;
-  *) AC_MSG_ERROR([unsupported machine type]) ;;
+  *) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
 esac
 
 AC_SUBST(target_cpu)