summaryrefslogtreecommitdiff
path: root/libgfortran/configure.ac
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-02 10:12:34 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-02 10:12:34 +0000
commit019fb48a4a7ee6972a1faf27c34a25b6213c19b9 (patch)
tree2485a81d15975a9f6f3bcd7cea6ddd05d1c6d03f /libgfortran/configure.ac
parent55f10c87af738f8c4ac76f353b9c3e88a90189e9 (diff)
downloadgcc-019fb48a4a7ee6972a1faf27c34a25b6213c19b9.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161697 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/configure.ac')
-rw-r--r--libgfortran/configure.ac21
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