Hi Pjotr,

Pjotr Prins <pjotr.publi...@thebird.nl> skribis:

> On Sun, Mar 17, 2019 at 05:06:16PM +0100, Pjotr Prins wrote:
>> Unfortunately the runtime of compiled software fails because the rpath is
>> not updated either. So that requires adding in the RPATH explicitly on
>> the ldc command line. When I set the RPATH the runtime is fine. 
>
> Reading up on the ld-wrapper code - that is exactly what happens. A
> gold-wrapper can do same.
>
> I think, like with rustc, I need to wrap the ldc compiler build with
> ld-wrapper and the ldc tests with gold-wrapper (yet to be written).

Indeed.  We’d just need to add a parameter to ‘make-ld-wrapper’ so we
can specify the executable name, which would be “gold” instead of “ld”
in this case.

Would you like to give it a try?

> gold does not honour LIBRARY_PATH so that means we'll have to use
> LD_LIBRARY_PATH or pass the lib path(s) on the command line. 

LIBRARY_PATH is honored by gcc, which “converts” it into a list of -L
flags for the linker, so no worries here.

HTH, and sorry for the delay!

Ludo’.

Reply via email to