ruby-changes:36014
From: yugui <ko1@a...>
Date: Wed, 22 Oct 2014 21:19:36 +0900 (JST)
Subject: [ruby-changes:36014] yugui:r48095 (trunk): Fix PNaCl configure/link errors.
yugui 2014-10-22 21:19:21 +0900 (Wed, 22 Oct 2014) New Revision: 48095 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48095 Log: 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. Modified files: trunk/ChangeLog trunk/configure.in trunk/nacl/GNUmakefile.in Index: configure.in =================================================================== --- configure.in (revision 48094) +++ configure.in (revision 48095) @@ -101,7 +101,7 @@ AC_DEFUN([RUBY_NACL], https://github.com/ruby/ruby/blob/trunk/configure.in#L101 [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], https://github.com/ruby/ruby/blob/trunk/configure.in#L153 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], https://github.com/ruby/ruby/blob/trunk/configure.in#L175 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], Index: ChangeLog =================================================================== --- ChangeLog (revision 48094) +++ ChangeLog (revision 48095) @@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Oct 22 21:09:51 2014 Yuki Yugui Sonoda <yugui@y...> + + * 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@y...> * common.mk (build-ext): avoid trying to build dynamic libraries Index: nacl/GNUmakefile.in =================================================================== --- nacl/GNUmakefile.in (revision 48094) +++ nacl/GNUmakefile.in (revision 48095) @@ -7,12 +7,16 @@ include Makefile https://github.com/ruby/ruby/blob/trunk/nacl/GNUmakefile.in#L7 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) https://github.com/ruby/ruby/blob/trunk/nacl/GNUmakefile.in#L47 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/