architecture list from netbsd src/tests/libexec/ld.elf_so/t_ifunc.c
(quick reference: 
https://github.com/NetBSD/src/blob/trunk/tests/libexec/ld.elf_so/t_ifunc.c#L38 )
tested on netbsd/amd64.

ifuncs worked anyway, but I can't use target_clones without this change.
that is one very cool feature I'd like to use :)

gcc/ChangeLog:
2019-04-07      Maya Rashish    <co...@sdf.org>
        * config.gcc (default_gnu_indirect_function): Default to yes
        for arm*-*-netbsd*, i[34567]86-*-netbsd*, powerpc*-*-netbsd*,
        sparc*-*-netbsd*, x86_64-*-netbsd*


diff --git a/gcc/config.gcc b/gcc/config.gcc
index 3eb2e800fc5..73debdde10f 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -849,6 +849,11 @@ case ${target} in
   nbsd_tm_file="netbsd.h netbsd-stdint.h netbsd-elf.h"
   default_use_cxa_atexit=yes
   target_has_targetdm=yes
+  case ${target} in
+    arm*-* | i[34567]86-* | powerpc*-* | sparc*-* | x86_64-*)
+      default_gnu_indirect_function=yes
+      ;;
+  esac
   ;;
 *-*-openbsd*)
   tmake_file="t-openbsd"

Reply via email to