summaryrefslogtreecommitdiff
path: root/nacl
diff options
context:
space:
mode:
Diffstat (limited to 'nacl')
-rw-r--r--nacl/GNUmakefile.in41
-rw-r--r--nacl/README.nacl4
-rw-r--r--nacl/ioctl.h7
-rwxr-xr-xnacl/nacl-config.rb14
-rw-r--r--nacl/pepper_main.c6
5 files changed, 36 insertions, 36 deletions
diff --git a/nacl/GNUmakefile.in b/nacl/GNUmakefile.in
index c1aaa36c7c..0ad8a29ee5 100644
--- a/nacl/GNUmakefile.in
+++ b/nacl/GNUmakefile.in
@@ -7,45 +7,54 @@ include Makefile
NACL_SDK_ROOT=@NACL_SDK_ROOT@
NACL_TOOLCHAIN=@NACL_TOOLCHAIN@
NACL_TOOLCHAIN_DIR=$(NACL_SDK_ROOT)/toolchain/$(NACL_TOOLCHAIN)
+
+# Don't override CC/LD/etc if they are already set to absolute
+# paths (this is the case when building in the naclports tree).
+ifeq ($(dir $(CC)),./)
CC:=$(NACL_TOOLCHAIN_DIR)/bin/$(CC)
+endif
+ifeq ($(dir $(LD)),./)
LD:=$(NACL_TOOLCHAIN_DIR)/bin/$(LD)
+endif
+ifeq ($(dir $(NM)),./)
NM:=$(NACL_TOOLCHAIN_DIR)/bin/$(NM)
+endif
+ifeq ($(dir $(AR)),./)
AR:=$(NACL_TOOLCHAIN_DIR)/bin/$(AR)
+endif
+ifeq ($(dir $(AS)),./)
AS:=$(NACL_TOOLCHAIN_DIR)/bin/$(AS)
+endif
+ifeq ($(dir $(RANLIB)),./)
RANLIB:=$(NACL_TOOLCHAIN_DIR)/bin/$(RANLIB)
+endif
+ifeq ($(dir $(OBJDUMP)),./)
OBJDUMP:=$(NACL_TOOLCHAIN_DIR)/bin/$(OBJDUMP)
+endif
+ifeq ($(dir $(OBJCOPY)),./)
OBJCOPY:=$(NACL_TOOLCHAIN_DIR)/bin/$(OBJCOPY)
+endif
PYTHON=@PYTHON@
PPROGRAM=pepper-$(PROGRAM)
PEPPER_LIBS=-lppapi
-PROGRAM_NMF=$(PROGRAM:.nexe=.nmf)
-PPROGRAM_NMF=$(PPROGRAM:.nexe=.nmf)
+PROGRAM_NMF=$(PROGRAM:$(EXEEXT)=.nmf)
+PPROGRAM_NMF=$(PPROGRAM:$(EXEEXT)=.nmf)
GNUmakefile: $(srcdir)/nacl/GNUmakefile.in
$(PPROGRAM): $(PROGRAM) pepper_main.$(OBJEXT)
$(Q)$(MAKE) $(MFLAGS) PROGRAM=$(PPROGRAM) MAINOBJ="pepper_main.$(OBJEXT)" LIBS="$(LIBS) $(PEPPER_LIBS)" program
-$(PROGRAM_NMF) $(PPROGRAM_NMF): $(@:.nmf=.nexe) nacl/create_nmf.rb
+$(PROGRAM_NMF) $(PPROGRAM_NMF): $(@:.nmf=$(EXEEXT)) nacl/create_nmf.rb
.PHONY: pprogram package show_naclflags
-.SUFFIXES: .nexe .nmf
-.nexe.nmf:
+.SUFFIXES: $(EXEEXT) .nmf
+$(EXEEXT).nmf:
$(ECHO) generating manifest $@
- $(Q)$(MINIRUBY) $(srcdir)/nacl/create_nmf.rb --verbose=$(V) $(@:.nmf=.nexe) $@
+ $(Q)$(MINIRUBY) $(srcdir)/nacl/create_nmf.rb --verbose=$(V) $(@:.nmf=$(EXEEXT)) $@
pepper_main.$(OBJEXT): $(srcdir)/nacl/pepper_main.c
@$(ECHO) compiling nacl/pepper_main.c
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(srcdir)/nacl/pepper_main.c
-ruby.$(OBJEXT):
- @$(ECHO) compiling $<
- $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@.tmp -c $<
- $(Q) $(OBJCOPY) --weaken-symbol=rb_load_file $@.tmp $@
- @-$(RM) $@.tmp
-file.$(OBJEXT):
- @$(ECHO) compiling $<
- $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@.tmp -c $<
- $(Q) $(OBJCOPY) --weaken-symbol=rb_file_load_ok $@.tmp $@
- @-$(RM) $@.tmp
.rbconfig.time:
@$(MAKE) .rbconfig.raw.time RBCONFIG=.rbconfig.raw.time
diff --git a/nacl/README.nacl b/nacl/README.nacl
index 471c3b5e5f..ef2c3d1fa4 100644
--- a/nacl/README.nacl
+++ b/nacl/README.nacl
@@ -6,14 +6,14 @@
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 22 or later
+* NativeClient SDK pepper 37 or later
* GNU make
== Steps
(1) Extract all files from the tarball:
$ tar xzf ruby-X.Y.Z.tar.gz
(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_16
+ $ 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
(4) Make
diff --git a/nacl/ioctl.h b/nacl/ioctl.h
deleted file mode 100644
index 0a18eeb3f5..0000000000
--- a/nacl/ioctl.h
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-// Author: yugui@google.com (Yugui Sonoda)
-#ifndef RUBY_NACL_IOCTL_H
-#define RUBY_NACL_IOCTL_H
-int ioctl(int fd, int request, ...);
-struct flock{};
-#endif
diff --git a/nacl/nacl-config.rb b/nacl/nacl-config.rb
index 2da05c0847..732de1dee3 100755
--- a/nacl/nacl-config.rb
+++ b/nacl/nacl-config.rb
@@ -27,14 +27,12 @@ module NaClConfig
INSTALL_PROGRAM = config['INSTALL_PROGRAM']
INSTALL_LIBRARY = config['INSTALL_DATA']
- SEL_LDR = [
- File.join(SDK_ROOT, 'toolchain', config['NACL_TOOLCHAIN'], 'bin', "sel_ldr_#{cpu_nick}"),
- File.join(SDK_ROOT, 'tools', "sel_ldr_#{cpu_nick}")
- ].find{|path| File.executable?(path)} or raise "No sel_ldr found"
- IRT_CORE = [
- File.join(SDK_ROOT, 'toolchain', config['NACL_TOOLCHAIN'], 'bin', "irt_core_#{cpu_nick}.nexe"),
- File.join(SDK_ROOT, 'tools', "irt_core_#{cpu_nick}.nexe")
- ].find{|path| File.exist?(path)} or raise "No irt_core found"
+ if cpu_nick == 'x86_64' or cpu_nick == 'x86_32'
+ SEL_LDR = File.join(SDK_ROOT, 'tools', "sel_ldr_#{cpu_nick}")
+ IRT_CORE = File.join(SDK_ROOT, 'tools', "irt_core_#{cpu_nick}.nexe")
+ raise "No sel_ldr found" if not File.executable?(SEL_LDR)
+ raise "No irt_core found" if not File.exists?(IRT_CORE)
+ end
RUNNABLE_LD = File.join(HOST_LIB, 'runnable-ld.so')
module_function
diff --git a/nacl/pepper_main.c b/nacl/pepper_main.c
index 1ccafd9332..e8d01ad078 100644
--- a/nacl/pepper_main.c
+++ b/nacl/pepper_main.c
@@ -210,7 +210,7 @@ pruby_async_return_value(void* data, VALUE value)
static struct PP_Var
pruby_cstr_to_var(const char* str)
{
-#ifdef PPB_VAR_INTERFACE_1_0
+#ifndef PPB_VAR_INTERFACE_1_1
if (var_interface != NULL)
return var_interface->VarFromUtf8(module_id, str, strlen(str));
return PP_MakeUndefined();
@@ -252,7 +252,7 @@ pruby_str_to_var(volatile VALUE str)
fprintf(stderr, "[BUG] Unexpected object type: %x\n", TYPE(str));
exit(EXIT_FAILURE);
}
-#ifdef PPB_VAR_INTERFACE_1_0
+#ifndef PPB_VAR_INTERFACE_1_1
if (var_interface != NULL) {
return var_interface->VarFromUtf8(module_id, RSTRING_PTR(str), RSTRING_LEN(str));
}
@@ -517,7 +517,7 @@ static void Instance_DidDestroy(PP_Instance instance) {
* the top left of the plugin's coordinate system (not the page). If the
* plugin is invisible, @a clip will be (0, 0, 0, 0).
*/
-#ifdef PPP_INSTANCE_INTERFACE_1_0
+#ifndef PPP_INSTANCE_INTERFACE_1_1
static void
Instance_DidChangeView(PP_Instance instance,
const struct PP_Rect* position,