Patrick Georgi (patrick@georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4584
-gerrit
commit 6791d3d1228df60c9b1f7231842cebf9eff068df Author: Patrick Georgi patrick@georgi-clan.de Date: Sun Dec 29 18:45:23 2013 +0100
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 --- Makefile.inc | 12 ++++++++++++ src/Kconfig | 10 ++++++++++ 2 files changed, 22 insertions(+)
diff --git a/Makefile.inc b/Makefile.inc index 0fb86ce..273c542 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) -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 diff --git a/src/Kconfig b/src/Kconfig index 1c80b8c..943cdef 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -79,6 +79,16 @@ config COMPILER_LLVM_CLANG
endchoice
+config ANY_TOOLCHAIN + bool "Allow building with any toolchain" + default n + depends on COMPILER_GCC + help + Many toolchains break when building coreboot since it uses quite + unusual linker features. Unless developers explicitely request it, + we'll have to assume that they use their distro compiler by mistake. + Make sure that using patched compilers is a conscious decision. + config SCANBUILD_ENABLE bool "Build with scan-build for static code analysis" default n