[commit: ghc] master: configure.ac: Ensure that we handle case of non-present --target (b09bf4b)
git at git.haskell.org
git at git.haskell.org
Thu Mar 9 22:53:01 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/b09bf4b0c0b01c1c53e972e52ceaeb28de66ae07/ghc
>---------------------------------------------------------------
commit b09bf4b0c0b01c1c53e972e52ceaeb28de66ae07
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Thu Mar 9 16:19:56 2017 -0500
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
>---------------------------------------------------------------
b09bf4b0c0b01c1c53e972e52ceaeb28de66ae07
configure.ac | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 949c3d0..9864f32 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)
More information about the ghc-commits
mailing list