diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2010-07-02 10:12:34 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2010-07-02 10:12:34 +0000 |
commit | 49ea7a0ef9fec0eecb2eb9ed60bfdc5630f23ad8 (patch) | |
tree | 2485a81d15975a9f6f3bcd7cea6ddd05d1c6d03f /libgfortran/configure.ac | |
parent | c18dc5cceab24096cbb83deacabb75b77d57a9df (diff) | |
download | gcc-49ea7a0ef9fec0eecb2eb9ed60bfdc5630f23ad8.tar.gz |
configure.ac: Check for Sun symbol versioning.
* configure.ac: Check for Sun symbol versioning.
* configure: Regenerate.
* Makefile.am [LIBGFOR_USE_SYMVER]: Protect version_arg with
LIBGFOR_USE_SYMVER_GNU.
Add version_dep.
[LIBGFOR_USE_SYMVER_SUN]: Handle Sun symbol versioning.
[!LIBGFOR_USE_SYMVER]: Add version_dep.
(libgfortran_la_DEPENDENCIES): Set to $(version_dep).
* Makefile.in: Regenerate.
From-SVN: r161697
Diffstat (limited to 'libgfortran/configure.ac')
-rw-r--r-- | libgfortran/configure.ac | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac index e7e34a6fec2..5f78a8b2d2c 100644 --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -138,17 +138,30 @@ AC_SUBST(CFLAGS) # Check for symbol versioning (copied from libssp). AC_MSG_CHECKING([whether symbol versioning is supported]) +save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS -fPIC -shared -Wl,--version-script,./conftest.map" cat > conftest.map <<EOF FOO_1.0 { global: *foo*; bar; local: *; }; EOF -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS -fPIC -shared -Wl,--version-script,./conftest.map" -AC_TRY_LINK([int foo;],[],[gfortran_use_symver=yes],[gfortran_use_symver=no]) +AC_TRY_LINK([int foo;],[],[gfortran_use_symver=gnu],[gfortran_use_symver=no]) +if test x$gfortran_use_symver = xno; then + LDFLAGS="$save_LDFLAGS" + LDFLAGS="$LDFLAGS -fPIC -shared -Wl,-M,./conftest.map" + # Sun ld cannot handle wildcards and treats all entries as undefined. + cat > conftest.map <<EOF +FOO_1.0 { + global: foo; local: *; +}; +EOF + AC_TRY_LINK([int foo;],[],[gfortran_use_symver=sun],[gfortran_use_symver=no]) +fi LDFLAGS="$save_LDFLAGS" AC_MSG_RESULT($gfortran_use_symver) -AM_CONDITIONAL(LIBGFOR_USE_SYMVER, [test "x$gfortran_use_symver" = xyes]) +AM_CONDITIONAL(LIBGFOR_USE_SYMVER, [test "x$gfortran_use_symver" != xno]) +AM_CONDITIONAL(LIBGFOR_USE_SYMVER_GNU, [test "x$gfortran_use_symver" = xgnu]) +AM_CONDITIONAL(LIBGFOR_USE_SYMVER_SUN, [test "x$gfortran_use_symver" = xsun]) # Figure out whether the compiler supports "-ffunction-sections -fdata-sections", # similarly to how libstdc++ does it |