[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu Oct 24 18:49:02 MDT 2013


The branch, master has been updated
       via  319c2d7 waf: parse LDFLAGS from python
       via  64f5e24 build: fix ordering problems with lib-provided and internal RPATHs
      from  d3aee80 s4-dns: dlz_bind9: Create dns-HOSTNAME account disabled

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 319c2d731148adda260a2fba9719ca8c6dc287f5
Author: Steven Siloti <ssiloti at gmail.com>
Date:   Wed Oct 23 20:46:05 2013 -0700

    waf: parse LDFLAGS from python
    
    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.
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Fri Oct 25 02:48:35 CEST 2013 on sn-devel-104

commit 64f5e24100a764ec198cab9a8d2c43fa86e7027c
Author: Michael Adam <obnox at samba.org>
Date:   Wed Oct 16 15:17:18 2013 +0200

    build: 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.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafadmin/Tools/config_c.py |   13 +++++++++++++
 buildtools/wafadmin/Tools/python.py   |    3 ++-
 2 files changed, 15 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafadmin/Tools/config_c.py b/buildtools/wafadmin/Tools/config_c.py
index a32d8aa..d0bc617 100644
--- a/buildtools/wafadmin/Tools/config_c.py
+++ b/buildtools/wafadmin/Tools/config_c.py
@@ -73,6 +73,19 @@ def parse_flags(line, uselib, env):
 			app('CCFLAGS_' + uselib, x)
 			app('CXXFLAGS_' + uselib, x)
 			app('LINKFLAGS_' + uselib, x)
+		#
+		# NOTE on special treatment of -Wl,-R and -Wl,-rpath:
+		#
+		# It is important to not put a library provided RPATH
+		# into the LINKFLAGS but in the RPATH instead, since
+		# the provided LINKFLAGS get prepended to our own internal
+		# RPATH later, and hence can potentially lead to linking
+		# in too old versions of our internal libs.
+		#
+		elif x.startswith('-Wl,-R'):
+			app('RPATH_' + uselib, x[6:])
+		elif x.startswith('-Wl,-rpath,'):
+			app('RPATH_' + uselib, x[11:])
 		elif x.startswith('-Wl'):
 			app('LINKFLAGS_' + uselib, x)
 		elif x.startswith('-m') or x.startswith('-f'):
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']


-- 
Samba Shared Repository


More information about the samba-cvs mailing list