summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_conftests.py14
-rw-r--r--buildtools/wafsamba/wscript10
2 files changed, 24 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index 49cd4ff17c..4811614ab7 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -94,6 +94,20 @@ def find_config_dir(conf):
return dir
@conf
+def CHECK_SHLIB_INTRASINC_NAME_FLAGS(conf, msg):
+ '''
+ check if the waf default flags for setting the name of lib
+ are ok
+ '''
+
+ snip = '''
+int foo(int v) {
+ return v * 2;
+}
+'''
+ return conf.check(features='cc cshlib',vnum="1",fragment=snip,msg=msg)
+
+@conf
def CHECK_SHLIB_W_PYTHON(conf, msg):
'''check if we need -undefined dynamic_lookup'''
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 90aeb45582..b9b06abfe8 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -275,6 +275,16 @@ def configure(conf):
else:
conf.ADD_CFLAGS('-fPIC', testflags=True)
+ # On Solaris 8 with suncc (at least) the flags for the linker to define the name of the
+ # library are not always working (if the command line is very very long and with a lot
+ # files)
+
+ if conf.env['COMPILER_CC'] == "suncc":
+ save = conf.env['SONAME_ST']
+ conf.env['SONAME_ST'] = '-Wl,-h,%s'
+ if not conf.CHECK_SHLIB_INTRASINC_NAME_FLAGS("Checking if flags %s are ok" % conf.env['SONAME_ST']):
+ conf.env['SONAME_ST'] = save
+
conf.CHECK_INLINE()
# check for pkgconfig