summaryrefslogtreecommitdiffstats
path: root/buildtools
Commit message (Collapse)AuthorAgeFilesLines
* test_duplicate_symbol: Use Samba subunit emitter.Jelmer Vernooij2015-03-061-1/+1
| | | | | | Change-Id: I280495706ff460674244183103306ca717c419a8 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build:wafadmin: fix use of spaces instead of tabs.Michael Adam2015-03-041-3/+3
| | | | | | | | Indentation should not be a mixture of tabs and spaces. Waf uses tabs. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* waf: Fix the build on openbsdVolker Lendecke2015-03-031-1/+3
| | | | | | | | | | We have single-digit vnum='0', make the assignment deal with it Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Mar 3 03:33:24 CET 2015 on sn-devel-104
* build: amend typo for address sanitizer helpGarming Sam2015-02-251-1/+1
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: make sure build fails when uninitialized variable is detectedAlexander Bokovoy2015-02-241-0/+2
| | | | | | | | | | | In developer build, fail if uninitialized variable is found by GCC. Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Feb 24 20:21:52 CET 2015 on sn-devel-104
* buildtools: Use separate storage for each function in runoncePetr Viktorin2015-02-171-1/+1
| | | | | | | | | | | | | The runonce decorator used shared storage for all functions, and dispatched only on arguments, so a call would be eliminated if a different runonce function had already been called with the same arguments. Use separate storage for each decorated function. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Simo Sorce <simo@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: Add address sanitizer configure option.Andreas Schneider2015-01-282-0/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: create unique names when building shared modulesStefan Metzmacher2015-01-191-0/+3
| | | | | | | | | | | | | | | | | | | | After commit 76fdcf5c15bd904c3686f0c2dd93d27486c61ca4, we could endup with bin/default/source3/auth/libauth-samba4.so being created two times. Once by SAMBA3_LIBRARY('auth',...) and once again by SAMBA3_MODULE('auth_samba4', ...). As a result bin/default/source3/auth/libauth-samba4.so gets randomly overwritten. SAMBA3_MODULE('auth_samba4', ...) results in bin/default/source3/auth/libauth_module_samba4.so now. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Jan 19 04:43:53 CET 2015 on sn-devel-104
* wafsamba: remove unused variable in SAMBA_MODULE()Stefan Metzmacher2015-01-191-2/+0
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* wafsamba: passing 'subsystem' to SAMBA_MODULE() is not optionalStefan Metzmacher2015-01-191-8/+9
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* wafsamba: make it possible to pass bundled_name to SAMBA_LIBRARY()Stefan Metzmacher2015-01-191-1/+4
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* wafadmin: backported the openbsd fixes from waf 1.7Thomas Nagy2015-01-093-6/+20
| | | | | | | | | | This is a backport from waf 1.5... Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jan 9 02:02:07 CET 2015 on sn-devel-104
* wafsamba: remove commented out code.Michael Adam2015-01-081-27/+0
| | | | | | | | | This code has only ever been there as commented out... Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Revert "waf: added suncc_wrap"Michael Adam2015-01-081-18/+1
| | | | | | | | | | This reverts commit 65743f932b511db009655847e77288c95c0aa525. Conflicts: buildtools/wafsamba/samba_optimisation.py Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: generate an empty.c file if a SAMBA_{LIBRARY,SUBSYSTEM} doesn't ↵Stefan Metzmacher2015-01-081-6/+23
| | | | | | | | | | | | | | have any source files This is better than passing '-' as filename to the compiler/linker. This replaces commit 65743f932b511db009655847e77288c95c0aa525. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9334 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10315 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: flags from enviroment are put before our own internal versionsRalph Boehme2015-01-081-0/+42
| | | | | | | | | | | | | | Ensure user provided CPPFLAGS and LDFLAGS are put *behind* our internally computed compiler and linker flags. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10877 Pair-Programmed-With: Michael Adam <obnox@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: filter out standard library paths from RPATH and LIBPATHMichael Adam2015-01-083-1/+55
| | | | | | | | | | | | | We should avoid passing them explicitly to the compiler/linker. We ask the compiler with the '-print-search-dirs' argument or fallback to [ '/usr/lib', '/usr/lib64' ]. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: fix ordering problems with lib-provided and internal RPATHsMichael Adam2015-01-081-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. 64f5e24100a764ec198cab9a8d2c43fa86e7027c is already in waf 1.5 upstream, but has some possible bugs, e.g. it doesn't handle -Wl,-R, (with ',' at the end) or some combinations where the path is given via an additional -Wl,/path argument. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10548 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: make it possible to specify ADDITIONAL_{CFLAGS,LDFLAGS} as env var ↵Stefan Metzmacher2015-01-081-0/+13
| | | | | | | | | | to ./configure CFLAGS and LDFLAGS are also used during the configure checks and might impact their results. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: improve -fvisibility=hidden, we should check it together this ↵Stefan Metzmacher2015-01-081-1/+1
| | | | | | | | | | | | | | WERROR_CFLAGS GCC ignores -fvisibility=hidden with a warning instead of failing om some platforms (e.g. Solaris). Bug: https://bugzilla.samba.org/show_bug.cgi?id=11031 Based on a patch from Tom Schulz <schulz@adi.com>. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: let CURRENT_CFLAGS() use bld.env.VISIBILITY_CFLAGSStefan Metzmacher2015-01-081-1/+1
| | | | | | | This is better than a hardcoded value in multiple places. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move -fvisibility=hidden checks from lib/replace to wafsambaStefan Metzmacher2015-01-081-0/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move '-fstack-protector' checks from lib/replace to wafsambaStefan Metzmacher2015-01-081-0/+4
| | | | | | | | | | | This moves the check to the end of the configure run, which means we no longer use this on configure checks, but only for the real build. This behavior is similar than our developer cflags. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move WERROR_CFLAGS checks from lib/replace to wafsambaStefan Metzmacher2015-01-081-0/+13
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move compiler / cflags related stuff from lib/replace to wafsambaStefan Metzmacher2015-01-081-0/+21
| | | | | | | We should have this just in one central place. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: let TO_LIST(mylist) return a copy of mylistStefan Metzmacher2015-01-081-1/+2
| | | | | | | | | | | | | In most cases we have TO_LIST(mystring) which returns an independent list. newlist = TO_LIST(mylist) returned just a reference to mylist. Which means newlist.append("end") would also modify mylist. TO_LIST() should always return an independent list. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: check for rpath compiler/linker flagsRalph Boehme2014-12-191-0/+4
| | | | | | | | | | | | Older SunOS linker only support -Wl,-R,/path instead of -Wl,-rpath,/path. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: fill PRIVATE_NAME() logic againStefan Metzmacher2014-12-192-4/+21
| | | | | | | | | | | | | We append bld.env.PRIVATE_EXTENSION to the name of private libraries again, but only unless they have a abi_directory, vnum or soname defined. This avoids naming conflicts with system libraries, e.g. libidmap.so on Solaris Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: add optional keep_underscore=True to SAMBA_LIBRARY()Stefan Metzmacher2014-12-191-1/+5
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: change the default to allow_warnings=False for CURRENT_CFLAGS()Stefan Metzmacher2014-11-251-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: change the default to allow_warnings=False for ↵Stefan Metzmacher2014-11-251-3/+3
| | | | | | | SAMBA_{SUBSYSTEM,LIBRARY,MODULE}() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: use -Wno-error=deprecated-declarations in picky-developer modeStefan Metzmacher2014-11-251-1/+1
| | | | | | | | | Currently we use too many deprecated function like dcerpc_binding_handle_set_sync_ev() and others, but this should not be a reason to require 'allow_warnings=True'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: add -Werror=return-type for developer buildsStefan Metzmacher2014-11-141-0/+2
| | | | | | | | | | | | This avoids errors like this: ../source3/utils/status.c: In function ‘print_share_mode’: ../source3/utils/status.c:126:3: error: ‘return’ with no value, in function returning non-void [-Werror=return-type] return; Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Run duplicate symbol check as just another test, rather than as part of "waf ↵Jelmer Vernooij2014-10-141-0/+12
| | | | | | | | | | | | test". This allows it to be scheduled independently as part of a parallel test run, and reduces the overhead of "waf test". Change-Id: I780fd2c4dd711ed27df73f56de98e7f1ffd53aaf Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10875
* Fix more pep8 issues in code I touched recently.Jelmer Vernooij2014-10-142-5/+7
| | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Change-Id: I35f3204bdf5d00b3280d703427ded2fa2163a6f7
* Remove last instances of pep8 error E712 (use 'is' rather than '==' for ↵Jelmer Vernooij2014-10-142-5/+5
| | | | | | | | booleans) Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Change-Id: I43b394a6225b4c2049d979fda75548c82d781f67
* Reduce the no-op build times by 30%Thomas Nagy2014-10-032-3/+148
| | | | | | | | | Change-Id: Ie68436c1e7c75c1786e9ed6b6a54d2b55abbbcea Reviewed-by: Matthieu Patou <mat@matws.net> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Oct 3 13:25:18 CEST 2014 on sn-devel-104
* Revert "buildtools: Rename perl vendorarch configure option."Michael Adam2014-09-091-9/+4
| | | | | | | | | | | | | | | This reverts commit 04685ff4eed9535769d6a5feee7353f1796a4389. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 9 03:07:20 CEST 2014 on sn-devel-104
* Revert "buildtools: Add perl vendorlib configure option."Michael Adam2014-09-091-10/+0
| | | | | | | | | | | | This reverts commit 48f0183dbeddd7bdf333a40fe0d3e1c7e7fe00f2. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "wafsamba: If perl can't provide defaults, define them."Michael Adam2014-09-091-8/+2
| | | | | | | | | | | | This reverts commit 0ba276ebad57d75a769e22414f94acbe8c177d97. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "wafsamba: Fail with error message if perl doesn't provide valid dirs."Michael Adam2014-09-091-39/+19
| | | | | | | | | | | | This reverts commit 2637890ef42a238093f0f3cbdda0d621d5f9b2e2. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: add perl_fixup parameter to INSTALL_FILESMichael Adam2014-09-051-4/+43
| | | | | | | | | | | | | | | | This fixes the search path for modules when installing a perl "binary" by replacing a line 'use lib "$RealBin/lib";' which works for the build directory with the appropriate "use lib" line. This is a step in allowing to install perl modules under the prefix directory again. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check.Michael Adam2014-09-052-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This checks for the perl binary, sets PERL and PERL_SPECIFIED as well es the PERL_ARCH_INSTALL_DIR and PERL_LIB_INSTALL_DIR. We want to avoid installing the perl modules outside the prefix. I.e. generally,the perl modules should be installed under "$prefix/share/perl5". This improves the fixes for bug #10472. The new strategy for automatically setting the paths is this: - if the prefix equals perl's vendorprefix, then - PERL_LIB_INSTALL_DIR is set to perl's vendorlib dir - PERL_ARCH_INSTALL_DIR is set to perl's vendorarch dir - otherwise: - PERL_LIB_INSTALL_DIR is set to ${DATADIR}/perl5 (usually ${PREFIX}/share/perl5) - PERL_ARCH_INSTALL_DIR is set to ${LIBDIR}/perl5 (usually ${PREFIX}/lib/perl5) BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: let SAMBA_BLDOPTIONS() use dep_vars=['defines'] instead of always=TrueStefan Metzmacher2014-09-051-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: fix dependencies on environment variables for python_fixupStefan Metzmacher2014-09-051-4/+1
| | | | | | | | We now checksum the sourcecode of copy_and_fix_python_path() and the env variables used by this function. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: allow an optional dep_vars list to be passed to SAMBA_GENERATOR()Stefan Metzmacher2014-09-051-1/+1
| | | | | | | This can be used to checksum variables used in the rule function. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: fix dependency for SAMBA_GENERATOR() when passing vars!=NoneStefan Metzmacher2014-09-051-4/+5
| | | | | | | | | | | | | | | vars can only be a dictionary as that's the only thing bld.EXPAND_VARIABLES() accepts. We need to checksum the whole vars dictionary into the dependencies. We set task.env.SAMBA_GENERATOR_VARS = vars and add SAMBA_GENERATOR_VARS to the dep_vars. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: fix dependency calculation for SAMBA_GENERATOR()Stefan Metzmacher2014-09-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to checksum the rule as string command of the sourcecode of the python function. This is stored in the 'ruledeps' envariable on the waf Task. See exec_rule() in wafadmin/TaskGen.py. dep_vars = getattr(self, 'dep_vars', ['ruledeps']) if dep_vars: tsk.dep_vars = dep_vars if isinstance(self.rule, str): tsk.env.ruledeps = self.rule else: # only works if the function is in a global module such as a waf tool tsk.env.ruledeps = Utils.h_fun(self.rule) If there's no 'dep_vars' it defaults to ['ruledeps']. As we pass our own 'dep_vars' we need to explicitly add 'ruledeps'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: improve wording in a commentMichael Adam2014-09-051-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: remove unused variable from copy_and_fix_python_pathMichael Adam2014-09-051-2/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>