From f9d4544df5533df9f6144f4ca40b64195fd3de47 Mon Sep 17 00:00:00 2001 From: Maya Rashish Date: Mon, 15 Feb 2021 18:38:55 +0000 Subject: [PATCH] aarch64: Run SUBTARGET_INIT_BUILTINS if it exists 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/aarch64/aarch64.c (aarch64_init_builtins): Call SUBTARGET_INIT_BUILTINS. --- gcc/config/aarch64/aarch64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 146ed8c1b69..6fda6bca2a5 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -13492,6 +13492,9 @@ aarch64_init_builtins () { aarch64_general_init_builtins (); aarch64_sve::init_builtins (); +#ifdef SUBTARGET_INIT_BUILTINS + SUBTARGET_INIT_BUILTINS; +#endif } /* Implement TARGET_FOLD_BUILTIN. */ -- 2.30.2