summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-06-29 15:34:39 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2017-06-29 15:34:39 +0100
commit58c781da4861faab11e4c5804e07e6892908ef72 (patch)
tree3eee171fbd5756b479b4dab6ce7f4e3328b9d64c /configure.ac
parent3b0e7555fafe73b157a96ca48d8ddc04ad81b231 (diff)
downloadhaskell-58c781da4861faab11e4c5804e07e6892908ef72.tar.gz
Revert "Remove the Windows GCC driver."
This reverts commit d6cecde585b0980ed8e0050c5a1d315789fb6356. The patch broke Simon PJ's Windows build, becuase he didn't have (and should not need) a separate msys2 gcc. Following an exchange on the ghc-devs list, Tamar wrote Oops, sorry, didn’t notice it because both mine and harbormaster’s msys2 have separate GCCs installed as well. I don’t see an easy fix that would also work for end user Configure based cabal installs. So I think I’ll have to go back to the drawing board for this one. You can just leave it reverted.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3c5e17a0fa..c0961cf8fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -302,6 +302,8 @@ fail() {
if test "$HostOS" = "mingw32"
then
# Find the mingw-w64 7z file to extract.
+ # NB. If you update the tarballs to a new version of gcc, don't
+ # forget to tweak the paths in driver/gcc/gcc.c.
if test "$HostArch" = "i386"
then
mingw_arch="i686"
@@ -364,6 +366,12 @@ set_up_tarballs() {
mv "inplace/${tarball_mingw_dir}" inplace/mingw &&
touch inplace/mingw
+ # NB. Now since the GCC is hardcoded to use /mingw32 we need to
+ # make a wrapper around it to give it the proper paths
+ mv inplace/mingw/bin/gcc.exe inplace/mingw/bin/realgcc.exe
+ PATH=`pwd`/inplace/mingw/bin:$PATH
+ inplace/mingw/bin/realgcc.exe driver/gcc/gcc.c driver/utils/cwrapper.c driver/utils/getLocation.c -Idriver/utils -o inplace/mingw/bin/gcc.exe
+
AC_MSG_NOTICE([In-tree MingW-w64 tree created])
fi
}