[GHC] #706: GHC uses _stub.c files regardless of whether any 'foreign import' decls remain in a .hs file

GHC trac at galois.com
Mon Oct 23 10:34:53 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          |  
------------------------------+---------------------------------------------
Changes (by jcab at JCABs-Rumblings.com):

  * testcase:  =>
  * summary:  GHC links _stub.o files regardless of whether any 'foreign
              import' decls remain in a .hs file => GHC uses
              _stub.c files regardless of whether any
              'foreign import' decls remain in a .hs file

Comment:

 The description of the bug is incorrect. It picks up the _stub.c files,
 not the _stub.o files, and it picks them up even if the file is recompiled
 (and didn't re-generate the _stub.c file).

 Verified with GHC 6.6. not even -fforce-recomp works, only manually
 deleting the _stub.c files works around the problem.

 Problem with 6.6 is that it won't generate _stub.c files for modules where
 previous versions did (for modules that _use_ other modules which have the
 FFI that causes _stub.c files), so after upgrading you may encounter this
 problem.

-- 
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