Alternate character for dollar sign in $ORIGIN?

Joseph Myers joseph@codesourcery.com
Mon Jun 3 17:06:00 GMT 2019


On Mon, 3 Jun 2019, Szabolcs Nagy wrote:

> On 03/06/2019 09:28, Jeffrey Walton wrote:
> > Hi Everyone,
> > 
> > I'm having trouble configuring Autotools projects with
> > -Wl,-rpath,$ORIGIN/../lib. Everything I've tried is replaced either by
> > the shell or the makefile.
> 
> '-Wl,-rpath,$$ORIGIN/../lib'
> 
> should work from a makefile.

Until there are multiple levels of shell and make interpretation from 
being passed to subdirectory make.  You end up needing something like

export LDFLAGS='-Wl,-rpath,'\''\\\$$\$$\\\$$\$$ORIGIN'\''/../lib'

for configuring GDB at top-level to get the correct RPATH setting in the 
actual GDB binaries.  (I don't know if passing LDFLAGS on the configure 
command line needs different levels of quoting from passing it in the 
environment.)

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Binutils mailing list