diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-01 14:56:56 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-01 14:56:56 +0000 |
commit | 27933ab4fdf2a6c33e07015985c31f69a07f98d1 (patch) | |
tree | 4824c9b5e9ce4c09d4a1418128dfbd519c067360 /autoconf | |
parent | 57900ec3ca13c107197a1f8ea6abd934a8e25f0f (diff) | |
download | external_llvm-27933ab4fdf2a6c33e07015985c31f69a07f98d1.zip external_llvm-27933ab4fdf2a6c33e07015985c31f69a07f98d1.tar.gz external_llvm-27933ab4fdf2a6c33e07015985c31f69a07f98d1.tar.bz2 |
-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.ac | 4 | ||||
-rw-r--r-- | autoconf/m4/link_options.m4 | 23 |
2 files changed, 15 insertions, 12 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 8487d94..66f5383 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 697abab..251c8a4 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 ]) |