|
From: <sv...@va...> - 2012-07-06 09:17:43
|
florian 2012-07-06 10:17:29 +0100 (Fri, 06 Jul 2012)
New Revision: 12717
Log:
Enhance the check for ifunc compatibility testing.
Make sure the executable can be linked.
As observed with gcc 4.4.5 and binutils 2.20.1
Modified files:
trunk/configure.in
Modified: trunk/configure.in (+15 -3)
===================================================================
--- trunk/configure.in 2012-07-06 09:26:37 +01:00 (rev 12716)
+++ trunk/configure.in 2012-07-06 10:17:29 +01:00 (rev 12717)
@@ -1752,9 +1752,21 @@
# automake-level symbol (BUILD_IFUNC_TESTS), used in test Makefile.am's
AC_MSG_CHECKING([if gcc supports the ifunc attribute])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
- void bar(void) {}
- void foo(void) __attribute__((ifunc("bar")));
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
+static void mytest(void) {}
+
+static void (*resolve_test(void))(void)
+{
+ return (void (*)(void))&mytest;
+}
+
+void test(void) __attribute__((ifunc("resolve_test")));
+
+int main()
+{
+ test();
+ return 0;
+}
]])], [
ac_have_ifunc_attr=yes
AC_MSG_RESULT([yes])
|