summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_autoconf.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2012-02-02 12:36:44 +1100
committerAndrew Tridgell <tridge@samba.org>2012-02-02 06:54:42 +0100
commit0fdd6c7632a070fc3f6251f44c520fa324155a7d (patch)
treee1e5d8146d6ce192e1a93869cc0750cf6c6774e9 /buildtools/wafsamba/samba_autoconf.py
parente3dac4b61aadeced427001f823377c79e457b8dd (diff)
downloadsamba-0fdd6c7632a070fc3f6251f44c520fa324155a7d.tar.gz
samba-0fdd6c7632a070fc3f6251f44c520fa324155a7d.tar.bz2
samba-0fdd6c7632a070fc3f6251f44c520fa324155a7d.zip
build: fixed a link order problem
this fixes a problem found by obnox where the -L path for CUPS was put before the path to internal libraries. The install path for CUPS happened to be the same as for a old system libtevent, which meant we linked against the old tevent instead of the correct one from our private library paths. The problem was that we were adding the -L paths directly to the ldflags. The waf core code (in ccroot.py) only adds more paths if they are not there already. So by adding it in ldflags it was not added at the end of the list. The fix is just to not do the -L processing in wafsamba and let the waf core do it in the right order Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Feb 2 06:54:42 CET 2012 on sn-devel-104
Diffstat (limited to 'buildtools/wafsamba/samba_autoconf.py')
-rw-r--r--buildtools/wafsamba/samba_autoconf.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 1ea818ef30..6ed719a80a 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -471,7 +471,9 @@ def library_flags(self, libs):
inc_path = getattr(self.env, 'CPPPATH_%s' % lib.upper(), [])
lib_path = getattr(self.env, 'LIBPATH_%s' % lib.upper(), [])
ccflags.extend(['-I%s' % i for i in inc_path])
- ldflags.extend(['-L%s' % l for l in lib_path])
+ # note that we do not add the -L in here, as that is added by the waf
+ # core. Adding it here would just change the order that it is put on the link line
+ # which can cause system paths to be added before internal libraries
extra_ccflags = TO_LIST(getattr(self.env, 'CCFLAGS_%s' % lib.upper(), []))
extra_ldflags = TO_LIST(getattr(self.env, 'LDFLAGS_%s' % lib.upper(), []))
ccflags.extend(extra_ccflags)