summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/default-distrovars.inc9
-rw-r--r--meta/recipes-core/eglibc/eglibc-options.inc62
-rw-r--r--meta/recipes-core/eglibc/eglibc.inc6
3 files changed, 76 insertions, 1 deletions
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 4b68a0a54c..2cde46cd7b 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -10,7 +10,14 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
10ENABLE_BINARY_LOCALE_GENERATION ?= "1" 10ENABLE_BINARY_LOCALE_GENERATION ?= "1"
11LOCALE_UTF8_ONLY ?= "0" 11LOCALE_UTF8_ONLY ?= "0"
12 12
13DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci" 13DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
14 libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
15 libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
16 libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
17 libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
18 libc-posix-wchar-io"
19
20DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
14 21
15IMAGE_FEATURES ?= "" 22IMAGE_FEATURES ?= ""
16 23
diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
new file mode 100644
index 0000000000..119ceefdd7
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-options.inc
@@ -0,0 +1,62 @@
1def eglibc_cfg(feature, features, tokens, cnf):
2 if type(tokens) == type(""):
3 tokens = [tokens]
4 if type(features) == type([]) and feature in features:
5 cnf.extend([token + ' = y' for token in tokens])
6 else:
7 for token in tokens:
8 cnf.extend([token + ' = n'])
9 if token == 'OPTION_EGLIBC_NSSWITCH':
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"])
12
13# Map distro features to eglibc options settings
14def features_to_eglibc_settings(d):
15 cnf = ([])
16 distro_features = (bb.data.getVar('DISTRO_FEATURES', d, True) or '').split()
17 eglibc_cfg('ipv6', distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
18 eglibc_cfg('libc-backtrace', distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
19 eglibc_cfg('libc-big-macros', distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
20 eglibc_cfg('libc-bsd', distro_features, 'OPTION_EGLIBC_BSD', cnf)
21 eglibc_cfg('libc-cxx-tests', distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
22 eglibc_cfg('libc-catgets', distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
23 eglibc_cfg('libc-charsets', distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
24 eglibc_cfg('libc-crypt', distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
25 eglibc_cfg('libc-crypt-ufc', distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
26 eglibc_cfg('libc-db-aliases', distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
27 eglibc_cfg('libc-envz', distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
28 eglibc_cfg('libc-fcvt', distro_features, 'OPTION_EGLIBC_FCVT', cnf)
29 eglibc_cfg('libc-fmtmsg', distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
30 eglibc_cfg('libc-fstab', distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
31 eglibc_cfg('libc-ftraverse', distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
32 eglibc_cfg('libc-getlogin', distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
33 eglibc_cfg('libc-idn', distro_features, 'OPTION_EGLIBC_IDN', cnf)
34 eglibc_cfg('libc-inet', distro_features, 'OPTION_EGLIBC_INET', cnf)
35 eglibc_cfg('libc-inet-anl', distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
36 eglibc_cfg('libc-libm', distro_features, 'OPTION_EGLIBC_LIBM', cnf)
37 eglibc_cfg('libc-libm-big', distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
38 eglibc_cfg('libc-locales', distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
39 eglibc_cfg('libc-locale-code', distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
40 eglibc_cfg('libc-memusage', distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
41 eglibc_cfg('libc-nis', distro_features, 'OPTION_EGLIBC_NIS', cnf)
42 eglibc_cfg('libc-nsswitch', distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
43 eglibc_cfg('libc-rcmd', distro_features, 'OPTION_EGLIBC_RCMD', cnf)
44 eglibc_cfg('libc-rtld-debug', distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
45 eglibc_cfg('libc-spawn', distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
46 eglibc_cfg('libc-streams', distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
47 eglibc_cfg('libc-sunrpc', distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
48 eglibc_cfg('libc-utmp', distro_features, 'OPTION_EGLIBC_UTMP', cnf)
49 eglibc_cfg('libc-utmpx', distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
50 eglibc_cfg('libc-wordexp', distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
51 eglibc_cfg('libc-posix-clang-wchar', distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
52 eglibc_cfg('libc-posix-regexp', distro_features, 'OPTION_POSIX_REGEXP', cnf)
53 eglibc_cfg('libc-posix-regexp-glibc', distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
54 eglibc_cfg('libc-posix-wchar-io', distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
55
56 # try to fix disable charsets/locales/locale-code compile fail
57 if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
58 bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
59 else:
60 bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
61
62 return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 46ffa82184..616f1aff6d 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -28,6 +28,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
28PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc" 28PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
29PROVIDES += "virtual/libintl virtual/libiconv" 29PROVIDES += "virtual/libintl virtual/libiconv"
30inherit autotools 30inherit autotools
31require eglibc-options.inc
31 32
32LEAD_SONAME = "libc.so" 33LEAD_SONAME = "libc.so"
33 34
@@ -43,3 +44,8 @@ EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
43PARALLEL_MAKE = "" 44PARALLEL_MAKE = ""
44 45
45PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" 46PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
47
48OE_FEATURES = "${@features_to_eglibc_settings(d)}"
49do_configure_prepend() {
50 echo '${OE_FEATURES}' > ${B}/option-groups.config
51}