Implement same specification as GHC spec file for mingw32
When the GCC
driver envokes the pipeline a SPEC
is used to determine how
to configure the compiler and which libraries to pass along.
For Windows/mingw, this specfile is https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/mingw32.h
This has a lot of interesting things that we need to emulate in order to
be able to link as many things out of the box as GCC. In particular this
is why you never need to specify -lgcc_s
when compiling, but you do when
using GHCi
.
Or specifying what -mwindows
links in, that when -lstdc++
is used what else to link in. Which base DLLs GCC will always link with when building an exe.
And how to link libgcc
, either static or dynamically.
Currently we only support static linking of libgcc
(which maybe we should change? or at least make user changeable).
The current partial implementation works by adding hooks into the RTS. A better implementation is adding it all outside the RTS in the DriverPipeline
tied directly to the commandline options.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |