mirror of
https://git.musl-libc.org/git/musl
synced 2025-03-22 10:33:16 +03:00
fix superh nofpu check on old gcc versions
As far as gcc3 knows, sh4 is the only processor version that can have an FPU, so it indicates the FPU's presence by defining __SH4__. This is not defined if there is no FPU, even if the processor really is an SH4. Starting with gcc4, there is support for the sh2a processor, which has an FPU but is not an SH4. gcc4 therefore additionally defines __SH_FPU_ANY__ when there is an FPU, but still doesn't define __SH4__ for an FPU-less sh4. Therefore, to support all gcc versions, we must look at both preprocessor symbols.
This commit is contained in:
parent
c3d9d172b1
commit
23d64182d8
2
configure
vendored
2
configure
vendored
@ -429,7 +429,7 @@ test "$ARCH" = "microblaze" && trycppif __MICROBLAZEEL__ "$t" \
|
||||
|
||||
if test "$ARCH" = "sh" ; then
|
||||
trycppif __BIG_ENDIAN__ "$t" && SUBARCH=${SUBARCH}eb
|
||||
if trycppif __SH_FPU_ANY__ "$t" ; then
|
||||
if trycppif "__SH_FPU_ANY__ || __SH4__" "$t" ; then
|
||||
# Some sh configurations are broken and replace double with float
|
||||
# rather than using softfloat when the fpu is present but only
|
||||
# supports single precision. Reject them.
|
||||
|
Loading…
x
Reference in New Issue
Block a user