GNU bug report logs -
#69770
[PATCH] build: strengthen 16 bit float support checks
Previous Next
Reported by: Grisha Levit <grishalevit <at> gmail.com>
Date: Wed, 13 Mar 2024 02:27:02 UTC
Severity: normal
Tags: patch
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 69770 <at> debbugs.gnu.org (full text, mbox):
On 14/03/2024 05:59, Paul Eggert wrote:
> On 2024-03-12 19:24, Grisha Levit wrote:
>> - AC_COMPILE_IFELSE(
>> + AC_RUN_IFELSE(
>
> This sort of change would break cross-compilation, no?
It would disable this feature for cross-compilation yes,
but this isn't the first instance of AC_RUN_IFELSE we use.
> How about leaving it AC_COMPILE_IFELSE, but ensuring that -O1 or better
> is used when the compiler supports -O1? That way we don't have to worry
> about running the program, because (with the "volatile") clang will
> error out.
>
> Alternatively perhaps there's some way to check for the bug using
> preprocessor macros like __FLT16_MANT_DIG__, __FLT16_MAX_EXP__,
> __clang_major__, and __aarch64__. (This could be more fragile, though,
> as clang presumably will fix the bug eventually.)
That would probably work for this edge case, but it's brittle
and I'm worried about other combinations of
compiler versions, complier options, and architectures.
For example sse availability is in the mix here,
so this will now correctly avoid this feature with:
CFLAGS=-mno-sse ./configure --quiet
Whereas previously it would have built but produced wrong values.
cheers,
Pádraig.
This bug report was last modified 1 year and 69 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.