grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/7]: Don't try to use -mcmodel=large on sparc


From: David Miller
Subject: [PATCH 4/7]: Don't try to use -mcmodel=large on sparc
Date: Tue, 03 Mar 2009 18:15:24 -0800 (PST)

We don't have that code model, and such a code model is unnecessary
on sparc64.

2009-03-03  David S. Miller  <address@hidden>

        * configure.ac: Don't try to use -mcmodel=large on sparc.
        * configure: Rebuilt.
---
 configure    |    9 ++++++++-
 configure.ac |    9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index c3677c6..a4b9603 100755
--- a/configure
+++ b/configure
@@ -1999,7 +1999,8 @@ esac
 
 case "$target_cpu" in
   i386 | powerpc) target_m32=1 ;;
-  x86_64 | sparc64) target_m64=1 ;;
+  x86_64) target_m64_large=1 ;;
+  sparc64) target_m64=1 ;;
 esac
 
 case "$host_os" in
@@ -6774,6 +6775,12 @@ fi
 
 if test "x$target_m64" = x1; then
   # Force 64-bit mode.
+  TARGET_CFLAGS="$TARGET_CFLAGS -m64"
+  TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
+fi
+
+if test "x$target_m64_large" = x1; then
+  # Force 64-bit mode.
   { echo "$as_me:$LINENO: checking whether option -mcmodel=large works" >&5
 echo $ECHO_N "checking whether option -mcmodel=large works... $ECHO_C" >&6; }
 if test "${grub_cv_cc_mcmodel+set}" = set; then
diff --git a/configure.ac b/configure.ac
index fd89d30..9a8713d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,7 +96,8 @@ esac
 
 case "$target_cpu" in
   i386 | powerpc) target_m32=1 ;;
-  x86_64 | sparc64) target_m64=1 ;;
+  x86_64) target_m64_large=1 ;;
+  sparc64) target_m64=1 ;;
 esac
 
 case "$host_os" in
@@ -299,6 +300,12 @@ fi
 
 if test "x$target_m64" = x1; then
   # Force 64-bit mode.
+  TARGET_CFLAGS="$TARGET_CFLAGS -m64"
+  TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
+fi
+
+if test "x$target_m64_large" = x1; then
+  # Force 64-bit mode.
   AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
     CFLAGS="-m64 -mcmodel=large"
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
-- 
1.6.1.2.253.ga34a





reply via email to

[Prev in Thread] Current Thread [Next in Thread]