diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 19 |
2 files changed, 20 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Sat Mar 15 11:02:58 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * configure.in (DLDFLAGS): check for each options to control + symbol resolution. [ruby-core:61429] [Bug #9624] + Sat Mar 15 07:02:35 2014 Eric Wong <e@80x24.org> * st.c (st_update): remove unnecessary assignment diff --git a/configure.in b/configure.in index 71377a6ddb..d949498dd9 100644 --- a/configure.in +++ b/configure.in @@ -2702,10 +2702,6 @@ if test "$with_dln_a_out" != yes; then fi rb_cv_dlopen=yes], [darwin*], [ : ${LDSHARED='$(CC) -dynamic -bundle'} - RUBY_APPEND_OPTIONS(DLDFLAGS, [ \ - "${linker_flag}-undefined${linker_flag:+,}dynamic_lookup" \ - "${linker_flag}-multiply_defined${linker_flag:+,}suppress" \ - ]) : ${LDFLAGS=""} : ${LIBPATHENV=DYLD_LIBRARY_PATH} # /usr/local/include is always searched for @@ -2772,6 +2768,21 @@ if test "$with_dln_a_out" != yes; then [ : ${LDSHARED='$(LD)'}]) AC_MSG_RESULT($rb_cv_dlopen) + if test "$rb_cv_dlopen" = yes; then + AS_CASE(["$target_os"], + [darwin*] [ + for flag in \ + "${linker_flag}-undefined${linker_flag:+,}dynamic_lookup" \ + "${linker_flag}-multiply_defined${linker_flag:+,}suppress" \ + ; do + RUBY_TRY_LDFLAGS([$flag], [], [flag=]) + if test "x$flag" != x; then + RUBY_APPEND_OPTIONS(DLDFLAGS, [$flag]) + fi + done + ]) + fi + if test "$enable_rpath" = yes; then if test x"${RPATHFLAG}" = x; then for rpathflag in -R "-rpath "; do |