From ec6d2b83f254606fc2e646595782a70b301a2524 Mon Sep 17 00:00:00 2001 From: quxm Date: Wed, 25 Jan 2023 17:47:33 +0800 Subject: C-SKY: Strip hard float abi from hard float feature. The hard float abi and hard float are different, Hard float abi: Use float register to pass float type arguments. Hard float: Enable the hard float ISA feature. So the with_fp_cond cannot represent these two features. When -mfloat-abi=softfp, the float abi is soft and hard float is enabled. So add 'with_hard_float_abi' in preconfigure and define 'CSKY_HARD_FLOAT_ABI' if float abi is hard, and use 'CSKY_HARD_FLOAT_ABI' to determine dynamic linker because it is what determines compatibility. And with_fp_cond is still needed to tell glibc whether to enable hard floating feature. In addition, use AC_TRY_COMMAND to test gcc to ensure compatibility between different versions of gcc. The original way has a problem that __CSKY_HARD_FLOAT_FPU_SF__ means the target only has single hard float-points ISA, so it's not defined in CPUs like ck810f. Reviewed-by: Adhemerval Zanella --- config.h.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config.h.in') diff --git a/config.h.in b/config.h.in index 43d32518ab..09730d9d52 100644 --- a/config.h.in +++ b/config.h.in @@ -123,9 +123,12 @@ /* C-SKY ABI version. */ #undef CSKYABI -/* C-SKY floating-point ABI. */ +/* C-SKY floating-point instructions. */ #undef CSKY_HARD_FLOAT +/* C-SKY floating-point ABI. */ +#undef CSKY_HARD_FLOAT_ABI + /* RISC-V integer ABI for ld.so. */ #undef RISCV_ABI_XLEN -- cgit 1.4.1