[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: Check whether we can compile the s390-ccw bios wi

From: Thomas Huth
Subject: Re: [PATCH] configure: Check whether we can compile the s390-ccw bios with -msoft-float
Date: Tue, 25 May 2021 16:40:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

On 25/05/2021 16.31, Cornelia Huck wrote:
On Tue, 25 May 2021 16:20:32 +0200
Thomas Huth <thuth@redhat.com> wrote:

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.


It's maybe better to use compile_object for testing -msoft-float anyway since it could influence the way of linking against libraries (if I get https://reviews.llvm.org/D72189 right).

Signed-off-by: Thomas Huth <thuth@redhat.com>
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 676239c697..673419ff31 100755
--- a/configure
+++ b/configure
@@ -5462,7 +5462,7 @@ if test "$cpu" = "s390x" ; then
    compile_prog "-march=z900" ""
-  if [ $has_z900 = 0 ] || compile_prog "-march=z10" ""; then
+  if [ $has_z900 = 0 ] || compile_object "-march=z10 -msoft-float -Werror"; 

Do you believe that we should have caught the various clang
specialties now?

Apart from one compiler warning that just popped up today, yes. I'm seeing this compiler warning with Clang 12.0 now:

roms/SLOF/lib/libnet/ipv6.c:447:18: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
                unsigned short raw[ip6size];

... not sure what to do with that one yet.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]