[PATCH 10/11] android: Add the correct toolchain directory to $PATH

Kevin Cernekee cernekee at gmail.com
Sun Mar 24 21:14:05 EDT 2013


On the 64-bit NDK, the toolchain binaries live under:

toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin

So hardcoding prebuilt/linux-x86/bin would cause build failures.

This probably affects the OSX NDK as well, but I didn't check whether my
fix works for that case.

Signed-off-by: Kevin Cernekee <cernekee at gmail.com>
---
 android/Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/android/Makefile b/android/Makefile
index 93f8290..ccc670d 100644
--- a/android/Makefile
+++ b/android/Makefile
@@ -35,7 +35,8 @@ endif
 NDK_SYSROOT := $(NDK)/platforms/android-$(APIVER)/arch-$(ARCH)
 OC_SYSROOT  := $(shell pwd)/sysroot-$(TRIPLET)
 
-PATH := $(NDK)/toolchains/$(TOOLCHAIN)/prebuilt/linux-x86/bin:$(PATH)
+BINDIR := $(firstword $(wildcard $(NDK)/toolchains/$(TOOLCHAIN)/prebuilt/*/bin))
+PATH := $(BINDIR):$(PATH)
 PKG_CONFIG_LIBDIR=$(OC_SYSROOT)/lib/pkgconfig
 export PATH PKG_CONFIG_LIBDIR
 
-- 
1.7.10.4




More information about the openconnect-devel mailing list