summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-11-19 15:15:33 +0100
committerPatrick Georgi <pgeorgi@google.com>2015-11-20 10:33:07 +0100
commit6dda31d287c3460398c90193419b72d75abc2d51 (patch)
treea4a6dbbe36ef894cfb90014a105a86af7872d550
parentbdb4af8bfd1eedb4cd58624b8dfdbc13f82c3654 (diff)
downloadcoreboot-6dda31d287c3460398c90193419b72d75abc2d51.tar.xz
build system: tighten down .xcompile handling some more
Bail out if .xcompile is incomplete or can't be regenerated. Change-Id: I74adeded7a3e849b25bf65c5b02f67820f29c7e2 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12477 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r--Makefile9
-rwxr-xr-xutil/xcompile/xcompile1
2 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2e5a74785b..c4c0195b61 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@
$(if $(wildcard .xcompile),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile || rm -f .xcompile)))
.xcompile: util/xcompile/xcompile
+ rm -f $@
$< $(XGCCPATH) > $@.tmp
\mv -f $@.tmp $@ 2> /dev/null
@@ -120,7 +121,13 @@ else
include $(HAVE_DOTCONFIG)
-include .xcompile
+-include .xcompile
+
+ifneq ($(XCOMPILE_COMPLETE),1)
+$(shell rm -f .xcompile)
+$(error .xcompile deleted because it's invalid. \
+ Restarting the build should fix that, or explain the problem)
+endif
ifneq ($(CONFIG_MMX),y)
CFLAGS_x86_32 += -mno-mmx
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index a8134a0c98..4b9858099b 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -355,3 +355,4 @@ for architecture in $SUPPORTED_ARCHITECTURES; do
report_arch_toolchain
fi
done
+echo XCOMPILE_COMPLETE:=1