#3658: Dynamically link GHCi on platforms that support it
---------------------------------+------------------------------------------
    Reporter:  simonmar          |        Owner:              
        Type:  task              |       Status:  new         
    Priority:  high              |    Milestone:  6.14.1      
   Component:  GHCi              |      Version:  6.10.4      
    Keywords:                    |   Difficulty:  Unknown     
          Os:  Unknown/Multiple  |     Testcase:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by simonmar):

 Some progress towards this:

 {{{
 Wed Apr 28 21:52:41 BST 2010  Simon Marlow <[email protected]>
   * Add $(GhcDynamic) knob, set to YES to get stage2 linked with -dynamic
   Default currently NO.

   Validate passed with GhcDynamic=YES on x86/Linux here.

   The compiler is currently slower on x86 when linked -dynamic,
   because the GC inner loop has been adversely affected by -fPIC, I'm
   looking into how to fix it.
 }}}

 The compiler really is slower when linked dynamically, at least on x86,
 because of the overhead of `-fPIC` - the GC is significantly slower.  I
 looked into it but didn't find a way to fix it.  We might have to ship
 separate GHC and GHCi binaries on x86; I expect this to be better on
 x86_64, but haven't measured it yet.

 Currently, Cabal doesn't build packages dynamically by default, and this
 will become an accute issue when GHCi is linked dynamically.  We need to
 do the package system changes needed to register each way separately, so
 that 'cabal install --enable-dynamic' works properly.  Either that or
 Cabal has to enable dynamic by default.

 GHCi is quicker to start up when dynamically linked: 0.1s vs. 0.23s.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3658#comment:4>
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