aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-package.inc
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2010-08-05 19:38:06 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-02 09:52:31 +0100
commit561d875404ef1783f94f37314b6e756766db8411 (patch)
tree664f8afe01c9ba8828ab02b19367e97e52dae842 /meta/recipes-core/eglibc/eglibc-package.inc
parent436d590c4a5b7b5942bac5b51af128bcdd30621f (diff)
downloadopenembedded-core-contrib-561d875404ef1783f94f37314b6e756766db8411.tar.gz
libc-package.bbclass: merge glibc & eglibc class files
Other enhancements: print qemu's stdio & error on failure glibc: enable locale generation for all arches eglibc: enable binary locale generation for mips And cleanup of code based on the code review. [e]glibc: move common definition in the common file bitbake was complaining about duplicate definition of get_libc_fpu_setting in eglibc.inc & glibc.inc files. And bump PRs Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-package.inc')
-rw-r--r--meta/recipes-core/eglibc/eglibc-package.inc99
1 files changed, 99 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
new file mode 100644
index 0000000000..8ee6bba067
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -0,0 +1,99 @@
+#
+# For now, we will skip building of a gcc package if it is a uclibc one
+# and our build is not a uclibc one, and we skip a eglibc one if our build
+# is a uclibc build.
+#
+# See the note in gcc/gcc_3.4.0.oe
+#
+
+python __anonymous () {
+ import bb, re
+ uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None)
+ if uc_os:
+ raise bb.parse.SkipPackage("incompatible with target %s" %
+ 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"
+
+# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
+BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips"
+
+# Set this to zero if you don't want ldconfig in the output package
+USE_LDCONFIG ?= "1"
+
+PACKAGES = "eglibc-dbg eglibc catchsegv sln nscd ldd localedef eglibc-utils eglibc-pic eglibc-dev eglibc-doc eglibc-locale libcidn libmemusage libsegfault eglibc-extra-nss eglibc-thread-db eglibc-pcprofile"
+
+PACKAGES_DYNAMIC = " \
+ glibc-gconv-* glibc-charmap-* glibc-localedata-* glibc-binary-localedata-* \
+ eglibc-gconv-* eglibc-charmap-* eglibc-localedata-* eglibc-binary-localedata-* \
+ locale-base-*"
+
+RPROVIDES_eglibc = "glibc"
+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"
+RPROVIDES_eglibc-dbg = "glibc-dbg"
+libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc*.so.* ${base_libdir}/libc*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
+
+FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig', '', d)}"
+FILES_ldd = "${bindir}/ldd"
+FILES_libsegfault = "${base_libdir}/libSegFault*"
+FILES_libcidn = "${base_libdir}/libcidn*.so"
+FILES_libmemusage = "${base_libdir}/libmemusage.so"
+FILES_eglibc-extra-nss = "${base_libdir}/libnss*"
+FILES_sln = "/sbin/sln"
+FILES_eglibc-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/"
+FILES_eglibc-dev_append += "${bindir}/rpcgen ${libdir}/*.a \
+ ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal"
+FILES_nscd = "${sbindir}/nscd*"
+FILES_eglibc-utils = "${bindir}/* ${sbindir}/*"
+FILES_eglibc-gconv = "${libdir}/gconv/*"
+FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/gconv/.debug"
+FILES_catchsegv = "${bindir}/catchsegv"
+RDEPENDS_catchsegv = "libsegfault"
+FILES_eglibc-pcprofile = "${base_libdir}/libpcprofile.so"
+FILES_eglibc-thread-db = "${base_libdir}/libthread_db*"
+FILES_localedef = "${bindir}/localedef"
+RPROVIDES_eglibc-dev += "libc-dev"
+
+DESCRIPTION_sln = "eglibc: create symbolic links between files"
+DESCRIPTION_nscd = "eglibc: name service cache daemon for passwd, group, and hosts"
+DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services"
+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
+