Hi Joseph, > On 30 Dec 2022, at 22:26, Joseph Myers <jos...@codesourcery.com> wrote: > > On Fri, 30 Dec 2022, Iain Sandoe via Gcc-patches wrote: > >> This patch is providing functions used by the modula-2 implementation. >> >> At present, I've used a crt rather than adding symbols to libgcc, since >> it is not clear if the modula-2 might alter the use of scalb to scalbn >> (although that will not solve the missing significand* symbols). >> >> I plan to apply the patch early next week (it is Darwin-specific) unless >> there are any comments on the implementation. > > I think it would be better to change Modula-2 to avoid using these > obsolescent functions, rather than providing them in GCC.
It seems that the Modula-2 use has drawn my attention to a pre-existing issue. 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) > (But if provided, the libgcc runtime license exception should be used.) thanks, I’d missed this. - 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). thanks Iain > > -- > Joseph S. Myers > jos...@codesourcery.com