mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 23:00:22 +00:00
65 lines
1.5 KiB
Plaintext
65 lines
1.5 KiB
Plaintext
|
GLIBC_PROVIDES[]dnl See aclocal.m4 in the top level source directory.
|
||
|
# Local preconfigure fragment for sysdeps/riscv
|
||
|
|
||
|
case "$machine" in
|
||
|
riscv*)
|
||
|
xlen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_xlen \(.*\)/\1/p'`
|
||
|
flen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_flen \(.*\)/\1/p'`
|
||
|
float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_float_abi_\([^ ]*\) .*/\1/p'`
|
||
|
atomic=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | grep '#define __riscv_atomic' | cut -d' ' -f2`
|
||
|
|
||
|
case "$xlen" in
|
||
|
64 | 32)
|
||
|
;;
|
||
|
*)
|
||
|
AC_MSG_ERROR([Unable to determine XLEN], [1])
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
case "$flen" in
|
||
|
64)
|
||
|
float_machine=rvd
|
||
|
with_fp_cond=1
|
||
|
;;
|
||
|
32)
|
||
|
AC_MSG_ERROR([glibc does not yet support systems with the F but not D extensions], 1)
|
||
|
;;
|
||
|
"")
|
||
|
with_fp_cond=0
|
||
|
;;
|
||
|
*)
|
||
|
AC_MSG_ERROR([Unable to determine FLEN], [1])
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
case "$float_abi" in
|
||
|
soft)
|
||
|
abi_flen=0
|
||
|
;;
|
||
|
single)
|
||
|
AC_MSG_ERROR([glibc does not yet support the single floating-point ABI], [1])
|
||
|
;;
|
||
|
double)
|
||
|
abi_flen=64
|
||
|
;;
|
||
|
*)
|
||
|
AC_MSG_ERROR([Unable to determine floating-point ABI], [1])
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
case "$atomic" in
|
||
|
__riscv_atomic)
|
||
|
;;
|
||
|
*)
|
||
|
AC_MSG_ERROR([glibc requires the A extension], [1])
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
base_machine=riscv
|
||
|
machine=riscv/rv$xlen/$float_machine
|
||
|
|
||
|
AC_DEFINE_UNQUOTED([RISCV_ABI_XLEN], [$xlen])
|
||
|
AC_DEFINE_UNQUOTED([RISCV_ABI_FLEN], [$abi_flen])
|
||
|
;;
|
||
|
esac
|