diff options
author | caiyinyu <caiyinyu@loongson.cn> | 2022-07-19 09:22:07 +0800 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-07-26 12:35:12 -0300 |
commit | 3d87c89815314b0854604a9e9be2990818ca6f6a (patch) | |
tree | e9c7b583efbe736e7e7428217657323dd5013a56 /sysdeps/loongarch/preconfigure | |
parent | 0d4a891a7ca14cc38075d043a1cf2a531a809a70 (diff) | |
download | glibc-3d87c89815314b0854604a9e9be2990818ca6f6a.zip glibc-3d87c89815314b0854604a9e9be2990818ca6f6a.tar.gz glibc-3d87c89815314b0854604a9e9be2990818ca6f6a.tar.bz2 |
LoongArch: Build Infrastructure
Diffstat (limited to 'sysdeps/loongarch/preconfigure')
-rw-r--r-- | sysdeps/loongarch/preconfigure | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/sysdeps/loongarch/preconfigure b/sysdeps/loongarch/preconfigure new file mode 100644 index 0000000..118963c --- /dev/null +++ b/sysdeps/loongarch/preconfigure @@ -0,0 +1,53 @@ +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! +# Local preconfigure fragment for sysdeps/loongarch + +case "$machine" in +loongarch*) + + abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __loongarch_\(lp64\|ilp32\).*/\1/p'` + float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __loongarch_\(soft\|single\|double\)_float.*/\1/p'` + + with_fp_cond="!defined __loongarch_soft_float" + + case "$float_abi" in + soft) + abi_flen=0 + as_fn_error 1 "loongarch does not yet support soft floating-point ABI!!" "$LINENO" 5 + ;; + single) + as_fn_error 1 "glibc does not yet support the single floating-point ABI!!" "$LINENO" 5 + ;; + double) + abi_flen=64 + ;; + *) + as_fn_error 1 "Unable to determine floating-point ABI!!" "$LINENO" 5 + ;; + esac + + case "$abi" in + ilp32) + as_fn_error 1 "loongarch does not yet support ilp32 ABI!!" "$LINENO" 5 + ;; + lp64) + grlen=64 + machine=loongarch/lp64 + ;; + *) + as_fn_error 1 "Unable to determine GRLEN!!" "$LINENO" 5 + ;; + esac + + cat >>confdefs.h <<_ACEOF +#define LOONGARCH_ABI_GRLEN $grlen +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define LOONGARCH_ABI_FRLEN $abi_flen +_ACEOF + + + base_machine=loongarch + ;; +esac + |