Fix Windows x86 build
authorTamar Christina <tamar@zhox.com>
Sat, 18 Mar 2017 15:19:01 +0000 (15:19 +0000)
committerTamar Christina <tamar@zhox.com>
Mon, 20 Mar 2017 18:19:24 +0000 (18:19 +0000)
Summary:
Fix some `-Werror` failures and work around a
bug in the `x86` version of `mingw-w64-crt`'s libraries.

The bump in the `win32` submodule is required for this.

Test Plan: ./validate

Reviewers: austin, bgamari, erikd, simonmar

Reviewed By: simonmar

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3362

libraries/Win32
rts/linker/PEi386.c

index 06d5849..67c5cc5 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 06d584916a4c32e6d31b60499afd52e32e4281ef
+Subproject commit 67c5cc56f0faeacc553471c8a7d9b9b95e011731
index 9c7f4db..c27dd31 100644 (file)
@@ -1357,9 +1357,11 @@ ocResolve_PEi386 ( ObjectCode* oc )
          sym = (COFF_symbol*)
                myindex ( sizeof_COFF_symbol,
                          symtab, reltab_j->SymbolTableIndex );
+#if defined(x86_64_HOST_ARCH)
          uint64_t symIndex = ((uint64_t)myindex(sizeof_COFF_symbol, symtab,
                                                 reltab_j->SymbolTableIndex)
                                         - (uint64_t)symtab) / sizeof_COFF_symbol;
+#endif
 
          IF_DEBUG(linker,
                   debugBelch(