summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-09-21 20:09:25 +0000
committerRoy Marples <roy@marples.name>2014-09-21 20:09:25 +0000
commitb7e48083a6b3a2a865f99efa9fe2a55007434e00 (patch)
tree66d14fe825f8f7e8516e3a03b7c02b22e5470116 /configure
parente5166f23cee8e45f8b8f164b828a0501a24f128e (diff)
downloaddhcpcd-b7e48083a6b3a2a865f99efa9fe2a55007434e00.tar.xz
Only hunt for a cross compiler if build != host.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 3 insertions, 5 deletions
diff --git a/configure b/configure
index b6eafbe6..64092211 100755
--- a/configure
+++ b/configure
@@ -15,8 +15,8 @@ STRLCPY=
UDEV=
OS=
BUILD=
-BUILDCC=
HOST=
+HOSTCC=
TARGET=
DEBUG=
FORK=
@@ -244,16 +244,14 @@ echo "LIBDIR= $LIBDIR" >>$CONFIG_MK
echo "MANDIR= $MANDIR" >>$CONFIG_MK
# Always obey CC.
-# However, if CC is not specified and we are given GNU style
-# --host or --build targets the expectation is we try and match that
-# to a compiler.
if [ -n "$CC" ]; then
HOSTCC=
else
CC=cc
_COMPILERS="cc clang gcc pcc icc"
fi
-if [ -n "$HOSTCC" ]; then
+# Only look for a cross compiler if --host and --build are not the same
+if [ -n "$HOSTCC" -a "$BUILD" != "$HOST" ]; then
for _CC in $_COMPILERS; do
_CC=$(_which "$HOSTCC$_CC")
if [ -x "$_CC" ]; then