From 951c73334a77608fd1108f03eb9e6f98ffbb12a1 Mon Sep 17 00:00:00 2001
From: Rob Landley <rob@landley.net>
Date: Sat, 6 Oct 2018 14:07:47 -0500
Subject: Check for cross compiler before creating any generated/* files
 w/probed vals.

---
 scripts/make.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/make.sh b/scripts/make.sh
index 06dec156..ef0a7050 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -7,6 +7,9 @@ export LC_ALL=C
 set -o pipefail
 source ./configure
 
+[ ! -z "$CROSS_COMPILE" ] && [ ! -e "$CROSS_COMPILE"cc ] &&
+  echo "missing ${CROSS_COMPILE}cc" && exit 1
+
 [ -z "$KCONFIG_CONFIG" ] && KCONFIG_CONFIG=.config
 [ -z "$OUTNAME" ] && OUTNAME=toybox
 UNSTRIPPED="generated/unstripped/$(basename "$OUTNAME")"
-- 
cgit v1.2.3