summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-22 12:19:21 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-22 12:19:21 +0000
commitf65e5121e2fb8374aaa0df4a0ab4768d6daaaab9 (patch)
tree8881bec7c8534d931c4f6f40fc5ded9838fc75bf
parenta49be8a8e378a8b2820c7fdfde3b6a3afd688c7b (diff)
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
-rw-r--r--ChangeLog10
-rw-r--r--configure.in11
-rw-r--r--nacl/GNUmakefile.in6
3 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f1c7d807e0..6d77f49d93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Wed Oct 22 21:09:51 2014 Yuki Yugui Sonoda <yugui@yugui.jp>
+
+ * 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.
+
Wed Oct 22 21:07:32 2014 Yuki Yugui Sonoda <yugui@yugui.jp>
* common.mk (build-ext): avoid trying to build dynamic libraries
diff --git a/configure.in b/configure.in
index 15281d700b..59d054cd12 100644
--- a/configure.in
+++ b/configure.in
@@ -101,7 +101,7 @@ AC_DEFUN([RUBY_NACL],
[i?86], [nacl_cv_cpu_nick=x86
nacl_cv_cpu_nick2=x86_32],
[le32], [nacl_cv_cpu_nick=pnacl
- nacl_cv_cpu_nick2=pnacl,
+ nacl_cv_cpu_nick2=pnacl
ac_cv_exeext=.pexe],
[nacl_cv_cpu_nick=$target_cpu])
AS_CASE(["$build_os"],
@@ -153,13 +153,19 @@ AC_DEFUN([RUBY_NACL],
AC_MSG_RESULT(${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/bin)
RUBY_APPEND_OPTIONS(XCFLAGS, '-I$(NACL_SDK_ROOT)/include')
+ if test x"${nacl_cv_cpu_nick}" = xpnacl; then
+ RUBY_APPEND_OPTIONS(XCFLAGS, '-isystem $(NACL_SDK_ROOT)/include/pnacl')
+ elif test x"${nacl_cv_build_variant}" = xnewlib; then
+ RUBY_APPEND_OPTIONS(XCFLAGS, '-isystem $(NACL_SDK_ROOT)/include/newlib')
+ fi
+
AC_MSG_CHECKING([nacl library path])
if test -d "${NACL_SDK_ROOT}/lib/${nacl_cv_build_variant}_${nacl_cv_cpu_nick2}/Release"; then
nacl_cv_libpath="${nacl_cv_build_variant}_${nacl_cv_cpu_nick2}"
elif test -d "${NACL_SDK_ROOT}/lib/${nacl_cv_cpu_nick2}/Release"; then
nacl_cv_libpath="${nacl_cv_cpu_nick2}"
else
- AC_MSG_ERROR("not found")
+ AC_MSG_ERROR([not found])
fi
AC_MSG_RESULT([${nacl_cv_libpath}])
RUBY_APPEND_OPTIONS(XLDFLAGS, '-L$(NACL_SDK_ROOT)/'"lib/${nacl_cv_libpath}/Release")
@@ -169,6 +175,7 @@ AC_DEFUN([RUBY_NACL],
AC_SUBST(NACL_SDK_VARIANT, "${nacl_cv_build_variant}")
AC_SUBST(NACL_LIB_PATH, "${nacl_cv_libpath}")
AC_CHECK_TOOLS(CC, [clang gcc])
+ AC_CHECK_TOOLS(CXX, [clang++ g++])
])])
AC_DEFUN([RUBY_NACL_CHECK_PEPPER_TYPES],
diff --git a/nacl/GNUmakefile.in b/nacl/GNUmakefile.in
index e850ad258d..1fffcee898 100644
--- a/nacl/GNUmakefile.in
+++ b/nacl/GNUmakefile.in
@@ -7,12 +7,16 @@ include Makefile
NACL_SDK_ROOT=@NACL_SDK_ROOT@
NACL_TOOLCHAIN=@NACL_TOOLCHAIN@
NACL_TOOLCHAIN_DIR=$(NACL_SDK_ROOT)/toolchain/$(NACL_TOOLCHAIN)
+CXX=@CXX@
# 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 $(CXX)),./)
+CXX:=$(NACL_TOOLCHAIN_DIR)/bin/$(CXX)
+endif
ifeq ($(dir $(LD)),./)
LD:=$(NACL_TOOLCHAIN_DIR)/bin/$(LD)
endif
@@ -43,7 +47,7 @@ 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
+ $(Q)$(MAKE) $(MFLAGS) PROGRAM=$(PPROGRAM) MAINOBJ="pepper_main.$(OBJEXT)" LIBS="$(LIBS) $(PEPPER_LIBS)" CC="$(CXX)" program
$(PROGRAM_NMF) $(PPROGRAM_NMF): $(@:.nmf=$(EXEEXT)) nacl/create_nmf.rb
.PHONY: pprogram package show_naclflags