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

test_have_library.rb: toolchains result

* test/mkmf/test_have_library.rb (create_library): check if toolchains
  work.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-07-04 07:03:05 +00:00
parent 246c66f702
commit a536143507

View file

@ -15,11 +15,13 @@ class TestMkmf
hdr.puts "void #{FUNC_NAME}_fake(void);"
end
create_tmpsrc("#include \"#{HEADER_NAME}\"\n""void #{FUNC_NAME}(void) {}")
xsystem(cc_command)
xsystem("#{CONFIG['AR']} #{config_string('ARFLAGS') || 'cru '}#{lib} #{CONFTEST}.#{$OBJEXT}")
assert(xsystem(cc_command), "compile failed: #{cc_command}")
command = "#{CONFIG['AR']} #{config_string('ARFLAGS') || 'cru '}#{lib} #{CONFTEST}.#{$OBJEXT}"
assert(xsystem(command), "making library failed: #{command}")
File.unlink("#{CONFTEST}.#{$OBJEXT}")
config_string('RANLIB') do |ranlib|
xsystem("#{ranlib} #{lib}")
command = "#{ranlib} #{lib}"
assert(xsystem(command), "ranlib failed: #{command}")
end
end