summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-10-29 11:49:31 +1100
committerAndrew Tridgell <tridge@samba.org>2010-10-30 23:49:00 +1100
commit65743f932b511db009655847e77288c95c0aa525 (patch)
tree660f8ea1167792f3528ff7f28b437e5171a5fb53 /buildtools/wafsamba
parentb6b0d2cea32c06c3f7a5574d22d1a344d70bd0d3 (diff)
downloadsamba-65743f932b511db009655847e77288c95c0aa525.tar.gz
samba-65743f932b511db009655847e77288c95c0aa525.tar.bz2
samba-65743f932b511db009655847e77288c95c0aa525.zip
waf: added suncc_wrap
this should solve a problem with creating alias modules with Sun CC. Thanks to Matthieu for the idea, and Thomas for the waf code
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_optimisation.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_optimisation.py b/buildtools/wafsamba/samba_optimisation.py
index 1c3478c2a4..ad0534834f 100644
--- a/buildtools/wafsamba/samba_optimisation.py
+++ b/buildtools/wafsamba/samba_optimisation.py
@@ -7,7 +7,7 @@
# overall this makes some build tasks quite a bit faster
from TaskGen import feature, after
-import preproc
+import preproc, Task
@feature('cc', 'cxx')
@after('apply_type_vars', 'apply_lib_vars', 'apply_core')
@@ -148,3 +148,18 @@ Task.TaskBase.hash_constraints = hash_constraints
# return task
+
+def suncc_wrap(cls):
+ '''work around a problem with cc on solaris not handling module aliases
+ which have empty libs'''
+ if getattr(cls, 'solaris_wrap', False):
+ return
+ cls.solaris_wrap = True
+ oldrun = cls.run
+ def run(self):
+ if self.env.CC_NAME == "sun" and not self.inputs:
+ self.env = self.env.copy()
+ self.env.append_value('LINKFLAGS', '-')
+ return oldrun(self)
+ cls.run = run
+suncc_wrap(Task.TaskBase.classes['cc_link'])