From 33a7e02261d1d9909265cf7c1a00e1afe58b1422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 24 Jul 2014 01:07:17 +0300 Subject: [PATCH] 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. --- build/platform-android.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/platform-android.mk b/build/platform-android.mk index 3d76cb1a..1e8c74d5 100644 --- a/build/platform-android.mk +++ b/build/platform-android.mk @@ -46,6 +46,10 @@ CXXFLAGS += -fno-rtti -fno-exceptions 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 = \