about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorquxm <xianmiao.qxm@alibaba-inc.com>2023-01-25 17:47:33 +0800
committerMao Han <han_mao@linux.alibaba.com>2023-02-07 16:34:24 +0800
commitec6d2b83f254606fc2e646595782a70b301a2524 (patch)
tree1db32c468ba0ca1b387f30140aac6266f8ad46c6 /sysdeps/unix
parent41f67ccbe92b4fd09e1062b383e55e407ae5bfa1 (diff)
downloadglibc-ec6d2b83f254606fc2e646595782a70b301a2524.tar.gz
glibc-ec6d2b83f254606fc2e646595782a70b301a2524.tar.xz
glibc-ec6d2b83f254606fc2e646595782a70b301a2524.zip
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  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/csky/shlib-versions4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/csky/shlib-versions b/sysdeps/unix/sysv/linux/csky/shlib-versions
index 8c026356ef..4ab7d6b83e 100644
--- a/sysdeps/unix/sysv/linux/csky/shlib-versions
+++ b/sysdeps/unix/sysv/linux/csky/shlib-versions
@@ -1,8 +1,8 @@
 DEFAULT			GLIBC_2.29
 
-%if CSKYABI == 2 && CSKY_HARD_FLOAT == 1
+%if CSKYABI == 2 && CSKY_HARD_FLOAT_ABI == 1
 ld=ld-linux-cskyv2-hf.so.1
-%elif CSKYABI == 2 && CSKY_HARD_FLOAT == 0
+%elif CSKYABI == 2 && CSKY_HARD_FLOAT_ABI == 0
 ld=ld-linux-cskyv2.so.1
 %else
 %error cannot determine ABI