Blame sysdeps/riscv/preconfigure
|
Packit Service |
82fcde |
case "$machine" in
|
|
Packit Service |
82fcde |
riscv*)
|
|
Packit Service |
82fcde |
xlen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_xlen \(.*\)/\1/p'`
|
|
Packit Service |
82fcde |
flen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_flen \(.*\)/\1/p'`
|
|
Packit Service |
82fcde |
float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_float_abi_\([^ ]*\) .*/\1/p'`
|
|
Packit Service |
82fcde |
atomic=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | grep '#define __riscv_atomic' | cut -d' ' -f2`
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
case "$xlen" in
|
|
Packit Service |
82fcde |
32)
|
|
Packit Service |
82fcde |
echo "glibc does not yet support 32-bit systems" >&2
|
|
Packit Service |
82fcde |
exit 1
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
64)
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
*)
|
|
Packit Service |
82fcde |
echo "Unable to determine XLEN" >&2
|
|
Packit Service |
82fcde |
exit 1
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
esac
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
case "$flen" in
|
|
Packit Service |
82fcde |
64)
|
|
Packit Service |
82fcde |
float_machine=rvd
|
|
Packit Service |
82fcde |
with_fp_cond=1
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
32)
|
|
Packit Service |
82fcde |
echo "glibc does not yet support systems with the F but not D extensions" >&2
|
|
Packit Service |
82fcde |
exit 1
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
"")
|
|
Packit Service |
82fcde |
with_fp_cond=0
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
*)
|
|
Packit Service |
82fcde |
echo "Unable to determine FLEN" >&2
|
|
Packit Service |
82fcde |
exit 1
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
esac
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
case "$float_abi" in
|
|
Packit Service |
82fcde |
soft)
|
|
Packit Service |
82fcde |
abi_flen=0
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
single)
|
|
Packit Service |
82fcde |
echo "glibc does not yet support the single floating-point ABI" >&2
|
|
Packit Service |
82fcde |
exit 1
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
double)
|
|
Packit Service |
82fcde |
abi_flen=64
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
*)
|
|
Packit Service |
82fcde |
echo "Unable to determine floating-point ABI" >&2
|
|
Packit Service |
82fcde |
exit 1
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
esac
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
case "$atomic" in
|
|
Packit Service |
82fcde |
__riscv_atomic)
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
*)
|
|
Packit Service |
82fcde |
echo "glibc requires the A extension" >&2
|
|
Packit Service |
82fcde |
exit 1
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
esac
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
base_machine=riscv
|
|
Packit Service |
82fcde |
machine=riscv/rv$xlen/$float_machine
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
$as_echo "#define RISCV_ABI_XLEN $xlen" >>confdefs.h
|
|
Packit Service |
82fcde |
$as_echo "#define RISCV_ABI_FLEN $abi_flen" >>confdefs.h
|
|
Packit Service |
82fcde |
;;
|
|
Packit Service |
82fcde |
esac
|