On Saturday 06 October 2012 03:47:57 Gregory M. Turner wrote:
> My god, I am a horrible self-editor.  Sorry.  Please ignore the magnum
> opus above and allow me to try again.
> 
> In dev-lang/python*, we use
> 
>    append-ldflags '-L.'
> 
> to ensure linking is performed against the built libpython.so in-tree,
> rather than than in the one in $(libdir).  But, this doesn't work if
> LDFLAGS contains "-L$(libdir)".

well, some notes here ...

for users: putting -L<some-system-path> is wrong.  it changes the meaning of 
"system paths" when it comes to searching for linking by elevating it to "user 
specified path".  imo, you should be fixing the source rather than the symptom.

for packagers: using -L$(libdir) is almost always wrong and pointless.  the 
toolchain itself knows the proper system path to search for libraries to link 
against, and when you cross-compile, the --libdir you specify to configure is 
not going to be valid when dereferenced on the build system.

> We could try to fix this like:
> 
>   export LDFLAGS="-L. ${LDFLAGS}"
> 
> or so.  That would cover 99.9% of the cases out there.  But very rarely,
> indiscriminately placing our '-L.' before every other clause in LDFLAGS
> might cause an unanticipated side-effect.

i would go with this if you want to support these people doing it wrong
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to