[commit: ghc] master: configure: Don't pass GHC's sanitized triple to libraries' configure (e901ed1)

git at git.haskell.org git at git.haskell.org
Sat Mar 4 21:45:40 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e901ed1c5d662a6f343e7d1a576f727e5e556d43/ghc

>---------------------------------------------------------------

commit e901ed1c5d662a6f343e7d1a576f727e5e556d43
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Fri Mar 3 17:48:50 2017 -0500

    configure: Don't pass GHC's sanitized triple to libraries' configure
    
    Reviewers: hvr, rwbarton, austin
    
    Subscribers: thomie, danharaj, erikd
    
    Differential Revision: https://phabricator.haskell.org/D3247


>---------------------------------------------------------------

e901ed1c5d662a6f343e7d1a576f727e5e556d43
 configure.ac | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3c153c6..ba5836d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -434,8 +434,19 @@ fi
 # Despite its similarity in name to TargetPlatform, TargetPlatformFull is used
 # in calls to subproject configure scripts and thus must be set to the autoconf
 # triple, not the normalized GHC triple that TargetPlatform is set to.
-# It may be better to just do away with the GHC triples all together.
-TargetPlatformFull="${target}"
+#
+# We use the non-canonicalized triple, target_alias, here since the subproject
+# configure scripts will use this triple to construct the names of the toolchain
+# executables. If we instead passed down the triple produced by
+# AC_CANONICAL_TARGET then it may look for the target toolchain under the wrong
+# name (this is a known problem in the case of the Android NDK, which has
+# slightly odd triples).
+#
+# It may be better to just do away with the GHC triples all together. This would
+# 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}"
 AC_SUBST(CrossCompiling)
 AC_SUBST(CrossCompilePrefix)
 AC_SUBST(TargetPlatformFull)



More information about the ghc-commits mailing list