From a20b0beb278e5299c6ce6aee0954c8a508e86016 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Tue, 15 Jul 2014 15:00:35 -0700 Subject: [PATCH] Fix toolchain.inc to quiet error messages When coreboot is being built, the terminal output is littered with the following messages: /bin/sh: -print-libgcc-file-name: command not found /bin/sh: -print-libgcc-file-name: command not found /bin/sh: -print-libgcc-file-name: command not found /bin/sh: -print-libgcc-file-name: command not found They do not prevent the build from succeeding, but are nevertheless annoying. This patch makes sure that there is no attempt to determine libgcc file name for nonexisting compilers. BUG=none TEST=The build for lumpy and storm still succeeds, but there is no spurious error messages generated any more Change-Id: Iac12e57edc8b605caf8d35287e78e2ad496b264e Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/208190 Reviewed-by: David Hendricks --- toolchain.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolchain.inc b/toolchain.inc index 3c59ab537c..86e8b60363 100644 --- a/toolchain.inc +++ b/toolchain.inc @@ -67,8 +67,9 @@ STRIP_$(1) := $(STRIP_$(2)) READELF_$(1) := $(READELF_$(2)) INCLUDES_$(1) = $$(INCLUDES) -Isrc/arch/$(ARCHDIR-$(2))/include CFLAGS_$(1) = $$(CFLAGS_common) $$(INCLUDES_$(1)) $(CFLAGS_$(2)) -LIBGCC_FILE_NAME_$(1) = $(shell [ -r `$(CC_$(2)) -print-libgcc-file-name` ] && \ - $(CC_$(2)) -print-libgcc-file-name) +LIBGCC_FILE_NAME_$(1) = $(shell test -n "$(CC_$(2))" && \ + test -r `$(CC_$(2)) -print-libgcc-file-name` && \ + $(CC_$(2)) -print-libgcc-file-name) endef # initialize standard toolchain (CC,AS and others) for given stage