mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-29 05:51:10 +00:00
72dfddeffc
This patch lays out the top-level organisation of the RISC-V 32-bit port. It provides all the Implies files as well as various other fragments of the build infrastructure. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
68 lines
1.4 KiB
Plaintext
68 lines
1.4 KiB
Plaintext
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)
|
|
;;
|
|
*)
|
|
echo "Unable to determine XLEN" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
case "$flen" in
|
|
64)
|
|
float_machine=rvd
|
|
with_fp_cond=1
|
|
;;
|
|
32)
|
|
echo "glibc does not yet support systems with the F but not D extensions" >&2
|
|
exit 1
|
|
;;
|
|
"")
|
|
with_fp_cond=0
|
|
;;
|
|
*)
|
|
echo "Unable to determine FLEN" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
case "$float_abi" in
|
|
soft)
|
|
abi_flen=0
|
|
;;
|
|
single)
|
|
echo "glibc does not yet support the single floating-point ABI" >&2
|
|
exit 1
|
|
;;
|
|
double)
|
|
abi_flen=64
|
|
;;
|
|
*)
|
|
echo "Unable to determine floating-point ABI" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
case "$atomic" in
|
|
__riscv_atomic)
|
|
;;
|
|
*)
|
|
echo "glibc requires the A extension" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
base_machine=riscv
|
|
machine=riscv/rv$xlen/$float_machine
|
|
|
|
$as_echo "#define RISCV_ABI_XLEN $xlen" >>confdefs.h
|
|
$as_echo "#define RISCV_ABI_FLEN $abi_flen" >>confdefs.h
|
|
;;
|
|
esac
|