aboutsummaryrefslogtreecommitdiff
path: root/libitm/configure
diff options
context:
space:
mode:
authorIain Sandoe <iains@gcc.gnu.org>2011-11-22 14:49:11 +0000
committerIain Sandoe <iains@gcc.gnu.org>2011-11-22 14:49:11 +0000
commit8cf36bb3b8eade04837bea3cc8f7e4cd1eb8904d (patch)
tree2c26188cd406f39ca321e6a5612b5d17b6376b1e /libitm/configure
parent8fb013576c6fc493f096492e4b10724c83f294d8 (diff)
downloadgcc-8cf36bb3b8eade04837bea3cc8f7e4cd1eb8904d.zip
gcc-8cf36bb3b8eade04837bea3cc8f7e4cd1eb8904d.tar.gz
gcc-8cf36bb3b8eade04837bea3cc8f7e4cd1eb8904d.tar.bz2
weakref.m4: New file.
config: * weakref.m4: New file. libitm: * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF. * alloc_cpp.cc: Generate dummy functions if we don't HAVE_ELF_STYLE_WEAKREF. * eh_cpp.cc: Likewise. * configure: Regenerate. * aclocal.m4: Likewise. * config.h.in: Likewise. * Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. From-SVN: r181618
Diffstat (limited to 'libitm/configure')
-rw-r--r--libitm/configure51
1 files changed, 51 insertions, 0 deletions
diff --git a/libitm/configure b/libitm/configure
index 024f396..9b06359 100644
--- a/libitm/configure
+++ b/libitm/configure
@@ -17213,6 +17213,57 @@ $as_echo "#define HAVE_AS_AVX 1" >>confdefs.h
;;
esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether weak refs work like ELF" >&5
+$as_echo_n "checking whether weak refs work like ELF... " >&6; }
+if test "${ac_cv_have_elf_style_weakref+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ weakref_m4_saved_CFLAGS="$CFLAGS"
+ case "${host}" in
+ *-apple-darwin*) CFLAGS="$CFLAGS -Wl,-undefined,dynamic_lookup" ;;
+ *) ;;
+ esac
+ if test "$cross_compiling" = yes; then :
+
+case "${host}" in
+ alpha*-dec-osf*) ac_cv_have_elf_style_weakref=no ;;
+ *-apple-darwin[89]*) ac_cv_have_elf_style_weakref=no ;;
+ *) ac_cv_have_elf_style_weakref=yes;;
+esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+extern void fNotToBeFound(void) __attribute__((weak));
+int main ()
+{
+ if (fNotToBeFound)
+ return 1;
+ else
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_have_elf_style_weakref=yes
+else
+ ac_cv_have_elf_style_weakref=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+CFLAGS="$weakref_m4_saved_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_elf_style_weakref" >&5
+$as_echo "$ac_cv_have_elf_style_weakref" >&6; }
+if test x"$ac_cv_have_elf_style_weakref" = xyes; then
+
+$as_echo "#define HAVE_ELF_STYLE_WEAKREF 1" >>confdefs.h
+
+fi
+
# Cleanup and exit.
CFLAGS="$save_CFLAGS"
cat >confcache <<\_ACEOF