[前][次][番号順一覧][スレッド一覧]

ruby-changes:26633

From: yugui <ko1@a...>
Date: Fri, 4 Jan 2013 00:39:28 +0900 (JST)
Subject: [ruby-changes:26633] yugui:r38684 (trunk): Fix failures on btest for NativeClient.

yugui	2013-01-04 00:39:15 +0900 (Fri, 04 Jan 2013)

  New Revision: 38684

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38684

  Log:
    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.

  Modified files:
    trunk/ChangeLog
    trunk/bootstraptest/runner.rb
    trunk/bootstraptest/test_io.rb
    trunk/bootstraptest/test_literal.rb
    trunk/configure.in
    trunk/nacl/README.nacl

Index: configure.in
===================================================================
--- configure.in	(revision 38683)
+++ configure.in	(revision 38684)
@@ -1294,9 +1294,10 @@ $POSTLINK" https://github.com/ruby/ruby/blob/trunk/configure.in#L1294
 [superux*], [	ac_cv_func_setitimer=no
 		],
 [nacl], [
-  LIBS="-lm -lnosys $LIBS"
+  LIBS="-lm $LIBS"
   if test "${nacl_cv_build_variant}" = "newlib"; then
     RUBY_APPEND_OPTION(CPPFLAGS, -DNACL_NEWLIB)
+    RUBY_APPEND_OPTION(LIBS, '-lnosys')
   else
     RUBY_APPEND_OPTION(XCFLAGS, -fPIC)
   fi
@@ -2707,6 +2708,10 @@ AS_CASE("$enable_shared", [yes], [ https://github.com/ruby/ruby/blob/trunk/configure.in#L2708
   [haiku], [
     # gcc supports PIE, but doesn't work correctly in Haiku
     pie=no
+  ],
+  [nacl], [
+    # -pie implies -shared for NaCl.
+    pie=no
   ])
   if test "$GCC" = yes -a -z "$EXTSTATIC" -a "x$pie" != xno; then
     RUBY_TRY_CFLAGS(-fPIE, [pie=yes], [pie=no])
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38683)
+++ ChangeLog	(revision 38684)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jan  4 00:35:11 2013  Yuki Yugui Sonoda  <yugui@y...>
+
+	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@y...>
 
 	* io.c (rb_cloexec_fcntl_dupfd): Fix failures in
Index: bootstraptest/test_literal.rb
===================================================================
--- bootstraptest/test_literal.rb	(revision 38683)
+++ bootstraptest/test_literal.rb	(revision 38684)
@@ -65,8 +65,10 @@ assert_equal ':a3c',            ':"a#{1+ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_literal.rb#L65
 assert_equal 'Symbol',          ':"a#{1+2}c".class'
 
 # xstring
-assert_equal "foo\n",           %q(`echo foo`)
-assert_equal "foo\n",           %q(s = "foo"; `echo #{s}`)
+unless nacl?
+  assert_equal "foo\n",           %q(`echo foo`)
+  assert_equal "foo\n",           %q(s = "foo"; `echo #{s}`)
+end
 
 # regexp
 assert_equal '',                '//.source'
Index: bootstraptest/test_io.rb
===================================================================
--- bootstraptest/test_io.rb	(revision 38683)
+++ bootstraptest/test_io.rb	(revision 38684)
@@ -53,7 +53,7 @@ assert_equal 'ok', %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_io.rb#L53
   STDIN.reopen(rw)
   STDIN.reopen(save)
   rw.close
-  File.unlink(tmpname)
+  File.unlink(tmpname) unless RUBY_PLATFORM['nacl']
   :ok
 }
 
@@ -70,7 +70,7 @@ assert_equal 'ok', %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_io.rb#L70
   STDIN.print "a"
   STDIN.reopen(save)
   rw.close
-  File.unlink(tmpname)
+  File.unlink(tmpname) unless RUBY_PLATFORM['nacl']
   :ok
 }
 
Index: bootstraptest/runner.rb
===================================================================
--- bootstraptest/runner.rb	(revision 38683)
+++ bootstraptest/runner.rb	(revision 38684)
@@ -229,6 +229,12 @@ rescue Exception => err https://github.com/ruby/ruby/blob/trunk/bootstraptest/runner.rb#L229
   error err.message, message
 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 = '')
   show_progress(message) {
     result = get_result_string(testsrc, opt)
Index: nacl/README.nacl
===================================================================
--- nacl/README.nacl	(revision 38683)
+++ nacl/README.nacl	(revision 38684)
@@ -6,7 +6,7 @@ https://github.com/ruby/ruby/blob/trunk/nacl/README.nacl#L6
 You need to install the following things before building NaCl port of Ruby.
 * Ruby 1.9.3 or later
 * Python 2.6 or later
-* NativeClient SDK pepper 18 or later
+* NativeClient SDK pepper 22 or later
 * GNU make
 
 == Steps

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]