summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2011-08-18 10:04:57 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-19 09:29:20 -0700
commitddc01beb5d44940812dcef55b2b0368339620153 (patch)
tree4cb8481533a730785425414f1fb04ba7c99546e9 /meta/recipes-core/eglibc
parentf6206cbfb023fe8de211932b572a132725b4e234 (diff)
downloadpoky-ddc01beb5d44940812dcef55b2b0368339620153.tar.gz
eglibc: check dependencies among eglibc options
Fixes [Yocto #1212] 'libc-inet' and 'ipv4' are the same thing, so remove 'libc-inet' from the default DISTRO_FEATURES_LIBC in file default-distrovars.inc. Check the dependencies among eglibc configurable options, make sure that eglibc could be compile successfully only with part of the options. (From OE-Core rev: 4b8d13b72c2c338ec5606f19aa5d7554558c51e5) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/eglibc')
-rw-r--r--meta/recipes-core/eglibc/eglibc-options.inc75
1 files changed, 74 insertions, 1 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
index 119ceefdd7..112029dab8 100644
--- a/meta/recipes-core/eglibc/eglibc-options.inc
+++ b/meta/recipes-core/eglibc/eglibc-options.inc
@@ -10,10 +10,83 @@ def eglibc_cfg(feature, features, tokens, cnf):
10 cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"]) 10 cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"])
11 cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"]) 11 cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"])
12 12
13# arrange the dependencies among eglibc configuable options according to file option-groups.def from eglibc source code
14def distro_features_check_deps(distro_features):
15 new_dep = True
16 while new_dep:
17 new_dep = False
18
19 if 'ipv6' in distro_features and 'ipv4' not in distro_features:
20 new_dep = True
21 distro_features.extend(['ipv4'])
22
23 if 'ipv4' in distro_features and 'libc-nsswitch' not in distro_features:
24 new_dep = True
25 distro_features.extend(['libc-nsswitch'])
26
27 if 'libc-cxx-tests' in distro_features:
28 if 'libc-posix-wchar-io' not in distro_features:
29 new_dep = True
30 distro_features.extend(['libc-posix-wchar-io'])
31 if 'libc-libm' not in distro_features:
32 new_dep = True
33 distro_features.extend(['libc-libm'])
34
35 if 'libc-catgets' in distro_features and 'libc-locale-code' not in distro_features:
36 new_dep = True
37 distro_features.extend(['libc-locale-code'])
38
39 if 'libc-crypt-ufc' in distro_features and 'libc-crypt' not in distro_features:
40 new_dep = True
41 distro_features.extend(['libc-crypt'])
42
43 if 'libc-getlogin' in distro_features and 'libc-utmp' not in distro_features:
44 new_dep = True
45 distro_features.extend(['libc-utmp'])
46
47 if 'libc-inet-anl' in distro_features and 'ipv4' not in distro_features:
48 new_dep = True
49 distro_features.extend(['ipv4'])
50
51 if 'libc-locale-code' in distro_features and 'libc-posix-clang-wchar' not in distro_features:
52 new_dep = True
53 distro_features.extend(['libc-posix-clang-wchar'])
54
55 if 'libc-nis' in distro_features:
56 if 'ipv4' not in distro_features:
57 new_dep = True
58 distro_features.extend(['ipv4'])
59 if 'libc-sunrpc' not in distro_features:
60 new_dep = True
61 distro_features.extend(['libc-sunrpc'])
62
63 if 'libc-rcmd' in distro_features and 'ipv4' not in distro_features:
64 new_dep = True
65 distro_features.extend(['ipv4'])
66
67 if 'libc-sunrpc' in distro_features and 'ipv4' not in distro_features:
68 new_dep = True
69 distro_features.extend(['ipv4'])
70
71 if 'libc-utmpx' in distro_features and 'libc-utmp' not in distro_features:
72 new_dep = True
73 distro_features.extend(['libc-utmp'])
74
75 if 'libc-posix-regexp-glibc' in distro_features and 'libc-posix-regexp' not in distro_features:
76 new_dep = True
77 distro_features.extend(['libc-posix-regexp'])
78
79 if 'libc-posix-wchar-io' in distro_features and 'libc-posix-clang-wchar' not in distro_features:
80 new_dep = True
81 distro_features.extend(['libc-posix-clang-wchar'])
82
13# Map distro features to eglibc options settings 83# Map distro features to eglibc options settings
14def features_to_eglibc_settings(d): 84def features_to_eglibc_settings(d):
15 cnf = ([]) 85 cnf = ([])
16 distro_features = (bb.data.getVar('DISTRO_FEATURES', d, True) or '').split() 86 distro_features = (bb.data.getVar('DISTRO_FEATURES', d, True) or '').split()
87
88 distro_features_check_deps(distro_features)
89
17 eglibc_cfg('ipv6', distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf) 90 eglibc_cfg('ipv6', distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
18 eglibc_cfg('libc-backtrace', distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf) 91 eglibc_cfg('libc-backtrace', distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
19 eglibc_cfg('libc-big-macros', distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf) 92 eglibc_cfg('libc-big-macros', distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
@@ -31,7 +104,7 @@ def features_to_eglibc_settings(d):
31 eglibc_cfg('libc-ftraverse', distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf) 104 eglibc_cfg('libc-ftraverse', distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
32 eglibc_cfg('libc-getlogin', distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf) 105 eglibc_cfg('libc-getlogin', distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
33 eglibc_cfg('libc-idn', distro_features, 'OPTION_EGLIBC_IDN', cnf) 106 eglibc_cfg('libc-idn', distro_features, 'OPTION_EGLIBC_IDN', cnf)
34 eglibc_cfg('libc-inet', distro_features, 'OPTION_EGLIBC_INET', cnf) 107 eglibc_cfg('ipv4', distro_features, 'OPTION_EGLIBC_INET', cnf)
35 eglibc_cfg('libc-inet-anl', distro_features, 'OPTION_EGLIBC_INET_ANL', cnf) 108 eglibc_cfg('libc-inet-anl', distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
36 eglibc_cfg('libc-libm', distro_features, 'OPTION_EGLIBC_LIBM', cnf) 109 eglibc_cfg('libc-libm', distro_features, 'OPTION_EGLIBC_LIBM', cnf)
37 eglibc_cfg('libc-libm-big', distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf) 110 eglibc_cfg('libc-libm-big', distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)