wafsamba: fix ordering problems with lib-provided and internal RPATHs
authorStefan Metzmacher <metze@samba.org>
Thu, 18 Dec 2014 17:09:15 +0000 (18:09 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 22 Dec 2014 08:51:46 +0000 (09:51 +0100)
commitedf0c22b422e4fa6e948b36a015c27fb2e80941c
treeef0f985d5e9df43654b2ff754aecaa97d70903dc
parentfbf5f0f1cb13bdf6bf6f6c677bbbc64680711f6e
wafsamba: fix ordering problems with lib-provided and internal RPATHs

When a library or system (like cups) provides an RPATH,
e.g. with -Wl,-R or -Wl,-rpath, this was added by waf
to the LINKFLAGS, wich was later prepended to our RPATH.
But if the path by chance contains an older version of
one of our internal libraries like talloc, this would lead
to linking the too old talloc into our binaries.

This has been observed on, e.g., FreeBSD, but it is a general
problem.

This patch fixes the problem by specially parsing the RPATH
linker options from the pkg-config(, cups-config, ....) output
and putting the paths into the RPATH_<lib> container, which
is then later correctly appended to our internal RPATH.

This is a better fix than commit 64f5e24100a764ec198cab9a8d2c43fa86e7027c
as it touches wafsamba only. We can revert
64f5e24100a764ec198cab9a8d2c43fa86e7027c in the following commit.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10548

Signed-off-by: Stefan Metzmacher <metze@samba.org>
buildtools/wafsamba/samba_conftests.py