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