Certainly doable but it does present a conundrum: for the old GHC
(without builtin cl-support) the order for compilation seems to be:
<output> <other flags>
while for cl running link.exe or link.exe, it is better to put all
the files at the end of the command line:
<output> <other flags>
It also adds one more layer of indirection a that delicate stage.
Maybe some gcc mimicing cl wrapper tailored specifically for GHC
building system could help? One more layer of indirection, but
could leave ghc driver relatively intact.
That's a good idea! Do you know if or how the mingw-gcc is able to
do that? Does mingw-gcc wrap link.exe? It sounds silly that someone
relatively inexperienced with mingw should be doing this but it
_really_needs doing and no one else seems to want it (besides, from
my perspective, once I get through the build-system drudgery it lets
me handle the fun stuff like adding inline MASM to the RTS, such as
ghc/includes/SMP.h).
Cheers,
Pete