summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2010-10-04 13:31:23 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-10-07 22:53:28 +0100
commit2f19e2a1e6fe519f77b1d9611beadbfd2c74a22a (patch)
tree65dda95a7dd3471162678eaa63a9443d45e7385d /meta/recipes-core/glibc
parent2e040618978b93d0add0e7e115c17545685c9dfc (diff)
downloadpoky-2f19e2a1e6fe519f77b1d9611beadbfd2c74a22a.tar.gz
libc-package.bbclass, eglibc, glibc: enable locales generation using cross-localedef
Along with qemu this provides another option to generate locales for [e]glibc. The new method is to use cross-localedef with appropriate arch specific parameters. The cross-localedef method is found to be 15 times faster than qemu's emnualted method. LOCALE_GENERATION_WITH_CROSS-LOCALEDEF : This is new config variable introduced to selet qemu or cross-localedef method for locale generation. Thanks to Mark Hatle from Windriver for providing the rich information for cross locale generation. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Diffstat (limited to 'meta/recipes-core/glibc')
-rw-r--r--meta/recipes-core/glibc/glibc-package.inc24
1 files changed, 4 insertions, 20 deletions
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 3c9132820d..8faeeb7e89 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -27,6 +27,10 @@ ENABLE_BINARY_LOCALE_GENERATION_pn-glibc-nativesdk = "0"
27# BINARY_LOCALE_ARCHES is a space separated list of regular expressions 27# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
28BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips" 28BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips"
29 29
30# set "1" to use cross-localedef for locale generation
31# set "0" for qemu emulation of native localedef for locale generation
32LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1"
33
30PKGSUFFIX = "" 34PKGSUFFIX = ""
31PKGSUFFIX_virtclass-nativesdk = "-nativesdk" 35PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
32 36
@@ -86,24 +90,4 @@ DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzse
86 90
87EXTRA_OEMAKE += "rootsbindir=${base_sbindir}" 91EXTRA_OEMAKE += "rootsbindir=${base_sbindir}"
88 92
89python __anonymous () {
90 enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1)
91
92 if enabled and int(enabled):
93 import re
94
95 target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
96 binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or ""
97
98 for regexp in binary_arches.split(" "):
99 r = re.compile(regexp)
100
101 if r.match(target_arch):
102 depends = bb.data.getVar("DEPENDS", d, 1)
103 depends = "%s qemu-native" % depends
104 bb.data.setVar("DEPENDS", depends, d)
105 bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile", d)
106 break
107}
108
109inherit libc-package 93inherit libc-package