mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
2e04061897
commit
2f19e2a1e6
@@ -19,13 +19,18 @@ python __anonymous () {
|
||||
# to decrease initial boot time and avoid localedef being killed by the OOM
|
||||
# killer which used to effectively break i18n on machines with < 128MB RAM.
|
||||
|
||||
# default to disabled until qemu works for everyone
|
||||
# default to disabled
|
||||
ENABLE_BINARY_LOCALE_GENERATION ?= "0"
|
||||
ENABLE_BINARY_LOCALE_GENERATION_pn-eglibc-nativesdk = "0"
|
||||
|
||||
#enable locale generation on these arches
|
||||
# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
|
||||
BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips"
|
||||
|
||||
# set "1" to use cross-localedef for locale generation
|
||||
# set "0" for qemu emulation of native localedef for locale generation
|
||||
LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1"
|
||||
|
||||
# Set this to zero if you don't want ldconfig in the output package
|
||||
USE_LDCONFIG ?= "1"
|
||||
|
||||
@@ -79,25 +84,5 @@ DESCRIPTION_ldd = "eglibc: print shared library dependencies"
|
||||
DESCRIPTION_localedef = "eglibc: compile locale definition files"
|
||||
DESCRIPTION_eglibc-utils = "eglibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..."
|
||||
|
||||
python __anonymous () {
|
||||
enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1)
|
||||
|
||||
if enabled and int(enabled):
|
||||
import re
|
||||
|
||||
target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
|
||||
binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or ""
|
||||
|
||||
for regexp in binary_arches.split(" "):
|
||||
r = re.compile(regexp)
|
||||
|
||||
if r.match(target_arch):
|
||||
depends = bb.data.getVar("DEPENDS", d, 1)
|
||||
depends = "%s qemu-native" % depends
|
||||
bb.data.setVar("DEPENDS", depends, d)
|
||||
bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile", d)
|
||||
break
|
||||
}
|
||||
|
||||
inherit libc-package
|
||||
|
||||
|
||||
Reference in New Issue
Block a user