aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-06-27 17:24:49 +0300
committerJia Tan <jiat0218@gmail.com>2023-06-27 23:56:06 +0800
commitb4cf7a2822e8d30eb2b12a1a07fd04383b10ade3 (patch)
tree193c06f6a852d755d91c20d903de2110ba0b4a37 /configure.ac
parentCMake: Rename CHECK_ATTR_IFUNC to ALLOW_ATTR_IFUNC. (diff)
downloadxz-b4cf7a2822e8d30eb2b12a1a07fd04383b10ade3.tar.xz
Minor tweaks to style and comments.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 5 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 5b764fce..193e2d6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -859,11 +859,12 @@ AC_COMPILE_IFELSE([
], [
AC_MSG_RESULT([no])
])
-
CFLAGS="$OLD_CFLAGS"
-# __attribute__((__ifunc__())) can be used for one-time initializations,
-# similar to __attribute__((__constructor__)).
+# __attribute__((__ifunc__())) can be used to choose between different
+# implementations of the same function at runtime. This is slightly more
+# efficient than using __attribute__((__constructor__)) and setting
+# a function pointer.
AC_ARG_ENABLE([ifunc], [AS_HELP_STRING([--disable-ifunc],
[do not use __attribute__((__ifunc__()))])],
[], [enable_ifunc=yes])
@@ -876,7 +877,7 @@ if test "x$enable_ifunc" = xyes ; then
static void func(void) { return; }
static void (*resolve_func (void)) (void) { return func; }
void func_ifunc (void)
- __attribute__ ((__ifunc__ ("resolve_func")));
+ __attribute__((__ifunc__("resolve_func")));
], [
AC_DEFINE([HAVE_FUNC_ATTRIBUTE_IFUNC], [1],
[Define to 1 if __attribute__((__ifunc__()))