diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-10 06:13:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-10 06:13:37 +0000 |
commit | fc5f37f0e1cda9afc108e2bed5676714cb7d7028 (patch) | |
tree | 22c8d475e717fcf78cddf19d89aa657b68cd56e8 /lib/mkmf.rb | |
parent | cfe220d8f390691f6c8e17f5c6554efbd450eb0a (diff) | |
download | ruby-fc5f37f0e1cda9afc108e2bed5676714cb7d7028.tar.gz |
* 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
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r-- | lib/mkmf.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index f397ad1a17..88d065027b 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -625,14 +625,17 @@ def try_func(func, libs, headers = nil, opt = "", &b) break opt = opt.send(meth, *args) end end + opt = "#{opt} #{libs}" + else + opt = libs end - try_link(<<"SRC", "#{opt} #{libs}", &b) or + try_link(<<"SRC", opt, &b) or #{headers} /*top*/ #{MAIN_DOES_NOTHING} int t() { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return 0; } SRC - call && try_link(<<"SRC", "#{opt} #{libs}", &b) + call && try_link(<<"SRC", opt, &b) #{headers} /*top*/ #{MAIN_DOES_NOTHING} |