aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-01-07 23:48:03 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-01-07 23:48:03 +0100
commit876080ffb70bdcb889f47aa334547cf25398e943 (patch)
tree22dccd08d2bc5c5b6e1c2366084c29c8e88922d4 /libgomp
parentc0f645750c9a137136860fdf91a76b92b847263f (diff)
re PR libgomp/38086 (libgomp fails to build if assembler doesn't support .symver)
PR libgomp/38086 * acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New check. * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undefine if HAVE_AS_SYMVER_DIRECTIVE is not defined. * configure: Regenerated. * config.h.in: Likewise. From-SVN: r143168
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog9
-rw-r--r--libgomp/acinclude.m410
-rw-r--r--libgomp/config.h.in3
-rwxr-xr-xlibgomp/configure62
-rw-r--r--libgomp/libgomp.h3
5 files changed, 86 insertions, 1 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index d8e91b340d0..9428394f629 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,12 @@
+2009-01-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgomp/38086
+ * acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New check.
+ * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undefine if
+ HAVE_AS_SYMVER_DIRECTIVE is not defined.
+ * configure: Regenerated.
+ * config.h.in: Likewise.
+
2008-12-28 Jakub Jelinek <jakub@redhat.com>
PR c++/38650
diff --git a/libgomp/acinclude.m4 b/libgomp/acinclude.m4
index f3cd089e537..c6d9c308d9a 100644
--- a/libgomp/acinclude.m4
+++ b/libgomp/acinclude.m4
@@ -298,6 +298,16 @@ if test $enable_symvers = yes; then
fi
fi
+AC_CACHE_CHECK([whether the target supports .symver directive],
+ libgomp_cv_have_as_symver_directive, [
+ AC_TRY_COMPILE([void foo (void); __asm (".symver foo, bar@SYMVER");],
+ [], libgomp_cv_have_as_symver_directive=yes,
+ libgomp_cv_have_as_symver_directive=no)])
+if test $libgomp_cv_have_as_symver_directive = yes; then
+ AC_DEFINE(HAVE_AS_SYMVER_DIRECTIVE, 1,
+ [Define to 1 if the target assembler supports .symver directive.])
+fi
+
AM_CONDITIONAL(LIBGOMP_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
])
diff --git a/libgomp/config.h.in b/libgomp/config.h.in
index 5f0dcc7570b..88bae83fab3 100644
--- a/libgomp/config.h.in
+++ b/libgomp/config.h.in
@@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+/* Define to 1 if the target assembler supports .symver directive. */
+#undef HAVE_AS_SYMVER_DIRECTIVE
+
/* Define to 1 if the target supports __attribute__((alias(...))). */
#undef HAVE_ATTRIBUTE_ALIAS
diff --git a/libgomp/configure b/libgomp/configure
index 376c09d9247..432543b2795 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -18761,6 +18761,68 @@ echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
fi
fi
+echo "$as_me:$LINENO: checking whether the target supports .symver directive" >&5
+echo $ECHO_N "checking whether the target supports .symver directive... $ECHO_C" >&6
+if test "${libgomp_cv_have_as_symver_directive+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+void foo (void); __asm (".symver foo, bar@SYMVER");
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ libgomp_cv_have_as_symver_directive=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+libgomp_cv_have_as_symver_directive=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $libgomp_cv_have_as_symver_directive" >&5
+echo "${ECHO_T}$libgomp_cv_have_as_symver_directive" >&6
+if test $libgomp_cv_have_as_symver_directive = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_SYMVER_DIRECTIVE 1
+_ACEOF
+
+fi
+
if test $enable_symvers != no; then
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
index 7292358b9aa..5acee09f4d5 100644
--- a/libgomp/libgomp.h
+++ b/libgomp/libgomp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU OpenMP Library (libgomp).
@@ -516,6 +516,7 @@ gomp_work_share_init_done (void)
#if !defined (HAVE_ATTRIBUTE_VISIBILITY) \
|| !defined (HAVE_ATTRIBUTE_ALIAS) \
+ || !defined (HAVE_AS_SYMVER_DIRECTIVE) \
|| !defined (PIC)
# undef LIBGOMP_GNU_SYMBOL_VERSIONING
#endif