diff options
author | Ian Lynagh <igloo@earth.li> | 2012-03-15 15:47:57 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-03-15 15:57:14 +0000 |
commit | 1d00c8393d8b9cd8a2fc8ad4c10bb04e8febabdf (patch) | |
tree | b9cbe2d4b3b209ff56394f3e4bd655778546b4d5 /configure.ac | |
parent | 45a40bab4aea14ee85375e5f1150f49c6b0b2646 (diff) | |
download | haskell-1d00c8393d8b9cd8a2fc8ad4c10bb04e8febabdf.tar.gz |
Support making a Win64 in-tree mingw
The Win64 mingw zip file isn't in the ghc-tarballs repo, as it's >300M.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 100 |
1 files changed, 58 insertions, 42 deletions
diff --git a/configure.ac b/configure.ac index c25fbe5aa5..0c9df53798 100644 --- a/configure.ac +++ b/configure.ac @@ -252,57 +252,73 @@ if test "$HostOS" = "mingw32" then test -d inplace || mkdir inplace - CC="$hardtop/inplace/mingw/bin/gcc.exe" - LD="$hardtop/inplace/mingw/bin/ld.exe" - NM="$hardtop/inplace/mingw/bin/nm.exe" - fp_prog_ar_raw="$hardtop/inplace/mingw/bin/ar.exe" - - # 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 -d inplace/mingw || - test inplace/mingw -ot ghc-tarballs/mingw/binutils*.tar.lzma || - test inplace/mingw -ot ghc-tarballs/mingw/gcc-core*.tar.lzma || - test inplace/mingw -ot ghc-tarballs/mingw/gcc-c++*.tar.lzma || - test inplace/mingw -ot ghc-tarballs/mingw/libgcc*.tar.gz || - test inplace/mingw -ot ghc-tarballs/mingw/libgmp*.tar.gz || - test inplace/mingw -ot ghc-tarballs/mingw/libmpc*.tar.gz || - test inplace/mingw -ot ghc-tarballs/mingw/libmpfr*.tar.gz || - test inplace/mingw -ot ghc-tarballs/mingw/libstdc*.tar.lzma || - test inplace/mingw -ot ghc-tarballs/mingw/mingwrt*-dev.tar.gz || - test inplace/mingw -ot ghc-tarballs/mingw/mingwrt*-dll.tar.gz || - test inplace/mingw -ot ghc-tarballs/mingw/w32api*.tar.lzma + if test "$HostOS" = "i386" then - AC_MSG_NOTICE([Making in-tree mingw tree]) - rm -rf inplace/mingw - mkdir inplace/mingw - ( - cd inplace/mingw && - tar --lzma -xf ../../ghc-tarballs/mingw/binutils*.tar.lzma && - tar --lzma -xf ../../ghc-tarballs/mingw/gcc-core*.tar.lzma && - tar --lzma -xf ../../ghc-tarballs/mingw/gcc-c++*.tar.lzma && - tar --lzma -xf ../../ghc-tarballs/mingw/libgcc*.tar.lzma && - tar --lzma -xf ../../ghc-tarballs/mingw/libgmp*.tar.lzma && - tar --lzma -xf ../../ghc-tarballs/mingw/libmpc*.tar.lzma && - tar --lzma -xf ../../ghc-tarballs/mingw/libmpfr*.tar.lzma && - tar --lzma -xf ../../ghc-tarballs/mingw/libstdc*.tar.lzma && - tar -z -xf ../../ghc-tarballs/mingw/mingwrt*-dev.tar.gz && - tar -z -xf ../../ghc-tarballs/mingw/mingwrt*-dll.tar.gz && - tar --lzma -xf ../../ghc-tarballs/mingw/w32api*.tar.lzma && - mv bin/gcc.exe 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 - if ! test -e inplace/mingw/bin/gcc.exe + # 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 -d inplace/mingw || + test inplace/mingw -ot ghc-tarballs/mingw/binutils*.tar.lzma || + test inplace/mingw -ot ghc-tarballs/mingw/gcc-core*.tar.lzma || + test inplace/mingw -ot ghc-tarballs/mingw/gcc-c++*.tar.lzma || + test inplace/mingw -ot ghc-tarballs/mingw/libgcc*.tar.gz || + test inplace/mingw -ot ghc-tarballs/mingw/libgmp*.tar.gz || + test inplace/mingw -ot ghc-tarballs/mingw/libmpc*.tar.gz || + test inplace/mingw -ot ghc-tarballs/mingw/libmpfr*.tar.gz || + test inplace/mingw -ot ghc-tarballs/mingw/libstdc*.tar.lzma || + test inplace/mingw -ot ghc-tarballs/mingw/mingwrt*-dev.tar.gz || + test inplace/mingw -ot ghc-tarballs/mingw/mingwrt*-dll.tar.gz || + test inplace/mingw -ot ghc-tarballs/mingw/w32api*.tar.lzma then - AC_MSG_ERROR([GHC is required unless bootstrapping from .hc files.]) + AC_MSG_NOTICE([Making in-tree mingw tree]) + rm -rf inplace/mingw + mkdir inplace/mingw + ( + cd inplace/mingw && + tar --lzma -xf ../../ghc-tarballs/mingw/binutils*.tar.lzma && + tar --lzma -xf ../../ghc-tarballs/mingw/gcc-core*.tar.lzma && + tar --lzma -xf ../../ghc-tarballs/mingw/gcc-c++*.tar.lzma && + tar --lzma -xf ../../ghc-tarballs/mingw/libgcc*.tar.lzma && + tar --lzma -xf ../../ghc-tarballs/mingw/libgmp*.tar.lzma && + tar --lzma -xf ../../ghc-tarballs/mingw/libmpc*.tar.lzma && + tar --lzma -xf ../../ghc-tarballs/mingw/libmpfr*.tar.lzma && + tar --lzma -xf ../../ghc-tarballs/mingw/libstdc*.tar.lzma && + tar -z -xf ../../ghc-tarballs/mingw/mingwrt*-dev.tar.gz && + tar -z -xf ../../ghc-tarballs/mingw/mingwrt*-dll.tar.gz && + tar --lzma -xf ../../ghc-tarballs/mingw/w32api*.tar.lzma && + mv bin/gcc.exe 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 tree created]) fi - AC_MSG_NOTICE([In-tree mingw tree created]) + mingwbin="$hardtop/inplace/mingw/bin/" + else + # 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 -d inplace/mingw || + test inplace/mingw -ot ghc-tarballs/mingw64/x86_64-w64-*.zip + then + AC_MSG_NOTICE([Making in-tree mingw tree]) + rm -rf inplace/mingw + mkdir inplace/mingw + ( + cd inplace/mingw && + unzip ../../ghc-tarballs/mingw64/x86_64-w64-*.zip + ) + AC_MSG_NOTICE([In-tree mingw tree created]) + fi + mingwbin="$hardtop/inplace/mingw/bin/x86_64-w64-mingw32-" fi + + CC="${mingwbin}gcc.exe" + LD="${mingwbin}ld.exe" + NM="${mingwbin}nm.exe" + fp_prog_ar_raw="${mingwbin}ar.exe" + if ! test -d inplace/perl || test inplace/perl -ot ghc-tarballs/perl/ghc-perl*.tar.gz then AC_MSG_NOTICE([Making in-tree perl tree]) rm -rf inplace/perl - mkdir inplace mkdir inplace/perl ( cd inplace/perl && |