string: Allow use of test-string.h for non-ifunc implementations.
[glibc.git] / sysdeps / riscv / preconfigure
blob4dedf4b0bb60341e272046daa716bfc5e1e6452a
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2 # Local preconfigure fragment for sysdeps/riscv
4 case "$machine" in
5 riscv*)
6     xlen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_xlen \(.*\)/\1/p'`
7     flen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_flen \(.*\)/\1/p'`
8     float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_float_abi_\([^ ]*\) .*/\1/p'`
9     atomic=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | grep '#define __riscv_atomic' | cut -d' ' -f2`
11     case "$xlen" in
12     64 | 32)
13         ;;
14     *)
15         as_fn_error 1 "Unable to determine XLEN" "$LINENO" 5
16         ;;
17     esac
19     case "$flen" in
20     64)
21         float_machine=rvd
22         with_fp_cond=1
23         ;;
24     32)
25         as_fn_error 1 "glibc does not yet support systems with the F but not D extensions" "$LINENO" 5
26         ;;
27     "")
28         with_fp_cond=0
29         ;;
30     *)
31         as_fn_error 1 "Unable to determine FLEN" "$LINENO" 5
32         ;;
33     esac
35     case "$float_abi" in
36     soft)
37         abi_flen=0
38         ;;
39     single)
40         as_fn_error 1 "glibc does not yet support the single floating-point ABI" "$LINENO" 5
41         ;;
42     double)
43         abi_flen=64
44         ;;
45     *)
46         as_fn_error 1 "Unable to determine floating-point ABI" "$LINENO" 5
47         ;;
48     esac
50     case "$atomic" in
51     __riscv_atomic)
52         ;;
53     *)
54         as_fn_error 1 "glibc requires the A extension" "$LINENO" 5
55         ;;
56     esac
58     base_machine=riscv
59     machine=riscv/rv$xlen/$float_machine
61     cat >>confdefs.h <<_ACEOF
62 #define RISCV_ABI_XLEN $xlen
63 _ACEOF
65     cat >>confdefs.h <<_ACEOF
66 #define RISCV_ABI_FLEN $abi_flen
67 _ACEOF
69     ;;
70 esac