hurd: Add missing va_end call in fcntl implementation. [BZ #32234]
[glibc.git] / sysdeps / riscv / configure
blob3ae4ae3bdbb73382b183b6b05a94d8a8f029aaf0
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/riscv/elf.
4 # Check if static linker supports R_RISCV_ALIGN
5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for R_RISCV_ALIGN linker relaxation support" >&5
6 printf %s "checking for R_RISCV_ALIGN linker relaxation support... " >&6; }
7 if test ${libc_cv_riscv_r_align+y}
8 then :
9   printf %s "(cached) " >&6
10 else case e in #(
11   e)   cat > conftest.S <<EOF
12 .align 3
13 foo:
14   li a0,42
15   ret
16 EOF
17   libc_cv_riscv_r_align=no
18   if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles $no_ssp -shared -fPIC -o contests.o conftest.S'
19   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
20   (eval $ac_try) 2>&5
21   ac_status=$?
22   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23   test $ac_status = 0; }; }
24   then
25     libc_cv_riscv_r_align=yes
26   fi
27   rm -rf conftest.* ;;
28 esac
30 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_riscv_r_align" >&5
31 printf "%s\n" "$libc_cv_riscv_r_align" >&6; }
32 config_vars="$config_vars
33 riscv-r-align = $libc_cv_riscv_r_align"
35 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the toolchain is sufficient to build static PIE on RISC-V" >&5
36 printf %s "checking if the toolchain is sufficient to build static PIE on RISC-V... " >&6; }
37 if test ${libc_cv_static_pie_on_riscv+y}
38 then :
39   printf %s "(cached) " >&6
40 else case e in #(
41   e)
42   cat > conftest1.S <<\EOF
43     .globl _start
44     .type   _start, @function
45 _start:
46     nop
48     .data
49     /* This should produce an R_RISCV_RELATIVE in the static PIE.  */
50     .dword      _start
51 EOF
53   libc_cv_static_pie_on_riscv=no
54   if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static-pie -nostdlib -fPIE -o conftest1 conftest1.S'
55   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
56   (eval $ac_try) 2>&5
57   ac_status=$?
58   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59   test $ac_status = 0; }; } \
60      && { ac_try='LC_ALL=C $READELF -Wr conftest1 | grep -q R_RISCV_RELATIVE'
61   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
62   (eval $ac_try) 2>&5
63   ac_status=$?
64   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65   test $ac_status = 0; }; } \
66      && ! { ac_try='LC_ALL=C $READELF -Wl conftest1 | grep -q INTERP'
67   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
68   (eval $ac_try) 2>&5
69   ac_status=$?
70   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
71   test $ac_status = 0; }; }
72   then
73     libc_cv_static_pie_on_riscv=yes
74   fi
75   rm -rf conftest*  ;;
76 esac
78 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_static_pie_on_riscv" >&5
79 printf "%s\n" "$libc_cv_static_pie_on_riscv" >&6; }
81 if test "$libc_cv_static_pie_on_riscv" = yes; then
82   printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h