diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-11 13:33:14 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-11 13:33:14 +0000 |
commit | 57bc5eaf2f9b44ad8321fecf6dfa45d82a50c580 (patch) | |
tree | 4a5e3e0cf3656e829ad4c830586e13ec57f92cc3 /nacl | |
parent | 3fedb5128f33390959cfcd97a624b33b0f22f372 (diff) |
Fixes build failures on Portable Native Client.
Note: Some of the fixes are for newlib in general but not NaCl-specific.
* include/ruby/intern.h (rb_fd_select): declare struct timeval, or the
struct gets local to the function in C99.
* file.c (#include): add nacl/stat.h for PNaCl.
(utimes): added a declaration for PNaCl.
(stat_atimespec): stat::st_atimensec is long long but
timespec::tv_nsec is long in PNaCl.
(stat_mtimespec, stat_ctimespec): ditto.
(rb_group_member): disable getgroups unless HAVE_GETGROUPS.
(eaccess): unify the fallback to generic defined(USE_GETEUID).
* io.c: include sys/time.h for struct timeval.
(rb_close_before_exec): nothing we can do if F_GETFD is not
available.
(ioctl): pnacl newlib actually doesn't have ioctl.
* process.c (maxgroups): it is used iff
defined(_SC_NGROUPS_MAX) || defined(NGROUPS_MAX) but not
defined(HAVE_GETGROUPS) || defined(HAVE_SETGROUPS).
(obj2gid): fail unless the object is a Fixnum if getgrnam is not
available.
(disable_child_handler_fork_child): sigaction is not available in
PNaCl newlib.
* configure.in (warnflags, strict_warnflags): avoid -ansi for strlcpy.
(rb_cv_gcc_atomic_builtins): also check
__atomic_or_etch because it is used in ruby_atomic.h.
(rb_cv_gcc_sync_builtins): ditto.
(HAVE_GETGRNAM): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'nacl')
-rw-r--r-- | nacl/README.nacl | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/nacl/README.nacl b/nacl/README.nacl index ef2c3d1fa4..77140e0f75 100644 --- a/nacl/README.nacl +++ b/nacl/README.nacl @@ -15,7 +15,7 @@ You need to install the following things before building NaCl port of Ruby. (2) Set NACL_SDK_ROOT environment variable to the path to the Native Client SDK you installed: $ export NACL_SDK_ROOT=/home/yugui/src/nacl_sdk/pepper_37 (3) Configure - $ ./configure --prefix=/tmp/nacl-ruby --host=x86_64-nacl --with-baseruby=/path/to/ruby-1.9.3 + $ ./configure --prefix=/tmp/nacl-ruby --host=x86_64-nacl --with-baseruby=/path/to/ruby-1.9.3-or-later (4) Make $ make $ make package @@ -28,6 +28,23 @@ embeds Ruby", and libraries to $prefix. You can run it by the following steps: (6) Visit the example.html on the web server by a browser that implements Pepper 18 or later. -- e.g., Chrome 18 implements Pepper 18, Chrome 19 implements Pepper 19, ... +=== Example Configurations +* x86_32 Native Client + $ ./configure --prefix=/tmp/nacl-ruby \ + --host=i686-nacl \ + --with-baseruby=/path/to/ruby-1.9.3-or-later +* arm Native Client + $ ./configure --prefix=/tmp/nacl-ruby \ + --host=arm-nacl \ + --with-newlib \ + --with-baseruby=/path/to/ruby-1.9.3-or-later +* Portable Native Client + $ ./configure --prefix=/tmp/nacl-ruby \ + --host=le32-nacl \ + --with-newlib \ + --with-static-linked-ext \ + --with-baseruby=/path/to/ruby-1.9.3-or-later + = Copyright * Copyright 2012 Google Inc. All Rights Reserved. * Author: [email protected] (Yugui Sonoda) |