aboutsummaryrefslogtreecommitdiff
path: root/scripts/portability.sh
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-03-21 15:53:18 -0500
committerRob Landley <rob@landley.net>2019-03-21 15:53:18 -0500
commit99cd706b1ad7bdc41658139f04ff30bd87ea7f3e (patch)
tree911871d854f1e3169c38570e6efaded7761a777c /scripts/portability.sh
parent14eee98d9dbe81729437bf333ea413b43e37969a (diff)
downloadtoybox-99cd706b1ad7bdc41658139f04ff30bd87ea7f3e.tar.gz
Test for compiler existence when sourcing portability.sh.
Diffstat (limited to 'scripts/portability.sh')
-rw-r--r--scripts/portability.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/portability.sh b/scripts/portability.sh
index fddd84ec..abeb31f2 100644
--- a/scripts/portability.sh
+++ b/scripts/portability.sh
@@ -1,5 +1,13 @@
# sourced to find alternate names for things
+source configure
+
+if [ -z "$(command -v "${CROSS_COMPILE}${CC}")" ]
+then
+ echo "No ${CROSS_COMPILE}${CC} found" >&2
+ exit 1
+fi
+
if [ -z "$SED" ]
then
[ ! -z "$(which gsed 2>/dev/null)" ] && SED=gsed || SED=sed