diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2019-01-14 17:24:18 -0700 |
---|---|---|
committer | Nathan Chancellor <natechancellor@gmail.com> | 2019-01-14 18:30:53 -0700 |
commit | 3aa15d6782d7d621ae54a54b8eaccaada6c969b4 (patch) | |
tree | 77846702793376fbbce698d1f1d1f0832a28144e | |
parent | 8fccd8d9d51a0a0d9a7b9514e53f64c097028f22 (diff) |
Makefile: Fix 4.14.93 resolution
Commit ff858d822074 ("kbuild: consolidate Clang compiler flags")
conflicts with commit 9ff6ab2fbc00 ("ANDROID: Kbuild, LLVMLinux: allow
overriding clang target triple"). As it currently stands, CLANG_FLAGS
will not have the proper target parameter when cross compiling for
aarch64-linux-android. Move the CLANG_FLAGS definition up and use it
when checking for the proper target fallback, allowing us to properly
remove CLANG_TARGET.
Change-Id: I176146ad613bd5e6187f3421f29c2ffcc9ceebc3
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
-rw-r--r-- | Makefile | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -481,11 +481,10 @@ endif ifeq ($(cc-name),clang) ifneq ($(CROSS_COMPILE),) CLANG_TRIPLE ?= $(CROSS_COMPILE) -CLANG_TARGET := --target=$(notdir $(CLANG_TRIPLE:%-=%)) -ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_TARGET)), y) +CLANG_FLAGS := --target=$(notdir $(CLANG_TRIPLE:%-=%)) +ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_FLAGS)), y) $(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?") endif -CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%)) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD))) CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) |