On Thursday December 3, 2009, Duncan Coutts wrote:
> On Wed, 2009-12-02 at 16:38 -0800, Howard B. Golden wrote:
> > At present, it is possible to say 'ghci -lpcre' or 'addDLL
> > "lpcre"'. For these to work, you have to be able to call the system
> > linker from ghci dynamically. (Therefore, I think it means
> > replacing Linker.c with the native system linker.)
> 
> The point is, technically we probably do not want "ghci -lpcre" to
> translate directly into a call to dlopen "libpcre.so". There should
>  be another translation stage to give us "libpcre.so.0". Then that
>  name --- corresponding to a fixed ABI --- should be kept in the
>  package config so we keep linking to the same thing even if you
>  install newer versions of the C lib.

I'm not sure this applies to ghci loading from the command line. I 
believe the semantics should be the same as the system linker uses, 
i.e., the current version.

However, I do agree with you about what is stored in the package config. 
It should be the version at compile time.

> The problem is I don't know any sensible way to obtain "libpcre.so.0"
> from "libpcre.so". You can take an empty .o file and use the system
> linker to link it against -lpcre and then use ldd to see what it
>  ended up picking. But I'm not sure that's so helpful.

Using the system linker with an empty file is the best idea I have come 
up with so far. Otherwise, you just have to copy/adapt what's already in 
the system linker to figure out the current version.

Howard

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to