diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-05 17:19:33 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-05 17:19:33 +0000 |
commit | 71cbce26c5ccce4738f8b1f3d403b5162e43a2d4 (patch) | |
tree | 70ed1ada8aa540dd60006d46db146cf2635262a4 /libgomp/acinclude.m4 | |
parent | 8eb9cb0e65308833014935b086f017f444777b5c (diff) | |
download | gcc-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/acinclude.m4')
-rw-r--r-- | libgomp/acinclude.m4 | 59 |
1 files changed, 51 insertions, 8 deletions
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) ]) |