OSDN Git Service

PR libgomp/38086
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jan 2009 22:48:03 +0000 (22:48 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jan 2009 22:48:03 +0000 (22:48 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143168 138bc75d-0d04-0410-961f-82ee72b054a4

libgomp/ChangeLog
libgomp/acinclude.m4
libgomp/config.h.in
libgomp/configure
libgomp/libgomp.h

index d8e91b3..9428394 100644 (file)
@@ -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
index f3cd089..c6d9c30 100644 (file)
@@ -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)
 ])
index 5f0dcc7..88bae83 100644 (file)
@@ -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
 
index 376c09d..432543b 100755 (executable)
@@ -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
index 7292358..5acee09 100644 (file)
@@ -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