diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac index 97a14293ea8553e1c8b9f714941bb8fd92f82ede..5be25af2adf2a2d7b98779b6fb41fca9a8ca7bb3 100644 --- a/llvm/autoconf/configure.ac +++ b/llvm/autoconf/configure.ac @@ -1239,7 +1239,7 @@ AC_LINK_GET_VERSION dnl Determine whether the linker supports the -R option. AC_LINK_USE_R -dnl Determine whether the linker supports the -export-dynamic option. +dnl Determine whether the compiler supports the -rdynamic option. AC_LINK_EXPORT_DYNAMIC dnl Determine whether the linker supports the --version-script option. @@ -1863,7 +1863,7 @@ AC_SUBST(RPATH) dnl Determine linker rdynamic flag if test "$llvm_cv_link_use_export_dynamic" = "yes" ; then - RDYNAMIC="-Wl,-export-dynamic" + RDYNAMIC="-rdynamic" else RDYNAMIC="" fi diff --git a/llvm/autoconf/m4/link_options.m4 b/llvm/autoconf/m4/link_options.m4 index 57da4a0d926998a1db92b428005b339b2dcb5c9c..b58d61745f97028ee10444e5f0f865872901d419 100644 --- a/llvm/autoconf/m4/link_options.m4 +++ b/llvm/autoconf/m4/link_options.m4 @@ -40,23 +40,24 @@ if test "$llvm_cv_link_use_r" = yes ; then ]) # -# Determine if the system can handle the -R option being passed to the linker. +# Determine if the system can handle the -rdynamic option being passed +# to the compiler. # # This macro is specific to LLVM. # AC_DEFUN([AC_LINK_EXPORT_DYNAMIC], -[AC_CACHE_CHECK([for compiler -Wl,-export-dynamic option], +[AC_CACHE_CHECK([for compiler -rdynamic option], [llvm_cv_link_use_export_dynamic], [ AC_LANG_PUSH([C]) oldcflags="$CFLAGS" - CFLAGS="$CFLAGS -Wl,-export-dynamic" + CFLAGS="$CFLAGS -rdynamic" AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], [llvm_cv_link_use_export_dynamic=yes],[llvm_cv_link_use_export_dynamic=no]) CFLAGS="$oldcflags" AC_LANG_POP([C]) ]) if test "$llvm_cv_link_use_export_dynamic" = yes ; then - AC_DEFINE([HAVE_LINK_EXPORT_DYNAMIC],[1],[Define if you can use -Wl,-export-dynamic.]) + AC_DEFINE([HAVE_LINK_EXPORT_DYNAMIC],[1],[Define if you can use -rdynamic.]) fi ]) diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake index 98f7417efb1c3aae8b7af81ddde16e56049f9611..97035937fced67bdc987487865630942bdf6ccd4 100644 --- a/llvm/include/llvm/Config/config.h.cmake +++ b/llvm/include/llvm/Config/config.h.cmake @@ -209,7 +209,7 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_LIMITS_H ${HAVE_LIMITS_H} -/* Define if you can use -Wl,-export-dynamic. */ +/* Define if you can use -rdynamic. */ #define HAVE_LINK_EXPORT_DYNAMIC 1 /* Define if you can use -Wl,-R. to pass -R. to the linker, in order to add diff --git a/llvm/include/llvm/Config/config.h.in b/llvm/include/llvm/Config/config.h.in index 2c4d09c673451947a0803d02acb2ce8a0c09ad17..74b7829d3b534d9723220a5f6993abe3db980997 100644 --- a/llvm/include/llvm/Config/config.h.in +++ b/llvm/include/llvm/Config/config.h.in @@ -220,7 +220,7 @@ /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ -/* Define if you can use -Wl,-export-dynamic. */ +/* Define if you can use -rdynamic. */ #undef HAVE_LINK_EXPORT_DYNAMIC /* Define to 1 if you have the header file. */ diff --git a/llvm/projects/sample/autoconf/configure.ac b/llvm/projects/sample/autoconf/configure.ac index 5c8dbb31398a8d6032c8e455337ebeee7eceaee4..dc0acf3bb42a1e114324ad7ca04c2a76d4a6f714 100644 --- a/llvm/projects/sample/autoconf/configure.ac +++ b/llvm/projects/sample/autoconf/configure.ac @@ -985,7 +985,7 @@ AC_LINK_GET_VERSION dnl Determine whether the linker supports the -R option. AC_LINK_USE_R -dnl Determine whether the linker supports the -export-dynamic option. +dnl Determine whether the compiler supports the -rdynamic option. AC_LINK_EXPORT_DYNAMIC dnl Determine whether the linker supports the --version-script option. @@ -1464,7 +1464,7 @@ AC_SUBST(RPATH) dnl Determine linker rdynamic flag if test "$llvm_cv_link_use_export_dynamic" = "yes" ; then - RDYNAMIC="-Wl,-export-dynamic" + RDYNAMIC="-rdynamic" else RDYNAMIC="" fi diff --git a/llvm/projects/sample/autoconf/m4/link_options.m4 b/llvm/projects/sample/autoconf/m4/link_options.m4 index 57da4a0d926998a1db92b428005b339b2dcb5c9c..b58d61745f97028ee10444e5f0f865872901d419 100644 --- a/llvm/projects/sample/autoconf/m4/link_options.m4 +++ b/llvm/projects/sample/autoconf/m4/link_options.m4 @@ -40,23 +40,24 @@ if test "$llvm_cv_link_use_r" = yes ; then ]) # -# Determine if the system can handle the -R option being passed to the linker. +# Determine if the system can handle the -rdynamic option being passed +# to the compiler. # # This macro is specific to LLVM. # AC_DEFUN([AC_LINK_EXPORT_DYNAMIC], -[AC_CACHE_CHECK([for compiler -Wl,-export-dynamic option], +[AC_CACHE_CHECK([for compiler -rdynamic option], [llvm_cv_link_use_export_dynamic], [ AC_LANG_PUSH([C]) oldcflags="$CFLAGS" - CFLAGS="$CFLAGS -Wl,-export-dynamic" + CFLAGS="$CFLAGS -rdynamic" AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], [llvm_cv_link_use_export_dynamic=yes],[llvm_cv_link_use_export_dynamic=no]) CFLAGS="$oldcflags" AC_LANG_POP([C]) ]) if test "$llvm_cv_link_use_export_dynamic" = yes ; then - AC_DEFINE([HAVE_LINK_EXPORT_DYNAMIC],[1],[Define if you can use -Wl,-export-dynamic.]) + AC_DEFINE([HAVE_LINK_EXPORT_DYNAMIC],[1],[Define if you can use -rdynamic.]) fi ])