The Samba-Bugzilla – Attachment 10554 Details for
Bug 10877
Flags from enviroment are put before Samba's own
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for master
waf_flags_ordering.patch (text/plain), 2.30 KB, created by
Ralph Böhme
on 2014-12-21 16:41:58 UTC
(
hide
)
Description:
Patch for master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2014-12-21 16:41:58 UTC
Size:
2.30 KB
patch
obsolete
>From e4b7b534cefedeb8d58825512df4571c942ee72b Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Fri, 19 Dec 2014 09:05:33 +0100 >Subject: [PATCH] wafsamba: flags from enviroment are put before our own > internal versions > >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: Stefan Metzmacher <metze@samba.org> > >Signed-off-by: Ralph Boehme <slow@samba.org> >--- > buildtools/wafsamba/samba_optimisation.py | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > >diff --git a/buildtools/wafsamba/samba_optimisation.py b/buildtools/wafsamba/samba_optimisation.py >index 1333f8b..512fbae 100644 >--- a/buildtools/wafsamba/samba_optimisation.py >+++ b/buildtools/wafsamba/samba_optimisation.py >@@ -59,6 +59,13 @@ def apply_incpaths(self): > self.env.append_value('INC_PATHS', node) > > @feature('cc') >+@before('apply_incpaths') >+def samba_stash_cppflags(self): >+ """Fix broken waf ordering of CPPFLAGS""" >+ self.env['SAVED_CPPFLAGS'] = self.env['CPPFLAGS'] >+ self.env['CPPFLAGS'] = [] >+ >+@feature('cc') > @after('apply_incpaths') > def apply_obj_vars_cc(self): > """after apply_incpaths for INC_PATHS""" >@@ -89,6 +96,10 @@ def apply_obj_vars_cc(self): > for i in env['CPPPATH']: > app('_CCINCFLAGS', cpppath_st % i) > >+ # append stashed user CPPFLAGS after our internally computed flags >+ app('_CCINCFLAGS', env['SAVED_CPPFLAGS']) >+ env['SAVED_CPPFLAGS'] = [] >+ > import Node, Environment > > def vari(self): >@@ -308,3 +319,20 @@ def apply_lib_vars(self): > val = self.env[v + '_' + x] > if val: > self.env.append_value(v, val) >+ >+@feature('cprogram', 'cshlib', 'cstaticlib') >+@before('apply_obj_vars', 'add_extra_flags') >+def samba_stash_linkflags(self): >+ """stash away LINKFLAGS in order to fix waf's broken ordering wrt or >+ user LDFLAGS""" >+ >+ self.env.SAVE_LINKFLAGS = self.env['LINKFLAGS'] >+ self.env['LINKFLAGS'] = [] >+ >+@feature('cprogram', 'cshlib', 'cstaticlib') >+@after('apply_obj_vars', 'add_extra_flags') >+def samba_pop_linkflags(self): >+ """after apply_obj_vars append saved LDFLAGS""" >+ >+ self.env.append_value('LINKFLAGS', self.env.SAVE_LINKFLAGS) >+ self.env.SAVE_LINKFLAGS = [] >-- >1.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10877
:
10348
|
10349
|
10350
|
10354
|
10553
|
10554
|
10991
|
11083
|
11084