[PATCH v2] C-SKY: Strip hard float abi from hard float feature.

Xianmiao Qu cooper.qu@linux.alibaba.com
Sat Jan 28 01:48:11 GMT 2023


On Fri, Jan 27, 2023 at 04:24:32PM -0300, Adhemerval Zanella Netto wrote:
> 
> 
> It is not clear to me why you need to use '-mfloat-abi=softfp' to check 
> for soft-float ABI, since it *won't* be used to actually build glibc
> (meaning that the compiler build invocation not necessary will use the
> same ABI as the test is doing).
>

This is for compatibility with versions prior to GCC 11. The older versions
of C-SKY GCC don't support -mfloat-abi=softfp, so the '__CSKY_HARD_FLOAT_ABI__'
is always not defined, and the expression 'defined(__CSKY_HARD_FLOAT__) && !defined(__CSKY_HARD_FLOAT_ABI__)'
which is correct for newer versions of GCC does not work for older versions.
And there doesn't seem to be an expression compitable with all versions of GCC,
so I add the check for the '-mfloat-abi=softfp' option.


More information about the Libc-alpha mailing list