aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2013-12-29 18:45:23 +0100
committerPatrick Georgi <patrick@georgi-clan.de>2014-04-16 08:20:06 +0200
commit9b0de7145927f0158de3fe526ff34e298fdae793 (patch)
tree0809c8760e1c44bca229461ff0070ad6631066d4 /Makefile.inc
parent34195beed12dd91805c9e7beb1d49038ecf123b6 (diff)
buildsystem: check for coreboot toolchain by default
Other toolchains just don't cut it. Change-Id: I7a0bdf60d89b5166c9a22c9e9f3f326b28f777b8 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/4584 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc
index fcd680df2b..90a50aa4aa 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -24,6 +24,18 @@ export KERNELVERSION := $(shell if [ -d "$(top)/.git" -a -f "`which git`" ]; \
else echo 4.0$(KERNELREVISION); fi)
#######################################################################
+# Test for coreboot toolchain (except when explicitely not requested)
+ifneq ($(NOCOMPILE),1)
+# only run if we're doing a build (not for tests, kconfig, ...)
+ifneq ($(CONFIG_ANY_TOOLCHAIN),y)
+_toolchain=$(shell $(CC_i386) -v 2>&1 |grep -q "gcc version .*coreboot toolchain" && echo coreboot)
+ifneq ($(_toolchain),coreboot)
+$(error Please use the coreboot toolchain (or prove that your toolchain works))
+endif
+endif
+endif
+
+#######################################################################
# Basic component discovery
MAINBOARDDIR=$(call strip_quotes,$(CONFIG_MAINBOARD_DIR))
export MAINBOARDDIR