]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
loongarch: Eliminate cmodel compilation warnings
authorXiaotian Wu <wuxiaotian@loongson.cn>
Thu, 24 Aug 2023 13:04:01 +0000 (21:04 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 22 Sep 2023 16:38:36 +0000 (18:38 +0200)
In the configure phase, the "-mcmodel=large" CFLAGS passed the test, but
because it has not been implemented in gcc, the following warning will
appear when compiling:

  gcc: warning: 'large' is not supported, now cmodel is set to 'normal'

Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
configure.ac

index 77e20ad0251106a642dfbcb57871cca1be550774..da9c8d560c88c8ad2ded5501f7068d8fab4a66fd 100644 (file)
@@ -1275,8 +1275,7 @@ AC_SUBST(TARGET_LDFLAGS_OLDMAGIC)
 
 LDFLAGS="$TARGET_LDFLAGS"
 
-if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64 \
-  || test "$target_cpu" = loongarch64 ; then
+if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64 ; then
   # Use large model to support 4G memory
   AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
     CFLAGS="$TARGET_CFLAGS -mcmodel=large"