]> code.ossystems Code Review - openembedded-core.git/commit
icu: fix libicudata corruption on big endian system
authorYi Zhao <yi.zhao@windriver.com>
Tue, 5 Dec 2017 01:17:04 +0000 (09:17 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Dec 2017 18:00:23 +0000 (18:00 +0000)
commit77d1b9cda69d09cd7d3c8174ef14b4ee10e5efb6
tree11c36213214750ea7a6052180f114c1c3ca07ac7
parent302bab86d65831d7b03325e7002a992eb266318e
icu: fix libicudata corruption on big endian system

ICU library libicudata is created with a wrong endianness if the host
and target have different endianness. (e.g. build ICU for qemuppc on
x86-64 host)
See upstream bug report: http://bugs.icu-project.org/trac/ticket/11758

The discussion in oe-core mailing list:
https://www.mail-archive.com/openembedded-core@lists.openembedded.org/msg65155.html

The root cause is the native pkgdata can not generate correct icu data
for different endianness. By default, this data is built into the shared
library libicudata that would cause it corrupt. But ICU also provides
additional options for loading the data. With option
--with-data-packaging=archive, ICU outputs a single icudt.dat file which
can be loaded by the library.
See document: http://userguide.icu-project.org/icudata

So for big endian system, we can use the separated data file which
re-generates by icupkg and set the correct ICU_DATA environment variable
to make sure the library can load the data without problems.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-support/icu/icu.inc