summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-01 14:56:56 +0000
committerDan Gohman <gohman@apple.com>2010-06-01 14:56:56 +0000
commitda612d62260220618af9be428aa827d5d04f344f (patch)
tree4824c9b5e9ce4c09d4a1418128dfbd519c067360 /autoconf
parentc6e1f67b17b4cb9d707af1245c1ecf00f91f23c0 (diff)
downloadllvm-da612d62260220618af9be428aa827d5d04f344f.tar.gz
llvm-da612d62260220618af9be428aa827d5d04f344f.tar.bz2
llvm-da612d62260220618af9be428aa827d5d04f344f.tar.xz
-retain-symbols-file is not what it seems. Update the makefiles
and configury to use --version-script. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac4
-rw-r--r--autoconf/m4/link_options.m423
2 files changed, 15 insertions, 12 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 8487d9403c..66f5383091 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -1039,8 +1039,8 @@ AC_LINK_USE_R
dnl Determine whether the linker supports the -export-dynamic option.
AC_LINK_EXPORT_DYNAMIC
-dnl Determine whether the linker supports the -retain-symbols-file option.
-AC_LINK_RETAIN_SYMBOLS_FILE
+dnl Determine whether the linker supports the --version-script option.
+AC_LINK_VERSION_SCRIPT
dnl Check for libtool and the library that has dlopen function (which must come
dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with
diff --git a/autoconf/m4/link_options.m4 b/autoconf/m4/link_options.m4
index 697abab07d..251c8a4f50 100644
--- a/autoconf/m4/link_options.m4
+++ b/autoconf/m4/link_options.m4
@@ -40,14 +40,14 @@ if test "$llvm_cv_link_use_export_dynamic" = yes ; then
])
#
-# Determine if the system can handle the -retain-symbols-file option being
+# Determine if the system can handle the --version-script option being
# passed to the linker.
#
# This macro is specific to LLVM.
#
-AC_DEFUN([AC_LINK_RETAIN_SYMBOLS_FILE],
-[AC_CACHE_CHECK([for compiler -Wl,-retain-symbols-file option],
- [llvm_cv_link_use_retain_symbols_file],
+AC_DEFUN([AC_LINK_VERSION_SCRIPT],
+[AC_CACHE_CHECK([for compiler -Wl,--version-script option],
+ [llvm_cv_link_use_version_script],
[ AC_LANG_PUSH([C])
oldcflags="$CFLAGS"
@@ -67,18 +67,21 @@ AC_DEFUN([AC_LINK_RETAIN_SYMBOLS_FILE],
(umask 077 && mkdir "$tmp")
} || exit $?
- echo "main" > "$tmp/exports"
+ echo "{" > "$tmp/export.map"
+ echo " global: main;" >> "$tmp/export.map"
+ echo " local: *;" >> "$tmp/export.map"
+ echo "};" >> "$tmp/export.map"
- CFLAGS="$CFLAGS -Wl,-retain-symbols-file=$tmp/exports"
+ CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
- [llvm_cv_link_use_retain_symbols_file=yes],[llvm_cv_link_use_retain_symbols_file=no])
- rm "$tmp/exports"
+ [llvm_cv_link_use_version_script=yes],[llvm_cv_link_version_script=no])
+ rm "$tmp/export.map"
rmdir "$tmp"
CFLAGS="$oldcflags"
AC_LANG_POP([C])
])
-if test "$llvm_cv_link_use_retain_symbols_file" = yes ; then
- AC_SUBST(HAVE_LINK_RETAIN_SYMBOLS_FILE,1)
+if test "$llvm_cv_link_use_version_script" = yes ; then
+ AC_SUBST(HAVE_LINK_VERSION_SCRIPT,1)
fi
])