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@google.com> Reviewed-on: https://review.coreboot.org/13019 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
4e7e987b24
commit
a656362402
|
@ -152,13 +152,14 @@ $(call init_stages)
|
||||||
|
|
||||||
# Test for coreboot toolchain (except when explicitly not requested)
|
# Test for coreboot toolchain (except when explicitly not requested)
|
||||||
ifneq ($(NOCOMPILE),1)
|
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
|
# rationale: gcc versions by Linux distributions tend to be quite messed up
|
||||||
# llvm/clang also needs patches supplied by the coreboot build
|
# llvm/clang also needs patches supplied by the coreboot build
|
||||||
COMPILERFAIL:=0
|
COMPILERFAIL:=0
|
||||||
IASLFAIL:=0
|
IASLFAIL:=0
|
||||||
|
|
||||||
ifneq ($(CONFIG_ANY_TOOLCHAIN),y)
|
ifneq ($(CONFIG_ANY_TOOLCHAIN),y)
|
||||||
|
# Verify that the coreboot toolchain is being used.
|
||||||
$(foreach arch,$(sort $(foreach stage,\
|
$(foreach arch,$(sort $(foreach stage,\
|
||||||
$(COREBOOT_STANDARD_STAGES),$(ARCH-$(stage)-y))), \
|
$(COREBOOT_STANDARD_STAGES),$(ARCH-$(stage)-y))), \
|
||||||
$(if $(shell if [ -n "$(CC_$(arch))" ]; then \
|
$(if $(shell if [ -n "$(CC_$(arch))" ]; then \
|
||||||
|
@ -167,7 +168,7 @@ $(foreach arch,$(sort $(foreach stage,\
|
||||||
$(eval COMPILERFAIL:=1)\
|
$(eval COMPILERFAIL:=1)\
|
||||||
$(warning The coreboot toolchain for '$(arch)'\
|
$(warning The coreboot toolchain for '$(arch)'\
|
||||||
architecture was not found.)))
|
architecture was not found.)))
|
||||||
#if iasl doesn't match the current coreboot version, fail the test
|
# If iasl doesn't match the current coreboot version, fail the test
|
||||||
# TODO: Figure out if iasl is even needed for the build.
|
# TODO: Figure out if iasl is even needed for the build.
|
||||||
$(if $(shell if [ -n "$(IASL)" ]; then \
|
$(if $(shell if [ -n "$(IASL)" ]; then \
|
||||||
$(IASL) -v 2>&1 | grep -q "$(shell util/crossgcc/buildgcc -s iasl)" || \
|
$(IASL) -v 2>&1 | grep -q "$(shell util/crossgcc/buildgcc -s iasl)" || \
|
||||||
|
@ -176,17 +177,20 @@ $(if $(shell if [ -n "$(IASL)" ]; then \
|
||||||
$(warning The coreboot toolchain version of iasl \
|
$(warning The coreboot toolchain version of iasl \
|
||||||
'$(shell util/crossgcc/buildgcc -s iasl)' was not found))
|
'$(shell util/crossgcc/buildgcc -s iasl)' was not found))
|
||||||
else #$(CONFIG_ANY_TOOLCHAIN)
|
else #$(CONFIG_ANY_TOOLCHAIN)
|
||||||
|
# If the coreboot toolchain isn't being used, verify that there is A toolchain
|
||||||
$(foreach arch,$(sort \
|
$(foreach arch,$(sort \
|
||||||
$(foreach stage,$(COREBOOT_STANDARD_STAGES),$(ARCH-$(stage)-y))), \
|
$(foreach stage,$(COREBOOT_STANDARD_STAGES),$(ARCH-$(stage)-y))), \
|
||||||
$(if $(CC_$(arch)),, $(eval COMPILERFAIL:=1) \
|
$(if $(CC_$(arch)),, $(eval COMPILERFAIL:=1) \
|
||||||
$(warning No compiler found for '$(arch)' architecture. \
|
$(warning No compiler found for '$(arch)' architecture. \
|
||||||
Install one or use the coreboot toolchain?)) )
|
Install one or use the coreboot toolchain?)) )
|
||||||
#if iasl isn't present, fail
|
# If iasl isn't present, fail
|
||||||
# TODO: Figure out if iasl is even needed for the build.
|
# TODO: Figure out if iasl is even needed for the build.
|
||||||
$(if $(IASL),, $(eval COMPILERFAIL:=1)$(eval IASLFAIL:=1) \
|
$(if $(IASL),, $(eval COMPILERFAIL:=1)$(eval IASLFAIL:=1) \
|
||||||
$(warning iasl not found. \
|
$(warning iasl not found. \
|
||||||
Please install it or use the coreboot toolchain.))
|
Please install it or use the coreboot toolchain.))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# If the compiler check failed, print out warnings
|
||||||
ifeq ($(COMPILERFAIL),1)
|
ifeq ($(COMPILERFAIL),1)
|
||||||
ifneq ($(XGCCPATH),)
|
ifneq ($(XGCCPATH),)
|
||||||
$(warning )
|
$(warning )
|
||||||
|
@ -213,6 +217,8 @@ endif #($(COMPILERFAIL),1)
|
||||||
|
|
||||||
endif #($(NOCOMPILE),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 ($(MAKECMDGOALS),)
|
||||||
ifneq ($(filter test-toolchain,$(MAKECMDGOALS)),)
|
ifneq ($(filter test-toolchain,$(MAKECMDGOALS)),)
|
||||||
$(foreach arch, $(ARCH_SUPPORTED), \
|
$(foreach arch, $(ARCH_SUPPORTED), \
|
||||||
|
@ -244,5 +250,5 @@ $(if $(shell if [ -n "$(IASL)" ]; then $(IASL) -v 2>&1 | \
|
||||||
$(eval COMPILER_OUT_OF_DATE:=1)\
|
$(eval COMPILER_OUT_OF_DATE:=1)\
|
||||||
$(warning The coreboot toolchain version of iasl \
|
$(warning The coreboot toolchain version of iasl \
|
||||||
is not the current version))
|
is not the current version))
|
||||||
endif # ifneq ($(filter crossgcc_check%,$(MAKECMDGOALS)),)
|
endif #($(filter crossgcc_check%,$(MAKECMDGOALS)),)
|
||||||
endif # ifneq ($(MAKECMDGOALS),)
|
endif #($(MAKECMDGOALS),)
|
||||||
|
|
Loading…
Reference in New Issue