1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

libc-locale: split locale handling from libc recipe.

*libc's do_package will cost a lot of time due to the locale handing,
which may delay the other recipe's do_package task and affect the build
performance.

This commit moves locale handling into a separate recipe *libc-locale.

[RP: Add fixup with recent eglibc commit conflict for FILES_pn-dbg and PACKAGES]
(From OE-Core rev: c6d3242f7642f537b02870bb4eb650f0e2094b85)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Dongxiao Xu
2011-06-28 14:58:15 +08:00
committed by Richard Purdie
parent 671e580111
commit 8fa9d64f1d
14 changed files with 176 additions and 79 deletions
@@ -1,6 +1,10 @@
require eglibc_${PV}.bb
require eglibc-initial.inc
do_install_locale() {
:
}
do_configure_prepend () {
unset CFLAGS
}
@@ -0,0 +1,58 @@
INHIBIT_DEFAULT_DEPS = "1"
LICENSE = "LGPL"
BPN = "eglibc"
do_fetch[noexec] = "1"
do_unpack[noexec] = "1"
do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
# is set. The idea is to avoid running localedef on the target (at first boot)
# 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
ENABLE_BINARY_LOCALE_GENERATION ?= "0"
ENABLE_BINARY_LOCALE_GENERATION_pn-eglibc-locale-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"
PR = "r0"
PKGSUFFIX = ""
PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
PACKAGES = "eglibc-locale localedef${PKGSUFFIX}"
PACKAGES_DYNAMIC = "locale-base-* \
eglibc-gconv-* eglibc-charmap-* eglibc-localedata-* eglibc-binary-localedata-* \
glibc-gconv-*${PKGSUFFIX} glibc-charmap-* glibc-localedata-* glibc-binary-localedata-*"
PROVIDES = "virtual/libc-locale${PKGSUFFIX}"
RPROVIDES_eglibc-locale = "glibc-locale"
FILES_eglibc-gconv = "${libdir}/gconv/*"
FILES_localedef${PKGSUFFIX} = "${bindir}/localedef"
do_install () {
cp -fpPR ${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}/* ${D}
cp -fpPR ${D}/SUPPORTED ${WORKDIR}
}
DESCRIPTION_localedef = "eglibc: compile locale definition files"
inherit libc-package
do_install[depends] += "virtual/libc${PKGSUFFIX}:do_populate_sysroot"
BBCLASSEXTEND = "nativesdk"
+3 -29
View File
@@ -14,35 +14,13 @@ python __anonymous () {
bb.data.getVar('TARGET_OS', d, 1))
}
# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
# is set. The idea is to avoid running localedef on the target (at first boot)
# 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
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"
PKGSUFFIX = ""
PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} ldd${PKGSUFFIX} localedef${PKGSUFFIX} libcidn ${PN}-utils ${PN}-pic ${PN}-dev eglibc-doc eglibc-locale libmemusage libsegfault${PKGSUFFIX} eglibc-extra-nss eglibc-thread-db${PKGSUFFIX} eglibc-pcprofile libsotruss${PKGSUFFIX}"
PACKAGES_DYNAMIC = " \
glibc-gconv-*${PKGSUFFIX} glibc-charmap-* glibc-localedata-* glibc-binary-localedata-* \
eglibc-gconv-* eglibc-charmap-* eglibc-localedata-* eglibc-binary-localedata-* \
locale-base-*${PKGSUFFIX}"
PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} ldd${PKGSUFFIX} ${PN}-utils ${PN}-pic ${PN}-dev eglibc-doc libcidn libmemusage libsegfault${PKGSUFFIX} eglibc-extra-nss eglibc-thread-db${PKGSUFFIX} eglibc-pcprofile libsotruss${PKGSUFFIX}"
# Create a eglibc-binaries
ALLOW_EMPTY_${PN}-binaries = "1"
@@ -69,7 +47,6 @@ RPROVIDES_eglibc-utils = "glibc-utils"
RPROVIDES_eglibc-pic = "glibc-pic"
RPROVIDES_eglibc-dev = "glibc-dev"
RPROVIDES_eglibc-doc = "glibc-doc"
RPROVIDES_eglibc-locale = "glibc-locale"
RPROVIDES_eglibc-extra-nss = "glibc-extra-nss"
RPROVIDES_eglibc-thread-db = "glibc-thread-db"
RPROVIDES_eglibc-pcprofile = "glibc-pcprofile"
@@ -89,14 +66,12 @@ FILES_eglibc-dev_append += "${bindir}/rpcgen ${libdir}/*.a \
${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal"
FILES_nscd${PKGSUFFIX} = "${sbindir}/nscd*"
FILES_eglibc-utils = "${bindir}/* ${sbindir}/*"
FILES_eglibc-gconv = "${libdir}/gconv/*"
FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/gconv/.debug ${libdir}/audit/.debug"
FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/audit/.debug"
FILES_catchsegv${PKGSUFFIX} = "${bindir}/catchsegv"
RDEPENDS_catchsegv${PKGSUFFIX} = "libsegfault"
EDEPENDS_eglibc-utils = "libsotruss"
FILES_eglibc-pcprofile = "${base_libdir}/libpcprofile.so"
FILES_eglibc-thread-db${PKGSUFFIX} = "${base_libdir}/libthread_db*"
FILES_localedef${PKGSUFFIX} = "${bindir}/localedef"
RPROVIDES_eglibc-dev += "libc-dev"
SUMMARY_sln = "The static ln."
@@ -107,10 +82,9 @@ SUMMARY_eglibc-extra-nss = "hesiod, NIS and NIS+ nss libraries"
DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services."
SUMMARY_ldd = "print shared library dependencies"
DESCRIPTION_ldd = "/usr/bin/ldd prints shared library dependencies for each program or shared library specified on the command line."
DESCRIPTION_localedef = "eglibc: compile locale definition files"
SUMMARY_eglibc-utils = "Miscellaneous utilities provided by eglibc"
DESCRIPTION_eglibc-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..."
DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
inherit libc-package
inherit libc-common
+1 -1
View File
@@ -43,7 +43,7 @@ EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}""
EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
PARALLEL_MAKE = ""
PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
PACKAGES = "glibc catchsegv sln nscd ldd glibc-utils glibc-dev glibc-doc libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
OE_FEATURES = "${@features_to_eglibc_settings(d)}"
do_configure_prepend() {
+12
View File
@@ -110,6 +110,18 @@ do_compile () {
)
}
do_install_locale () {
dest=${D}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}
install -d ${dest} ${dest}${bindir}
cp -fpPR ${D}${base_libdir} ${dest}${base_prefix}
cp -fpPR ${D}${libdir} ${dest}${exec_prefix}
cp -fpPR ${D}${datadir} ${dest}${exec_prefix}
cp -fpPR ${D}${bindir}/localedef ${dest}${bindir}
cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
}
addtask do_install_locale after do_install before do_populate_sysroot
require eglibc-package.inc
BBCLASSEXTEND = "nativesdk"