Граф коммитов

21 Коммитов

Автор SHA1 Сообщение Дата
yugui f65e5121e2 Fix PNaCl configure/link errors.
* configure.in (nacl_cv_cpu_nick): fix typo in PNaCl.
  (XCFLAGS) Add -isystem flag to pnacl and nacl-newlib
  (CXX): added

* nacl/GNUmakefile.in (CXX): Added
  (PPROGRAM): Use clang++ instead of clang because libnacl_io
  depends on c++ std lib.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-22 12:19:21 +00:00
yugui 04e356b002 * nacl/pepper_main.c (Instance_DidCreate): mount devfs and rebind fd 0
.. 2 so that stderr goes to the console of the browser.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-22 00:32:03 +00:00
svn a4f0db49ab * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21 15:23:35 +00:00
yugui 165221441c Enable nacl_io in pepper-ruby.
* configure.in (XCFLAGS): Add include path for NaCl libraries.
  (XLDFLAGS): ditto.
  (NACL_LIB_PATH): new stubstitution

* nacl/nacl-config.rb: support NACL_LIB_PATH

* nacl/package.rb: ditto.

* nacl/pepper_main.c: replace old implementations with nacl_io.

* nacl/GNUmakefile.in: link nacl_io to pepper_ruby

* ruby.c (rb_load_file): remove __attribute__((weak)) because the old
  override hack was replaced with nacl_io.

* file.c (rb_file_load_ok): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21 15:23:21 +00:00
yugui 57bc5eaf2f 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
2014-10-11 13:33:14 +00:00
yugui 69ac654c90 Merges a patch form naclports.
* configure.in (RUBY_NACL and others): Supports PNaCl.
* dln.c: replace the old hacky dynamic loading over HTTP with nacl_io.
* file.c: tenatively use access(2) instead of eaccess.
  (rb_file_load_ok): weaken with attribute but not by postprocess.
* io.c (socket.h): now NaCl has socket.h
  (flock): disable here instead of nacl/ioctl.h
* nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY):
  respect path to them if they are absolute.
  This helps naclports to build ruby in their source tree.
  (PROGRAM_NMF, .SUFFIXES): support .pnexe for PNaCl.
  (ruby.o, file.o): move the hack to attributes in ruby.c and file.c
* nacl/ioctl.h: removed. move the hack to io.c.
* nacl/nacl-config.rb: support arm, pnacl and others.
* nacl/pepper_main.c: support build in a naclports tree.
* ruby.c (rb_load_file): weaken with attribute but not by postprocess.

The patch is by sbc@google.com and the Native Client Authors.
It is available at:
* 873ca4910a/ports/ruby/nacl.patch

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 02:11:53 +00:00
nobu 28b9f11d5a protoize no-arguments functions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30 05:25:32 +00:00
kosaki 476af221b7 * nacl/nacl-config.rb: Use File.exist? instead of executable?
for irt_core. Recent nacl_sdk has non-executable irt_core.
  Patch by Shinichiro Hamaji.
  [Fixes GH-529] https://github.com/ruby/ruby/pull/529

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 20:53:16 +00:00
ktsj edb98f8b91 fix typos. Patch by k_takata.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 03:10:21 +00:00
yugui 6efba755da 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
2013-01-03 15:39:15 +00:00
yugui 0cd1cf3876 * nacl/GNUmakefile.in (.rbconfig.time): r36828 was incomplete.
It did not run correctly on clean build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-28 02:34:43 +00:00
yugui 6d66dbf25e * nacl/GNUmakefile.in (package): make package should install
example.html for nacl build

Patch by Takashi Toyoshima <toyoshim AT gmail.com>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-27 01:23:00 +00:00
yugui a66b2c6df1 * nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY)
Rewrites these variables instead of PATH.
  NaCl port uses a toolchain which is specified by NACL_SDK_ROOT
  environment variable. Originally, NaCl build added the toolchain
  under the NACL_SDK_ROOT to the PATH. But updating PATH doesn't work
  on Mac.
  (RBCONFIG): Replaces configs with the variable updates above.

* configure.in: Thus it is no longer necessary to check $PATH.

Based on a patch by Takashi Toyoshima <toyoshim AT gmail.com>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-27 01:22:53 +00:00
yugui 1497959ef5 * nacl/pepper_main.c (init_loadpath): Pushes the correct load path on
other architectures than x86_64. Fixes #6873.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 01:14:14 +00:00
yugui 412c5a96be * vm_eval.c (rb_eval_string_from_file,
rb_eval_string_from_file_protect): new functions to replace
  rb_compile_main_from_string() and ruby_eval_main().

* nacl/pepper_ruby.c: Follows the change in vm_eval.c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11 03:25:26 +00:00
kosaki 428a5a9cd9 * include/ruby/ruby.h: Removed RUBY_GLOBAL_SETUP complely. It is
no meaning definition since r24894.
* main.c: ditto.
* nacl/pepper_main.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-09 15:53:02 +00:00
yugui 88fa84a560 * nacl/pepper_main.c: Removed an unnecessary and errorneous inclusion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 00:03:56 +00:00
nobu 073297789a fix r36079
* include/ruby/ruby.h: public symbols must have default visibility.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 03:03:48 +00:00
yugui 22e7c535a6 * nacl/pepper_maini.c: Applies the new embedding API to pepper_ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 02:22:22 +00:00
yugui cc4072b3db * nacl/nacl_config.rb: Fixed for 32bit hosts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 12:51:40 +00:00
yugui 76bc2d1ed7 Imports Ruby's port to NativeClient (a.k.a NaCl).
Patch by Google Inc. [ruby-core:45073].

* configure.in (RUBY_NACL): New M4 func to configure variables for
  NaCl.
  (RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names
  of Pepper interface types.
  (BTESTRUBY): New variable to specify which ruby should be run on
  "make btest". NaCl can run the built binary by sel_ldr, but it need
  rbconfig.rb. So this variable is distinguished from $MINIRUBY.
  
* thread_pthread.c: Disabled some features on NaCl.

* io.c: ditto.

* process.c: ditto.

* signal.c: ditto.

* file.c: ditto.

* missing/flock.c: ditto.

* nacl/pepper_main.c: An example implementation of Pepper application
  that embeds Ruby.

* nacl/example.html: An example of web page that uses the Pepper
  application.

* nacl/nacl-config.rb: Detects variants of NaCl SDK.

* nacl/GNUmakefile.in: Makefile template for NaCl specific build
  process.

* nacl/package.rb: script for packaging a NaCl-Ruby embedding
  application. 

* nacl/reate_nmf.rb: Wrapper script of create_nmf.py

* dln.c (dln_load): Added a hack to call on NaCl.

* util.c (ruby_getcwd): Path to the current directort is not available
  on NaCl.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17 02:48:59 +00:00