[Lldb-commits] [lldb] r297279 - Android.rules: fix computation of gcc toolchain directory on arm

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 8 06:57:15 PST 2017


Author: labath
Date: Wed Mar  8 08:57:15 2017
New Revision: 297279

URL: http://llvm.org/viewvc/llvm-project?rev=297279&view=rev
Log:
Android.rules: fix computation of gcc toolchain directory on arm

The toolchain directory for arm android targets was computed
incorrectly. The architecture part should be arm, and the environment
part androideabi. This fixes that.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules

Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules?rev=297279&r1=297278&r2=297279&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules Wed Mar  8 08:57:15 2017
@@ -14,34 +14,36 @@ endif
 ifeq "$(ARCH)" "arm"
 	SYSROOT_ARCH := arm
 	STL_ARCH := armeabi-v7a
-	TRIPLE_ARCH := armv7
+	TRIPLE := armv7-none-linux-androideabi
 	ARCH_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm
 else ifeq "$(ARCH)" "aarch64"
 	SYSROOT_ARCH := arm64
-	TRIPLE_ARCH := aarch64
+	TRIPLE := aarch64-none-linux-android
 	STL_ARCH := arm64-v8a
 else ifeq "$(ARCH)" "i386"
 	SYSROOT_ARCH := x86
 	STL_ARCH := x86
-	TRIPLE_ARCH := i686
+	TRIPLE := i686-none-linux-android
 else ifeq "$(ARCH)" "mips64r6"
 	SYSROOT_ARCH := mips64
 	STL_ARCH := mips64
-	TRIPLE_ARCH := mips64el
+	TRIPLE := mips64el-none-linux-android
 else ifeq "$(ARCH)" "mips32"
 	SYSROOT_ARCH := mips
 	STL_ARCH := mips
-	TRIPLE_ARCH := mipsel
+	TRIPLE := mipsel-none-linux-android
 else
 	SYSROOT_ARCH := $(ARCH)
 	STL_ARCH := $(ARCH)
-	TRIPLE_ARCH := $(ARCH)
+	TRIPLE := $(ARCH)-none-linux-android
 endif
 
 ifeq "$(findstring 86,$(ARCH))" "86"
 	TOOLCHAIN_DIR := $(STL_ARCH)-4.9
+else ifeq "$(ARCH)" "arm"
+	TOOLCHAIN_DIR := arm-linux-androideabi-4.9
 else
-	TOOLCHAIN_DIR := $(TRIPLE_ARCH)-linux-android-4.9
+	TOOLCHAIN_DIR := $(subst -none,,$(TRIPLE))-4.9
 endif
 
 ifeq "$(HOST_OS)" "Linux"
@@ -53,11 +55,9 @@ else
 endif
 
 ifeq "$(findstring clang,$(CC))" "clang"
-	ARCH_CFLAGS += \
-		-target $(TRIPLE_ARCH)-none-linux-android \
+	ARCH_CFLAGS += -target $(TRIPLE) \
 		-gcc-toolchain $(NDK_ROOT)/toolchains/$(TOOLCHAIN_DIR)/prebuilt/$(HOST_TAG)
-	ARCH_LDFLAGS += \
-		-target $(TRIPLE_ARCH)-none-linux-android \
+	ARCH_LDFLAGS += -target $(TRIPLE) \
 		-gcc-toolchain $(NDK_ROOT)/toolchains/$(TOOLCHAIN_DIR)/prebuilt/$(HOST_TAG)
 endif
 




More information about the lldb-commits mailing list