summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2011-12-13 23:52:17 +0059
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2011-12-13 23:52:17 +0059
commit0b7d1d0940fd1fdcec8cb95e3bbba9489f2c7396 (patch)
tree99c101bdb129602e6406b06fbdde228abff6c43c
parentc4ab6841171696fa0f17d826d37944f520bd1a35 (diff)
tasks/uboot.mk: Allow specifying an override toolchain
Allow passing a UBOOT_TOOLS_PREFIX to override TARGET_TOOLS_PREFIX for building u-boot (and u-boot only). U-boot often triggers compiler bugs, and should typically be built with a bare-metal toolchain. Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--tasks/uboot.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/tasks/uboot.mk b/tasks/uboot.mk
index 8bbbc57..afa5a42 100644
--- a/tasks/uboot.mk
+++ b/tasks/uboot.mk
@@ -1,3 +1,7 @@
+ifneq ($(UBOOT_TOOLS_PREFIX),)
+UBOOT_TCDIR = $(realpath $(shell dirname $(UBOOT_TOOLS_PREFIX)))
+UBOOT_TCPREFIX = $(shell basename $(UBOOT_TOOLS_PREFIX))
+else
ifneq ($(findstring prebuilt,$(TARGET_TOOLS_PREFIX)),)
# The AOSP prebuilt toolchain is too old to compile
# current u-boot, so we fall back to a system compiler
@@ -9,6 +13,7 @@ UBOOT_TCDIR = $(realpath $(shell dirname $(TARGET_TOOLS_PREFIX)))
# built with the bare metal toolchain if it is available
UBOOT_TCPREFIX = $(shell if [ -e $(UBOOT_TCDIR)/arm-eabi-gcc ]; then echo arm-eabi-; else basename $(TARGET_TOOLS_PREFIX); fi)
endif
+endif
# u-boot can't be built with gold - so we force BFD LD into the
# PATH ahead of everything else