On Sat, 31 Dec 2022, Iain Sandoe wrote: > builtins.def unconditionally defines these builtins to be DEF_EXT_LIB_BUILTIN > which expands to the libcall, this is currently hard-wired to FALLBACK_P = true. > > but, AFAIU the builtins.def descriptions: > > FALLBACK_P should be false if the libc (or libm, I suppose, if that’s different) > does not have the function, perhaps that’s an underlying bug or at least an > oversight? > > (or, of course, I misunderstood the intent of that param) FALLBACK_P true means that it's the user's responsibility, if calling __builtin_X, to make sure the library function X is also available in cases where the call doesn't get expected inline - that is, that the API for that __builtin_X function is that it may call an underlying library function X, which is expected to exist and have a compatible interface. Information about whether a function is present in libc / libm is generally only relevant when __builtin_X might expand to call Y instead of X; then GCC needs to know whether Y is available. > - at present, it seems that this crt might be the least invasive > solution (since ‘significand*()’ are not obsolete AFAIU, we still need > to provide those implementations, regardless of any subsitution of > scalbn*() in Modula-2). The significand functions can be considered obsolete and were never in any standard (thus glibc does not provide a version for _Float128, for example). -- Joseph S. Myers joseph@codesourcery.com