initial commit
[glibc.git] / sysdeps / unix / sysv / linux / riscv / configure.ac
1 sinclude(./aclocal.m4)dnl Autoconf lossage
2 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
3 # Local configure fragment for sysdeps/unix/sysv/linux/riscv.
4
5 arch_minimum_kernel=4.15.0
6
7 libc_cv_riscv_int_abi=no
8 AC_EGREP_CPP(4 8 8, [__SIZEOF_INT__ __SIZEOF_LONG__ __SIZEOF_POINTER__
9 ], libc_cv_riscv_int_abi=lp64)
10 AC_EGREP_CPP(4 4 4, [__SIZEOF_INT__ __SIZEOF_LONG__ __SIZEOF_POINTER__
11 ], libc_cv_riscv_int_abi=ilp32)
12 if test $libc_cv_riscv_int_abi = no; then
13 AC_MSG_ERROR([Unable to determine integer ABI])
14 fi
15
16 if test $libc_cv_riscv_int_abi = ilp32; then
17 arch_minimum_kernel=5.4.0
18 fi
19
20 libc_cv_riscv_float_abi=no
21 AC_EGREP_CPP(yes, [#ifdef __riscv_float_abi_double
22 yes
23 #endif
24 ],libc_cv_riscv_float_abi=d)
25 AC_EGREP_CPP(yes, [#ifdef __riscv_float_abi_soft
26 yes
27 #endif
28 ],libc_cv_riscv_float_abi=)
29 if test "$libc_cv_riscv_float_abi" = no; then
30 AC_MSG_ERROR([Unable to determine floating-point ABI])
31 fi
32
33 LIBC_CONFIG_VAR([default-abi], [$libc_cv_riscv_int_abi$libc_cv_riscv_float_abi])
34
35 case $libc_cv_riscv_int_abi$libc_cv_riscv_float_abi-$machine in
36 lp64-riscv/rv64/*)
37 LIBC_SLIBDIR_RTLDDIR([lib64/lp64], [lib])
38 ;;
39 lp64d-riscv/rv64/*)
40 LIBC_SLIBDIR_RTLDDIR([lib64/lp64d], [lib])
41 ;;
42 ilp32-riscv/rv32/*)
43 LIBC_SLIBDIR_RTLDDIR([lib32/ilp32], [lib])
44 ;;
45 ilp32d-riscv/rv32/*)
46 LIBC_SLIBDIR_RTLDDIR([lib32/ilp32d], [lib])
47 ;;
48 esac
49
50 ldd_rewrite_script=sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed