* lib/mkmf.rb (link_command): use static library only for bundled

extensions.  [Bug #5147]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-08-03 17:21:12 +00:00
parent 7150df4522
commit ae51324199
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Thu Aug 4 02:21:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (link_command): use static library only for bundled
extensions. [Bug #5147]
Thu Aug 4 02:02:10 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/psych.gemspec: installing psych as a gem.

View File

@ -390,6 +390,7 @@ MSG
end
def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
librubyarg = $extmk ? $LIBRUBYARG_STATIC : $LIBRUBYARG
conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote,
'src' => "#{CONFTEST_C}",
'arch_hdrdir' => $arch_hdrdir.quote,
@ -400,7 +401,7 @@ def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
'ARCH_FLAG' => "#$ARCH_FLAG",
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS")
'LIBS' => "#{librubyarg} #{opt} #$LIBS")
conf['LIBPATH'] = libpathflag(libpath.map {|s| RbConfig::expand(s.dup, conf)})
RbConfig::expand(TRY_LINK.dup, conf)
end