rts: fix filename case for mingw32 target
ClosedPublic

Authored by trofi on Dec 2 2017, 5:17 AM.

Details

Summary

The failure is visible when we build a cross-compiler
from linux to mingw32 as:

$ ./configure --host=x86_64-pc-linux-gnu \
              --target=x86_64-w64-mingw32
$ make
rts/linker/PEi386.c:159:10: error:
     fatal error: Psapi.h: No such file or directory
     #include <Psapi.h>
              ^~~~~~~~~
    |
159 | #include <Psapi.h>
    |          ^

The problem here is case-sensitive linux filesystem. On windows
it does not matter what case is used for includes and libraries.

mingw32 provides all libraries and headers lowercase. This change
fixes case for <dbghelp.h>, <psapi.h>, -ldbghelp, -lpsapi.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
trofi created this revision.Dec 2 2017, 5:17 AM
bgamari accepted this revision.Dec 4 2017, 2:37 PM

Good catch!

This revision is now accepted and ready to land.Dec 4 2017, 2:37 PM
This revision was automatically updated to reflect the committed changes.