From a201b3e237e1994e0ee3668b25287fc9fdd574f9 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 21 Nov 2022 10:43:26 -0500 Subject: config: Support target_clones on more platforms --- src/config.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h index 5bd49de..0822e3c 100644 --- a/src/config.h +++ b/src/config.h @@ -186,4 +186,11 @@ # define BFS_FORMATTER(fmt, args) #endif +/** + * Check if function multiversioning via GNU indirect functions (ifunc) is supported. + */ +#if !defined(BFS_TARGET_CLONES) && __has_attribute(target_clones) && (__GLIBC__ || __FreeBSD__ || __NetBSD__) +# define BFS_TARGET_CLONES true +#endif + #endif // BFS_CONFIG_H -- cgit v1.2.3