From fc5f37f0e1cda9afc108e2bed5676714cb7d7028 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 10 Nov 2011 06:13:37 +0000 Subject: [PATCH] * 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 --- lib/mkmf.rb | 7 +++++-- 1 file 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}