about summary refs log tree commit diff
path: root/sysdeps/loongarch/configure
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/loongarch/configure')
-rw-r--r--sysdeps/loongarch/configure22
1 files changed, 22 insertions, 0 deletions
diff --git a/sysdeps/loongarch/configure b/sysdeps/loongarch/configure
index 3046915ce2..a08ba67c9a 100644
--- a/sysdeps/loongarch/configure
+++ b/sysdeps/loongarch/configure
@@ -72,3 +72,25 @@ if test "$libc_cv_static_pie_on_loongarch" = yes; then
   $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
 fi
+
+  # Check if gcc supports option -mcmodel=medium.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports option -mcmodel=medium" >&5
+$as_echo_n "checking whether $CC supports option -mcmodel=medium... " >&6; }
+if ${libc_cv_loongarch_cmodel_medium+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    if { ac_try='${CC-cc} -c $CFLAGS -mcmodel=medium /dev/null 1>&5'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    libc_cv_loongarch_cmodel_medium=yes
+  else
+    libc_cv_loongarch_cmodel_medium=no
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_loongarch_cmodel_medium" >&5
+$as_echo "$libc_cv_loongarch_cmodel_medium" >&6; }
+config_vars="$config_vars
+have-cmodel-medium = $libc_cv_loongarch_cmodel_medium"