This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Alternate character for dollar sign in $ORIGIN?


On Tue, 4 Jun 2019, Jeffrey Walton wrote:
> Here are some datapoints, if interested.
>
> Most of the time I can use $ORIGIN/../lib with the following. It
> passes through Autotools/Bash/Makefile chain as expected:
>
>     RPATH="'""\$\$ORIGIN/../lib""'"
>     LDFLAGS="... -Wl,-rpath,$RPATH"
>
> About 1 in 4 fail, however. Those that fail seem to do extra escaping
> in the Autotools/Bash/Makefile chain and it results in:
>
>     $ objdump -p <some prog>
>     ...
>     NEEDED    RIGIN/../lib
>
> One of the failures is OpenLDAP.
>
> Jeff

Perhaps a response-file be used for that case, with the
"-Wl,-rpath,$RPATH" option put in that file?  An extra step, but
simpler than adding a linker char-replace feature.

For the curious, "response-file" is the funny name for that
@FILENAME feature, where FILENAME specifies a file
with...options.  Implemented in gcc as well as ld, but old
enough now that people appears to have forgotten about it.

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]