1 GLIBC_PROVIDES[]dnl See aclocal.m4 in the top level source directory.
2 # Local preconfigure fragment for sysdeps/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`
15 AC_MSG_ERROR([Unable to determine XLEN], [1])
25 AC_MSG_ERROR([glibc does not yet support systems with the F but not D extensions], 1)
31 AC_MSG_ERROR([Unable to determine FLEN], [1])
40 AC_MSG_ERROR([glibc does not yet support the single floating-point ABI], [1])
46 AC_MSG_ERROR([Unable to determine floating-point ABI], [1])
54 AC_MSG_ERROR([glibc requires the A extension], [1])
59 machine=riscv/rv$xlen/$float_machine
61 AC_DEFINE_UNQUOTED([RISCV_ABI_XLEN], [$xlen])
62 AC_DEFINE_UNQUOTED([RISCV_ABI_FLEN], [$abi_flen])