aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2011-06-28 14:58:15 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-28 12:04:05 +0100
commitc6d3242f7642f537b02870bb4eb650f0e2094b85 (patch)
tree7c34d9fcb0a7c41a9f9f5972471e7b1fac33c71d /meta/recipes-core/glibc
parent3aec2fa2df9aaa883feda0d7aed85e63d01398b9 (diff)
downloadopenembedded-core-contrib-c6d3242f7642f537b02870bb4eb650f0e2094b85.tar.gz
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] Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc')
-rw-r--r--meta/recipes-core/glibc/glibc-initial_2.10.1.bb4
-rw-r--r--meta/recipes-core/glibc/glibc-locale_2.10.1.bb52
-rw-r--r--meta/recipes-core/glibc/glibc-package.inc29
-rw-r--r--meta/recipes-core/glibc/glibc_2.10.1.bb12
4 files changed, 72 insertions, 25 deletions
diff --git a/meta/recipes-core/glibc/glibc-initial_2.10.1.bb b/meta/recipes-core/glibc/glibc-initial_2.10.1.bb
index d66297090f..bc3d7e4192 100644
--- a/meta/recipes-core/glibc/glibc-initial_2.10.1.bb
+++ b/meta/recipes-core/glibc/glibc-initial_2.10.1.bb
@@ -1,6 +1,10 @@
require glibc_${PV}.bb
require glibc-initial.inc
+do_install_locale() {
+ :
+}
+
do_configure_prepend () {
unset CFLAGS
}
diff --git a/meta/recipes-core/glibc/glibc-locale_2.10.1.bb b/meta/recipes-core/glibc/glibc-locale_2.10.1.bb
new file mode 100644
index 0000000000..d8ff12d274
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-locale_2.10.1.bb
@@ -0,0 +1,52 @@
+#INHIBIT_DEFAULT_DEPS = "1"
+LICENSE = "LGPL"
+
+BPN = "glibc"
+
+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-glibc-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"
+
+PROVIDES = "virtual/libc-locale"
+
+PACKAGES = "glibc-locale localedef${PKGSUFFIX}"
+
+PACKAGES_DYNAMIC = "locale-base-* \
+ glibc-gconv-*${PKGSUFFIX} glibc-charmap-* glibc-localedata-* glibc-binary-localedata-*"
+
+FILES_localedef${PKGSUFFIX} = "${bindir}/localedef"
+
+DESCRIPTION_localedef = "glibc: compile locale definition files"
+
+do_install () {
+ cp -fpPR ${STAGING_INCDIR}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}/* ${D}
+ cp -fpPR ${D}/SUPPORTED ${WORKDIR}
+}
+
+do_install[depends] += "virtual/libc${PKGSUFFIX}:do_populate_sysroot"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 27dc4271c3..5373d56d57 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -14,34 +14,14 @@ 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 until qemu works for everyone
-ENABLE_BINARY_LOCALE_GENERATION ?= "0"
-ENABLE_BINARY_LOCALE_GENERATION_pn-glibc-nativesdk = "0"
-
-# 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"
-
PKGSUFFIX = ""
PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} \
- ldd${PKGSUFFIX} localedef${PKGSUFFIX} ${PN}-utils ${PN}-dev ${PN}-doc \
- ${PN}-locale libsegfault${PKGSUFFIX} ${PN}-extra-nss ${PN}-thread-db \
+ ldd${PKGSUFFIX} ${PN}-utils ${PN}-dev ${PN}-doc \
+ libsegfault${PKGSUFFIX} ${PN}-extra-nss ${PN}-thread-db \
${PN}-pcprofile"
-PACKAGES_DYNAMIC = "glibc-gconv-*${PKGSUFFIX} glibc-charmap-* glibc-localedata-* locale-base-* \
- glibc-binary-localedata-*"
-
libc_baselibs = "${base_libdir}/libc* ${base_libdir}/libm* ${base_libdir}/ld* \
${base_libdir}/libpthread* ${base_libdir}/libresolv* ${base_libdir}/librt* \
${base_libdir}/libutil* ${base_libdir}/libnsl* ${base_libdir}/libnss_files* \
@@ -77,7 +57,6 @@ FILES_catchsegv${PKGSUFFIX} = "${bindir}/catchsegv"
RDEPENDS_catchsegv${PKGSUFFIX} = "libsegfault"
FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so"
FILES_glibc-thread-db = "${base_libdir}/libthread_db*"
-FILES_localedef${PKGSUFFIX} = "${bindir}/localedef"
RPROVIDES_glibc-dev += "libc-dev"
SUMMARY_sln = "The static ln."
@@ -88,10 +67,10 @@ SUMMARY_glibc-extra-nss = "hesiod, NIS and NIS+ nss libraries"
DESCRIPTION_glibc-extra-nss = "glibc: 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 = "glibc: compile locale definition files"
SUMMARY_glibc-utils = "Miscellaneous utilities provided by glibc"
DESCRIPTION_glibc-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..."
EXTRA_OEMAKE += "rootsbindir=${base_sbindir}"
-inherit libc-package
+inherit libc-common
+
diff --git a/meta/recipes-core/glibc/glibc_2.10.1.bb b/meta/recipes-core/glibc/glibc_2.10.1.bb
index 33ebe24b03..a2e7b834f5 100644
--- a/meta/recipes-core/glibc/glibc_2.10.1.bb
+++ b/meta/recipes-core/glibc/glibc_2.10.1.bb
@@ -154,6 +154,18 @@ do_compile () {
)
}
+do_install_locale () {
+ dest=${D}/${includedir}/glibc-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 glibc-stage.inc
require glibc-package.inc