diff options
-rw-r--r-- | meta/classes/libc-package.bbclass (renamed from meta/classes/glibc-package.bbclass) | 216 | ||||
-rw-r--r-- | meta/conf/distro/include/poky-eglibc.inc | 12 | ||||
-rw-r--r-- | meta/conf/distro/include/poky-glibc.inc | 1 | ||||
-rw-r--r-- | meta/packages/meta/external-csl-toolchain_2006q3-27.bb | 2 | ||||
-rw-r--r-- | meta/packages/meta/external-csl-toolchain_2007q3-51.bb | 2 | ||||
-rw-r--r-- | meta/packages/meta/external-csl-toolchain_2008q3-72.bb | 2 | ||||
-rw-r--r-- | meta/recipes-core/eglibc/eglibc-package.bbclass | 381 | ||||
-rw-r--r-- | meta/recipes-core/eglibc/eglibc-package.inc | 99 | ||||
-rw-r--r-- | meta/recipes-core/eglibc/eglibc.inc | 2 | ||||
-rw-r--r-- | meta/recipes-core/eglibc/eglibc_2.12.bb | 6 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc-package.inc | 79 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc_2.10.1.bb | 4 |
12 files changed, 298 insertions, 508 deletions
diff --git a/meta/classes/glibc-package.bbclass b/meta/classes/libc-package.bbclass index 56bf8ba40a..c0e7176472 100644 --- a/meta/classes/glibc-package.bbclass +++ b/meta/classes/libc-package.bbclass | |||
@@ -1,5 +1,5 @@ | |||
1 | # | 1 | # |
2 | # This class knows how to package up glibc. Its shared since prebuild binary toolchains | 2 | # This class knows how to package up [e]glibc. Its shared since prebuild binary toolchains |
3 | # may need packaging and its pointless to duplicate this code. | 3 | # may need packaging and its pointless to duplicate this code. |
4 | # | 4 | # |
5 | # Caller should set GLIBC_INTERNAL_USE_BINARY_LOCALE to one of: | 5 | # Caller should set GLIBC_INTERNAL_USE_BINARY_LOCALE to one of: |
@@ -9,57 +9,27 @@ | |||
9 | 9 | ||
10 | GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice" | 10 | GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice" |
11 | 11 | ||
12 | PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" | 12 | inherit qemu |
13 | PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* locale-base-* glibc-binary-localedata-*" | 13 | |
14 | 14 | def get_libc_fpu_setting(bb, d): | |
15 | 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* ${base_libdir}/libnss_compat* ${base_libdir}/libnss_dns* ${base_libdir}/libdl* ${base_libdir}/libanl* ${base_libdir}/libBrokenLocale*" | 15 | if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: |
16 | 16 | return "--without-fp" | |
17 | 17 | return "" | |
18 | # The problem is that if PN = "glibc", FILES_${PN} will overwrite FILES_glibc | 18 | |
19 | # Solution: Make them both the same thing, then it doesn't matter | 19 | OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}" |
20 | 20 | ||
21 | glibcfiles = "${sysconfdir} ${libc_baselibs} ${base_sbindir}/ldconfig ${libexecdir}/* ${datadir}/zoneinfo" | 21 | do_configure_prepend() { |
22 | glibcdbgfiles = "${bindir}/.debug ${sbindir}/.debug ${libdir}/.debug \ | 22 | sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in |
23 | ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug \ | 23 | } |
24 | ${libdir}/gconv/.debug ${libexecdir}/*/.debug" | 24 | |
25 | glibcdevfiles = "${bindir}/rpcgen ${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \ | ||
26 | ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig \ | ||
27 | ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal" | ||
28 | |||
29 | FILES_glibc = "${glibcfiles}" | ||
30 | FILES_${PN} = "${glibcfiles}" | ||
31 | FILES_ldd = "${bindir}/ldd" | ||
32 | FILES_libsegfault = "${base_libdir}/libSegFault*" | ||
33 | FILES_glibc-extra-nss = "${base_libdir}/libnss*" | ||
34 | FILES_sln = "${base_sbindir}/sln" | ||
35 | FILES_glibc-dev = "${glibcdevfiles}" | ||
36 | FILES_${PN}-dev = "${glibcdevfiles}" | ||
37 | FILES_glibc-dbg = "${glibcdbgfiles}" | ||
38 | FILES_${PN}-dbg = "${glibcdbgfiles}" | ||
39 | FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/nscd* ${sysconfdir}/init.d/nscd*" | ||
40 | FILES_glibc-utils = "${bindir}/* ${sbindir}/*" | ||
41 | FILES_glibc-gconv = "${libdir}/gconv/*" | ||
42 | FILES_catchsegv = "${bindir}/catchsegv" | ||
43 | RDEPENDS_catchsegv = "libsegfault" | ||
44 | FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so" | ||
45 | FILES_glibc-thread-db = "${base_libdir}/libthread_db*" | ||
46 | FILES_localedef = "${bindir}/localedef" | ||
47 | RPROVIDES_glibc-dev += "libc-dev" | ||
48 | |||
49 | DESCRIPTION_sln = "glibc: create symbolic links between files" | ||
50 | DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts" | ||
51 | DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services" | ||
52 | DESCRIPTION_ldd = "glibc: print shared library dependencies" | ||
53 | DESCRIPTION_localedef = "glibc: compile locale definition files" | ||
54 | DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." | ||
55 | 25 | ||
56 | TMP_LOCALE="/tmp/locale${libdir}/locale" | ||
57 | 26 | ||
27 | # indentation removed on purpose | ||
58 | locale_base_postinst() { | 28 | locale_base_postinst() { |
59 | #!/bin/sh | 29 | #!/bin/sh |
60 | 30 | ||
61 | if [ "x$D" != "x" ]; then | 31 | if [ "x$D" != "x" ]; then |
62 | exit 1 | 32 | exit 1 |
63 | fi | 33 | fi |
64 | 34 | ||
65 | rm -rf ${TMP_LOCALE} | 35 | rm -rf ${TMP_LOCALE} |
@@ -73,6 +43,7 @@ mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ | |||
73 | rm -rf ${TMP_LOCALE} | 43 | rm -rf ${TMP_LOCALE} |
74 | } | 44 | } |
75 | 45 | ||
46 | # indentation removed on purpose | ||
76 | locale_base_postrm() { | 47 | locale_base_postrm() { |
77 | #!/bin/sh | 48 | #!/bin/sh |
78 | 49 | ||
@@ -86,6 +57,31 @@ mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ | |||
86 | rm -rf ${TMP_LOCALE} | 57 | rm -rf ${TMP_LOCALE} |
87 | } | 58 | } |
88 | 59 | ||
60 | |||
61 | do_install() { | ||
62 | oe_runmake install_root=${D} install | ||
63 | for r in ${rpcsvc}; do | ||
64 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
65 | install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/ | ||
66 | done | ||
67 | install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ | ||
68 | install -d ${D}${libdir}/locale | ||
69 | make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED" | ||
70 | # get rid of some broken files... | ||
71 | for i in ${GLIBC_BROKEN_LOCALES}; do | ||
72 | grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp | ||
73 | mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED | ||
74 | done | ||
75 | rm -f ${D}{sysconfdir}/rpc | ||
76 | rm -f ${D}${includedir}/scsi/sg.h | ||
77 | rm -f ${D}${includedir}/scsi/scsi_ioctl.h | ||
78 | rm -f ${D}${includedir}/scsi/scsi.h | ||
79 | rm -rf ${D}${datadir}/zoneinfo | ||
80 | rm -rf ${D}${libexecdir}/getconf | ||
81 | } | ||
82 | |||
83 | TMP_LOCALE="/tmp/locale${libdir}/locale" | ||
84 | |||
89 | do_prep_locale_tree() { | 85 | do_prep_locale_tree() { |
90 | treedir=${WORKDIR}/locale-tree | 86 | treedir=${WORKDIR}/locale-tree |
91 | rm -rf $treedir | 87 | rm -rf $treedir |
@@ -118,6 +114,7 @@ python package_do_split_gconvs () { | |||
118 | if not bb.data.getVar('PACKAGES', d, 1): | 114 | if not bb.data.getVar('PACKAGES', d, 1): |
119 | return | 115 | return |
120 | 116 | ||
117 | bpn = bb.data.getVar('BPN', d, 1) | ||
121 | libdir = bb.data.getVar('libdir', d, 1) | 118 | libdir = bb.data.getVar('libdir', d, 1) |
122 | if not libdir: | 119 | if not libdir: |
123 | bb.error("libdir not defined") | 120 | bb.error("libdir not defined") |
@@ -132,9 +129,46 @@ python package_do_split_gconvs () { | |||
132 | locales_dir = base_path_join(datadir, "i18n", "locales") | 129 | locales_dir = base_path_join(datadir, "i18n", "locales") |
133 | binary_locales_dir = base_path_join(libdir, "locale") | 130 | binary_locales_dir = base_path_join(libdir, "locale") |
134 | 131 | ||
135 | do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='glibc-gconv-%s', description='gconv module for character set %s', extra_depends='glibc-gconv') | 132 | def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group): |
133 | deps = [] | ||
134 | f = open(fn, "r") | ||
135 | c_re = re.compile('^copy "(.*)"') | ||
136 | i_re = re.compile('^include "(\w+)".*') | ||
137 | for l in f.readlines(): | ||
138 | m = c_re.match(l) or i_re.match(l) | ||
139 | if m: | ||
140 | dp = legitimize_package_name('%s-gconv-%s' % (bpn, m.group(1))) | ||
141 | if not dp in deps: | ||
142 | deps.append(dp) | ||
143 | f.close() | ||
144 | if deps != []: | ||
145 | bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) | ||
146 | if bpn != 'glibc': | ||
147 | bb.data.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc'), d) | ||
148 | |||
149 | do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern=bpn+'-gconv-%s', \ | ||
150 | description='gconv module for character set %s', hook=calc_gconv_deps, \ | ||
151 | extra_depends=bpn+'-gconv') | ||
136 | 152 | ||
137 | do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern='glibc-charmap-%s', description='character map for %s encoding', extra_depends='') | 153 | def calc_charmap_deps(fn, pkg, file_regex, output_pattern, group): |
154 | deps = [] | ||
155 | f = open(fn, "r") | ||
156 | c_re = re.compile('^copy "(.*)"') | ||
157 | i_re = re.compile('^include "(\w+)".*') | ||
158 | for l in f.readlines(): | ||
159 | m = c_re.match(l) or i_re.match(l) | ||
160 | if m: | ||
161 | dp = legitimize_package_name('%s-charmap-%s' % (bpn, m.group(1))) | ||
162 | if not dp in deps: | ||
163 | deps.append(dp) | ||
164 | f.close() | ||
165 | if deps != []: | ||
166 | bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) | ||
167 | if bpn != 'glibc': | ||
168 | bb.data.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc'), d) | ||
169 | |||
170 | do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern=bpn+'-charmap-%s', \ | ||
171 | description='character map for %s encoding', hook=calc_charmap_deps, extra_depends='') | ||
138 | 172 | ||
139 | def calc_locale_deps(fn, pkg, file_regex, output_pattern, group): | 173 | def calc_locale_deps(fn, pkg, file_regex, output_pattern, group): |
140 | deps = [] | 174 | deps = [] |
@@ -144,24 +178,33 @@ python package_do_split_gconvs () { | |||
144 | for l in f.readlines(): | 178 | for l in f.readlines(): |
145 | m = c_re.match(l) or i_re.match(l) | 179 | m = c_re.match(l) or i_re.match(l) |
146 | if m: | 180 | if m: |
147 | dp = legitimize_package_name('glibc-localedata-%s' % m.group(1)) | 181 | dp = legitimize_package_name(bpn+'-localedata-%s' % m.group(1)) |
148 | if not dp in deps: | 182 | if not dp in deps: |
149 | deps.append(dp) | 183 | deps.append(dp) |
150 | f.close() | 184 | f.close() |
151 | if deps != []: | 185 | if deps != []: |
152 | bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) | 186 | bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) |
187 | if bpn != 'glibc': | ||
188 | bb.data.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc'), d) | ||
153 | 189 | ||
154 | do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='') | 190 | do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern=bpn+'-localedata-%s', \ |
155 | bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d) | 191 | description='locale definition for %s', hook=calc_locale_deps, extra_depends='') |
192 | bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' ' + bpn + '-gconv', d) | ||
156 | 193 | ||
157 | use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1) | 194 | use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1) |
158 | 195 | ||
159 | dot_re = re.compile("(.*)\.(.*)") | 196 | dot_re = re.compile("(.*)\.(.*)") |
160 | 197 | ||
198 | #GLIBC_GENERATE_LOCALES var specifies which locales to be supported, empty or "all" means all locales | ||
161 | if use_bin != "precompiled": | 199 | if use_bin != "precompiled": |
162 | f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r") | 200 | supported = bb.data.getVar('GLIBC_GENERATE_LOCALES', d, 1) |
163 | supported = f.readlines() | 201 | if not supported or supported == "all": |
164 | f.close() | 202 | f = open(base_path_join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r") |
203 | supported = f.readlines() | ||
204 | f.close() | ||
205 | else: | ||
206 | supported = supported.split() | ||
207 | supported = map(lambda s:s.replace(".", " ") + "\n", supported) | ||
165 | else: | 208 | else: |
166 | supported = [] | 209 | supported = [] |
167 | full_bin_path = bb.data.getVar('PKGD', d, True) + binary_locales_dir | 210 | full_bin_path = bb.data.getVar('PKGD', d, True) + binary_locales_dir |
@@ -188,44 +231,66 @@ python package_do_split_gconvs () { | |||
188 | encodings[locale].append(charset) | 231 | encodings[locale].append(charset) |
189 | 232 | ||
190 | def output_locale_source(name, pkgname, locale, encoding): | 233 | def output_locale_source(name, pkgname, locale, encoding): |
191 | bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d) | 234 | bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef %s-localedata-%s %s-charmap-%s' % \ |
192 | bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) % (locale, encoding, locale), d) | 235 | (bpn, legitimize_package_name(locale), bpn, legitimize_package_name(encoding)), d) |
193 | bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % (locale, encoding, locale), d) | 236 | bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) \ |
237 | % (locale, encoding, locale), d) | ||
238 | bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % \ | ||
239 | (locale, encoding, locale), d) | ||
194 | 240 | ||
195 | def output_locale_binary_rdepends(name, pkgname, locale, encoding): | 241 | def output_locale_binary_rdepends(name, pkgname, locale, encoding): |
196 | m = re.match("(.*)\.(.*)", name) | 242 | m = re.match("(.*)_(.*)", name) |
197 | if m: | 243 | if m: |
198 | glibc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-","")) | 244 | libc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-","")) |
199 | else: | 245 | else: |
200 | glibc_name = name | 246 | libc_name = name |
201 | bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('glibc-binary-localedata-%s' % glibc_name), d) | 247 | bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \ |
248 | % (bpn, libc_name)), d) | ||
249 | rprovides = (bb.data.getVar('RPROVIDES_%s' % pkgname, d, True) or "").split() | ||
250 | rprovides.append(legitimize_package_name('%s-binary-localedata-%s' % (bpn, libc_name))) | ||
251 | bb.data.setVar('RPROVIDES_%s' % pkgname, " ".join(rprovides), d) | ||
202 | 252 | ||
203 | def output_locale_binary(name, pkgname, locale, encoding): | 253 | def output_locale_binary(name, pkgname, locale, encoding): |
254 | qemu = qemu_target_binary(d) | ||
255 | |||
204 | treedir = base_path_join(bb.data.getVar("WORKDIR", d, 1), "locale-tree") | 256 | treedir = base_path_join(bb.data.getVar("WORKDIR", d, 1), "locale-tree") |
257 | ldlibdir = "%s/lib" % treedir | ||
205 | path = bb.data.getVar("PATH", d, 1) | 258 | path = bb.data.getVar("PATH", d, 1) |
206 | i18npath = base_path_join(treedir, datadir, "i18n") | 259 | i18npath = base_path_join(treedir, datadir, "i18n") |
207 | target_arch = bb.data.getVar("TARGET_ARCH", d, 1) | 260 | |
208 | qemu = "qemu-%s" % target_arch | 261 | localedef_opts = "--force --old-style --no-archive --prefix=%s \ |
209 | localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, name) | 262 | --inputfile=%s/i18n/locales/%s --charmap=%s %s" \ |
263 | % (treedir, datadir, locale, encoding, name) | ||
210 | 264 | ||
211 | qemu_options = bb.data.getVar("QEMU_OPTIONS_%s" % bb.data.getVar('PACKAGE_ARCH', d, 1), d, 1) | 265 | qemu_options = bb.data.getVar("QEMU_OPTIONS_%s" % bb.data.getVar('PACKAGE_ARCH', d, 1), d, 1) |
212 | if not qemu_options: | 266 | if not qemu_options: |
213 | qemu_options = bb.data.getVar('QEMU_OPTIONS', d, 1) | 267 | qemu_options = bb.data.getVar('QEMU_OPTIONS', d, 1) |
214 | 268 | ||
215 | cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, qemu_options, treedir, localedef_opts) | 269 | cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \ |
270 | -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \ | ||
271 | (path, i18npath, qemu, treedir, ldlibdir, qemu_options, treedir, localedef_opts) | ||
216 | bb.note("generating locale %s (%s)" % (locale, encoding)) | 272 | bb.note("generating locale %s (%s)" % (locale, encoding)) |
217 | if os.system(cmd): | 273 | import subprocess |
218 | raise bb.build.FuncFailed("localedef returned an error (command was %s)." % cmd) | 274 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
275 | if process.wait() != 0: | ||
276 | bb.note("cmd:") | ||
277 | bb.note(cmd) | ||
278 | bb.note("stdout:") | ||
279 | bb.note(process.stdout.read()) | ||
280 | bb.note("stderr:") | ||
281 | bb.note(process.stderr.read()) | ||
282 | raise bb.build.FuncFailed("localedef returned an error") | ||
219 | 283 | ||
220 | def output_locale(name, locale, encoding): | 284 | def output_locale(name, locale, encoding): |
221 | pkgname = 'locale-base-' + legitimize_package_name(name) | 285 | pkgname = 'locale-base-' + legitimize_package_name(name) |
222 | bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) | 286 | bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) |
223 | bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) | 287 | bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) |
224 | rprovides = 'virtual-locale-%s' % legitimize_package_name(name) | 288 | rprovides = ' virtual-locale-%s' % legitimize_package_name(name) |
225 | m = re.match("(.*)_(.*)", name) | 289 | m = re.match("(.*)_(.*)", name) |
226 | if m: | 290 | if m: |
227 | rprovides += ' virtual-locale-%s' % m.group(1) | 291 | rprovides += ' virtual-locale-%s' % m.group(1) |
228 | bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) | 292 | bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) |
293 | |||
229 | if use_bin == "compile": | 294 | if use_bin == "compile": |
230 | output_locale_binary_rdepends(name, pkgname, locale, encoding) | 295 | output_locale_binary_rdepends(name, pkgname, locale, encoding) |
231 | output_locale_binary(name, pkgname, locale, encoding) | 296 | output_locale_binary(name, pkgname, locale, encoding) |
@@ -261,9 +326,13 @@ python package_do_split_gconvs () { | |||
261 | if use_bin == "compile": | 326 | if use_bin == "compile": |
262 | bb.note("collecting binary locales from locale tree") | 327 | bb.note("collecting binary locales from locale tree") |
263 | bb.build.exec_func("do_collect_bins_from_locale_tree", d) | 328 | bb.build.exec_func("do_collect_bins_from_locale_tree", d) |
264 | do_split_packages(d, binary_locales_dir, file_regex='(.*)', output_pattern='glibc-binary-localedata-%s', description='binary locale definition for %s', extra_depends='', allow_dirs=True) | 329 | do_split_packages(d, binary_locales_dir, file_regex='(.*)', \ |
330 | output_pattern=bpn+'-binary-localedata-%s', \ | ||
331 | description='binary locale definition for %s', extra_depends='', allow_dirs=True) | ||
265 | elif use_bin == "precompiled": | 332 | elif use_bin == "precompiled": |
266 | do_split_packages(d, binary_locales_dir, file_regex='(.*)', output_pattern='glibc-binary-localedata-%s', description='binary locale definition for %s', extra_depends='', allow_dirs=True) | 333 | do_split_packages(d, binary_locales_dir, file_regex='(.*)', \ |
334 | output_pattern=bpn+'-binary-localedata-%s', \ | ||
335 | description='binary locale definition for %s', extra_depends='', allow_dirs=True) | ||
267 | else: | 336 | else: |
268 | bb.note("generation of binary locales disabled. this may break i18n!") | 337 | bb.note("generation of binary locales disabled. this may break i18n!") |
269 | 338 | ||
@@ -273,7 +342,8 @@ python package_do_split_gconvs () { | |||
273 | # from the called function even though we're prepending | 342 | # from the called function even though we're prepending |
274 | python populate_packages_prepend () { | 343 | python populate_packages_prepend () { |
275 | if bb.data.getVar('DEBIAN_NAMES', d, 1): | 344 | if bb.data.getVar('DEBIAN_NAMES', d, 1): |
276 | bb.data.setVar('PKG_glibc', 'libc6', d) | 345 | bpn = bb.data.getVar('BPN', d, 1) |
277 | bb.data.setVar('PKG_glibc-dev', 'libc6-dev', d) | 346 | bb.data.setVar('PKG_'+bpn, 'libc6', d) |
347 | bb.data.setVar('PKG_'+bpn+'-dev', 'libc6-dev', d) | ||
278 | bb.build.exec_func('package_do_split_gconvs', d) | 348 | bb.build.exec_func('package_do_split_gconvs', d) |
279 | } | 349 | } |
diff --git a/meta/conf/distro/include/poky-eglibc.inc b/meta/conf/distro/include/poky-eglibc.inc index 6c9dd0437c..c4e002b6e3 100644 --- a/meta/conf/distro/include/poky-eglibc.inc +++ b/meta/conf/distro/include/poky-eglibc.inc | |||
@@ -15,18 +15,6 @@ TARGET_OS = "${GLIBCTARGETOS}" | |||
15 | 15 | ||
16 | CXXFLAGS += "-fvisibility-inlines-hidden" | 16 | CXXFLAGS += "-fvisibility-inlines-hidden" |
17 | 17 | ||
18 | |||
19 | # eglibc is configured for OLDEST_KERNEL kernel version, so we set minimal | ||
20 | # sane versions there | ||
21 | |||
22 | OLDEST_KERNEL ?= "2.4.0" | ||
23 | |||
24 | # ARM OABI is fine with 2.4.0, EABI is not, so we override on "-gnueabi" | ||
25 | # TARGET_OS here, not on architecture which is 'arm' in both cases | ||
26 | OLDEST_KERNEL_linux-gnueabi ?= "2.6.16" | ||
27 | OLDEST_KERNEL_sparc64 ?= "2.4.21" | ||
28 | OLDEST_KERNEL_ppc64 ?= "2.4.21" | ||
29 | |||
30 | LIBC_DEPENDENCIES = "libsegfault \ | 18 | LIBC_DEPENDENCIES = "libsegfault \ |
31 | eglibc \ | 19 | eglibc \ |
32 | eglibc-dbg \ | 20 | eglibc-dbg \ |
diff --git a/meta/conf/distro/include/poky-glibc.inc b/meta/conf/distro/include/poky-glibc.inc index 79abacf543..5d300c6dfa 100644 --- a/meta/conf/distro/include/poky-glibc.inc +++ b/meta/conf/distro/include/poky-glibc.inc | |||
@@ -5,6 +5,7 @@ | |||
5 | PREFERRED_PROVIDER_virtual/libiconv ?= "glibc" | 5 | PREFERRED_PROVIDER_virtual/libiconv ?= "glibc" |
6 | PREFERRED_PROVIDER_virtual/libintl ?= "glibc" | 6 | PREFERRED_PROVIDER_virtual/libintl ?= "glibc" |
7 | PREFERRED_PROVIDER_virtual/libc ?= "glibc" | 7 | PREFERRED_PROVIDER_virtual/libc ?= "glibc" |
8 | PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial ?= "glibc-initial" | ||
8 | 9 | ||
9 | TARGET_OS = "${GLIBCTARGETOS}" | 10 | TARGET_OS = "${GLIBCTARGETOS}" |
10 | 11 | ||
diff --git a/meta/packages/meta/external-csl-toolchain_2006q3-27.bb b/meta/packages/meta/external-csl-toolchain_2006q3-27.bb index 02deefacdb..197c288f1a 100644 --- a/meta/packages/meta/external-csl-toolchain_2006q3-27.bb +++ b/meta/packages/meta/external-csl-toolchain_2006q3-27.bb | |||
@@ -33,7 +33,7 @@ do_install() { | |||
33 | 33 | ||
34 | GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "compile" | 34 | GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "compile" |
35 | 35 | ||
36 | inherit glibc-package | 36 | inherit libc-package |
37 | 37 | ||
38 | PACKAGES += "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers" | 38 | PACKAGES += "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers" |
39 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" | 39 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" |
diff --git a/meta/packages/meta/external-csl-toolchain_2007q3-51.bb b/meta/packages/meta/external-csl-toolchain_2007q3-51.bb index d1ab1ab0bf..ce75e716e7 100644 --- a/meta/packages/meta/external-csl-toolchain_2007q3-51.bb +++ b/meta/packages/meta/external-csl-toolchain_2007q3-51.bb | |||
@@ -33,7 +33,7 @@ do_install() { | |||
33 | 33 | ||
34 | GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "compile" | 34 | GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "compile" |
35 | 35 | ||
36 | inherit glibc-package | 36 | inherit libc-package |
37 | 37 | ||
38 | PACKAGES += "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers" | 38 | PACKAGES += "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers" |
39 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" | 39 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" |
diff --git a/meta/packages/meta/external-csl-toolchain_2008q3-72.bb b/meta/packages/meta/external-csl-toolchain_2008q3-72.bb index 650da54d3e..20e1690196 100644 --- a/meta/packages/meta/external-csl-toolchain_2008q3-72.bb +++ b/meta/packages/meta/external-csl-toolchain_2008q3-72.bb | |||
@@ -37,7 +37,7 @@ do_install() { | |||
37 | 37 | ||
38 | GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "compile" | 38 | GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "compile" |
39 | 39 | ||
40 | inherit glibc-package | 40 | inherit libc-package |
41 | 41 | ||
42 | PACKAGES += "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers" | 42 | PACKAGES += "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers" |
43 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" | 43 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" |
diff --git a/meta/recipes-core/eglibc/eglibc-package.bbclass b/meta/recipes-core/eglibc/eglibc-package.bbclass deleted file mode 100644 index 4e286afa80..0000000000 --- a/meta/recipes-core/eglibc/eglibc-package.bbclass +++ /dev/null | |||
@@ -1,381 +0,0 @@ | |||
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 eglibc one if our build | ||
4 | # is a uclibc build. | ||
5 | # | ||
6 | # See the note in gcc/gcc_3.4.0.oe | ||
7 | # | ||
8 | |||
9 | inherit qemu | ||
10 | |||
11 | python __anonymous () { | ||
12 | import bb, re | ||
13 | uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None) | ||
14 | if uc_os: | ||
15 | raise bb.parse.SkipPackage("incompatible with target %s" % | ||
16 | bb.data.getVar('TARGET_OS', d, 1)) | ||
17 | } | ||
18 | |||
19 | |||
20 | # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION | ||
21 | # is set. The idea is to avoid running localedef on the target (at first boot) | ||
22 | # to decrease initial boot time and avoid localedef being killed by the OOM | ||
23 | # killer which used to effectively break i18n on machines with < 128MB RAM. | ||
24 | |||
25 | # default to disabled until qemu works for everyone | ||
26 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" | ||
27 | |||
28 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions | ||
29 | BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc" | ||
30 | |||
31 | # Set this to zero if you don't want ldconfig in the output package | ||
32 | USE_LDCONFIG ?= "1" | ||
33 | |||
34 | 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" | ||
35 | PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* glibc-binary-localedata-* eglibc-gconv-* eglibc-charmap-* eglibc-localedata-* eglibc-binary-localedata-* locale-base-*" | ||
36 | |||
37 | RPROVIDES_eglibc = "glibc" | ||
38 | RPROVIDES_eglibc-utils = "glibc-utils" | ||
39 | RPROVIDES_eglibc-pic = "glibc-pic" | ||
40 | RPROVIDES_eglibc-dev = "glibc-dev" | ||
41 | RPROVIDES_eglibc-doc = "glibc-doc" | ||
42 | RPROVIDES_eglibc-locale = "glibc-locale" | ||
43 | RPROVIDES_eglibc-extra-nss = "glibc-extra-nss" | ||
44 | RPROVIDES_eglibc-thread-db = "glibc-thread-db" | ||
45 | RPROVIDES_eglibc-pcprofile = "glibc-pcprofile" | ||
46 | RPROVIDES_eglibc-dbg = "glibc-dbg" | ||
47 | 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" | ||
48 | |||
49 | FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig', '', d)}" | ||
50 | FILES_ldd = "${bindir}/ldd" | ||
51 | FILES_libsegfault = "${base_libdir}/libSegFault*" | ||
52 | FILES_libcidn = "${base_libdir}/libcidn*.so" | ||
53 | FILES_libmemusage = "${base_libdir}/libmemusage.so" | ||
54 | FILES_eglibc-extra-nss = "${base_libdir}/libnss*" | ||
55 | FILES_sln = "/sbin/sln" | ||
56 | FILES_eglibc-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/" | ||
57 | FILES_eglibc-dev_append += "${bindir}/rpcgen ${libdir}/*.a \ | ||
58 | ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal" | ||
59 | FILES_nscd = "${sbindir}/nscd*" | ||
60 | FILES_eglibc-utils = "${bindir}/* ${sbindir}/*" | ||
61 | FILES_eglibc-gconv = "${libdir}/gconv/*" | ||
62 | FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/gconv/.debug" | ||
63 | FILES_catchsegv = "${bindir}/catchsegv" | ||
64 | RDEPENDS_catchsegv = "libsegfault" | ||
65 | FILES_eglibc-pcprofile = "${base_libdir}/libpcprofile.so" | ||
66 | FILES_eglibc-thread-db = "${base_libdir}/libthread_db*" | ||
67 | FILES_localedef = "${bindir}/localedef" | ||
68 | RPROVIDES_eglibc-dev += "libc-dev" | ||
69 | |||
70 | DESCRIPTION_sln = "eglibc: create symbolic links between files" | ||
71 | DESCRIPTION_nscd = "eglibc: name service cache daemon for passwd, group, and hosts" | ||
72 | DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services" | ||
73 | DESCRIPTION_ldd = "eglibc: print shared library dependencies" | ||
74 | DESCRIPTION_localedef = "eglibc: compile locale definition files" | ||
75 | DESCRIPTION_eglibc-utils = "eglibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." | ||
76 | |||
77 | def get_eglibc_fpu_setting(bb, d): | ||
78 | if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: | ||
79 | return "--without-fp" | ||
80 | return "" | ||
81 | |||
82 | EXTRA_OECONF += "${@get_eglibc_fpu_setting(bb, d)}" | ||
83 | |||
84 | OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}" | ||
85 | |||
86 | do_configure_prepend() { | ||
87 | sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in | ||
88 | } | ||
89 | |||
90 | do_install() { | ||
91 | oe_runmake install_root=${D} install | ||
92 | for r in ${rpcsvc}; do | ||
93 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
94 | install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/ | ||
95 | done | ||
96 | install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ | ||
97 | install -d ${D}${libdir}/locale | ||
98 | make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED" | ||
99 | # get rid of some broken files... | ||
100 | for i in ${GLIBC_BROKEN_LOCALES}; do | ||
101 | grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp | ||
102 | mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED | ||
103 | done | ||
104 | rm -f ${D}/etc/rpc | ||
105 | rm -rf ${D}${datadir}/zoneinfo | ||
106 | rm -rf ${D}${libexecdir}/getconf | ||
107 | } | ||
108 | |||
109 | TMP_LOCALE="/tmp/locale${libdir}/locale" | ||
110 | |||
111 | locale_base_postinst() { | ||
112 | #!/bin/sh | ||
113 | |||
114 | if [ "x$D" != "x" ]; then | ||
115 | exit 1 | ||
116 | fi | ||
117 | |||
118 | rm -rf ${TMP_LOCALE} | ||
119 | mkdir -p ${TMP_LOCALE} | ||
120 | if [ -f ${libdir}/locale/locale-archive ]; then | ||
121 | cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ | ||
122 | fi | ||
123 | localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s | ||
124 | mkdir -p ${libdir}/locale/ | ||
125 | mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ | ||
126 | rm -rf ${TMP_LOCALE} | ||
127 | } | ||
128 | |||
129 | locale_base_postrm() { | ||
130 | #!/bin/sh | ||
131 | |||
132 | rm -rf ${TMP_LOCALE} | ||
133 | mkdir -p ${TMP_LOCALE} | ||
134 | if [ -f ${libdir}/locale/locale-archive ]; then | ||
135 | cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ | ||
136 | fi | ||
137 | localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s | ||
138 | mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ | ||
139 | rm -rf ${TMP_LOCALE} | ||
140 | } | ||
141 | |||
142 | python __anonymous () { | ||
143 | enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1) | ||
144 | |||
145 | if enabled and int(enabled): | ||
146 | import re | ||
147 | |||
148 | target_arch = bb.data.getVar("TARGET_ARCH", d, 1) | ||
149 | binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or "" | ||
150 | |||
151 | for regexp in binary_arches.split(" "): | ||
152 | r = re.compile(regexp) | ||
153 | |||
154 | if r.match(target_arch): | ||
155 | depends = bb.data.getVar("DEPENDS", d, 1) | ||
156 | depends = "%s qemu-native" % depends | ||
157 | bb.data.setVar("DEPENDS", depends, d) | ||
158 | bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "1", d) | ||
159 | break | ||
160 | } | ||
161 | |||
162 | do_prep_locale_tree() { | ||
163 | treedir=${WORKDIR}/locale-tree | ||
164 | rm -rf $treedir | ||
165 | mkdir -p $treedir/bin $treedir/lib $treedir/${datadir} $treedir/${libdir}/locale | ||
166 | cp -pPR ${PKGD}${datadir}/i18n $treedir/${datadir}/i18n | ||
167 | # unzip to avoid parsing errors | ||
168 | for i in $treedir/${datadir}/i18n/charmaps/*gz; do | ||
169 | gunzip $i | ||
170 | done | ||
171 | ls -d ${PKGD}${base_libdir}/* | xargs -iBLAH cp -pPR BLAH $treedir/lib | ||
172 | if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.* ]; then | ||
173 | cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib | ||
174 | fi | ||
175 | install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin | ||
176 | } | ||
177 | |||
178 | do_collect_bins_from_locale_tree() { | ||
179 | treedir=${WORKDIR}/locale-tree | ||
180 | |||
181 | mkdir -p ${PKGD}${libdir} | ||
182 | cp -pPR $treedir/${libdir}/locale ${PKGD}${libdir} | ||
183 | } | ||
184 | |||
185 | python package_do_split_gconvs () { | ||
186 | import os, re | ||
187 | if (bb.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'): | ||
188 | bb.note("package requested not splitting gconvs") | ||
189 | return | ||
190 | |||
191 | if not bb.data.getVar('PACKAGES', d, 1): | ||
192 | return | ||
193 | |||
194 | libdir = bb.data.getVar('libdir', d, 1) | ||
195 | if not libdir: | ||
196 | bb.error("libdir not defined") | ||
197 | return | ||
198 | datadir = bb.data.getVar('datadir', d, 1) | ||
199 | if not datadir: | ||
200 | bb.error("datadir not defined") | ||
201 | return | ||
202 | |||
203 | gconv_libdir = base_path_join(libdir, "gconv") | ||
204 | charmap_dir = base_path_join(datadir, "i18n", "charmaps") | ||
205 | locales_dir = base_path_join(datadir, "i18n", "locales") | ||
206 | binary_locales_dir = base_path_join(libdir, "locale") | ||
207 | |||
208 | def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group): | ||
209 | deps = [] | ||
210 | f = open(fn, "r") | ||
211 | c_re = re.compile('^copy "(.*)"') | ||
212 | i_re = re.compile('^include "(\w+)".*') | ||
213 | for l in f.readlines(): | ||
214 | m = c_re.match(l) or i_re.match(l) | ||
215 | if m: | ||
216 | dp = legitimize_package_name('eglibc-gconv-%s' % m.group(1)) | ||
217 | if not dp in deps: | ||
218 | deps.append(dp) | ||
219 | f.close() | ||
220 | if deps != []: | ||
221 | bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) | ||
222 | bb.data.setVar('RPROVIDES_%s' % pkg, pkg.replace('eglibc', 'glibc'), d) | ||
223 | |||
224 | do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='eglibc-gconv-%s', description='gconv module for character set %s', hook=calc_gconv_deps, extra_depends='eglibc-gconv') | ||
225 | |||
226 | def calc_charmap_deps(fn, pkg, file_regex, output_pattern, group): | ||
227 | deps = [] | ||
228 | f = open(fn, "r") | ||
229 | c_re = re.compile('^copy "(.*)"') | ||
230 | i_re = re.compile('^include "(\w+)".*') | ||
231 | for l in f.readlines(): | ||
232 | m = c_re.match(l) or i_re.match(l) | ||
233 | if m: | ||
234 | dp = legitimize_package_name('eglibc-charmap-%s' % m.group(1)) | ||
235 | if not dp in deps: | ||
236 | deps.append(dp) | ||
237 | f.close() | ||
238 | if deps != []: | ||
239 | bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) | ||
240 | bb.data.setVar('RPROVIDES_%s' % pkg, pkg.replace('eglibc', 'glibc'), d) | ||
241 | |||
242 | do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern='eglibc-charmap-%s', description='character map for %s encoding', hook=calc_charmap_deps, extra_depends='') | ||
243 | |||
244 | def calc_locale_deps(fn, pkg, file_regex, output_pattern, group): | ||
245 | deps = [] | ||
246 | f = open(fn, "r") | ||
247 | c_re = re.compile('^copy "(.*)"') | ||
248 | i_re = re.compile('^include "(\w+)".*') | ||
249 | for l in f.readlines(): | ||
250 | m = c_re.match(l) or i_re.match(l) | ||
251 | if m: | ||
252 | dp = legitimize_package_name('eglibc-localedata-%s' % m.group(1)) | ||
253 | if not dp in deps: | ||
254 | deps.append(dp) | ||
255 | f.close() | ||
256 | if deps != []: | ||
257 | bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) | ||
258 | bb.data.setVar('RPROVIDES_%s' % pkg, pkg.replace('eglibc', 'glibc'), d) | ||
259 | |||
260 | do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='eglibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='') | ||
261 | bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' eglibc-gconv', d) | ||
262 | |||
263 | supported = bb.data.getVar('GLIBC_GENERATE_LOCALES', d, 1) | ||
264 | if not supported or supported == "all": | ||
265 | f = open(base_path_join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r") | ||
266 | supported = f.readlines() | ||
267 | f.close() | ||
268 | else: | ||
269 | supported = supported.split() | ||
270 | supported = map(lambda s:s.replace(".", " ") + "\n", supported) | ||
271 | |||
272 | dot_re = re.compile("(.*)\.(.*)") | ||
273 | |||
274 | # Collate the locales by base and encoding | ||
275 | encodings = {} | ||
276 | for l in supported: | ||
277 | l = l[:-1] | ||
278 | (locale, charset) = l.split(" ") | ||
279 | m = dot_re.match(locale) | ||
280 | if m: | ||
281 | locale = m.group(1) | ||
282 | if not encodings.has_key(locale): | ||
283 | encodings[locale] = [] | ||
284 | encodings[locale].append(charset) | ||
285 | |||
286 | def output_locale_source(name, locale, encoding): | ||
287 | pkgname = 'locale-base-' + legitimize_package_name(name) | ||
288 | |||
289 | bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef eglibc-localedata-%s eglibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d) | ||
290 | rprovides = 'virtual-locale-%s' % legitimize_package_name(name) | ||
291 | m = re.match("(.*)_(.*)", name) | ||
292 | if m: | ||
293 | rprovides += ' virtual-locale-%s' % m.group(1) | ||
294 | bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) | ||
295 | bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) | ||
296 | bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) | ||
297 | bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) % (locale, encoding, locale), d) | ||
298 | bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % (locale, encoding, locale), d) | ||
299 | |||
300 | def output_locale_binary(name, locale, encoding): | ||
301 | qemu = qemu_target_binary(d) + " -s 1048576" | ||
302 | kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1) | ||
303 | if kernel_ver: | ||
304 | qemu += " -r %s" % (kernel_ver) | ||
305 | pkgname = 'locale-base-' + legitimize_package_name(name) | ||
306 | m = re.match("(.*)\.(.*)", name) | ||
307 | if m: | ||
308 | eglibc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-","")) | ||
309 | else: | ||
310 | eglibc_name = name | ||
311 | bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('eglibc-binary-localedata-%s' % eglibc_name), d) | ||
312 | bb.data.setVar('RPROVIDES_%s' % pkgname, 'glibc-binary-localedata-%s' % eglibc_name, d) | ||
313 | rprovides = 'virtual-locale-%s' % legitimize_package_name(name) | ||
314 | m = re.match("(.*)_(.*)", name) | ||
315 | if m: | ||
316 | rprovides += ' virtual-locale-%s' % m.group(1) | ||
317 | bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) | ||
318 | bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) | ||
319 | bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) | ||
320 | |||
321 | treedir = base_path_join(bb.data.getVar("WORKDIR", d, 1), "locale-tree") | ||
322 | ldlibdir = "%s/lib" % treedir | ||
323 | path = bb.data.getVar("PATH", d, 1) | ||
324 | i18npath = base_path_join(treedir, datadir, "i18n") | ||
325 | |||
326 | localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, name) | ||
327 | cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s -E LD_LIBRARY_PATH=%s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, ldlibdir, treedir, localedef_opts) | ||
328 | bb.note("generating locale %s (%s)" % (locale, encoding)) | ||
329 | if os.system(cmd): | ||
330 | raise bb.build.FuncFailed("localedef returned an error (command was %s)." % cmd) | ||
331 | |||
332 | def output_locale(name, locale, encoding): | ||
333 | use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1) | ||
334 | if use_bin: | ||
335 | output_locale_binary(name, locale, encoding) | ||
336 | else: | ||
337 | output_locale_source(name, locale, encoding) | ||
338 | |||
339 | use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1) | ||
340 | if use_bin: | ||
341 | bb.note("preparing tree for binary locale generation") | ||
342 | bb.build.exec_func("do_prep_locale_tree", d) | ||
343 | |||
344 | # Reshuffle names so that UTF-8 is preferred over other encodings | ||
345 | non_utf8 = [] | ||
346 | for l in encodings.keys(): | ||
347 | if len(encodings[l]) == 1: | ||
348 | output_locale(l, l, encodings[l][0]) | ||
349 | if encodings[l][0] != "UTF-8": | ||
350 | non_utf8.append(l) | ||
351 | else: | ||
352 | if "UTF-8" in encodings[l]: | ||
353 | output_locale(l, l, "UTF-8") | ||
354 | encodings[l].remove("UTF-8") | ||
355 | else: | ||
356 | non_utf8.append(l) | ||
357 | for e in encodings[l]: | ||
358 | output_locale('%s.%s' % (l, e), l, e) | ||
359 | |||
360 | if non_utf8 != []: | ||
361 | bb.note("the following locales are supported only in legacy encodings:") | ||
362 | bb.note(" " + " ".join(non_utf8)) | ||
363 | |||
364 | use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1) | ||
365 | if use_bin: | ||
366 | bb.note("collecting binary locales from locale tree") | ||
367 | bb.build.exec_func("do_collect_bins_from_locale_tree", d) | ||
368 | do_split_packages(d, binary_locales_dir, file_regex='(.*)', output_pattern='eglibc-binary-localedata-%s', description='binary locale definition for %s', extra_depends='', allow_dirs=True) | ||
369 | else: | ||
370 | bb.note("generation of binary locales disabled. this may break i18n!") | ||
371 | |||
372 | } | ||
373 | |||
374 | # We want to do this indirection so that we can safely 'return' | ||
375 | # from the called function even though we're prepending | ||
376 | python populate_packages_prepend () { | ||
377 | if bb.data.getVar('DEBIAN_NAMES', d, 1): | ||
378 | bb.data.setVar('PKG_eglibc', 'libc6', d) | ||
379 | bb.data.setVar('PKG_eglibc-dev', 'libc6-dev', d) | ||
380 | bb.build.exec_func('package_do_split_gconvs', d) | ||
381 | } | ||
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 @@ | |||
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 eglibc one if our build | ||
4 | # is a uclibc build. | ||
5 | # | ||
6 | # See the note in gcc/gcc_3.4.0.oe | ||
7 | # | ||
8 | |||
9 | python __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 | # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION | ||
18 | # is set. The idea is to avoid running localedef on the target (at first boot) | ||
19 | # to decrease initial boot time and avoid localedef being killed by the OOM | ||
20 | # killer which used to effectively break i18n on machines with < 128MB RAM. | ||
21 | |||
22 | # default to disabled until qemu works for everyone | ||
23 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" | ||
24 | |||
25 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions | ||
26 | BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips" | ||
27 | |||
28 | # Set this to zero if you don't want ldconfig in the output package | ||
29 | USE_LDCONFIG ?= "1" | ||
30 | |||
31 | 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" | ||
32 | |||
33 | PACKAGES_DYNAMIC = " \ | ||
34 | glibc-gconv-* glibc-charmap-* glibc-localedata-* glibc-binary-localedata-* \ | ||
35 | eglibc-gconv-* eglibc-charmap-* eglibc-localedata-* eglibc-binary-localedata-* \ | ||
36 | locale-base-*" | ||
37 | |||
38 | RPROVIDES_eglibc = "glibc" | ||
39 | RPROVIDES_eglibc-utils = "glibc-utils" | ||
40 | RPROVIDES_eglibc-pic = "glibc-pic" | ||
41 | RPROVIDES_eglibc-dev = "glibc-dev" | ||
42 | RPROVIDES_eglibc-doc = "glibc-doc" | ||
43 | RPROVIDES_eglibc-locale = "glibc-locale" | ||
44 | RPROVIDES_eglibc-extra-nss = "glibc-extra-nss" | ||
45 | RPROVIDES_eglibc-thread-db = "glibc-thread-db" | ||
46 | RPROVIDES_eglibc-pcprofile = "glibc-pcprofile" | ||
47 | RPROVIDES_eglibc-dbg = "glibc-dbg" | ||
48 | 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" | ||
49 | |||
50 | FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig', '', d)}" | ||
51 | FILES_ldd = "${bindir}/ldd" | ||
52 | FILES_libsegfault = "${base_libdir}/libSegFault*" | ||
53 | FILES_libcidn = "${base_libdir}/libcidn*.so" | ||
54 | FILES_libmemusage = "${base_libdir}/libmemusage.so" | ||
55 | FILES_eglibc-extra-nss = "${base_libdir}/libnss*" | ||
56 | FILES_sln = "/sbin/sln" | ||
57 | FILES_eglibc-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/" | ||
58 | FILES_eglibc-dev_append += "${bindir}/rpcgen ${libdir}/*.a \ | ||
59 | ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal" | ||
60 | FILES_nscd = "${sbindir}/nscd*" | ||
61 | FILES_eglibc-utils = "${bindir}/* ${sbindir}/*" | ||
62 | FILES_eglibc-gconv = "${libdir}/gconv/*" | ||
63 | FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/gconv/.debug" | ||
64 | FILES_catchsegv = "${bindir}/catchsegv" | ||
65 | RDEPENDS_catchsegv = "libsegfault" | ||
66 | FILES_eglibc-pcprofile = "${base_libdir}/libpcprofile.so" | ||
67 | FILES_eglibc-thread-db = "${base_libdir}/libthread_db*" | ||
68 | FILES_localedef = "${bindir}/localedef" | ||
69 | RPROVIDES_eglibc-dev += "libc-dev" | ||
70 | |||
71 | DESCRIPTION_sln = "eglibc: create symbolic links between files" | ||
72 | DESCRIPTION_nscd = "eglibc: name service cache daemon for passwd, group, and hosts" | ||
73 | DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services" | ||
74 | DESCRIPTION_ldd = "eglibc: print shared library dependencies" | ||
75 | DESCRIPTION_localedef = "eglibc: compile locale definition files" | ||
76 | DESCRIPTION_eglibc-utils = "eglibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." | ||
77 | |||
78 | python __anonymous () { | ||
79 | enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1) | ||
80 | |||
81 | if enabled and int(enabled): | ||
82 | import re | ||
83 | |||
84 | target_arch = bb.data.getVar("TARGET_ARCH", d, 1) | ||
85 | binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or "" | ||
86 | |||
87 | for regexp in binary_arches.split(" "): | ||
88 | r = re.compile(regexp) | ||
89 | |||
90 | if r.match(target_arch): | ||
91 | depends = bb.data.getVar("DEPENDS", d, 1) | ||
92 | depends = "%s qemu-native" % depends | ||
93 | bb.data.setVar("DEPENDS", depends, d) | ||
94 | bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile", d) | ||
95 | break | ||
96 | } | ||
97 | |||
98 | inherit libc-package | ||
99 | |||
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc index 66bb90e83f..52a93d3336 100644 --- a/meta/recipes-core/eglibc/eglibc.inc +++ b/meta/recipes-core/eglibc/eglibc.inc | |||
@@ -22,3 +22,5 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
22 | ARM_INSTRUCTION_SET = "arm" | 22 | ARM_INSTRUCTION_SET = "arm" |
23 | 23 | ||
24 | PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" | 24 | PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" |
25 | |||
26 | |||
diff --git a/meta/recipes-core/eglibc/eglibc_2.12.bb b/meta/recipes-core/eglibc/eglibc_2.12.bb index a214980707..f1b84967b4 100644 --- a/meta/recipes-core/eglibc/eglibc_2.12.bb +++ b/meta/recipes-core/eglibc/eglibc_2.12.bb | |||
@@ -2,7 +2,7 @@ require eglibc.inc | |||
2 | 2 | ||
3 | DEPENDS += "gperf-native" | 3 | DEPENDS += "gperf-native" |
4 | FILESPATHPKG =. "eglibc-svn:" | 4 | FILESPATHPKG =. "eglibc-svn:" |
5 | PR = "r0" | 5 | PR = "r2" |
6 | SRCREV="10809" | 6 | SRCREV="10809" |
7 | EGLIBC_BRANCH="eglibc-2_12" | 7 | EGLIBC_BRANCH="eglibc-2_12" |
8 | SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \ | 8 | SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \ |
@@ -50,7 +50,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ | |||
50 | --without-selinux \ | 50 | --without-selinux \ |
51 | ${GLIBC_EXTRA_OECONF}" | 51 | ${GLIBC_EXTRA_OECONF}" |
52 | 52 | ||
53 | EXTRA_OECONF += "${@get_eglibc_fpu_setting(bb, d)}" | 53 | EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" |
54 | 54 | ||
55 | do_unpack_append() { | 55 | do_unpack_append() { |
56 | bb.build.exec_func('do_move_ports', d) | 56 | bb.build.exec_func('do_move_ports', d) |
@@ -94,4 +94,4 @@ do_compile () { | |||
94 | ) | 94 | ) |
95 | } | 95 | } |
96 | 96 | ||
97 | require eglibc-package.bbclass | 97 | require eglibc-package.inc |
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index 858bc522b5..5c683bbe7d 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc | |||
@@ -24,42 +24,54 @@ python __anonymous () { | |||
24 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" | 24 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" |
25 | 25 | ||
26 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions | 26 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions |
27 | BINARY_LOCALE_ARCHES ?= "arm.*" | 27 | BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips" |
28 | |||
29 | PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" | ||
30 | PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* locale-base-* glibc-binary-localedata-*" | ||
31 | |||
32 | 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* ${base_libdir}/libnss_compat* ${base_libdir}/libnss_dns* ${base_libdir}/libdl* ${base_libdir}/libanl* ${base_libdir}/libBrokenLocale*" | ||
33 | |||
34 | # The problem is that if PN = "glibc", FILES_${PN} will overwrite FILES_glibc | ||
35 | # Solution: Make them both the same thing, then it doesn't matter | ||
36 | |||
37 | glibcfiles = "${sysconfdir} ${libc_baselibs} ${base_sbindir}/ldconfig ${libexecdir}/* ${datadir}/zoneinfo" | ||
38 | glibcdbgfiles = "${bindir}/.debug ${sbindir}/.debug ${libdir}/.debug \ | ||
39 | ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug \ | ||
40 | ${libdir}/gconv/.debug ${libexecdir}/*/.debug" | ||
41 | glibcdevfiles = "${bindir}/rpcgen ${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \ | ||
42 | ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig \ | ||
43 | ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal" | ||
44 | |||
45 | FILES_glibc = "${glibcfiles}" | ||
46 | FILES_${PN} = "${glibcfiles}" | ||
47 | FILES_ldd = "${bindir}/ldd" | ||
48 | FILES_libsegfault = "${base_libdir}/libSegFault*" | ||
49 | FILES_glibc-extra-nss = "${base_libdir}/libnss*" | ||
50 | FILES_sln = "${base_sbindir}/sln" | ||
51 | FILES_glibc-dev = "${glibcdevfiles}" | ||
52 | FILES_${PN}-dev = "${glibcdevfiles}" | ||
53 | FILES_glibc-dbg = "${glibcdbgfiles}" | ||
54 | FILES_${PN}-dbg = "${glibcdbgfiles}" | ||
55 | FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/nscd* ${sysconfdir}/init.d/nscd*" | ||
56 | FILES_glibc-utils = "${bindir}/* ${sbindir}/*" | ||
57 | FILES_glibc-gconv = "${libdir}/gconv/*" | ||
58 | FILES_catchsegv = "${bindir}/catchsegv" | ||
59 | RDEPENDS_catchsegv = "libsegfault" | ||
60 | FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so" | ||
61 | FILES_glibc-thread-db = "${base_libdir}/libthread_db*" | ||
62 | FILES_localedef = "${bindir}/localedef" | ||
63 | RPROVIDES_glibc-dev += "libc-dev" | ||
64 | |||
65 | DESCRIPTION_sln = "glibc: create symbolic links between files" | ||
66 | DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts" | ||
67 | DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services" | ||
68 | DESCRIPTION_ldd = "glibc: print shared library dependencies" | ||
69 | DESCRIPTION_localedef = "glibc: compile locale definition files" | ||
70 | DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." | ||
28 | 71 | ||
29 | 72 | ||
30 | inherit glibc-package | ||
31 | |||
32 | def get_glibc_fpu_setting(bb, d): | ||
33 | if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: | ||
34 | return "--without-fp" | ||
35 | return "" | ||
36 | |||
37 | EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}" | ||
38 | EXTRA_OEMAKE += "rootsbindir=${base_sbindir}" | 73 | EXTRA_OEMAKE += "rootsbindir=${base_sbindir}" |
39 | 74 | ||
40 | OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}" | ||
41 | |||
42 | do_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}{sysconfdir}/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 | |||
63 | python __anonymous () { | 75 | python __anonymous () { |
64 | enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1) | 76 | enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1) |
65 | 77 | ||
@@ -80,5 +92,4 @@ python __anonymous () { | |||
80 | break | 92 | break |
81 | } | 93 | } |
82 | 94 | ||
83 | 95 | inherit libc-package | |
84 | |||
diff --git a/meta/recipes-core/glibc/glibc_2.10.1.bb b/meta/recipes-core/glibc/glibc_2.10.1.bb index 2a118a4af6..a82a870256 100644 --- a/meta/recipes-core/glibc/glibc_2.10.1.bb +++ b/meta/recipes-core/glibc/glibc_2.10.1.bb | |||
@@ -5,7 +5,7 @@ ARM_INSTRUCTION_SET = "arm" | |||
5 | PACKAGES_DYNAMIC = "libc6*" | 5 | PACKAGES_DYNAMIC = "libc6*" |
6 | RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev" | 6 | RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev" |
7 | 7 | ||
8 | PR = "r0" | 8 | PR = "r2" |
9 | 9 | ||
10 | # the -isystem in bitbake.conf screws up glibc do_stage | 10 | # the -isystem in bitbake.conf screws up glibc do_stage |
11 | BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" | 11 | BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" |
@@ -85,7 +85,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ | |||
85 | --without-selinux \ | 85 | --without-selinux \ |
86 | ${GLIBC_EXTRA_OECONF}" | 86 | ${GLIBC_EXTRA_OECONF}" |
87 | 87 | ||
88 | EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}" | 88 | EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" |
89 | 89 | ||
90 | do_munge() { | 90 | do_munge() { |
91 | # Integrate ports and libidn into tree | 91 | # Integrate ports and libidn into tree |