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: configure munges $ORIGIN in LDFLAGS (SOLVED)


>  From: Dave Korn <dave.korn.cygwin@googlemail.com>
>  
>  Poor Yorick wrote:
>  >> From: Poor Yorick Subject: configure munges $ORIGIN in LDFLAGS
>  >>
>  >> Using a shell script to build binutils-2.19.1, LDFLAGS assignment looks
>  >> like this:
>  
>    Can we see this script?

The "script" is a 1500-line build system, so it's probably not worth
eyeballing, but the LDFLAGS part is simple:  LDFLAGS is assigned some rpath
options for the linker.

>  
>  >> Apparently, the top Makefile needs to requote arguments before invoking
>  >> binutils/configure.  
>  
>    Either that, or it is not supported to embed shell variables into the
>  configure arguments.

This is the kicker.  $ORIGIN is not an environment variable.  It's the magic
word for the dynamic linker that must be literally embedded in the R(UN)PATH
sections to make the paths relative.  Getting that dollar sign to be passed
literally through all the make and shell layers is what the fuss is about.
Perhaps "$" was an unfortunate choice.

>  
[SNIP]
>  
>  > If that isn't evil, I don't know what is.
>  
>    This makes me suspect that your desired mode of operation is simply not
>  catered for.
>  

Agreed, but relative R(UN)PATH's are really useful, and should be catered for.

-- 
Yorick


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