summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Wu <arw@dmp.com.tw>2013-09-05 00:21:11 +0800
committerPatrick Georgi <patrick@georgi-clan.de>2014-01-23 20:43:28 +0100
commit1287d1cc80c52ff2598f2bae235fc42d8456f44a (patch)
treed84f2b638471f2ebbecd1f3e0a9ff147039d4549
parentf3c7a9cf9dd275fa597abf4e40552b3645e1cb23 (diff)
downloadcoreboot-1287d1cc80c52ff2598f2bae235fc42d8456f44a.tar.xz
Makefile: Check $CC variable returned from xcompile is not empty.
If xcompile can't find out suitable GCC compiler for i386/armv7, it will not set $CC_i386/$CC_armv7 variable. Makefile sets $CC variable from xcompile, and will print strange error messages when executing $CC program if $CC is empty. Add checking to avoid this problem. If $CC is empty, also delete invalid .xcompile file, so Make can recreate this file next time. Change-Id: Ia8d481d76ca52f3351cb99f05779d06947161c5d Signed-off-by: Andrew Wu <arw@dmp.com.tw> Reviewed-on: http://review.coreboot.org/3905 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
-rw-r--r--Makefile5
-rw-r--r--payloads/libpayload/Makefile5
2 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b709d14a9d..11222d65c5 100644
--- a/Makefile
+++ b/Makefile
@@ -138,6 +138,11 @@ AR := $(AR_$(ARCH-y))
CFLAGS += $(CFLAGS_$(ARCH-y))
+ifeq ($(CC),)
+$(shell rm .xcompile)
+$(error no suitable GCC for $(ARCH-y))
+endif
+
LIBGCC_FILE_NAME := $(shell test -r `$(CC) -print-libgcc-file-name` && \
$(CC) -print-libgcc-file-name)
diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index a1e8dc7510..7a29be3956 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -113,6 +113,11 @@ AR := $(AR_$(ARCH-y))
CFLAGS += $(CFLAGS_$(ARCH-y))
+ifeq ($(CC),)
+$(shell rm .xcompile)
+$(error no suitable GCC for $(ARCH-y))
+endif
+
LIBGCC_FILE_NAME := $(shell test -r `$(CC) -print-libgcc-file-name` && \
$(CC) -print-libgcc-file-name)