Revision: 22531
Author:   paul.l...@imgtec.com
Date:     Tue Jul 22 15:29:22 2014 UTC
Log:      Fix remaining CXX cross-compilation builds in Makefile.

r22509 fixed arm and mips (big-endian) cross-compilation builds.

It did not fix mipsel, mips64el, or arm64 builds, since the
toolchain prefix did not match the v8_target_arch.

For mips, the toolchain is typically named mips-linux-gnu-g++,
but it can compile for mipsel or mips64el via flags. (There can
also be mipsel-linux-gnu-g++ toolchains, and this patch will
work for mipsel build in that case).

For arm64, the toolchains seem to be named aarch64-linux-gnu-g++.

BUG=
R=jkumme...@chromium.org

Review URL: https://codereview.chromium.org/408133002
http://code.google.com/p/v8/source/detail?r=22531

Modified:
 /branches/bleeding_edge/Makefile

=======================================
--- /branches/bleeding_edge/Makefile    Tue Jul 22 14:53:29 2014 UTC
+++ /branches/bleeding_edge/Makefile    Tue Jul 22 15:29:22 2014 UTC
@@ -401,14 +401,15 @@
 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
        $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
                cut -f 2 -d " " | cut -f 1 -d "-" ))
+       $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$CXX_TARGET_ARCH))
        $(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@))))
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
        GYP_GENERATORS=make \
        build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
                      -Ibuild/standalone.gypi --depth=. \
                      -Dv8_target_arch=$(V8_TARGET_ARCH) \
-                     $(if $(filter $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \
-                     -Dtarget_arch=$(CXX_TARGET_ARCH),) \
+                     $(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \
+                     -Dtarget_arch=$(V8_TARGET_ARCH),) \
                      $(if $(findstring optdebug,$@),-Dv8_optimized_debug=2,) \
                      -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS)

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to