summaryrefslogtreecommitdiff
path: root/spec/rubyspec
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-15 11:16:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-15 11:16:25 +0000
commitc68b4c5f5867110592686cdfd52fd3cbe0ee37ce (patch)
treed6e6d7802291150f44c9e22c98e77566d8ea8005 /spec/rubyspec
parent912fc583534b7b7c69089f77aeaed5dcda94a1eb (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/rubyspec')
-rw-r--r--spec/rubyspec/optional/capi/spec_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/rubyspec/optional/capi/spec_helper.rb b/spec/rubyspec/optional/capi/spec_helper.rb
index d0534d8ce0..1c16261714 100644
--- a/spec/rubyspec/optional/capi/spec_helper.rb
+++ b/spec/rubyspec/optional/capi/spec_helper.rb
@@ -83,13 +83,13 @@ def compile_extension(name)
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}"