#3687: Merge _stub.o files back in to the .o file
---------------------------------+------------------------------------------
    Reporter:  NeilMitchell      |       Owner:              
        Type:  feature request   |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  6.10.4            |    Keywords:              
          Os:  Unknown/Multiple  |    Testcase:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 GHC sometimes generates _stub.o files. When it does, ghci doesn't work
 with compiled files (it forgets to include the _stub.o in the files to
 link against), and it complicates many building rules (including those
 inside GHC's makefile).

 It would be far better if the _stub.o files were merged back in with the
 original. This is actually reasonably easy:

 {{{
 b <- doesFileExist stub
 when b $ do
     let tmp = res <.> "tmp.o"
     mv obj tmp
     exec ["ld","-r","-o",obj,tmp,stub]
     rm stub
     rm tmp
 }}}

 While being mainly a feature request, this enhancement also fixes a bug
 with GHCi loading files with _stub's, so includes a bug fix for free.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3687>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to