summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-05 17:19:33 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-05 17:19:33 +0000
commit71cbce26c5ccce4738f8b1f3d403b5162e43a2d4 (patch)
tree70ed1ada8aa540dd60006d46db146cf2635262a4 /libgomp
parent8eb9cb0e65308833014935b086f017f444777b5c (diff)
downloadgcc-71cbce26c5ccce4738f8b1f3d403b5162e43a2d4.tar.gz
* acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Handle sun style.
Define LIBGOMP_BUILD_VERSIONED_SHLIB_GNU, LIBGOMP_BUILD_VERSIONED_SHLIB_SUN automake conditionals. (HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define unless targetting solaris2*. * configure: Regenerate. * config.h.in: Regenerate. * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB]: Protect libgomp_version_script with LIBGOMP_BUILD_VERSIONED_SHLIB_GNU. Add libgomp_version_dep. [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Handle Sun symbol versioning. [!LIBGOMP_BUILD_VERSIONED_SHLIB]: Add libgomp_version_dep. (libgomp_la_DEPENDENCIES): Set to $(libgomp_version_dep). * Makefile.in: Regenerate. * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef unless HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT. * libgomp.map (OMP_1.0): Move symbols both in OMP_1.0 and OMP_3.0 to common block, protected by HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161842 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog25
-rw-r--r--libgomp/Makefile.am26
-rw-r--r--libgomp/Makefile.in21
-rw-r--r--libgomp/acinclude.m459
-rw-r--r--libgomp/config.h.in4
-rwxr-xr-xlibgomp/configure106
-rw-r--r--libgomp/libgomp.h3
-rw-r--r--libgomp/libgomp.map21
8 files changed, 237 insertions, 28 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index e2127b02702..4ac37eb56c0 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,28 @@
+2010-07-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Handle sun style.
+ Define LIBGOMP_BUILD_VERSIONED_SHLIB_GNU,
+ LIBGOMP_BUILD_VERSIONED_SHLIB_SUN automake conditionals.
+ (HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define unless
+ targetting solaris2*.
+ * configure: Regenerate.
+ * config.h.in: Regenerate.
+
+ * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB]: Protect
+ libgomp_version_script with LIBGOMP_BUILD_VERSIONED_SHLIB_GNU.
+ Add libgomp_version_dep.
+ [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Handle Sun symbol
+ versioning.
+ [!LIBGOMP_BUILD_VERSIONED_SHLIB]: Add libgomp_version_dep.
+ (libgomp_la_DEPENDENCIES): Set to $(libgomp_version_dep).
+ * Makefile.in: Regenerate.
+
+ * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef unless
+ HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
+ * libgomp.map (OMP_1.0): Move symbols both in OMP_1.0 and OMP_3.0
+ to common block, protected by
+ HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
+
2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
* libgomp.texi: Move to GFDL version 1.3. Update copyright years.
diff --git a/libgomp/Makefile.am b/libgomp/Makefile.am
index 3786bee4c13..2428e66ee7a 100644
--- a/libgomp/Makefile.am
+++ b/libgomp/Makefile.am
@@ -22,13 +22,39 @@ toolexeclib_LTLIBRARIES = libgomp.la
nodist_toolexeclib_HEADERS = libgomp.spec
if LIBGOMP_BUILD_VERSIONED_SHLIB
+if LIBGOMP_BUILD_VERSIONED_SHLIB_GNU
+if LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2
+libgomp_version_script = -Wl,--version-script,libgomp.map-sol2
+libgomp_version_dep = libgomp.map-sol2
+libgomp.map-sol2 : $(top_srcdir)/libgomp.map
+ sed -e '/^#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT/,/^#endif/d' $< \
+ > $@ || (rm -f $@ ; exit 1)
+else
libgomp_version_script = -Wl,--version-script,$(top_srcdir)/libgomp.map
+libgomp_version_dep = $(top_srcdir)/libgomp.map
+endif
+endif
+if LIBGOMP_BUILD_VERSIONED_SHLIB_SUN
+libgomp_version_script = -Wl,-M,libgomp.map-sun
+libgomp_version_dep = libgomp.map-sun
+libgomp.map-sun : $(top_srcdir)/libgomp.map \
+ $(top_srcdir)/../contrib/make_sunver.pl \
+ $(libgomp_la_OBJECTS) $(libgomp_la_LIBADD)
+ perl $(top_srcdir)/../contrib/make_sunver.pl \
+ $(top_srcdir)/libgomp.map \
+ $(libgomp_la_OBJECTS:%.lo=.libs/%.o) \
+ `echo $(libgomp_la_LIBADD) | \
+ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
+ > $@ || (rm -f $@ ; exit 1)
+endif
else
libgomp_version_script =
+libgomp_version_dep =
endif
libgomp_version_info = -version-info $(libtool_VERSION)
libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
-no-undefined -bindir "$(bindir)"
+libgomp_la_DEPENDENCIES = $(libgomp_version_dep)
libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS)
libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
index c27d7a4c786..ee57f676075 100644
--- a/libgomp/Makefile.in
+++ b/libgomp/Makefile.in
@@ -297,11 +297,18 @@ AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS)
toolexeclib_LTLIBRARIES = libgomp.la
nodist_toolexeclib_HEADERS = libgomp.spec
@LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgomp_version_script =
-@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,--version-script,$(top_srcdir)/libgomp.map
+@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,--version-script,$(top_srcdir)/libgomp.map
+@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,--version-script,libgomp.map-sol2
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,-M,libgomp.map-sun
+@LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgomp_version_dep =
+@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = $(top_srcdir)/libgomp.map
+@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.map-sol2
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.map-sun
libgomp_version_info = -version-info $(libtool_VERSION)
libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
-no-undefined -bindir "$(bindir)"
+libgomp_la_DEPENDENCIES = $(libgomp_version_dep)
libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS)
libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
iter_ull.c loop.c loop_ull.c ordered.c parallel.c sections.c single.c \
@@ -1057,6 +1064,18 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
vpath % $(strip $(search_path))
+@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp.map-sol2 : $(top_srcdir)/libgomp.map
+@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ sed -e '/^#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT/,/^#endif/d' $< \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ > $@ || (rm -f $@ ; exit 1)
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp.map-sun : $(top_srcdir)/libgomp.map \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(top_srcdir)/../contrib/make_sunver.pl \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(libgomp_la_OBJECTS) $(libgomp_la_LIBADD)
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ perl $(top_srcdir)/../contrib/make_sunver.pl \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(top_srcdir)/libgomp.map \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(libgomp_la_OBJECTS:%.lo=.libs/%.o) \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ `echo $(libgomp_la_LIBADD) | \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
+@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ > $@ || (rm -f $@ ; exit 1)
omp_lib_kinds.mod: omp_lib.mod
:
diff --git a/libgomp/acinclude.m4 b/libgomp/acinclude.m4
index 0c671d4eb74..8d6d0e54a7b 100644
--- a/libgomp/acinclude.m4
+++ b/libgomp/acinclude.m4
@@ -223,16 +223,42 @@ AC_DEFUN([LIBGOMP_ENABLE_SYMVERS], [
LIBGOMP_ENABLE(symvers,yes,[=STYLE],
[enables symbol versioning of the shared library],
- [permit yes|no|gnu])
+ [permit yes|no|gnu|sun])
# If we never went through the LIBGOMP_CHECK_LINKER_FEATURES macro, then we
# don't know enough about $LD to do tricks...
AC_REQUIRE([LIBGOMP_CHECK_LINKER_FEATURES])
# FIXME The following test is too strict, in theory.
-if test $enable_shared = no ||
- test "x$LD" = x ||
- test x$libgomp_gnu_ld_version = x; then
+if test $enable_shared = no || test "x$LD" = x; then
enable_symvers=no
+else
+ if test $with_gnu_ld = yes ; then
+ enable_symvers=gnu
+ else
+ case ${target_os} in
+ # Sun symbol versioning exists since Solaris 2.5.
+ solaris2.[[5-9]]* | solaris2.1[[0-9]]*)
+ enable_symvers=sun ;;
+ *)
+ enable_symvers=no ;;
+ esac
+ fi
+fi
+
+# Check if 'sun' was requested on non-Solaris 2 platforms.
+if test x$enable_symvers = xsun ; then
+ case ${target_os} in
+ solaris2*)
+ # All fine.
+ ;;
+ *)
+ # Unlikely to work.
+ AC_MSG_WARN([=== You have requested Sun symbol versioning, but])
+ AC_MSG_WARN([=== you are not targetting Solaris 2.])
+ AC_MSG_WARN([=== Symbol versioning will be disabled.])
+ enable_symvers=no
+ ;;
+ esac
fi
# Check to see if libgcc_s exists, indicating that shared libgcc is possible.
@@ -269,10 +295,8 @@ libgomp_min_gnu_ld_version=21400
# Check to see if unspecified "yes" value can win, given results above.
# Change "yes" into either "no" or a style name.
-if test $enable_symvers = yes; then
- if test $with_gnu_ld = yes &&
- test $libgomp_shared_libgcc = yes;
- then
+if test $enable_symvers != no && test $libgomp_shared_libgcc = yes; then
+ if test $with_gnu_ld = yes; then
if test $libgomp_gnu_ld_version -ge $libgomp_min_gnu_ld_version ; then
enable_symvers=gnu
elif test $libgomp_ld_is_gold = yes ; then
@@ -295,6 +319,8 @@ if test $enable_symvers = yes; then
enable_symvers=no
fi
fi
+ elif test $enable_symvers = sun; then
+ : All interesting versions of Sun ld support sun style symbol versioning.
else
# just fail for now
AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
@@ -316,5 +342,22 @@ if test $libgomp_cv_have_as_symver_directive = yes; then
fi
AM_CONDITIONAL(LIBGOMP_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
+AM_CONDITIONAL(LIBGOMP_BUILD_VERSIONED_SHLIB_GNU, test $enable_symvers = gnu)
+AM_CONDITIONAL(LIBGOMP_BUILD_VERSIONED_SHLIB_SUN, test $enable_symvers = sun)
AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
+
+if test $enable_symvers != no ; then
+ case ${target_os} in
+ # The Solaris 2 runtime linker doesn't support the GNU extension of
+ # binding the same symbol to different versions
+ solaris2*)
+ symvers_renaming=no ;;
+ # Other platforms with GNU symbol versioning (GNU/Linux, more?) do.
+ *)
+ AC_DEFINE(HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT, 1,
+ [Define to 1 if the target runtime linker supports binding the same symbol to different versions.])
+ symvers_renaming=yes ;;
+ esac
+fi
+AM_CONDITIONAL(LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2, test $symvers_renaming = no)
])
diff --git a/libgomp/config.h.in b/libgomp/config.h.in
index c88660a945e..14c7e2a9a1b 100644
--- a/libgomp/config.h.in
+++ b/libgomp/config.h.in
@@ -54,6 +54,10 @@
/* Define to 1 if you have the `strtoull' function. */
#undef HAVE_STRTOULL
+/* Define to 1 if the target runtime linker supports binding the same symbol
+ to different versions. */
+#undef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT
+
/* Define to 1 if the target supports __sync_*_compare_and_swap */
#undef HAVE_SYNC_BUILTINS
diff --git a/libgomp/configure b/libgomp/configure
index e9b3a656291..9074529aef5 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -619,6 +619,12 @@ link_gomp
XLDFLAGS
XCFLAGS
config_path
+LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE
+LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE
+LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_FALSE
+LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE
+LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_FALSE
+LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE
LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE
LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE
OPT_LDFLAGS
@@ -11083,7 +11089,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11086 "configure"
+#line 11092 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11189,7 +11195,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11192 "configure"
+#line 11198 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15754,7 +15760,7 @@ $as_echo "$ac_sectionLDflags" >&6; }
if test "${enable_symvers+set}" = set; then :
enableval=$enable_symvers;
case "$enableval" in
- yes|no|gnu) ;;
+ yes|no|gnu|sun) ;;
*) as_fn_error "Unknown argument to enable/disable symvers" "$LINENO" 5 ;;
esac
@@ -15768,10 +15774,39 @@ fi
# don't know enough about $LD to do tricks...
# FIXME The following test is too strict, in theory.
-if test $enable_shared = no ||
- test "x$LD" = x ||
- test x$libgomp_gnu_ld_version = x; then
+if test $enable_shared = no || test "x$LD" = x; then
enable_symvers=no
+else
+ if test $with_gnu_ld = yes ; then
+ enable_symvers=gnu
+ else
+ case ${target_os} in
+ # Sun symbol versioning exists since Solaris 2.5.
+ solaris2.[5-9]* | solaris2.1[0-9]*)
+ enable_symvers=sun ;;
+ *)
+ enable_symvers=no ;;
+ esac
+ fi
+fi
+
+# Check if 'sun' was requested on non-Solaris 2 platforms.
+if test x$enable_symvers = xsun ; then
+ case ${target_os} in
+ solaris2*)
+ # All fine.
+ ;;
+ *)
+ # Unlikely to work.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === You have requested Sun symbol versioning, but" >&5
+$as_echo "$as_me: WARNING: === You have requested Sun symbol versioning, but" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === you are not targetting Solaris 2." >&5
+$as_echo "$as_me: WARNING: === you are not targetting Solaris 2." >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === Symbol versioning will be disabled." >&5
+$as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
+ enable_symvers=no
+ ;;
+ esac
fi
# Check to see if libgcc_s exists, indicating that shared libgcc is possible.
@@ -15840,10 +15875,8 @@ libgomp_min_gnu_ld_version=21400
# Check to see if unspecified "yes" value can win, given results above.
# Change "yes" into either "no" or a style name.
-if test $enable_symvers = yes; then
- if test $with_gnu_ld = yes &&
- test $libgomp_shared_libgcc = yes;
- then
+if test $enable_symvers != no && test $libgomp_shared_libgcc = yes; then
+ if test $with_gnu_ld = yes; then
if test $libgomp_gnu_ld_version -ge $libgomp_min_gnu_ld_version ; then
enable_symvers=gnu
elif test $libgomp_ld_is_gold = yes ; then
@@ -15870,6 +15903,8 @@ $as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
enable_symvers=no
fi
fi
+ elif test $enable_symvers = sun; then
+ : All interesting versions of Sun ld support sun style symbol versioning.
else
# just fail for now
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: === You have requested some kind of symbol versioning, but" >&5
@@ -15924,9 +15959,48 @@ else
LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE=
fi
+ if test $enable_symvers = gnu; then
+ LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE=
+ LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_FALSE='#'
+else
+ LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE='#'
+ LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_FALSE=
+fi
+
+ if test $enable_symvers = sun; then
+ LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE=
+ LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_FALSE='#'
+else
+ LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE='#'
+ LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_FALSE=
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: versioning on shared library symbols is $enable_symvers" >&5
$as_echo "$as_me: versioning on shared library symbols is $enable_symvers" >&6;}
+if test $enable_symvers != no ; then
+ case ${target_os} in
+ # The Solaris 2 runtime linker doesn't support the GNU extension of
+ # binding the same symbol to different versions
+ solaris2*)
+ symvers_renaming=no ;;
+ # Other platforms with GNU symbol versioning (GNU/Linux, more?) do.
+ *)
+
+$as_echo "#define HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT 1" >>confdefs.h
+
+ symvers_renaming=yes ;;
+ esac
+fi
+ if test $symvers_renaming = no; then
+ LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE=
+ LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE='#'
+else
+ LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE='#'
+ LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE=
+fi
+
+
if test $enable_symvers = gnu; then
@@ -16309,6 +16383,18 @@ if test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE}" && test -z "${LIBGOMP_BUILD_V
as_fn_error "conditional \"LIBGOMP_BUILD_VERSIONED_SHLIB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE}" && test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_FALSE}"; then
+ as_fn_error "conditional \"LIBGOMP_BUILD_VERSIONED_SHLIB_GNU\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE}" && test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_FALSE}"; then
+ as_fn_error "conditional \"LIBGOMP_BUILD_VERSIONED_SHLIB_SUN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_TRUE}" && test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2_FALSE}"; then
+ as_fn_error "conditional \"LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${USE_FORTRAN_TRUE}" && test -z "${USE_FORTRAN_FALSE}"; then
as_fn_error "conditional \"USE_FORTRAN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
index 1d21cc09cfe..edde1e97a1b 100644
--- a/libgomp/libgomp.h
+++ b/libgomp/libgomp.h
@@ -514,7 +514,8 @@ gomp_work_share_init_done (void)
#if !defined (HAVE_ATTRIBUTE_VISIBILITY) \
|| !defined (HAVE_ATTRIBUTE_ALIAS) \
|| !defined (HAVE_AS_SYMVER_DIRECTIVE) \
- || !defined (PIC)
+ || !defined (PIC) \
+ || !defined (HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
# undef LIBGOMP_GNU_SYMBOL_VERSIONING
#endif
diff --git a/libgomp/libgomp.map b/libgomp/libgomp.map
index e6c12fa0019..d95693dbdde 100644
--- a/libgomp/libgomp.map
+++ b/libgomp/libgomp.map
@@ -10,6 +10,10 @@ OMP_1.0 {
omp_get_dynamic;
omp_set_nested;
omp_get_nested;
+#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT
+ # If the assembler used lacks the .symver directive or the linker
+ # doesn't support GNU symbol versioning, we have the same symbol in
+ # two versions, which Sun ld chokes on.
omp_init_lock;
omp_init_nest_lock;
omp_destroy_lock;
@@ -22,6 +26,15 @@ OMP_1.0 {
omp_test_nest_lock;
omp_destroy_lock_;
omp_destroy_nest_lock_;
+ omp_init_lock_;
+ omp_init_nest_lock_;
+ omp_set_lock_;
+ omp_set_nest_lock_;
+ omp_test_lock_;
+ omp_test_nest_lock_;
+ omp_unset_lock_;
+ omp_unset_nest_lock_;
+#endif
omp_get_dynamic_;
omp_get_max_threads_;
omp_get_nested_;
@@ -29,20 +42,12 @@ OMP_1.0 {
omp_get_num_threads_;
omp_get_thread_num_;
omp_in_parallel_;
- omp_init_lock_;
- omp_init_nest_lock_;
omp_set_dynamic_;
omp_set_dynamic_8_;
- omp_set_lock_;
- omp_set_nest_lock_;
omp_set_nested_;
omp_set_nested_8_;
omp_set_num_threads_;
omp_set_num_threads_8_;
- omp_test_lock_;
- omp_test_nest_lock_;
- omp_unset_lock_;
- omp_unset_nest_lock_;
local:
*;
};