summaryrefslogtreecommitdiffstats
path: root/llvm/autoconf/m4
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
commitb7edb4287ba806339c9080029e5c3d43a9cee001 (patch)
tree76d0ddf59d2828bb97de486b98d120044045f938 /llvm/autoconf/m4
parent88337a95cae8d1d2aac1ceeb80cfc7fb54292a41 (diff)
downloadbcm5719-llvm-b7edb4287ba806339c9080029e5c3d43a9cee001.tar.gz
bcm5719-llvm-b7edb4287ba806339c9080029e5c3d43a9cee001.zip
-retain-symbols-file is not what it seems. Update the makefiles
and configury to use --version-script. llvm-svn: 105271
Diffstat (limited to 'llvm/autoconf/m4')
-rw-r--r--llvm/autoconf/m4/link_options.m423
1 files changed, 13 insertions, 10 deletions
diff --git a/llvm/autoconf/m4/link_options.m4 b/llvm/autoconf/m4/link_options.m4
index 697abab07d4..251c8a4f503 100644
--- a/llvm/autoconf/m4/link_options.m4
+++ b/llvm/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
])
OpenPOWER on IntegriCloud