: Don't try to use -mcmodel=large on sparc
PATCH 4/7 : Don't try to use -mcmodel=large on sparc
We don't have that code model, and such a code model is unnecessary on sparc64.
2009-03-03 David S. Miller <[email protected]>
* 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(-)
configure +8 -1
@@ -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
configure.ac +8 -1
@@ -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([[]], [[]])],
Signature · 1 line
1.6.1.2.253.ga34a
Quoted 3 lines · David Miller
We don't have that code model, and such a code model is unnecessary on sparc64.
Hi,
Oh, thanks for pointing out. In fact, mcmodel=large is only needed in x86_64-efi. I move the test to its own section, it would not interfere with sparc64 now.
Signature · 1 line
Bean
From: Bean <[email protected]>
Date: Wed, 4 Mar 2009 13:58:50 +0800
Quoted 10 lines · David Miller
Quoted 3 lines
We don't have that code model, and such a code model is unnecessary on sparc64.
Hi,
Oh, thanks for pointing out. In fact, mcmodel=large is only needed in x86_64-efi. I move the test to its own section, it would not interfere with sparc64 now.
Thanks.