distrib/configure: Canonicalize triples
authorBen Gamari <bgamari.foss@gmail.com>
Thu, 20 Jul 2017 15:34:00 +0000 (11:34 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 20 Jul 2017 15:34:01 +0000 (11:34 -0400)
Previously we failed to do this, which meant that the bindist's
configure would fail when passed --target (as you may need to do when
installing an armv7 bindist on an aarch64 machine, for instance).

Reviewers: hvr, erikd, austin

Reviewed By: hvr

Subscribers: rwbarton, thomie

GHC Trac Issues: #13934

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

distrib/configure.ac.in

index a15b4a5..314bb3a 100644 (file)
@@ -13,6 +13,13 @@ dnl--------------------------------------------------------------------
 FP_GMP
 
 bootstrap_target=@TargetPlatform@
+
+# We have to run these unconditionally as FPTOOLS_SET_PLATFORM_VARS wants the
+# values it computes.
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+
 FPTOOLS_SET_PLATFORM_VARS
 
 # Requires FPTOOLS_SET_PLATFORM_VARS to be run first.