summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-03-09 16:19:56 -0500
committerBen Gamari <ben@smart-cactus.org>2017-03-09 17:52:49 -0500
commitb09bf4b0c0b01c1c53e972e52ceaeb28de66ae07 (patch)
tree34a4811d738fdf1d1e0a0e6dc432895ea86ba59d /configure.ac
parent37a415e23cb68bf74d942453817a546c2652a457 (diff)
downloadhaskell-b09bf4b0c0b01c1c53e972e52ceaeb28de66ae07.tar.gz
configure.ac: Ensure that we handle case of non-present --target
@rwbarton pointed out that this could be an issue during review, but I assumed from my point sample of three test builds that this wouldn't be necessary. Sadly, none of these builds were on Windows, which indeed does fail. Strangely, only Simon and Harbormaster have been able to replicate the issue (which apparently manifests as libffi thinking it's building for unix). I've been completely unable to replicate the failure in my own builds, neither locally nor on the Harbormaster machine. Test Plan: Validate on Windows Reviewers: austin, Phyx, hvr Reviewed By: Phyx Subscribers: thomie, rwbarton, erikd Differential Revision: https://phabricator.haskell.org/D3304
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 949c3d06dc..9864f3290f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -446,7 +446,13 @@ fi
# all be taken care of for us if we configured the subprojects using
# AC_CONFIG_DIR, but unfortunately Cabal needs to be the one to do the
# configuration.
-TargetPlatformFull="${target_alias}"
+if test -z "${target_alias}"
+then
+ # --target wasn't given; use result from AC_CANONICAL_TARGET
+ TargetPlatformFull="${target}"
+else
+ TargetPlatformFull="${target_alias}"
+fi
AC_SUBST(CrossCompiling)
AC_SUBST(CrossCompilePrefix)
AC_SUBST(TargetPlatformFull)