summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-03-24 18:40:45 +0000
committerRoy Marples <roy@marples.name>2014-03-24 18:40:45 +0000
commit85b1b94a1bed8aa434ea840ff411b42d954dcf75 (patch)
tree3d6a8e99e012e42807e7a2315ce55d2bcb4a6541 /configure
parentffab836eabad628324dc86c95e1dcc74705d1aaf (diff)
downloaddhcpcd-85b1b94a1bed8aa434ea840ff411b42d954dcf75.tar.xz
So apparently target is just for compilers and we should be using host instead.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 9 insertions, 19 deletions
diff --git a/configure b/configure
index f467dfd2..a136e7b1 100755
--- a/configure
+++ b/configure
@@ -13,10 +13,9 @@ GETLINE=
STRLCPY=
UDEV=
OS=
-BUILD=
+BUILDCC=
HOST=
TARGET=
-TARGETCC=
DEBUG=
FORK=
STATIC=
@@ -57,7 +56,7 @@ for x do
--with-hook) HOOKSCRIPTS="$HOOKSCRIPTS${HOOKSCRIPTS:+ }$var";;
--with-hooks|HOOKSCRIPTS) HOOKSCRIPTS=$var; HOOKSET=true;;
--build) BUILD=$var;;
- --host) HOST=$var;;
+ --host) HOST=$var; HOSTCC=$var-;;
--target) TARGET=$var;;
--libdir) LIBDIR=$var;;
--without-arc4random) ARC4RANDOM=no;;
@@ -190,23 +189,14 @@ CONFIG_MK=config.mk
if [ -z "$BUILD" ]; then
# autoconf target triplet: cpu-vendor-os
BUILD=$(uname -m)-unknown-$(uname -s | tr '[:upper:]' '[:lower:]')
-else
- TARGETCC=$BUILD-
-fi
-if [ -n "$TARGET" ]; then
- TARGETCC=$TARGET-
-elif [ -n "$HOST" ]; then
- TARGET=$HOST
-else
- HOST=$BUILD
- TARGET=$HOST
fi
+: ${HOST:=$BUILD}
if [ -z "$OS" ]; then
- echo "Deriving operating system from ... $TARGET"
+ echo "Deriving operating system from ... $HOST"
# Derive OS from cpu-vendor-[kernel-]os
- CPU=${TARGET%%-*}
- REST=${TARGET#*-}
+ CPU=${HOST%%-*}
+ REST=${HOST#*-}
if [ "$CPU" != "$REST" ]; then
VENDOR=${REST%%-*}
REST=${REST#*-}
@@ -254,14 +244,14 @@ echo "MANDIR= $MANDIR" >>$CONFIG_MK
# --host or --build targets the expectation is we try and match that
# to a compiler.
if [ -n "$CC" ]; then
- TARGETCC=
+ HOSTCC=
else
CC=cc
_COMPILERS="cc clang gcc pcc icc"
fi
-if [ -n "$TARGETCC" ]; then
+if [ -n "$HOSTCC" ]; then
for _CC in $_COMPILERS; do
- _CC=$(_which "$TARGETCC$_CC")
+ _CC=$(_which "$HOSTCC$_CC")
if [ -x "$_CC" ]; then
CC=$_CC
break