diff options
Diffstat (limited to 'meta-networking/recipes-connectivity/samba/samba-4.1.12/0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch')
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba-4.1.12/0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch deleted file mode 100644 index 3fbb770f3..000000000 --- a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | From 8ffb1892b5c42d8d29124d274aa4b5f1726d7e9f Mon Sep 17 00:00:00 2001 | ||
2 | From: Gustavo Zacarias <gustavo@zacarias.com.ar> | ||
3 | Date: Mon, 21 Apr 2014 10:18:16 -0300 | ||
4 | Subject: [PATCH 4/7] build: make wafsamba CHECK_SIZEOF cross-compile friendly | ||
5 | |||
6 | Use the same trick as commit 0d9bb86293c9d39298786df095c73a6251b08b7e | ||
7 | We do the same array trick iteratively starting from 1 (byte) by powers | ||
8 | of 2 up to 32. | ||
9 | |||
10 | The new 'critical' option is used to make the invocation die or not | ||
11 | according to each test. | ||
12 | The default is True since normally it's expected to find a proper | ||
13 | result and should error out if not. | ||
14 | |||
15 | Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> | ||
16 | Reviewed-by: Andrew Bartlett <abartlet@samba.org> | ||
17 | Reviewed-by: David Disseldorp <ddiss@samba.org> | ||
18 | |||
19 | Upstream-Status: Backport | ||
20 | |||
21 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
22 | --- | ||
23 | buildtools/wafsamba/samba_autoconf.py | 28 ++++++++++++++++------------ | ||
24 | 1 file changed, 16 insertions(+), 12 deletions(-) | ||
25 | |||
26 | diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py | ||
27 | index fe110bd..59953d9 100644 | ||
28 | --- a/buildtools/wafsamba/samba_autoconf.py | ||
29 | +++ b/buildtools/wafsamba/samba_autoconf.py | ||
30 | @@ -304,23 +304,27 @@ def CHECK_FUNCS(conf, list, link=True, lib=None, headers=None): | ||
31 | |||
32 | |||
33 | @conf | ||
34 | -def CHECK_SIZEOF(conf, vars, headers=None, define=None): | ||
35 | +def CHECK_SIZEOF(conf, vars, headers=None, define=None, critical=True): | ||
36 | '''check the size of a type''' | ||
37 | - ret = True | ||
38 | for v in TO_LIST(vars): | ||
39 | v_define = define | ||
40 | + ret = False | ||
41 | if v_define is None: | ||
42 | v_define = 'SIZEOF_%s' % v.upper().replace(' ', '_') | ||
43 | - if not CHECK_CODE(conf, | ||
44 | - 'printf("%%u", (unsigned)sizeof(%s))' % v, | ||
45 | - define=v_define, | ||
46 | - execute=True, | ||
47 | - define_ret=True, | ||
48 | - quote=False, | ||
49 | - headers=headers, | ||
50 | - local_include=False, | ||
51 | - msg="Checking size of %s" % v): | ||
52 | - ret = False | ||
53 | + for size in list((1, 2, 4, 8, 16, 32)): | ||
54 | + if CHECK_CODE(conf, | ||
55 | + 'static int test_array[1 - 2 * !(((long int)(sizeof(%s))) <= %d)];' % (v, size), | ||
56 | + define=v_define, | ||
57 | + quote=False, | ||
58 | + headers=headers, | ||
59 | + local_include=False, | ||
60 | + msg="Checking if size of %s == %d" % (v, size)): | ||
61 | + conf.DEFINE(v_define, size) | ||
62 | + ret = True | ||
63 | + break | ||
64 | + if not ret and critical: | ||
65 | + Logs.error("Couldn't determine size of '%s'" % v) | ||
66 | + sys.exit(1) | ||
67 | return ret | ||
68 | |||
69 | @conf | ||
70 | -- | ||
71 | 1.9.1 | ||
72 | |||