summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2016-12-01 20:07:59 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2016-12-01 20:07:59 +0800
commit01b946fe85cdbccdd8760e83911a54ee0f1f46c0 (patch)
tree256a1342cd1e60cc5fc5220a07d0eef80aa274f3
parent61a573bdde468a3e7d588840baadfd9f81a1fbcf (diff)
downloadcommon-RLCR-16.12.tar.gz
tasks/kernel.mk: support for kernel toolchain specificationRLCR-16.12
with KERNEL_TOOLS_PREFIX to specify the toolchain used for kernel building, if not specified, use the default android TARGET_TOOLS_PREFIX Change-Id: Ic19635fd43128cdfe089061507c49d90fe05a4b8 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--tasks/kernel.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/tasks/kernel.mk b/tasks/kernel.mk
index 2b9911b..526a58b 100644
--- a/tasks/kernel.mk
+++ b/tasks/kernel.mk
@@ -10,7 +10,12 @@ endif
# built with TARGET_TOOLS (not KERNEL_TOOLS because we may be building a
# 64/32 environment), but is not built from the regular top directory,
# so passing a relative TARGET_TOOLS_PREFIX won't work.
+
+ifeq ($(strip $(KERNEL_TOOLS_PREFIX)),)
ABS_TARGET_TOOLS_PREFIX = $(shell cd `dirname $(TARGET_TOOLS_PREFIX)` && pwd)/$(shell basename $(TARGET_TOOLS_PREFIX))
+else
+ABS_TARGET_TOOLS_PREFIX = $(shell cd `dirname $(KERNEL_TOOLS_PREFIX)` && pwd)/$(shell basename $(KERNEL_TOOLS_PREFIX))
+endif
UNRESOLVED_KERNEL_TOOLS_PREFIX ?= $(ABS_TARGET_TOOLS_PREFIX)
KERNEL_TOOLS_PREFIX := $(UNRESOLVED_KERNEL_TOOLS_PREFIX)