[GHC] #3879: Enable shared libraries on Windows
GHC
trac at galois.com
Sun Feb 21 19:11:47 EST 2010
#3879: Enable shared libraries on Windows
---------------------------------+------------------------------------------
Reporter: igloo | Owner: benl
Type: feature request | Status: new
Priority: high | Milestone: 6.14.1
Component: Compiler | Version: 6.12.1
Keywords: | Difficulty:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by benl):
Yes, in `rts/PrimOps.cmm` there is:
{{{
import sm_mutex;
}}}
Because `sm_mutex` has an import statement it thinks this symbol is from
some other package (dll) so is trying to use the dll's IAT (Import Address
Table) to access it. However, `sm_mutex` is compiled into the rts package
directly, so won't appear in the IAT, hence the undefined reference.
This is a bit of a mess because for other reasons (I forget the exact
details), bootstrapping via-c requires this import statement to be there.
I actually added it myself a few weeks ago to fix the build on SPARC
again, which was after I last built on Windows. (sigh)
Adding a `#if defined(mingw32_HOST_OS)` around `import sm_mutex` should
solve the problem. I've just moved house and don't have a Windows machine
to test on right now, but I expect this will fix it.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3879#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list