1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/mkmf.rb (try_func): ignore empty opts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-11-10 06:13:37 +00:00
parent cfe220d8f3
commit fc5f37f0e1

View file

@ -625,14 +625,17 @@ def try_func(func, libs, headers = nil, opt = "", &b)
break opt = opt.send(meth, *args) break opt = opt.send(meth, *args)
end end
end end
opt = "#{opt} #{libs}"
else
opt = libs
end end
try_link(<<"SRC", "#{opt} #{libs}", &b) or try_link(<<"SRC", opt, &b) or
#{headers} #{headers}
/*top*/ /*top*/
#{MAIN_DOES_NOTHING} #{MAIN_DOES_NOTHING}
int t() { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return 0; } int t() { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return 0; }
SRC SRC
call && try_link(<<"SRC", "#{opt} #{libs}", &b) call && try_link(<<"SRC", opt, &b)
#{headers} #{headers}
/*top*/ /*top*/
#{MAIN_DOES_NOTHING} #{MAIN_DOES_NOTHING}