Some subtargets don't provide the canonical function names as the symbol name in C libraries, and libcalls will only work if the builtins are patched to emit the correct library name.
For example, on NetBSD, cabsl has the symbol name __c99_cabsl, and the patching is done via netbsd_patch_builtin. With this change, libgfortran.so is correctly built with a reference to __c99_cabsl, instead of "cabsl" which is not defined. gcc/ChangeLog: * config/sparc/sparc.c (sparc_init_builtins): Call SUBTARGET_INIT_BUILTINS. --- gcc/config/sparc/sparc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index f3557936114..fe6475f2520 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -10962,6 +10962,9 @@ sparc_init_builtins (void) if (TARGET_VIS) sparc_vis_init_builtins (); +#ifdef SUBTARGET_INIT_BUILTINS + SUBTARGET_INIT_BUILTINS; +#endif } /* Create builtin functions for FPU instructions. */ -- 2.28.0