summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-01-05 16:07:42 -0700
committerMartin Roth <martinroth@google.com>2016-01-12 22:31:30 +0100
commitaede3fc828a98221fcf64457665fabbe0eb1eb09 (patch)
tree0f7fdcbf9e954cb7840869603ff9a5329febfebd /Makefile.inc
parent5933814e272a6dec3ab763462e3629e75690fc66 (diff)
Makefile: Add toolchain version check
This is an initial check for the coreboot toolchain versions. It currently checks binutils, gcc, clang, and iasl. The other components are slightly more difficult to test, but should follow on shortly. If the toolchain is not the correct version, make will halt with an error. Change-Id: I41daf6c4545c01dc21231d78fd081bbcf77c4726 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12846 Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 3b2a75b4a9..d7bb0186d3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -488,6 +488,7 @@ help_toolchain help::
@echo ' crossgcc-clean - Remove all built coreboot cross-compilers'
@echo ' iasl - Build coreboot IASL compiler (built by all cross targets)'
@echo ' clang - Build coreboot clang compiler'
+ @echo ' test-toolchain - Reports if toolchain components are out of date'
@echo ' crossgcc-ARCH - Build cross-compiler for specific architecture'
@echo ' crosstools-ARCH - Build cross-compiler with GDB for specific architecture'
@echo ' ARCH can be "i386", "x64", "arm", "aarch64", "mips", "riscv", or "power8"'
@@ -561,6 +562,14 @@ crossgcc-clean: clean-for-update
tools: $(objutil)/kconfig/conf $(CBFSTOOL) $(FMAPTOOL) $(RMODTOOL) $(objutil)/nvramtool/nvramtool $(ROMCC_BIN) $(objutil)/sconfig/sconfig $(IFDTOOL) $(IFDFAKE) $(CBOOTIMAGE) $(AMDFWTOOL)
+test-toolchain:
+ifeq ($(COMPILER_OUT_OF_DATE),1)
+ echo "The coreboot toolchain is not the current version."
+ $(error )
+else
+ echo "The coreboot toolchain is the current version."
+endif # ifeq ($(COMPILER_OUT_OF_DATE),1)
+
###########################################################################
# Common recipes for all stages
###########################################################################