configure: Check whether we can compile the s390-ccw bios with -msoft-float
authorThomas Huth <thuth@redhat.com>
Tue, 25 May 2021 14:20:32 +0000 (16:20 +0200)
committerCornelia Huck <cohuck@redhat.com>
Mon, 21 Jun 2021 06:48:21 +0000 (08:48 +0200)
The -msoft-float switch is not available in older versions of Clang.
Since we rely on the compiler to not generate floating point instructions
unexpectedly, we block those old compilers now via a test in the configure
script. Note that for some weird reasons, the Clang compiler only complains
about the missing soft-float support if no other flags are passed via
"-Wl,..." to the linker. So we have to use "compile_object" instead of
"compile_prog" for this check.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210525142032.156989-1-thuth@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
configure

index 262ab71802eb4b379ce581bf7ca8d7aa0709168e..931f6ac01af07b6ccd7ffd3120963d5451c53c4c 100755 (executable)
--- a/configure
+++ b/configure
@@ -5424,7 +5424,7 @@ if test "$cpu" = "s390x" ; then
   write_c_skeleton
   compile_prog "-march=z900" ""
   has_z900=$?
-  if [ $has_z900 = 0 ] || compile_prog "-march=z10" ""; then
+  if [ $has_z900 = 0 ] || compile_object "-march=z10 -msoft-float -Werror"; then
     if [ $has_z900 != 0 ]; then
       echo "WARNING: Your compiler does not support the z900!"
       echo "         The s390-ccw bios will only work with guest CPUs >= z10."