зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
a49be8a8e3
Коммит
f65e5121e2
10
ChangeLog
10
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>
|
Wed Oct 22 21:07:32 2014 Yuki Yugui Sonoda <yugui@yugui.jp>
|
||||||
|
|
||||||
* common.mk (build-ext): avoid trying to build dynamic libraries
|
* common.mk (build-ext): avoid trying to build dynamic libraries
|
||||||
|
|
11
configure.in
11
configure.in
|
@ -101,7 +101,7 @@ AC_DEFUN([RUBY_NACL],
|
||||||
[i?86], [nacl_cv_cpu_nick=x86
|
[i?86], [nacl_cv_cpu_nick=x86
|
||||||
nacl_cv_cpu_nick2=x86_32],
|
nacl_cv_cpu_nick2=x86_32],
|
||||||
[le32], [nacl_cv_cpu_nick=pnacl
|
[le32], [nacl_cv_cpu_nick=pnacl
|
||||||
nacl_cv_cpu_nick2=pnacl,
|
nacl_cv_cpu_nick2=pnacl
|
||||||
ac_cv_exeext=.pexe],
|
ac_cv_exeext=.pexe],
|
||||||
[nacl_cv_cpu_nick=$target_cpu])
|
[nacl_cv_cpu_nick=$target_cpu])
|
||||||
AS_CASE(["$build_os"],
|
AS_CASE(["$build_os"],
|
||||||
|
@ -153,13 +153,19 @@ AC_DEFUN([RUBY_NACL],
|
||||||
AC_MSG_RESULT(${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/bin)
|
AC_MSG_RESULT(${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/bin)
|
||||||
|
|
||||||
RUBY_APPEND_OPTIONS(XCFLAGS, '-I$(NACL_SDK_ROOT)/include')
|
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])
|
AC_MSG_CHECKING([nacl library path])
|
||||||
if test -d "${NACL_SDK_ROOT}/lib/${nacl_cv_build_variant}_${nacl_cv_cpu_nick2}/Release"; then
|
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}"
|
nacl_cv_libpath="${nacl_cv_build_variant}_${nacl_cv_cpu_nick2}"
|
||||||
elif test -d "${NACL_SDK_ROOT}/lib/${nacl_cv_cpu_nick2}/Release"; then
|
elif test -d "${NACL_SDK_ROOT}/lib/${nacl_cv_cpu_nick2}/Release"; then
|
||||||
nacl_cv_libpath="${nacl_cv_cpu_nick2}"
|
nacl_cv_libpath="${nacl_cv_cpu_nick2}"
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR("not found")
|
AC_MSG_ERROR([not found])
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT([${nacl_cv_libpath}])
|
AC_MSG_RESULT([${nacl_cv_libpath}])
|
||||||
RUBY_APPEND_OPTIONS(XLDFLAGS, '-L$(NACL_SDK_ROOT)/'"lib/${nacl_cv_libpath}/Release")
|
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_SDK_VARIANT, "${nacl_cv_build_variant}")
|
||||||
AC_SUBST(NACL_LIB_PATH, "${nacl_cv_libpath}")
|
AC_SUBST(NACL_LIB_PATH, "${nacl_cv_libpath}")
|
||||||
AC_CHECK_TOOLS(CC, [clang gcc])
|
AC_CHECK_TOOLS(CC, [clang gcc])
|
||||||
|
AC_CHECK_TOOLS(CXX, [clang++ g++])
|
||||||
])])
|
])])
|
||||||
|
|
||||||
AC_DEFUN([RUBY_NACL_CHECK_PEPPER_TYPES],
|
AC_DEFUN([RUBY_NACL_CHECK_PEPPER_TYPES],
|
||||||
|
|
|
@ -7,12 +7,16 @@ include Makefile
|
||||||
NACL_SDK_ROOT=@NACL_SDK_ROOT@
|
NACL_SDK_ROOT=@NACL_SDK_ROOT@
|
||||||
NACL_TOOLCHAIN=@NACL_TOOLCHAIN@
|
NACL_TOOLCHAIN=@NACL_TOOLCHAIN@
|
||||||
NACL_TOOLCHAIN_DIR=$(NACL_SDK_ROOT)/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
|
# Don't override CC/LD/etc if they are already set to absolute
|
||||||
# paths (this is the case when building in the naclports tree).
|
# paths (this is the case when building in the naclports tree).
|
||||||
ifeq ($(dir $(CC)),./)
|
ifeq ($(dir $(CC)),./)
|
||||||
CC:=$(NACL_TOOLCHAIN_DIR)/bin/$(CC)
|
CC:=$(NACL_TOOLCHAIN_DIR)/bin/$(CC)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(dir $(CXX)),./)
|
||||||
|
CXX:=$(NACL_TOOLCHAIN_DIR)/bin/$(CXX)
|
||||||
|
endif
|
||||||
ifeq ($(dir $(LD)),./)
|
ifeq ($(dir $(LD)),./)
|
||||||
LD:=$(NACL_TOOLCHAIN_DIR)/bin/$(LD)
|
LD:=$(NACL_TOOLCHAIN_DIR)/bin/$(LD)
|
||||||
endif
|
endif
|
||||||
|
@ -43,7 +47,7 @@ PPROGRAM_NMF=$(PPROGRAM:$(EXEEXT)=.nmf)
|
||||||
|
|
||||||
GNUmakefile: $(srcdir)/nacl/GNUmakefile.in
|
GNUmakefile: $(srcdir)/nacl/GNUmakefile.in
|
||||||
$(PPROGRAM): $(PROGRAM) pepper_main.$(OBJEXT)
|
$(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
|
$(PROGRAM_NMF) $(PPROGRAM_NMF): $(@:.nmf=$(EXEEXT)) nacl/create_nmf.rb
|
||||||
|
|
||||||
.PHONY: pprogram package show_naclflags
|
.PHONY: pprogram package show_naclflags
|
||||||
|
|
Загрузка…
Ссылка в новой задаче