mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
workaround for mingw
* lib/mkmf.rb (try_link0, try_compile, try_cpp): check if the target file get created actually. workaround for the case that the exit status of a cygwin program seems lost on mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b1bdada158
commit
24513fe21e
1 changed files with 6 additions and 3 deletions
|
@ -482,7 +482,7 @@ MSG
|
|||
end
|
||||
else
|
||||
try_do(src, cmd, *opts, &b)
|
||||
end
|
||||
end and File.executable?("conftest#{$EXEEXT}")
|
||||
end
|
||||
|
||||
# Returns whether or not the +src+ can be compiled as a C source and linked
|
||||
|
@ -511,7 +511,8 @@ MSG
|
|||
# [+src+] a String which contains a C source
|
||||
# [+opt+] a String which contains compiler options
|
||||
def try_compile(src, opt="", *opts, &b)
|
||||
with_werror(opt, *opts) {|_opt, *_opts| try_do(src, cc_command(_opt), *_opts, &b)}
|
||||
with_werror(opt, *opts) {|_opt, *_opts| try_do(src, cc_command(_opt), *_opts, &b)} and
|
||||
File.file?("conftest.#{$OBJEXT}")
|
||||
ensure
|
||||
MakeMakefile.rm_f "conftest*"
|
||||
end
|
||||
|
@ -526,7 +527,8 @@ MSG
|
|||
# [+src+] a String which contains a C source
|
||||
# [+opt+] a String which contains preprocessor options
|
||||
def try_cpp(src, opt="", *opts, &b)
|
||||
try_do(src, cpp_command(CPPOUTFILE, opt), *opts, &b)
|
||||
try_do(src, cpp_command(CPPOUTFILE, opt), *opts, &b) and
|
||||
File.file?("conftest.i")
|
||||
ensure
|
||||
MakeMakefile.rm_f "conftest*"
|
||||
end
|
||||
|
@ -2242,6 +2244,7 @@ site-install-rb: install-rb
|
|||
$DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup
|
||||
$LIBEXT = config['LIBEXT'].dup
|
||||
$OBJEXT = config["OBJEXT"].dup
|
||||
$EXEEXT = config["EXEEXT"].dup
|
||||
$LIBS = "#{config['LIBS']} #{config['DLDLIBS']}"
|
||||
$LIBRUBYARG = ""
|
||||
$LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC']
|
||||
|
|
Loading…
Add table
Reference in a new issue