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 <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/208190
Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
Vadim Bendebury 2014-07-15 15:00:35 -07:00 committed by chrome-internal-fetch
commit a20b0beb27

View file

@ -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