2022-05-13 16:07:23 +00:00
|
|
|
# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
|
|
|
|
# Local preconfigure fragment for sysdeps/riscv
|
|
|
|
|
2018-01-29 18:30:24 +00:00
|
|
|
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
|
2018-11-30 09:18:00 +00:00
|
|
|
64 | 32)
|
2018-01-29 18:30:24 +00:00
|
|
|
;;
|
|
|
|
*)
|
2022-05-13 16:07:23 +00:00
|
|
|
as_fn_error 1 "Unable to determine XLEN" "$LINENO" 5
|
2018-01-29 18:30:24 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$flen" in
|
|
|
|
64)
|
|
|
|
float_machine=rvd
|
|
|
|
with_fp_cond=1
|
|
|
|
;;
|
|
|
|
32)
|
2022-05-13 16:07:23 +00:00
|
|
|
as_fn_error 1 "glibc does not yet support systems with the F but not D extensions" "$LINENO" 5
|
2018-01-29 18:30:24 +00:00
|
|
|
;;
|
|
|
|
"")
|
|
|
|
with_fp_cond=0
|
|
|
|
;;
|
|
|
|
*)
|
2022-05-13 16:07:23 +00:00
|
|
|
as_fn_error 1 "Unable to determine FLEN" "$LINENO" 5
|
2018-01-29 18:30:24 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$float_abi" in
|
|
|
|
soft)
|
|
|
|
abi_flen=0
|
|
|
|
;;
|
|
|
|
single)
|
2022-05-13 16:07:23 +00:00
|
|
|
as_fn_error 1 "glibc does not yet support the single floating-point ABI" "$LINENO" 5
|
2018-01-29 18:30:24 +00:00
|
|
|
;;
|
|
|
|
double)
|
|
|
|
abi_flen=64
|
|
|
|
;;
|
|
|
|
*)
|
2022-05-13 16:07:23 +00:00
|
|
|
as_fn_error 1 "Unable to determine floating-point ABI" "$LINENO" 5
|
2018-01-29 18:30:24 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$atomic" in
|
|
|
|
__riscv_atomic)
|
2022-05-13 16:07:23 +00:00
|
|
|
;;
|
2018-01-29 18:30:24 +00:00
|
|
|
*)
|
2022-05-13 16:07:23 +00:00
|
|
|
as_fn_error 1 "glibc requires the A extension" "$LINENO" 5
|
2018-01-29 18:30:24 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
base_machine=riscv
|
|
|
|
machine=riscv/rv$xlen/$float_machine
|
|
|
|
|
2022-05-13 16:07:23 +00:00
|
|
|
cat >>confdefs.h <<_ACEOF
|
|
|
|
#define RISCV_ABI_XLEN $xlen
|
|
|
|
_ACEOF
|
|
|
|
|
|
|
|
cat >>confdefs.h <<_ACEOF
|
|
|
|
#define RISCV_ABI_FLEN $abi_flen
|
|
|
|
_ACEOF
|
|
|
|
|
2018-01-29 18:30:24 +00:00
|
|
|
;;
|
|
|
|
esac
|