[PATCH] waf: parse LDFLAGS from python
obnox at samba.org
Thu Oct 24 16:12:06 MDT 2013
The patch looks good to me.
==> Reviewed-by: Michael Adam <obnox at samba.org>
Andrew: since I updated the other waf patch aafter a comment of
ita, could you re-review that and push them both?
Thanks - Michael
On 2013-10-24 at 17:08 +1300, Andrew Bartlett wrote:
> On Wed, 2013-10-23 at 20:46 -0700, Steven Siloti wrote:
> > The LDFLAGS returned by get_python_variables may contain additional library
> > search paths. These need to be parsed out and placed in LIBPATH to maintain
> > correct ordering of search paths in the final link flags.
> > Specifically, appending LDFLAGS directly to LINKFLAGS on my system was causing
> > /usr/lib to be the first search path specified. This lead to linking against
> > installed libraries rather than the versions from the current build.
> > ---
> > buildtools/wafadmin/Tools/python.py | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> > diff --git a/buildtools/wafadmin/Tools/python.py b/buildtools/wafadmin/Tools/python.py
> > index a15e1f6..ab1e817 100644
> > --- a/buildtools/wafadmin/Tools/python.py
> > +++ b/buildtools/wafadmin/Tools/python.py
> > @@ -10,6 +10,7 @@ import TaskGen, Utils, Options
> > from Logs import debug, warn, info
> > from TaskGen import extension, before, after, feature
> > from Configure import conf
> > +from config_c import parse_flags
> > EXT_PY = ['.py']
> > FRAG_2 = '''
> > @@ -213,7 +214,7 @@ MACOSX_DEPLOYMENT_TARGET = %r
> > env.append_value('LINKFLAGS_PYEMBED', lib)
> > if Options.platform != 'darwin' and python_LDFLAGS:
> > - env.append_value('LINKFLAGS_PYEMBED', python_LDFLAGS.split())
> > + parse_flags(python_LDFLAGS, 'PYEMBED', env)
> > result = False
> > name = 'python' + env['PYTHON_VERSION']
> You are quite correct to note that LINKFLAGS to end up at the start, and
> cause total chaos. For even better effect, we need to build on the good
> work done when we had very similar with cups-config.
> Reviewed-by: Andrew Bartlett <abartlet at samba.org>
> Michael, can you review this and merge your other waf patch to
> Andrew Bartlett
> Andrew Bartlett
> Authentication Developer, Samba Team http://samba.org
> Samba Developer, Catalyst IT http://catalyst.net.nz
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 215 bytes
Desc: Digital signature
More information about the samba-technical