TODO: build: fix issue with standard libpaths introduced by cups-config and friends
authorMichael Adam <obnox@samba.org>
Wed, 11 Jun 2014 13:49:33 +0000 (15:49 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 22 Dec 2014 08:51:45 +0000 (09:51 +0100)
commit3bf695dbcb5f421ffaa5543cee8ee0aa4071de82
treedba1b8e070dbcb189b54883a3a3bbe1973c77cc5
parent616255264ad8f8d4dc6ac339c1f2ad23d689f991
TODO: build: fix issue with standard libpaths introduced by cups-config and friends

Problem:

Some tools like cups-config and python-config list system standard library
paths with -L in the ldflags.

Since these flags are in treated as flags required by libraries
and not as standard flags, this can lead to situations where
configure correctly detects a version of a library (e.g. talloc)
as installed into a special location, but the link process fails
because the unsupported old version of the library is found first
in the library path reported by foo-config.

See e.g.:

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10515

Solution:

The solution of this patch is to filter out the standard
library paths. The difficulty here is that the list of standard
paths varies between the systems. This patch calls "${CC} -print-search-dirs"
to get this list, which is supported at least by gcc and clang.

TODOS:
- is_standard_libpath() : correct place in ccroot.py ??
- can/should we do it in wafsamba only?
buildtools/wafadmin/Tools/ccroot.py
buildtools/wafadmin/Tools/config_c.py
buildtools/wafadmin/Tools/python.py
buildtools/wafsamba/wscript