On 06-10-2012 00:47:57 -0700, 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)".
>
> 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.
>
> The flag-o-matic patch in my previous post analyses LDPATH and finds the
> first statement that might possibly cause the ld command-line
> library-search-path to be impacted, and inserts the "-L." just before
> that statement, hopefully achieving the desired result with the least
> possible side-effects.I think it would make more sense in this case to just add one more patch to Python, such that the build-system just inserts it. I recall it's necessary at least on FreeBSD, Darwin, Solaris, but I don't recall any more why it works/worked on Linux fine. -- Fabian Groffen Gentoo on a different level
signature.asc
Description: Digital signature
