[PATCHEs] wafsamba: fix ordering problems with lib-provided and internal RPATHs

Stefan (metze) Metzmacher metze at samba.org
Fri Dec 19 01:08:16 MST 2014

Am 19.12.2014 um 08:31 schrieb Ralph Böhme:
> On Thu, Dec 18, 2014 at 10:49:59PM +0100, Stefan (metze) Metzmacher wrote:
>> Am 18.12.2014 um 22:45 schrieb Michael Adam:
>>> On 2014-12-18 at 22:16 +0100, Stefan (metze) Metzmacher wrote:
>>>> Am 18.12.2014 um 22:13 schrieb Michael Adam:
>>>>> this is nice, but the patch you want to revert from wafadmin is
>>>>> upstream, so it would be wrong to revert it. It was also fixed
>>>>> in newer waf versions. I'd also argue that your fix is not
>>>>> necessarily a better fix, since the bug in question is a proper
>>>>> bug in wafadmin. But it is nice that you found a way to do it in
>>>>> wafsamba that is not too complicated! We can add that
>>>>> additionally if you want.
>>>>> And I can see whether I can use the ideas for modifying our
>>>>> "wellknown libpaths" to not touch wafadmin.
>>>> Ah, ok then we just should not push the revert patch, but keep
>>>> the otherone to handle '-Wl,-R,' too.
>>> I don't quite understand: Your patch to samba treats nothing
>>> the original wafadmin patch does not catch. It even uses the
>>> same checks. :-)
>> I only handles -Wl,-R but not -Wl,-R,
>>>> The wellknown libpath patch is attached:-)
>>> Hey, you've been quicker than me, as usual.. ;)
>>> I see that the actual code that retrieves the
>>> standard libpaths is the same as the one I sent a
>>> few weeks ago and that we had worked on together.
>>> You have only found a better place to make use of it. :-)
>> I start to understand the waf magic:-)
> great! Then you may be able to help me with this one:
> <https://bugzilla.samba.org/show_bug.cgi?id=10877>

Maybe something like this...

-------------- next part --------------
From 039811c9cee13616872de16ea975d770df1b60b7 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Fri, 19 Dec 2014 09:05:33 +0100
Subject: [PATCH] wafsamba: move global include paths behind local include

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10877

Signed-off-by: Stefan Metzmacher <metze at samba.org>
 buildtools/wafsamba/samba_optimisation.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/buildtools/wafsamba/samba_optimisation.py b/buildtools/wafsamba/samba_optimisation.py
index 583a651..7e511bd 100644
--- a/buildtools/wafsamba/samba_optimisation.py
+++ b/buildtools/wafsamba/samba_optimisation.py
@@ -90,6 +90,12 @@ def apply_obj_vars_cc(self):
     for i in env['CPPPATH']:
         app('_CCINCFLAGS', cpppath_st % i)
+    # we need to move -I from CPPFLAGS behind _CCINCFLAGS
+    for i in env['CPPFLAGS']:
+        if i.startswith('-I'):
+            app('_CCINCFLAGS', i)
+            env['CPPFLAGS'].remove(i)
 import Node, Environment
 def vari(self):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141219/371d80d2/attachment.pgp>

More information about the samba-technical mailing list