about summary refs log tree commit diff
path: root/sysdeps/i386/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/configure.ac')
-rw-r--r--sysdeps/i386/configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysdeps/i386/configure.ac b/sysdeps/i386/configure.ac
index 7f68e6210a..d61ab42927 100644
--- a/sysdeps/i386/configure.ac
+++ b/sysdeps/i386/configure.ac
@@ -58,6 +58,21 @@ rm -f conftest*])
   fi
 fi
 
+if test "$libc_cv_static_pie" == "yes"; then
+  LIBC_TRY_LINK_STATIC([dnl
+int foo (void) __attribute__ ((ifunc ("foo_ifunc")));
+void *
+foo_ifunc (void)
+{
+  return 0;
+}
+int main (void)
+{
+  return foo ();
+}],
+    [-fPIE -static-pie], libc_cv_ifunc_static_pie=yes, libc_cv_ifunc_static_pie=no)
+fi
+
 dnl When multi-arch is enabled, all external functions must be called
 dnl via PIC PLT in PIE, which requires setting up EBX register.
 if test x"$multi_arch" != xno; then