summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2015-08-12 13:33:13 +0200
committerBen Gamari <ben@smart-cactus.org>2015-08-12 17:37:46 +0200
commit7b211b4e5a38efca437d76ea442495370da7cc9a (patch)
tree261c567aadef6b165089b4f5b9707bc0e2acb8c6 /driver
parentb0dee6104fed18f6a6c894caaa621a8488d9965f (diff)
downloadhaskell-7b211b4e5a38efca437d76ea442495370da7cc9a.tar.gz
Upgrade GCC to 5.2.0 for Windows x86 and x86_64
This patch does a few things - Moved GHC x86 to MinGW-w64 (Using Awson's patch) - Moves Both GHCs to MSYS2 toolchains - Completely removes the dependencies on the git tarball repo - Downloads only the required tarball for the architecture for which we are building - Downloads the perl tarball is missing as well - Fixed a few bugs in the linker to fix tests on Windows The links currently point to repo.msys2.org and GitHub, it might be more desirable to mirror them on http://downloads.haskell.org/~ghc/mingw/ as with the previous patch attempt. For more details on what the MSYS2 packages I include see #10726 (Awson's comment). but it should contain all we need and no python or fortran, which makes the uncompressed tar a 1-2 hundreds mb smaller. The `GCC 5.2.0` in the package supports `libgcc` as a shared library, this is a problem since when compiling with -shared the produced dll now has a dependency on `libgcc_s_sjlj-1.dll`. To solve this the flag `-static-libgcc` is now being used for all GCC calls on windows. Test Plan: ./validate was ran both on x86 and x86_64 windows and compared against the baseline. A few test were failing due to Ld no longer being noisy. These were updated. The changes to the configure script *should* be validated by the build bots for the other platforms before landing Reviewers: simonmar, awson, bgamari, austin, thomie Reviewed By: thomie Subscribers: #ghc_windows_task_force, thomie, awson Differential Revision: https://phabricator.haskell.org/D1123 GHC Trac Issues: #10726, #9014, #9218, #10435
Diffstat (limited to 'driver')
-rw-r--r--driver/gcc/gcc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/driver/gcc/gcc.c b/driver/gcc/gcc.c
index ea1f480b4d..517b008a12 100644
--- a/driver/gcc/gcc.c
+++ b/driver/gcc/gcc.c
@@ -47,9 +47,13 @@ int main(int argc, char** argv) {
from that in preference to the in-tree files. */
preArgv[0] = mkString("-B%s", binDir);
preArgv[1] = mkString("-B%s/../lib", binDir);
- preArgv[2] = mkString("-B%s/../lib/gcc/mingw32/4.5.2", binDir);
- preArgv[3] = mkString("-B%s/../libexec/gcc/mingw32/4.5.2", binDir);
-
+#ifdef __MINGW64__
+ preArgv[2] = mkString("-B%s/../lib/gcc/x86_64-w64-mingw32/5.2.0", binDir);
+ preArgv[3] = mkString("-B%s/../libexec/gcc/x86_64-w64-mingw32/5.2.0", binDir);
+#else
+ preArgv[2] = mkString("-B%s/../lib/gcc/i686-w64-mingw32/5.2.0", binDir);
+ preArgv[3] = mkString("-B%s/../libexec/gcc/i686-w64-mingw32/5.2.0", binDir);
+#endif
run(exePath, 4, preArgv, argc - 1, argv + 1);
}