diff options
author | Zong Li <zongbox@gmail.com> | 2018-11-30 17:18:00 +0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2020-08-27 08:17:43 -0700 |
commit | 72dfddeffcc993a726bdcbe5e515afa1180095e8 (patch) | |
tree | c164b32b945df48e74ad88e1f4e539bd44a4b5de /sysdeps/unix/sysv/linux/riscv/configure | |
parent | 30b963c143eaa07f09567f2e0649edb7525c43fd (diff) | |
download | glibc-72dfddeffcc993a726bdcbe5e515afa1180095e8.tar.gz glibc-72dfddeffcc993a726bdcbe5e515afa1180095e8.tar.xz glibc-72dfddeffcc993a726bdcbe5e515afa1180095e8.zip |
RISC-V: Build infrastructure for 32-bit port
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>
Diffstat (limited to 'sysdeps/unix/sysv/linux/riscv/configure')
-rwxr-xr-x | sysdeps/unix/sysv/linux/riscv/configure | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/riscv/configure b/sysdeps/unix/sysv/linux/riscv/configure index de3bb62003..33139618e7 100755 --- a/sysdeps/unix/sysv/linux/riscv/configure +++ b/sysdeps/unix/sysv/linux/riscv/configure @@ -147,6 +147,17 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | fi rm -f conftest* +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +__SIZEOF_INT__ __SIZEOF_LONG__ __SIZEOF_POINTER__ + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "4 4 4" >/dev/null 2>&1; then : + libc_cv_riscv_int_abi=ilp32 +fi +rm -f conftest* + if test $libc_cv_riscv_int_abi = no; then as_fn_error $? "Unable to determine integer ABI" "$LINENO" 5 fi @@ -218,6 +229,34 @@ case "$prefix" in ;; esac ;; +ilp32-riscv/rv32/*) + test -n "$libc_cv_slibdir" || +case "$prefix" in +/usr | /usr/) + libc_cv_slibdir='/lib32/ilp32' + libc_cv_rtlddir='/lib' + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib32/ilp32'; + # Locale data can be shared between 32-bit and 64-bit libraries. + libc_cv_complocaledir='${exec_prefix}/lib/locale' + fi + ;; +esac + ;; +ilp32d-riscv/rv32/*) + test -n "$libc_cv_slibdir" || +case "$prefix" in +/usr | /usr/) + libc_cv_slibdir='/lib32/ilp32d' + libc_cv_rtlddir='/lib' + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib32/ilp32d'; + # Locale data can be shared between 32-bit and 64-bit libraries. + libc_cv_complocaledir='${exec_prefix}/lib/locale' + fi + ;; +esac + ;; esac ldd_rewrite_script=sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed |