Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12847
-gerrit
commit eac8eae42ecbaa2be97077324517fbffcc787004
Author: Martin Roth <martinroth(a)google.com>
Date: Tue Jan 5 16:14:12 2016 -0700
toolchain.inc: test IASL by version string instead of number
Test that the coreboot toolchain version of IASL is being used by
looking for the string 'coreboot toolchain' instead of a specific
version number. While this may cause people to have to rebuild
their toolchains again now, it helps to prevent toolchain failures
when bisecting in the future.
Change-Id: I9913eeae8f29ddc3ec8c70077c05d898595eb283
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
toolchain.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/toolchain.inc b/toolchain.inc
index 5836a19..99d1706 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -160,7 +160,7 @@ $(foreach arch,$(sort $(foreach stage,$(COREBOOT_STANDARD_STAGES),$(ARCH-$(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 $(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), \
+$(if $(shell if [ -n "$(IASL)" ]; then $(IASL) -v 2>&1 | grep -q "coreboot toolchain" || echo not-coreboot; else echo not-coreboot; fi), \
$(eval COMPILERFAIL:=1)$(eval IASLFAIL:=1)$(warning The coreboot toolchain version of iasl '$(shell util/crossgcc/buildgcc -s iasl)' was not found))
else #$(CONFIG_ANY_TOOLCHAIN)
$(foreach arch,$(sort $(foreach stage,$(COREBOOT_STANDARD_STAGES),$(ARCH-$(stage)-y))), \
the following patch was just integrated into master:
commit af91b8b086b6fd087a99a4e88ad76e46defacf9b
Author: Martin Roth <martinroth(a)google.com>
Date: Mon Dec 7 14:33:44 2015 -0700
toolchain.inc: Test for valid toolchain when ANY_TOOLCHAIN is used
Even when ANY_TOOLCHAIN is selected, a valid compiler for the requested
architecture is needed.
Change-Id: If1a0a1ca6b726e8e58d29c69de93546510582548
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/12681
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/12681 for details.
-gerrit
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12846
-gerrit
commit 038eb244f71f8da7fe3aba3ca21c607c7b06f390
Author: Martin Roth <martinroth(a)google.com>
Date: Tue Jan 5 16:07:42 2016 -0700
Makefile: Add toolchain version check
This is an initial check for the coreboot toolchain versions. It
currently checks binutils, gcc, clang, and iasl. The other components
are slightly more difficult to test, but should follow on shortly.
This supplies two targets to check the toolchain:
test_toolchain_and_halt - dies if the toolchain is not
the current version that is specified in the tree.
test_toolchain - will print the status of the toolchain, but
will continue to build if called as one of several targets.
for example 'make test_toolchain all' will print the status,
and then build the tree even if a toolchain component is out
of date.
Change-Id: I41daf6c4545c01dc21231d78fd081bbcf77c4726
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
Makefile.inc | 11 +++++++++++
toolchain.inc | 15 +++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/Makefile.inc b/Makefile.inc
index 000ad63..fb7bed9 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -486,6 +486,7 @@ help_toolchain help::
@echo ' crossgcc-clean - Remove all built coreboot cross-compilers'
@echo ' iasl - Build coreboot IASL compiler (built by all cross targets)'
@echo ' clang - Build coreboot clang compiler'
+ @echo ' test_toolchain - Reports if toolchain components are out of date'
@echo ' crossgcc-ARCH - Build cross-compiler for specific architecture'
@echo ' crosstools-ARCH - Build cross-compiler with GDB for specific architecture'
@echo ' ARCH can be "i386", "x64", "arm", "aarch64", "mips", "riscv", or "power8"'
@@ -559,6 +560,16 @@ crossgcc-clean: clean-for-update
tools: $(objutil)/kconfig/conf $(CBFSTOOL) $(FMAPTOOL) $(RMODTOOL) $(objutil)/nvramtool/nvramtool $(ROMCC_BIN) $(objutil)/sconfig/sconfig $(IFDTOOL) $(IFDFAKE) $(CBOOTIMAGE) $(AMDFWTOOL)
+test_toolchain_and_halt test_toolchain:
+ifeq ($(COMPILER_OUT_OF_DATE),1)
+ echo "The coreboot toolchain is not the current version"
+ifneq ($(filter test_toolchain_and_halt,$(MAKECMDGOALS)),)
+$(error )
+endif # ifneq ($(filter crossgcc_check_and_halt,$(MAKECMDGOALS)),)
+else
+ echo "The coreboot tools are the current version"
+endif # ifeq ($(COMPILER_OUT_OF_DATE),1)
+
###########################################################################
# Common recipes for all stages
###########################################################################
diff --git a/toolchain.inc b/toolchain.inc
index f2a6232..609fe44 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -185,3 +185,18 @@ $(error Halting the build)
endif #($(COMPILERFAIL),1)
endif #($(NOCOMPILE),1)
+
+ifneq ($(MAKECMDGOALS),)
+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)" || 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.)) \
+ $(if $(shell if [ -n "$(CLANG_CC_$(arch))" ]; then $(CLANG_CC_$(arch)) -v 2>&1 | grep -q "$(shell util/crossgcc/buildgcc -s clang)" || echo not-current; fi), \
+ $(eval COMPILER_OUT_OF_DATE:=1)$(warning The coreboot toolchain version of clang for '$(arch)' architecture is not the current version.)) \
+ $(if $(shell if [ "$(OBJDUMP_$(arch))" != "invalidobjdump" ]; then $(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.)) \
+)
+$(if $(shell if [ -n "$(IASL)" ]; then $(IASL) -v 2>&1 | grep -q "$(shell util/crossgcc/buildgcc -s iasl)" || echo not-coreboot; fi), \
+ $(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),)
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12843
-gerrit
commit ccce82014a5cb5b0d3a440375a803204f553001f
Author: Martin Roth <martinroth(a)google.com>
Date: Tue Jan 5 15:44:02 2016 -0700
xcompile: use $() instead of backticks
While the backtick syntax isn't actually depricated, the $() syntax
is preferred. Since both styles were being used in this script, settle
on the new standard for all cases.
Change-Id: I33770d666781b4fa34c909411e0d220c2540dbb4
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/xcompile/xcompile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index c8cf6e9..b336f88 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -19,15 +19,15 @@ TMPFILE=""
XGCCPATH=$1
# libpayload crossgcc path
-if [ -d "`pwd`/../../util/crossgcc/xgcc/bin/" ]
+if [ -d "$(pwd)/../../util/crossgcc/xgcc/bin/" ]
then
- XGCCPATH=${XGCCPATH:-"`pwd`/../../util/crossgcc/xgcc/bin/"}
+ XGCCPATH=${XGCCPATH:-"$(pwd)/../../util/crossgcc/xgcc/bin/"}
fi
# coreboot crossgcc path
-if [ -d "`pwd`/util/crossgcc/xgcc/bin/" ]
+if [ -d "$(pwd)/util/crossgcc/xgcc/bin/" ]
then
- XGCCPATH=${XGCCPATH:-"`pwd`/util/crossgcc/xgcc/bin/"}
+ XGCCPATH=${XGCCPATH:-"$(pwd)/util/crossgcc/xgcc/bin/"}
fi
die() {
@@ -187,9 +187,9 @@ detect_special_flags() {
detect_compiler_runtime() {
test -z "$CLANG" || \
- CC_RT_CLANG="`${CLANG} ${CFLAGS_CLANG} -print-librt-file-name 2>/dev/null`"
+ CC_RT_CLANG="$(${CLANG} ${CFLAGS_CLANG} -print-librt-file-name 2>/dev/null)"
test -z "$GCC" || \
- CC_RT_GCC="`${GCC} ${CFLAGS_GCC} -print-libgcc-file-name`"
+ CC_RT_GCC="$(${GCC} ${CFLAGS_GCC} -print-libgcc-file-name)"
}
report_arch_toolchain() {