summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-01-07 16:35:41 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-01-07 16:35:41 +0000
commitc5dbacbac11791581ef005fa91cd41a4a90c25fc (patch)
treeab97588f5990edc2d1823ea4bc5e4091398591bf /configure.ac
parent27310213397bb89555bb03585e057ba1b017e895 (diff)
downloadhaskell-c5dbacbac11791581ef005fa91cd41a4a90c25fc.tar.gz
In configure, test that GHC generates code for the correct platform (#4819)
Patch supplied by the bug reporter, tidied up by me. $ ./configure --with-ghc=$HOME/fp/bin/i386-unknown-linux/ghc --build=x86_64-unknown-linux checking for gfind... no checking for find... /usr/bin/find checking for sort... /usr/bin/sort checking for GHC version date... inferred 7.1.20110107 checking version of ghc... 7.0.1 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu Host platform inferred as: i386-unknown-linux Target platform inferred as: i386-unknown-linux This GHC (/home/simonmar/fp/bin/i386-unknown-linux/ghc) does not generate code for the build platform GHC target platform : i386-unknown-linux Desired build platform : x86_64-unknown-linux
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d176e2c9be..afe7a05b16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -346,6 +346,16 @@ checkArch "$TargetArch"
checkVendor "$TargetVendor"
checkOS "$TargetOS"
+# Verify that the installed (bootstrap) GHC is capable of generating
+# code for the requested build platform.
+if test "$build" != "$bootstrap_target"
+then
+ echo "This GHC (${WithGhc}) does not generate code for the build platform"
+ echo " GHC target platform : $bootstrap_target"
+ echo " Desired build platform : $BuildPlatform"
+ exit 1
+fi
+
AC_SUBST(BuildPlatform)
AC_SUBST(HostPlatform)
AC_SUBST(TargetPlatform)