From: Xiaotian Wu Date: Thu, 24 Aug 2023 13:04:01 +0000 (+0800) Subject: loongarch: Eliminate cmodel compilation warnings X-Git-Tag: grub-2.12~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3335591c6420ae373a24a4dc8f71d661b1fa3090;p=thirdparty%2Fgrub.git loongarch: Eliminate cmodel compilation warnings 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 Reviewed-by: Daniel Kiper --- diff --git a/configure.ac b/configure.ac index 77e20ad02..da9c8d560 100644 --- a/configure.ac +++ b/configure.ac @@ -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"