3 xlen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_xlen \(.*\)/\1/p'`
4 flen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_flen \(.*\)/\1/p'`
5 float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_float_abi_\([^ ]*\) .*/\1/p'`
6 atomic=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | grep '#define __riscv_atomic' | cut -d' ' -f2`
10 echo "glibc does not yet support 32-bit systems" >&2
16 echo "Unable to determine XLEN" >&2
27 echo "glibc does not yet support systems with the F but not D extensions" >&2
34 echo "Unable to determine FLEN" >&2
44 echo "glibc does not yet support the single floating-point ABI" >&2
51 echo "Unable to determine floating-point ABI" >&2
60 echo "glibc requires the A extension" >&2
66 machine=riscv/rv$xlen/$float_machine
68 $as_echo "#define RISCV_ABI_XLEN $xlen" >>confdefs.h
69 $as_echo "#define RISCV_ABI_FLEN $abi_flen" >>confdefs.h