hurd: Fix restoring message to be retried
[glibc.git] / sysdeps / loongarch / configure
blobd3d9fec9109cea5f96e29cba797867e978484700
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/loongarch/elf.
4 printf "%s\n" "#define HIDDEN_VAR_NEEDS_DYNAMIC_RELOC 1" >>confdefs.h
7 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${CC-cc} is sufficient to build static PIE on LoongArch" >&5
8 printf %s "checking if ${CC-cc} is sufficient to build static PIE on LoongArch... " >&6; }
9 if test ${libc_cv_static_pie_on_loongarch+y}
10 then :
11   printf %s "(cached) " >&6
12 else case e in #(
13   e)
14   cat > conftest.S <<\EOF
15 .global _start
16 .type _start, @function
17 _start:
18   li.w $a7, 93
19   li.w $a0, 0
20   syscall 0
22 .data
24   .word 0
25   /* This should produce an R_LARCH_RELATIVE in the static PIE.  */
26   .dword _start
27 EOF
29   libc_cv_static_pie_on_loongarch=no
30   if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static-pie -nostdlib -fPIE -o conftest conftest.S'
31   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
32   (eval $ac_try) 2>&5
33   ac_status=$?
34   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35   test $ac_status = 0; }; } \
36      && { ac_try='LC_ALL=C $READELF -Wr conftest | grep -q R_LARCH_RELATIVE'
37   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
38   (eval $ac_try) 2>&5
39   ac_status=$?
40   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41   test $ac_status = 0; }; } \
42      && ! { ac_try='LC_ALL=C $READELF -Wl conftest | grep -q INTERP'
43   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
44   (eval $ac_try) 2>&5
45   ac_status=$?
46   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47   test $ac_status = 0; }; }
48   then
49     libc_cv_static_pie_on_loongarch=yes
50   fi
51   rm -rf conftest*  ;;
52 esac
54 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_static_pie_on_loongarch" >&5
55 printf "%s\n" "$libc_cv_static_pie_on_loongarch" >&6; }
57 if test "$libc_cv_static_pie_on_loongarch" = yes; then
58   printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
62   # Check if gcc supports option -mcmodel=medium.
63 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports option -mcmodel=medium" >&5
64 printf %s "checking whether $CC supports option -mcmodel=medium... " >&6; }
65 if test ${libc_cv_loongarch_cmodel_medium+y}
66 then :
67   printf %s "(cached) " >&6
68 else case e in #(
69   e)
70   if { ac_try='${CC-cc} -c $CFLAGS -mcmodel=medium /dev/null 1>&5'
71   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
72   (eval $ac_try) 2>&5
73   ac_status=$?
74   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
75   test $ac_status = 0; }; }; then
76     libc_cv_loongarch_cmodel_medium=yes
77   else
78     libc_cv_loongarch_cmodel_medium=no
79   fi ;;
80 esac
82 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_loongarch_cmodel_medium" >&5
83 printf "%s\n" "$libc_cv_loongarch_cmodel_medium" >&6; }
84 config_vars="$config_vars
85 have-cmodel-medium = $libc_cv_loongarch_cmodel_medium"
87 # Check if asm support vector instructions.
88 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vector support in assembler" >&5
89 printf %s "checking for vector support in assembler... " >&6; }
90 if test ${libc_cv_loongarch_vec_asm+y}
91 then :
92   printf %s "(cached) " >&6
93 else case e in #(
94   e) cat > conftest.s <<\EOF
95         vld  $vr0, $sp, 0
96 EOF
97 if { ac_try='${CC-cc} -c $CFLAGS conftest.s -o conftest 1>&5'
98   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
99   (eval $ac_try) 2>&5
100   ac_status=$?
101   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
102   test $ac_status = 0; }; }; then
103   libc_cv_loongarch_vec_asm=yes
104 else
105   libc_cv_loongarch_vec_asm=no
107 rm -f conftest* ;;
108 esac
110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_loongarch_vec_asm" >&5
111 printf "%s\n" "$libc_cv_loongarch_vec_asm" >&6; }
112 if test $libc_cv_loongarch_vec_asm = no; then
113   as_fn_error $? "binutils version is too old, use 2.41 or newer version" "$LINENO" 5
117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vector support in compiler" >&5
118 printf %s "checking for vector support in compiler... " >&6; }
119 if test ${libc_cv_loongarch_vec_com+y}
120 then :
121   printf %s "(cached) " >&6
122 else case e in #(
123   e)
124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
125 /* end confdefs.h.  */
127 void foo (void)
129   asm volatile ("vldi \$vr0, 1" ::: "\$vr0");
130   asm volatile ("xvldi \$xr0, 1" ::: "\$xr0");
133 _ACEOF
134 if ac_fn_c_try_compile "$LINENO"
135 then :
136   libc_cv_loongarch_vec_com=yes
137 else case e in #(
138   e) libc_cv_loongarch_vec_com=no ;;
139 esac
141 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
142 esac
144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_loongarch_vec_com" >&5
145 printf "%s\n" "$libc_cv_loongarch_vec_com" >&6; }
146 if test "$libc_cv_loongarch_vec_com" = yes ;
147 then
148   printf "%s\n" "#define HAVE_LOONGARCH_VEC_COM 1" >>confdefs.h
151 config_vars="$config_vars
152 loongarch-vec-com = $libc_cv_loongarch_vec_com"