diff options
Diffstat (limited to 'meta-networking/recipes-support/libtalloc/libtalloc/0001-waf-add-support-of-cross_compile.patch')
-rw-r--r-- | meta-networking/recipes-support/libtalloc/libtalloc/0001-waf-add-support-of-cross_compile.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/libtalloc/libtalloc/0001-waf-add-support-of-cross_compile.patch b/meta-networking/recipes-support/libtalloc/libtalloc/0001-waf-add-support-of-cross_compile.patch new file mode 100644 index 000000000..e58339afb --- /dev/null +++ b/meta-networking/recipes-support/libtalloc/libtalloc/0001-waf-add-support-of-cross_compile.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Fri, 25 Jan 2019 15:00:59 +0800 | ||
4 | Subject: [PATCH] waf: add support of cross_compile | ||
5 | |||
6 | After upgrade, waf also upgraded | ||
7 | |||
8 | on 1.5.19, for cross_compile, subprocess.Popen is set to be | ||
9 | samba_cross.cross_Popen, which will not execute testprog on | ||
10 | host, but only read result from cross-answers.txt which is | ||
11 | passed by option --cross-answer | ||
12 | |||
13 | part of old code: | ||
14 | args = Utils.to_list(kw.get('exec_args', [])) | ||
15 | proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE) | ||
16 | |||
17 | but on new version, exec_args is not used and cause do_configure | ||
18 | failed with Exec format error | ||
19 | |||
20 | fixed by append cross anser related args to cmd | ||
21 | |||
22 | Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211] | ||
23 | |||
24 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
25 | --- | ||
26 | third_party/waf/waflib/Tools/c_config.py | 11 ++++++----- | ||
27 | 1 file changed, 6 insertions(+), 5 deletions(-) | ||
28 | |||
29 | diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py | ||
30 | index 7608215..767cf33 100644 | ||
31 | --- a/third_party/waf/waflib/Tools/c_config.py | ||
32 | +++ b/third_party/waf/waflib/Tools/c_config.py | ||
33 | @@ -660,20 +660,21 @@ class test_exec(Task.Task): | ||
34 | """ | ||
35 | color = 'PINK' | ||
36 | def run(self): | ||
37 | + args = self.generator.bld.kw.get('exec_args', []) | ||
38 | if getattr(self.generator, 'rpath', None): | ||
39 | if getattr(self.generator, 'define_ret', False): | ||
40 | - self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()]) | ||
41 | - else: | ||
42 | - self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()]) | ||
43 | + self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args) | ||
44 | + else: | ||
45 | + self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args) | ||
46 | else: | ||
47 | env = self.env.env or {} | ||
48 | env.update(dict(os.environ)) | ||
49 | for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'): | ||
50 | env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '') | ||
51 | if getattr(self.generator, 'define_ret', False): | ||
52 | - self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env) | ||
53 | + self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env) | ||
54 | else: | ||
55 | - self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env) | ||
56 | + self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env) | ||
57 | |||
58 | @feature('test_exec') | ||
59 | @after_method('apply_link') | ||
60 | -- | ||
61 | 2.7.4 | ||
62 | |||