From 9e4b75cf345c798eabd7a869e20ecf79383062e4 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Wed, 29 Jan 2025 16:14:12 -0700 Subject: [PATCH] toolchain: Print CC command and output when CC invocation fails We are gobbling up the `$(CC_$(arch))` stderr when testing the toolchain. This change makes it so we print the command we tried to invoke and the output from the command. ``` toolchain.mk:183: The coreboot toolchain for 'x86_32' architecture was not found. toolchain.mk:183: /build/guybrush/tmp/portage/sys-boot/coreboot-9999/files/reclient/ccache /build/guybrush/tmp/portage/sys-boot/coreboot-9999/work/coreboot-sdk/bin/i386-elf-gcc -v I AM STDERR toolchain.mk:183: I AM STDOUT toolchain.mk:219: toolchain.mk:220: Path to your toolchain is currently set to '/build/guybrush/tmp/portage/sys-boot/coreboot-9999/work/coreboot-sdk/bin' toolchain.mk:222: toolchain.mk:223: To build the entire coreboot toolchain: run 'make crossgcc' ``` BUG=b:392874252, b:389737339 TEST=USE_REMOTEEXEC=true BOARD=brya bazel run @portage//internal/packages/stage2/target/board/chromiumos/sys-boot/coreboot:9999_debug Change-Id: I7c7352c7254c21deb3e4a03106b841ec9f111ba4 Signed-off-by: Raul E Rangel Reviewed-on: https://review.coreboot.org/c/coreboot/+/86220 Tested-by: build bot (Jenkins) Reviewed-by: Jon Murphy --- toolchain.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toolchain.mk b/toolchain.mk index 77fb46eb69..8d6d4496a2 100644 --- a/toolchain.mk +++ b/toolchain.mk @@ -187,7 +187,10 @@ $(foreach arch,$(sort $(foreach stage,\ echo not-coreboot; else echo not-coreboot; fi), \ $(eval COMPILERFAIL:=1)\ $(warning The coreboot toolchain for '$(arch)'\ - architecture was not found.))) + architecture was not found.)\ + $(if $(CC_$(arch)),\ + $(warning $(CC_$(arch)) -v)\ + $(warning $(shell $(CC_$(arch)) -v))))) # 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 \