gmp

Don Stewart dons at galois.com
Thu Jan 17 13:14:57 EST 2008


gale:
> Don Stewart wrote:
> > However, its buried in the rts/distributed with the runtime, so that
> > users may optionally use that version, rather than finding and
> > installing their own external gmp package. On almost all platforms
> > though, the distributed-with-ghc gmp is unused.
> 
> But doesn't that mean that it gets linked into any program
> compiled with ghc? If so, that is not a good choice for
> a just-in-case mp lib.

only on systems that, when ghc was built, there was no libgmp 
available. 

on any system where an external libgmp is available, it will
be dynamically linked into the generated haskell programs,
and in-tree gmp isn't used at all (or compiled, or installed)

e.g

    $ ldd `which xmonad`
    /home/dons/bin/xmonad:
        Start            End              Type Open Ref GrpRef Name
        0000000048cc0000 00000000490e3000 rlib 0    1   0      /usr/lib/libpthread.so.8.0
        0000000050424000 000000005083d000 rlib 0    1   0      /usr/lib/libm.so.2.3
        0000000042a92000 0000000042ece000 rlib 0    1   0      /usr/local/lib/libgmp.so.7.0
        000000004e3f2000 000000004e8c4000 rlib 0    1   0      /usr/lib/libc.so.42.0

-- Don


More information about the Glasgow-haskell-users mailing list