зеркало из https://github.com/github/ruby.git
Fix failures on btest for NativeClient.
* bootstraptest/runner.rb (nacl?): New method to distinguish NaCl corss build. * bootstraptest/test_io.rb: Skip unsupported operations. * bootstraptest/test_literal.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0626021e13
Коммит
6efba755da
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Fri Jan 4 00:35:11 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
|
||||||
|
|
||||||
|
Fix failures on btest for NativeClient.
|
||||||
|
* bootstraptest/runner.rb (nacl?): New method to distinguish NaCl
|
||||||
|
corss build.
|
||||||
|
|
||||||
|
* bootstraptest/test_io.rb: Skip unsupported operations.
|
||||||
|
|
||||||
|
* bootstraptest/test_literal.rb: ditto.
|
||||||
|
|
||||||
Fri Jan 4 00:29:40 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
|
Fri Jan 4 00:29:40 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
|
||||||
|
|
||||||
* io.c (rb_cloexec_fcntl_dupfd): Fix failures in
|
* io.c (rb_cloexec_fcntl_dupfd): Fix failures in
|
||||||
|
|
|
@ -229,6 +229,12 @@ rescue Exception => err
|
||||||
error err.message, message
|
error err.message, message
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# NativeClient is special. The binary is cross-compiled. But runs on the build environment.
|
||||||
|
# So RUBY_PLATFORM in this process is not useful to detect it.
|
||||||
|
def nacl?
|
||||||
|
@ruby and File.basename(@ruby.split(/\s/).first)['sel_ldr']
|
||||||
|
end
|
||||||
|
|
||||||
def assert_check(testsrc, message = '', opt = '')
|
def assert_check(testsrc, message = '', opt = '')
|
||||||
show_progress(message) {
|
show_progress(message) {
|
||||||
result = get_result_string(testsrc, opt)
|
result = get_result_string(testsrc, opt)
|
||||||
|
|
|
@ -53,7 +53,7 @@ assert_equal 'ok', %q{
|
||||||
STDIN.reopen(rw)
|
STDIN.reopen(rw)
|
||||||
STDIN.reopen(save)
|
STDIN.reopen(save)
|
||||||
rw.close
|
rw.close
|
||||||
File.unlink(tmpname)
|
File.unlink(tmpname) unless RUBY_PLATFORM['nacl']
|
||||||
:ok
|
:ok
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ assert_equal 'ok', %q{
|
||||||
STDIN.print "a"
|
STDIN.print "a"
|
||||||
STDIN.reopen(save)
|
STDIN.reopen(save)
|
||||||
rw.close
|
rw.close
|
||||||
File.unlink(tmpname)
|
File.unlink(tmpname) unless RUBY_PLATFORM['nacl']
|
||||||
:ok
|
:ok
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,10 @@ assert_equal ':a3c', ':"a#{1+2}c".inspect'
|
||||||
assert_equal 'Symbol', ':"a#{1+2}c".class'
|
assert_equal 'Symbol', ':"a#{1+2}c".class'
|
||||||
|
|
||||||
# xstring
|
# xstring
|
||||||
assert_equal "foo\n", %q(`echo foo`)
|
unless nacl?
|
||||||
assert_equal "foo\n", %q(s = "foo"; `echo #{s}`)
|
assert_equal "foo\n", %q(`echo foo`)
|
||||||
|
assert_equal "foo\n", %q(s = "foo"; `echo #{s}`)
|
||||||
|
end
|
||||||
|
|
||||||
# regexp
|
# regexp
|
||||||
assert_equal '', '//.source'
|
assert_equal '', '//.source'
|
||||||
|
|
|
@ -1294,9 +1294,10 @@ $POSTLINK"
|
||||||
[superux*], [ ac_cv_func_setitimer=no
|
[superux*], [ ac_cv_func_setitimer=no
|
||||||
],
|
],
|
||||||
[nacl], [
|
[nacl], [
|
||||||
LIBS="-lm -lnosys $LIBS"
|
LIBS="-lm $LIBS"
|
||||||
if test "${nacl_cv_build_variant}" = "newlib"; then
|
if test "${nacl_cv_build_variant}" = "newlib"; then
|
||||||
RUBY_APPEND_OPTION(CPPFLAGS, -DNACL_NEWLIB)
|
RUBY_APPEND_OPTION(CPPFLAGS, -DNACL_NEWLIB)
|
||||||
|
RUBY_APPEND_OPTION(LIBS, '-lnosys')
|
||||||
else
|
else
|
||||||
RUBY_APPEND_OPTION(XCFLAGS, -fPIC)
|
RUBY_APPEND_OPTION(XCFLAGS, -fPIC)
|
||||||
fi
|
fi
|
||||||
|
@ -2707,6 +2708,10 @@ AS_CASE("$enable_shared", [yes], [
|
||||||
[haiku], [
|
[haiku], [
|
||||||
# gcc supports PIE, but doesn't work correctly in Haiku
|
# gcc supports PIE, but doesn't work correctly in Haiku
|
||||||
pie=no
|
pie=no
|
||||||
|
],
|
||||||
|
[nacl], [
|
||||||
|
# -pie implies -shared for NaCl.
|
||||||
|
pie=no
|
||||||
])
|
])
|
||||||
if test "$GCC" = yes -a -z "$EXTSTATIC" -a "x$pie" != xno; then
|
if test "$GCC" = yes -a -z "$EXTSTATIC" -a "x$pie" != xno; then
|
||||||
RUBY_TRY_CFLAGS(-fPIE, [pie=yes], [pie=no])
|
RUBY_TRY_CFLAGS(-fPIE, [pie=yes], [pie=no])
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
You need to install the following things before building NaCl port of Ruby.
|
You need to install the following things before building NaCl port of Ruby.
|
||||||
* Ruby 1.9.3 or later
|
* Ruby 1.9.3 or later
|
||||||
* Python 2.6 or later
|
* Python 2.6 or later
|
||||||
* NativeClient SDK pepper 18 or later
|
* NativeClient SDK pepper 22 or later
|
||||||
* GNU make
|
* GNU make
|
||||||
|
|
||||||
== Steps
|
== Steps
|
||||||
|
|
Загрузка…
Ссылка в новой задаче