configure.ac: fix --host= handling
authorSergei Trofimovich <slyfox@gentoo.org>
Fri, 2 Sep 2016 07:35:25 +0000 (08:35 +0100)
committerSergei Trofimovich <siarheit@google.com>
Fri, 2 Sep 2016 07:36:38 +0000 (08:36 +0100)
The following command fails as:
    $ ./configure --prefix=/usr \
        --build=x86_64-pc-linux-gnu \
        --host=x86_64-pc-linux-gnu \
        --target=x86_64-pc-linux-gnu
    configure: error:
    You've selected:

      BUILD:  x86_64-unknown-linux
      HOST:   x86_64-unknown-linux
      TARGET: x86_64-unknown-linux

    BUILD must equal HOST;

18f06878ed5d8cb0cf366a876f2bfea29647e5f0 changed native
configure $build/$host/$target checks to ghc-mangled ones,
but not completely.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Reviewers: rwbarton, erikd, austin, hvr, bgamari, Phyx

Reviewed By: Phyx

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2508

GHC Trac Issues: #12487

configure.ac

index ea3ba4e..0fceb16 100644 (file)
@@ -417,7 +417,7 @@ if test "$TargetPlatform" != "$HostPlatform" ; then
                           #   configure: error: cannot run C compiled programs.
                           #   If you meant to cross compile, use `--host'.
 fi
-if test "$BuildPlatform" != "$host" ; then
+if test "$BuildPlatform" != "$HostPlatform" ; then
    AC_MSG_ERROR([
 You've selected: