ruby-changes:46613
From: nobu <ko1@a...>
Date: Mon, 15 May 2017 20:16:32 +0900 (JST)
Subject: [ruby-changes:46613] nobu:r58728 (trunk): optional/capi: fix link on mingw
nobu 2017-05-15 20:16:25 +0900 (Mon, 15 May 2017) New Revision: 58728 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58728 Log: optional/capi: fix link on mingw * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): LIBRUBYARG is always necessary unless dynamic lookup is allowed. strip $(DEFFILE) from DLDFLAGS on mingw. Modified files: trunk/spec/rubyspec/optional/capi/spec_helper.rb Index: spec/rubyspec/optional/capi/spec_helper.rb =================================================================== --- spec/rubyspec/optional/capi/spec_helper.rb (revision 58727) +++ spec/rubyspec/optional/capi/spec_helper.rb (revision 58728) @@ -83,13 +83,13 @@ def compile_extension(name) https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/optional/capi/spec_helper.rb#L83 ldshared = RbConfig::CONFIG["LDSHARED"] ldshared += " #{RbConfig::CONFIG["ARCH_FLAG"]}" if RbConfig::CONFIG["ARCH_FLAG"] - libs = RbConfig::CONFIG["LIBS"] + libs = "#{RbConfig::CONFIG["LIBRUBYARG"]} #{RbConfig::CONFIG["LIBS"]}" dldflags = "#{RbConfig::CONFIG["LDFLAGS"]} #{RbConfig::CONFIG["DLDFLAGS"]} #{RbConfig::CONFIG["EXTDLDFLAGS"]}" dldflags.sub!(/-Wl,-soname,\S+/, '') + dldflags.sub!(/\$\(DEFFILE\)/, '') if /mswin/ =~ RUBY_PLATFORM dldflags.sub!("$(LIBPATH)", RbConfig::CONFIG["LIBPATHFLAG"] % path) - libs += RbConfig::CONFIG["LIBRUBY"] outflag = RbConfig::CONFIG["OUTFLAG"] link_cmd = "#{ldshared} #{outflag}#{lib} #{obj} #{libs} -link #{dldflags} /export:Init_#{ext}" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/