summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-19 22:48:07 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-19 22:48:07 +0000
commit7379ee7786dd1b0612e44c078b73a5e6624139bb (patch)
treecbfe03a7d03acfedd3d528bd0f6ea2f4d431ddcf
parent1e549b98e1afbc91a5673dd00954f7c4a358b8c0 (diff)
downloadpoky-7379ee7786dd1b0612e44c078b73a5e6624139bb.tar.gz
glibc: Add missing .inc file from last commit
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/packages/glibc/glibc-package.inc84
1 files changed, 84 insertions, 0 deletions
diff --git a/meta/packages/glibc/glibc-package.inc b/meta/packages/glibc/glibc-package.inc
new file mode 100644
index 0000000000..3200809234
--- /dev/null
+++ b/meta/packages/glibc/glibc-package.inc
@@ -0,0 +1,84 @@
1#
2# For now, we will skip building of a gcc package if it is a uclibc one
3# and our build is not a uclibc one, and we skip a glibc one if our build
4# is a uclibc build.
5#
6# See the note in gcc/gcc_3.4.0.oe
7#
8
9python __anonymous () {
10 import bb, re
11 uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None)
12 if uc_os:
13 raise bb.parse.SkipPackage("incompatible with target %s" %
14 bb.data.getVar('TARGET_OS', d, 1))
15}
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
24ENABLE_BINARY_LOCALE_GENERATION ?= "0"
25
26# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
27BINARY_LOCALE_ARCHES ?= "arm.*"
28
29
30inherit glibc-package
31
32def get_glibc_fpu_setting(bb, d):
33 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
34 return "--without-fp"
35 return ""
36
37EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
38EXTRA_OEMAKE += "rootsbindir=${base_sbindir}"
39
40OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
41
42do_install() {
43 oe_runmake install_root=${D} install
44 for r in ${rpcsvc}; do
45 h=`echo $r|sed -e's,\.x$,.h,'`
46 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
47 done
48 install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/
49 install -d ${D}${libdir}/locale
50 make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
51 # get rid of some broken files...
52 for i in ${GLIBC_BROKEN_LOCALES}; do
53 grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
54 mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
55 done
56 rm -f ${D}/etc/rpc
57 rm -f ${D}${includedir}/scsi/sg.h
58 rm -f ${D}${includedir}/scsi/scsi_ioctl.h
59 rm -f ${D}${includedir}/scsi/scsi.h
60}
61
62
63python __anonymous () {
64 enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1)
65
66 if enabled and int(enabled):
67 import re
68
69 target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
70 binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or ""
71
72 for regexp in binary_arches.split(" "):
73 r = re.compile(regexp)
74
75 if r.match(target_arch):
76 depends = bb.data.getVar("DEPENDS", d, 1)
77 depends = "%s qemu-native" % depends
78 bb.data.setVar("DEPENDS", depends, d)
79 bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile", d)
80 break
81}
82
83
84