ref: 33a7e02261d1d9909265cf7c1a00e1afe58b1422
parent: 470246c20f2cf487f5d7cf691eb5c438bde3ca40
author: Martin Storsjö <[email protected]>
date: Wed Jul 23 21:07:17 EDT 2014
Check that a working android toolchain was found If the user selects a nonexistent ARCH, previously the call that sets TOOLCHAINPREFIX would set it to contain a long error message, which makes it quite hard to figure out what actually went wrong. Instead check that CXX=$(TOLCHAINPREFIX)g++ actually points to a working executable, and abort immediately if this isn't true.
--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -46,6 +46,10 @@
LDFLAGS += --sysroot=$(SYSROOT)
SHLDFLAGS = -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so
+ifneq ($(CXX),$(wildcard $(CXX)))
+$(error Compiler not found, bad NDKROOT or ARCH?)
+endif
+
STL_INCLUDES = \
-I$(NDKROOT)/sources/cxx-stl/stlport/stlport
STL_LIB = \