aarch64: Run SUBTARGET_INIT_BUILTINS if it exists
authorMaya Rashish <coypu@sdf.org>
Mon, 15 Feb 2021 18:38:55 +0000 (18:38 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 15 Feb 2021 18:38:55 +0000 (18:38 +0000)
commitf9d4544df5533df9f6144f4ca40b64195fd3de47
treeaf76d8d4d3a4a2a56fd13103c1b82bf25a68a5ae
parenta33927c9ab4af3f4595251ce0c8ba54db821b039
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