diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2011-06-28 14:58:15 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-28 13:44:41 +0100 |
commit | 8fa9d64f1d5128f304a0d36dbf55f49ccaf784b1 (patch) | |
tree | ad031554642f4b160ec5b9bd044577c03ef0c5a6 /meta/recipes-core/glibc | |
parent | 671e580111c3f37f3c7835956db17e0425f9f937 (diff) | |
download | poky-8fa9d64f1d5128f304a0d36dbf55f49ccaf784b1.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]
(From OE-Core rev: c6d3242f7642f537b02870bb4eb650f0e2094b85)
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.bb | 4 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc-locale_2.10.1.bb | 52 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc-package.inc | 29 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc_2.10.1.bb | 12 |
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 @@ | |||
1 | require glibc_${PV}.bb | 1 | require glibc_${PV}.bb |
2 | require glibc-initial.inc | 2 | require glibc-initial.inc |
3 | 3 | ||
4 | do_install_locale() { | ||
5 | : | ||
6 | } | ||
7 | |||
4 | do_configure_prepend () { | 8 | do_configure_prepend () { |
5 | unset CFLAGS | 9 | unset CFLAGS |
6 | } | 10 | } |
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 @@ | |||
1 | #INHIBIT_DEFAULT_DEPS = "1" | ||
2 | LICENSE = "LGPL" | ||
3 | |||
4 | BPN = "glibc" | ||
5 | |||
6 | do_fetch[noexec] = "1" | ||
7 | do_unpack[noexec] = "1" | ||
8 | do_patch[noexec] = "1" | ||
9 | do_configure[noexec] = "1" | ||
10 | do_compile[noexec] = "1" | ||
11 | |||
12 | # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION | ||
13 | # is set. The idea is to avoid running localedef on the target (at first boot) | ||
14 | # to decrease initial boot time and avoid localedef being killed by the OOM | ||
15 | # killer which used to effectively break i18n on machines with < 128MB RAM. | ||
16 | |||
17 | # default to disabled | ||
18 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" | ||
19 | ENABLE_BINARY_LOCALE_GENERATION_pn-glibc-locale-nativesdk = "0" | ||
20 | |||
21 | #enable locale generation on these arches | ||
22 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions | ||
23 | BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips" | ||
24 | |||
25 | # set "1" to use cross-localedef for locale generation | ||
26 | # set "0" for qemu emulation of native localedef for locale generation | ||
27 | LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1" | ||
28 | |||
29 | PR = "r0" | ||
30 | |||
31 | PKGSUFFIX = "" | ||
32 | PKGSUFFIX_virtclass-nativesdk = "-nativesdk" | ||
33 | |||
34 | PROVIDES = "virtual/libc-locale" | ||
35 | |||
36 | PACKAGES = "glibc-locale localedef${PKGSUFFIX}" | ||
37 | |||
38 | PACKAGES_DYNAMIC = "locale-base-* \ | ||
39 | glibc-gconv-*${PKGSUFFIX} glibc-charmap-* glibc-localedata-* glibc-binary-localedata-*" | ||
40 | |||
41 | FILES_localedef${PKGSUFFIX} = "${bindir}/localedef" | ||
42 | |||
43 | DESCRIPTION_localedef = "glibc: compile locale definition files" | ||
44 | |||
45 | do_install () { | ||
46 | cp -fpPR ${STAGING_INCDIR}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}/* ${D} | ||
47 | cp -fpPR ${D}/SUPPORTED ${WORKDIR} | ||
48 | } | ||
49 | |||
50 | do_install[depends] += "virtual/libc${PKGSUFFIX}:do_populate_sysroot" | ||
51 | |||
52 | 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 () { | |||
14 | bb.data.getVar('TARGET_OS', d, 1)) | 14 | bb.data.getVar('TARGET_OS', d, 1)) |
15 | } | 15 | } |
16 | 16 | ||
17 | |||
18 | # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION | ||
19 | # is set. The idea is to avoid running localedef on the target (at first boot) | ||
20 | # to decrease initial boot time and avoid localedef being killed by the OOM | ||
21 | # killer which used to effectively break i18n on machines with < 128MB RAM. | ||
22 | |||
23 | # default to disabled until qemu works for everyone | ||
24 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" | ||
25 | ENABLE_BINARY_LOCALE_GENERATION_pn-glibc-nativesdk = "0" | ||
26 | |||
27 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions | ||
28 | BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips" | ||
29 | |||
30 | # set "1" to use cross-localedef for locale generation | ||
31 | # set "0" for qemu emulation of native localedef for locale generation | ||
32 | LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1" | ||
33 | |||
34 | PKGSUFFIX = "" | 17 | PKGSUFFIX = "" |
35 | PKGSUFFIX_virtclass-nativesdk = "-nativesdk" | 18 | PKGSUFFIX_virtclass-nativesdk = "-nativesdk" |
36 | 19 | ||
37 | PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} \ | 20 | PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} \ |
38 | ldd${PKGSUFFIX} localedef${PKGSUFFIX} ${PN}-utils ${PN}-dev ${PN}-doc \ | 21 | ldd${PKGSUFFIX} ${PN}-utils ${PN}-dev ${PN}-doc \ |
39 | ${PN}-locale libsegfault${PKGSUFFIX} ${PN}-extra-nss ${PN}-thread-db \ | 22 | libsegfault${PKGSUFFIX} ${PN}-extra-nss ${PN}-thread-db \ |
40 | ${PN}-pcprofile" | 23 | ${PN}-pcprofile" |
41 | 24 | ||
42 | PACKAGES_DYNAMIC = "glibc-gconv-*${PKGSUFFIX} glibc-charmap-* glibc-localedata-* locale-base-* \ | ||
43 | glibc-binary-localedata-*" | ||
44 | |||
45 | libc_baselibs = "${base_libdir}/libc* ${base_libdir}/libm* ${base_libdir}/ld* \ | 25 | libc_baselibs = "${base_libdir}/libc* ${base_libdir}/libm* ${base_libdir}/ld* \ |
46 | ${base_libdir}/libpthread* ${base_libdir}/libresolv* ${base_libdir}/librt* \ | 26 | ${base_libdir}/libpthread* ${base_libdir}/libresolv* ${base_libdir}/librt* \ |
47 | ${base_libdir}/libutil* ${base_libdir}/libnsl* ${base_libdir}/libnss_files* \ | 27 | ${base_libdir}/libutil* ${base_libdir}/libnsl* ${base_libdir}/libnss_files* \ |
@@ -77,7 +57,6 @@ FILES_catchsegv${PKGSUFFIX} = "${bindir}/catchsegv" | |||
77 | RDEPENDS_catchsegv${PKGSUFFIX} = "libsegfault" | 57 | RDEPENDS_catchsegv${PKGSUFFIX} = "libsegfault" |
78 | FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so" | 58 | FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so" |
79 | FILES_glibc-thread-db = "${base_libdir}/libthread_db*" | 59 | FILES_glibc-thread-db = "${base_libdir}/libthread_db*" |
80 | FILES_localedef${PKGSUFFIX} = "${bindir}/localedef" | ||
81 | RPROVIDES_glibc-dev += "libc-dev" | 60 | RPROVIDES_glibc-dev += "libc-dev" |
82 | 61 | ||
83 | SUMMARY_sln = "The static ln." | 62 | SUMMARY_sln = "The static ln." |
@@ -88,10 +67,10 @@ SUMMARY_glibc-extra-nss = "hesiod, NIS and NIS+ nss libraries" | |||
88 | DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services. | 67 | DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services. |
89 | SUMMARY_ldd = "print shared library dependencies" | 68 | SUMMARY_ldd = "print shared library dependencies" |
90 | DESCRIPTION_ldd = "/usr/bin/ldd prints shared library dependencies for each program or shared library specified on the command line." | 69 | DESCRIPTION_ldd = "/usr/bin/ldd prints shared library dependencies for each program or shared library specified on the command line." |
91 | DESCRIPTION_localedef = "glibc: compile locale definition files" | ||
92 | SUMMARY_glibc-utils = "Miscellaneous utilities provided by glibc" | 70 | SUMMARY_glibc-utils = "Miscellaneous utilities provided by glibc" |
93 | DESCRIPTION_glibc-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..." | 71 | DESCRIPTION_glibc-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..." |
94 | 72 | ||
95 | EXTRA_OEMAKE += "rootsbindir=${base_sbindir}" | 73 | EXTRA_OEMAKE += "rootsbindir=${base_sbindir}" |
96 | 74 | ||
97 | inherit libc-package | 75 | inherit libc-common |
76 | |||
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 () { | |||
154 | ) | 154 | ) |
155 | } | 155 | } |
156 | 156 | ||
157 | do_install_locale () { | ||
158 | dest=${D}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS} | ||
159 | install -d ${dest} ${dest}${bindir} | ||
160 | cp -fpPR ${D}${base_libdir} ${dest}${base_prefix} | ||
161 | cp -fpPR ${D}${libdir} ${dest}${exec_prefix} | ||
162 | cp -fpPR ${D}${datadir} ${dest}${exec_prefix} | ||
163 | cp -fpPR ${D}${bindir}/localedef ${dest}${bindir} | ||
164 | cp -fpPR ${WORKDIR}/SUPPORTED ${dest} | ||
165 | } | ||
166 | |||
167 | addtask do_install_locale after do_install before do_populate_sysroot | ||
168 | |||
157 | require glibc-stage.inc | 169 | require glibc-stage.inc |
158 | 170 | ||
159 | require glibc-package.inc | 171 | require glibc-package.inc |