[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 Nov 24 05:26:06 EST 2009


#706: GHC uses _stub.c files regardless of whether any 'foreign import' decls
remain in a .hs file
-----------------------------------------+----------------------------------
  Reporter:  ncalexan at uci.edu            |          Owner:                  
      Type:  bug                         |         Status:  new             
  Priority:  normal                      |      Milestone:  6.14.1          
 Component:  Compiler (FFI)              |        Version:  6.4.1           
Resolution:                              |       Keywords:  ffi, link       
Difficulty:  Moderate (less than a day)  |             Os:  Unknown/Multiple
  Testcase:                              |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown                |  
-----------------------------------------+----------------------------------
Comment (by simonpj):

 Simon and I looked briefly at this:
  * The `mg_foreign` field of a `ModGuts` records the foreign-stub
 information
  * It would be straightforward to add a `Bool` to `ModIface` to record
 whether there were stubs
  * The only tricky bit is making use of that `ModIface` field to construct
 the right `hm_linkable` list of `Linkables`, recorded in `HomeModInfo`.

 So this is probably not hard to fix; just a bit fiddly to poke around and
 see what needs to be done.  Any volunteers?

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/706#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list