From 0eb903aa984b70c942e89b49de6035b948a239a8 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 11 Aug 2011 06:07:37 +0000 Subject: [PATCH] * lib/mkmf.rb (link_command): use LIBRUBYARG in rbconfig for unbundled extensions. [ruby-core:38802] [Bug #5147] * lib/mkmf.rb (init_mkmf): revert r32902. [ruby-core:38903] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ lib/mkmf.rb | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9bd8414ab4..c209df77e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Aug 11 15:07:36 2011 Nobuyoshi Nakada + + * lib/mkmf.rb (link_command): use LIBRUBYARG in rbconfig for + unbundled extensions. [ruby-core:38802] [Bug #5147] + + * lib/mkmf.rb (init_mkmf): revert r32902. [ruby-core:38903] + Wed Aug 10 23:03:55 2011 Tanaka Akira * ext/socket/lib/socket.rb: fix argument check in the previous commit. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 0a587965db..59c2c8509a 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -390,7 +390,7 @@ MSG end def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH) - librubyarg = $extmk ? $LIBRUBYARG_STATIC : $LIBRUBYARG + librubyarg = $extmk ? $LIBRUBYARG_STATIC : "$(LIBRUBYARG)" conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'src' => "#{CONFTEST_C}", 'arch_hdrdir' => $arch_hdrdir.quote, @@ -2157,7 +2157,7 @@ def init_mkmf(config = CONFIG, rbconfig = RbConfig::CONFIG) $LIBEXT = config['LIBEXT'].dup $OBJEXT = config["OBJEXT"].dup $LIBS = "#{config['LIBS']} #{config['DLDLIBS']}" - $LIBRUBYARG = config['LIBRUBYARG'] + $LIBRUBYARG = "" $LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC'] $LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED'] $DEFLIBPATH = [$extmk ? "$(topdir)" : "$(libdir)"] @@ -2170,6 +2170,9 @@ def init_mkmf(config = CONFIG, rbconfig = RbConfig::CONFIG) $objs = nil $srcs = nil $libs = "" + if $enable_shared or RbConfig.expand(config["LIBRUBY"].dup) != RbConfig.expand(config["LIBRUBY_A"].dup) + $LIBRUBYARG = config['LIBRUBYARG'] + end $LOCAL_LIBS = ""