From: Roy Marples Date: Mon, 24 Mar 2014 18:40:45 +0000 (+0000) Subject: So apparently target is just for compilers and we should be using host instead. X-Git-Tag: v6.4.0~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85b1b94a1bed8aa434ea840ff411b42d954dcf75;p=thirdparty%2Fdhcpcd.git So apparently target is just for compilers and we should be using host instead. --- 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