[GHC] #13189: Implement same specification as GHC spec file for mingw32
GHC
ghc-devs at haskell.org
Thu Jan 26 22:58:12 UTC 2017
#13189: Implement same specification as GHC spec file for mingw32
-------------------------------------+-------------------------------------
Reporter: Phyx- | Owner: Phyx-
Type: feature | Status: new
request |
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets: #13093
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13189>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list