configure.in: check symbol resolution options

* configure.in (DLDFLAGS): check for each options to control
  symbol resolution.  [ruby-core:61429] [Bug #9624]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-03-15 02:03:25 +00:00
parent 1b9ff04f65
commit 1eaddcaffa
2 changed files with 20 additions and 4 deletions

View File

@ -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

View File

@ -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