summaryrefslogtreecommitdiff
path: root/libgfortran/configure.ac
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-24 09:08:52 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-24 09:08:52 +0000
commitce1a737c5d8541db078a16891f5d9c60f9747bb6 (patch)
treeed8f6448a70614d0a12e305b74ca617397231177 /libgfortran/configure.ac
parent095798e3c7fc33fce0e1ca8c05a10d89428dc6bd (diff)
downloadgcc-ce1a737c5d8541db078a16891f5d9c60f9747bb6.tar.gz
2007-04-24 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/27740 * configure.ac: New test to determine if symbol versioning is supported. * Makefile.am: Use result of above test to add appropriate linker flags. * gfortran.map: New file. * configure: Regenerated. * Makefile.in: Regenerated. * config.h.in: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124098 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/configure.ac')
-rw-r--r--libgfortran/configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index 319b5549da8..58839bbcba0 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -122,6 +122,20 @@ fi
AC_SUBST(AM_FCFLAGS)
AC_SUBST(AM_CFLAGS)
+# Check for symbol versioning (copied from libssp).
+AC_MSG_CHECKING([whether symbol versioning is supported])
+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])
+LDFLAGS="$save_LDFLAGS"
+AC_MSG_RESULT($gfortran_use_symver)
+AM_CONDITIONAL(LIBGFOR_USE_SYMVER, [test "x$gfortran_use_symver" = xyes])
+
# Find other programs we need.
AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(AR, ar)