Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48903 )
Change subject: toolchain.inc: Update and fix the test-toolchain target ......................................................................
toolchain.inc: Update and fix the test-toolchain target
Due to some change, the test-toolchain was no longer working, and was always reporting that the toolchain is out of date.
This fixes the failure, and prints both the expected versions of Clang, GCC, and IASL on failures.
Additional changes fix some indentation issues and skip trying to update submodules when the test is run.
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: Ia350f279c3fd3533523996327cc6b2304e0bead4 --- M toolchain.inc 1 file changed, 30 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/48903/1
diff --git a/toolchain.inc b/toolchain.inc index b680b1c..18c6ab2 100644 --- a/toolchain.inc +++ b/toolchain.inc @@ -219,23 +219,37 @@ ifneq ($(filter test-toolchain,$(MAKECMDGOALS)),) $(foreach arch, $(ARCH_SUPPORTED), \ $(if $(shell if [ -n "$(GCC_CC_$(arch))" ]; then \ - $(GCC_CC_$(arch)) -v 2>&1 | \ - grep -q "$(shell util/crossgcc/buildgcc -s gcc)" || \ + $(GCC_CC_$(arch)) --version 2>&1 | head -n1 | rev | \ + cut -d ' ' -f 1 | rev | \ + grep -q "$$(util/crossgcc/buildgcc -s gcc)" || \ echo not-current; fi), \ $(eval COMPILER_OUT_OF_DATE:=1) \ $(warning The coreboot toolchain version of gcc for '$(arch)' \ - architecture is not the current version.)) \ + architecture is not the current version.) \ + $(warning $(arch) gcc version from buildgcc: \ + $(shell util/crossgcc/buildgcc -s gcc)) \ + $(warning $(arch) version of gcc executable: \ + $(shell $(GCC_CC_$(arch)) --version | head -n1 | \ + rev | cut -d ' ' -f 1 | rev))) \ $(if $(shell if [ -n "$(CLANG_CC_$(arch))" ]; then \ - $(CLANG_CC_$(arch)) -v 2>&1 | \ + $(CLANG_CC_$(arch)) --version 2>&1 | \ + sed 's/.*clang version/clang version/' | \ + head -n1 | cut -d ' ' -f 3 | \ grep -q "$(shell util/crossgcc/buildgcc -s clang)" || \ echo not-current; fi), \ - $(eval COMPILER_OUT_OF_DATE:=1)\ + $(eval COMPILER_OUT_OF_DATE:=1) \ $(warning The coreboot toolchain version of clang for \ - '$(arch)' architecture is not the current version.)) \ + '$(arch)' architecture is not the current version.) \ + $(warning $(arch) clang version from buildgcc: \ + $(shell util/crossgcc/buildgcc -s clang)) \ + $(warning $(arch) version of clang executable: \ + $(shell $(CLANG_CC_$(arch)) --version 2>&1 | \ + sed 's/.*clang version/clang version/' | \ + head -n1 | cut -d ' ' -f 3))) \ $(if $(shell if [ "$(OBJDUMP_$(arch))" != "invalidobjdump" ]; then \ - $(OBJDUMP_$(arch)) -v 2>&1 | \ - grep -q "$(shell util/crossgcc/buildgcc -s binutils)" || \ - echo not-current; fi), \ + $(OBJDUMP_$(arch)) -v 2>&1 | \ + grep -q "$(shell util/crossgcc/buildgcc -s binutils)" || \ + echo not-current; fi), \ $(eval COMPILER_OUT_OF_DATE:=1)\ $(warning The coreboot toolchain version of binutils for \ '$(arch)' architecture is not the current version.)) \ @@ -245,6 +259,12 @@ echo not-coreboot; fi), \ $(eval COMPILER_OUT_OF_DATE:=1)\ $(warning The coreboot toolchain version of iasl \ - is not the current version)) + is not the current version) \ + $(warning $(arch) iasl version from buildgcc: \ + $(shell util/crossgcc/buildgcc -s iasl)) \ + $(warning $(arch) version of iasl executable: \ + $(shell $(IASL) -v 2>&1 | \ + grep ASL+ | rev | cut -f 1 -d ' ' | rev))) +$(eval UPDATED_SUBMODULES:=1) endif #($(filter crossgcc_check%,$(MAKECMDGOALS)),) endif #($(MAKECMDGOALS),)
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48903 )
Change subject: toolchain.inc: Update and fix the test-toolchain target ......................................................................
Patch Set 1: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48903 )
Change subject: toolchain.inc: Update and fix the test-toolchain target ......................................................................
toolchain.inc: Update and fix the test-toolchain target
Due to some change, the test-toolchain was no longer working, and was always reporting that the toolchain is out of date.
This fixes the failure, and prints both the expected versions of Clang, GCC, and IASL on failures.
Additional changes fix some indentation issues and skip trying to update submodules when the test is run.
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: Ia350f279c3fd3533523996327cc6b2304e0bead4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48903 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com --- M toolchain.inc 1 file changed, 30 insertions(+), 10 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
diff --git a/toolchain.inc b/toolchain.inc index b680b1c..18c6ab2 100644 --- a/toolchain.inc +++ b/toolchain.inc @@ -219,23 +219,37 @@ ifneq ($(filter test-toolchain,$(MAKECMDGOALS)),) $(foreach arch, $(ARCH_SUPPORTED), \ $(if $(shell if [ -n "$(GCC_CC_$(arch))" ]; then \ - $(GCC_CC_$(arch)) -v 2>&1 | \ - grep -q "$(shell util/crossgcc/buildgcc -s gcc)" || \ + $(GCC_CC_$(arch)) --version 2>&1 | head -n1 | rev | \ + cut -d ' ' -f 1 | rev | \ + grep -q "$$(util/crossgcc/buildgcc -s gcc)" || \ echo not-current; fi), \ $(eval COMPILER_OUT_OF_DATE:=1) \ $(warning The coreboot toolchain version of gcc for '$(arch)' \ - architecture is not the current version.)) \ + architecture is not the current version.) \ + $(warning $(arch) gcc version from buildgcc: \ + $(shell util/crossgcc/buildgcc -s gcc)) \ + $(warning $(arch) version of gcc executable: \ + $(shell $(GCC_CC_$(arch)) --version | head -n1 | \ + rev | cut -d ' ' -f 1 | rev))) \ $(if $(shell if [ -n "$(CLANG_CC_$(arch))" ]; then \ - $(CLANG_CC_$(arch)) -v 2>&1 | \ + $(CLANG_CC_$(arch)) --version 2>&1 | \ + sed 's/.*clang version/clang version/' | \ + head -n1 | cut -d ' ' -f 3 | \ grep -q "$(shell util/crossgcc/buildgcc -s clang)" || \ echo not-current; fi), \ - $(eval COMPILER_OUT_OF_DATE:=1)\ + $(eval COMPILER_OUT_OF_DATE:=1) \ $(warning The coreboot toolchain version of clang for \ - '$(arch)' architecture is not the current version.)) \ + '$(arch)' architecture is not the current version.) \ + $(warning $(arch) clang version from buildgcc: \ + $(shell util/crossgcc/buildgcc -s clang)) \ + $(warning $(arch) version of clang executable: \ + $(shell $(CLANG_CC_$(arch)) --version 2>&1 | \ + sed 's/.*clang version/clang version/' | \ + head -n1 | cut -d ' ' -f 3))) \ $(if $(shell if [ "$(OBJDUMP_$(arch))" != "invalidobjdump" ]; then \ - $(OBJDUMP_$(arch)) -v 2>&1 | \ - grep -q "$(shell util/crossgcc/buildgcc -s binutils)" || \ - echo not-current; fi), \ + $(OBJDUMP_$(arch)) -v 2>&1 | \ + grep -q "$(shell util/crossgcc/buildgcc -s binutils)" || \ + echo not-current; fi), \ $(eval COMPILER_OUT_OF_DATE:=1)\ $(warning The coreboot toolchain version of binutils for \ '$(arch)' architecture is not the current version.)) \ @@ -245,6 +259,12 @@ echo not-coreboot; fi), \ $(eval COMPILER_OUT_OF_DATE:=1)\ $(warning The coreboot toolchain version of iasl \ - is not the current version)) + is not the current version) \ + $(warning $(arch) iasl version from buildgcc: \ + $(shell util/crossgcc/buildgcc -s iasl)) \ + $(warning $(arch) version of iasl executable: \ + $(shell $(IASL) -v 2>&1 | \ + grep ASL+ | rev | cut -f 1 -d ' ' | rev))) +$(eval UPDATED_SUBMODULES:=1) endif #($(filter crossgcc_check%,$(MAKECMDGOALS)),) endif #($(MAKECMDGOALS),)