[GHC] #706: GHC uses _stub.c files regardless of whether any
'foreign import' decls remain in a .hs file
GHC
trac at galois.com
Tue Oct 24 14:25:57 EDT 2006
#706: GHC uses _stub.c files regardless of whether any 'foreign import' decls
remain in a .hs file
------------------------------+---------------------------------------------
Reporter: ncalexan at uci.edu | Owner: igloo
Type: bug | Status: new
Priority: normal | Milestone: 6.8
Component: Compiler (FFI) | Version: 6.4.1
Severity: minor | Resolution:
Keywords: ffi, link | Difficulty: Moderate (1 day)
Testcase: | Architecture: Multiple
Os: Multiple |
------------------------------+---------------------------------------------
Comment (by jcab at JCABs-Rumblings.com):
In order to repro, just install GHC in a Windows machine, unzip the
attached file in some directory, and from that directory run the command:
ghc -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-
instances -fno-monomorphism-restriction -threaded -lKernel32 -lUser32
-lGdi32 -lOle32 -lComctl32 -optc-D_WIN32_IE=0x700 -optc-
D_WIN32_WINNT=0x600 Win32Test.hs -fforce-recomp
There's a stub.c (renamed as stubBugBug.c) in the Win32 directory. There's
another stub.c file in the root directory (Win32Test_stub.c). Both (the
one in Win32 directory needs to be renamed back to stub.c, of course) will
cause compile errors if present. Deleting them (or renaming them) will
work around the issue. Both came from GHC 6.4.2.
Let me know if you have any trouble reproing this.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/706>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list