[SCM] Samba Shared Repository - branch master updated
Matthieu Patou
mat at samba.org
Fri Dec 10 14:35:01 MST 2010
The branch, master has been updated
via a1db341 build: cpp is prefixed by CPP=
via 6875a61 build: add a function to test if -lc is needed
from 26a3728 drsblobs.idl: remove nopython from package_PrimaryKerberosBlob related stuff
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a1db341e4603cbd605eab7f1d4d4abe246468670
Author: Matthieu Patou <mat at matws.net>
Date: Fri Dec 10 23:47:54 2010 +0300
build: cpp is prefixed by CPP=
Autobuild-User: Matthieu Patou <mat at samba.org>
Autobuild-Date: Fri Dec 10 22:34:45 CET 2010 on sn-devel-104
commit 6875a611a71bf6d1623fc62361fc8b145b1f6559
Author: Matthieu Patou <mat at matws.net>
Date: Fri Dec 10 23:16:28 2010 +0300
build: add a function to test if -lc is needed
This is needed on openbsd as some linking flags makes mandatory to
specify the libc for the linking
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_conftests.py | 45 ++++++++++++++++++++++++++++++++
buildtools/wafsamba/samba_pidl.py | 2 +-
source4/wscript | 2 +
3 files changed, 48 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index 2246ac3..c7e596d 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -108,6 +108,51 @@ int foo(int v) {
return conf.check(features='cc cshlib',vnum="1",fragment=snip,msg=msg)
@conf
+def CHECK_NEED_LC(conf, msg):
+ '''check if we need -lc'''
+
+ dir = find_config_dir(conf)
+
+ env = conf.env
+
+ bdir = os.path.join(dir, 'testbuild2')
+ if not os.path.exists(bdir):
+ os.makedirs(bdir)
+
+
+ subdir = os.path.join(dir, "liblctest")
+
+ os.makedirs(subdir)
+
+ dest = open(os.path.join(subdir, 'liblc1.c'), 'w')
+ dest.write('#include <stdio.h>\nint lib_func(void) { FILE *f = fopen("foo", "r");}\n')
+ dest.close()
+
+ bld = Build.BuildContext()
+ bld.log = conf.log
+ bld.all_envs.update(conf.all_envs)
+ bld.all_envs['default'] = env
+ bld.lst_variants = bld.all_envs.keys()
+ bld.load_dirs(dir, bdir)
+
+ bld.rescan(bld.srcnode)
+
+ bld(features='cc cshlib',
+ source='liblctest/liblc1.c',
+ ldflags=conf.env['EXTRA_LDFLAGS'],
+ target='liblc',
+ name='liblc')
+
+ try:
+ bld.compile()
+ conf.check_message(msg, '', True)
+ return True
+ except:
+ conf.check_message(msg, '', False)
+ return False
+
+
+ at conf
def CHECK_SHLIB_W_PYTHON(conf, msg):
'''check if we need -undefined dynamic_lookup'''
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py
index 720f8e6..d5ac217 100644
--- a/buildtools/wafsamba/samba_pidl.py
+++ b/buildtools/wafsamba/samba_pidl.py
@@ -66,7 +66,7 @@ def SAMBA_PIDL(bld, pname, source,
else:
cpp = "CPP=%s" % bld.CONFIG_GET("CPP")
- if cpp == "xlc_r":
+ if cpp == "CPP=xlc_r":
cpp = ""
diff --git a/source4/wscript b/source4/wscript
index 3213e7c..93391da 100644
--- a/source4/wscript
+++ b/source4/wscript
@@ -113,6 +113,8 @@ def configure(conf):
# allows us to find problems on our development hosts faster.
# It also results in faster load time.
conf.ADD_LDFLAGS('-Wl,--as-needed', testflags=True)
+ if not conf.CHECK_NEED_LC("-lc not needed"):
+ conf.ADD_LDFLAGS('-lc', testflags=False)
# we don't want PYTHONDIR in config.h, as otherwise changing
# --prefix causes a complete rebuild
--
Samba Shared Repository
More information about the samba-cvs
mailing list