Libtool and Support for Shared Libraries (3)

Greg Banks gnb at fastmail.fm
Sun Jun 3 22:13:44 EDT 2012



Sent from my iPhone

On 03/06/2012, at 20:50, Дилян Палаузов  
<dilyan.palauzov at aegee.org> wrote:

> Hello,
>
> concerning the rpath for the perl shared objects IMAP.so and  
> managesieve.so, after all I found that MakeMaker uses as linker by  
> default the value returned by $Config(ld) (visible by running perl - 
> V under Linker and Libraries), which is sometimes "ld='cc'" and  
> sometimes "ld='ld'".
>
> If I do not overwrite the default LD-variable (<=> $config(ld)),  
> then it might be "cc", which could be gcc or not.  I have no idea  
> how to pass linker flags, if the linker is "cc", but not "gcc" (with  
> gcc the parameters are passed with -Wl,param).  So on the one side,  
> I do not know how to instruct $config(ld)/the linker in a portable  
> way by passing -rpath parameters to include rpath in the .so file.
>

This is very platform specific, which is why libtool exists.

Perhaps you could arrange for MakeMaker to run libtool for the link  
step? This might result in needing to run libtool for *every* step,  
which may be awkward.

Relying on LD_RUN_PATH is just as platform specific as using -rpath.

Greg.


More information about the Cyrus-devel mailing list