[coreboot-gerrit] New patch to review for coreboot: toolchain.inc: Update comments
Martin Roth (martinroth@google.com)
gerrit at coreboot.org
Fri Jan 15 22:56:21 CET 2016
Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13019
-gerrit
commit 44d5d7b490605f8cd8197ac3306d2256a71b1434
Author: Martin Roth <martinroth at google.com>
Date: Fri Jan 15 14:56:06 2016 -0700
toolchain.inc: Update comments
This fixes some nits that were pointed out in a previous review, and
adds a couple additional comments to explain what is happening.
Change-Id: I1ca4bf59ba79744f79fbe73f4e226feeea1cc2ab
Signed-off-by: Martin Roth <martinroth at google.com>
---
toolchain.inc | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/toolchain.inc b/toolchain.inc
index eb1f087..640c793 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -152,13 +152,14 @@ $(call init_stages)
# Test for coreboot toolchain (except when explicitly not requested)
ifneq ($(NOCOMPILE),1)
-# only run if we're doing a build (not for tests, kconfig, ...)
+# Only run if we're doing a build (not for tests, kconfig, ...)
# rationale: gcc versions by Linux distributions tend to be quite messed up
# llvm/clang also needs patches supplied by the coreboot build
COMPILERFAIL:=0
IASLFAIL:=0
ifneq ($(CONFIG_ANY_TOOLCHAIN),y)
+# Verify that the coreboot toolchain is being used.
$(foreach arch,$(sort $(foreach stage,\
$(COREBOOT_STANDARD_STAGES),$(ARCH-$(stage)-y))), \
$(if $(shell if [ -n "$(CC_$(arch))" ]; then \
@@ -167,8 +168,8 @@ $(foreach arch,$(sort $(foreach stage,\
$(eval COMPILERFAIL:=1)\
$(warning The coreboot toolchain for '$(arch)'\
architecture was not found.)))
-#if iasl doesn't match the current coreboot version, fail the test
-#TODO: Figure out if iasl is even needed for the build.
+# If iasl doesn't match the current coreboot version, fail the test
+# TODO: Figure out if iasl is even needed for the build.
$(if $(shell if [ -n "$(IASL)" ]; then \
$(IASL) -v 2>&1 | grep -q "$(shell util/crossgcc/buildgcc -s iasl)" || \
echo not-coreboot; else echo not-coreboot; fi), \
@@ -176,17 +177,20 @@ $(if $(shell if [ -n "$(IASL)" ]; then \
$(warning The coreboot toolchain version of iasl \
'$(shell util/crossgcc/buildgcc -s iasl)' was not found))
else #$(CONFIG_ANY_TOOLCHAIN)
+# If the coreboot toolchain isn't being used, verify that there is A toolchain
$(foreach arch,$(sort \
$(foreach stage,$(COREBOOT_STANDARD_STAGES),$(ARCH-$(stage)-y))), \
$(if $(CC_$(arch)),, $(eval COMPILERFAIL:=1) \
$(warning No compiler found for '$(arch)' architecture. \
Install one or use the coreboot toolchain?)) )
-#if iasl isn't present, fail
-#TODO: Figure out if iasl is even needed for the build.
+# If iasl isn't present, fail
+# TODO: Figure out if iasl is even needed for the build.
$(if $(IASL),, $(eval COMPILERFAIL:=1)$(eval IASLFAIL:=1) \
$(warning iasl not found. \
Please install it or use the coreboot toolchain.))
endif
+
+# If the compiler check failed, print out warnings
ifeq ($(COMPILERFAIL),1)
ifneq ($(XGCCPATH),)
$(warning )
@@ -213,6 +217,8 @@ endif #($(COMPILERFAIL),1)
endif #($(NOCOMPILE),1)
+# Run the toolchain version checks if the requested target is 'test-toolchain'
+# Checks the versions of GCC, binutils, clang, and IASL
ifneq ($(MAKECMDGOALS),)
ifneq ($(filter test-toolchain,$(MAKECMDGOALS)),)
$(foreach arch, $(ARCH_SUPPORTED), \
@@ -244,5 +250,5 @@ $(if $(shell if [ -n "$(IASL)" ]; then $(IASL) -v 2>&1 | \
$(eval COMPILER_OUT_OF_DATE:=1)\
$(warning The coreboot toolchain version of iasl \
is not the current version))
-endif # ifneq ($(filter crossgcc_check%,$(MAKECMDGOALS)),)
-endif # ifneq ($(MAKECMDGOALS),)
+endif #($(filter crossgcc_check%,$(MAKECMDGOALS)),)
+endif #($(MAKECMDGOALS),)
More information about the coreboot-gerrit
mailing list