Skip to content

package/icu: fix size requirements

Andreas Ziegler buildroot 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v13 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3DEVELOPERS: add Andreas Ziegler for icuDEVELOPERS+1 -00 replies
2/3package/icu: rebase patches and add upstream tagspackage/icu/0001-dont-build-static-dynamic-twice.patch package/icu/0002-link-icudata-as-data-only.patch+23 -180 replies
3/3package/icu: Fix /enhance customizing for sizeConfig.in.legacy package/icu/Config.in package/icu/icu.mk+93 -220 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Buildroot] [PATCH v2 0/3] package/icu: fix size requirements

[ Changes v1 -> v2: rebased (Config.in.legacy changed) ]

TL;DR

Simply adding Unicode capability to a Buildroot project grows the root file system by a stunning 37.6 MiB (more than doubling the root fs size!).

The ICU source ships with a prebuilt data set, containing comprehensive resources for multiple languages, locales and features. This dataset can be tailored to include only those resources necessary on the target system.

Prior to ICU version 58, this was done using an online tool; this website is no longer available (https://unicode-org.atlassian.net/browse/ICU-12977)
(2018-06-28)

Data customization now is built into the code, needs additional sources (downloadable) and a configuration file (user supplied).

Applications in need of Unicode character representation usually link against i18n and uc libraries. These libraries depend on themselves and on the data library:

$ host/bin/aarch64-buildroot-linux-musl-readelf --dynamic \
	target/usr/lib/libicudata.so.78.2 | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]
$ host/bin/aarch64-buildroot-linux-musl-readelf --dynamic \
	target/usr/lib/libicuuc.so.78.2 | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libicudata.so.78]
 0x0000000000000001 (NEEDED)             Shared library: [libatomic.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]
$ host/bin/aarch64-buildroot-linux-musl-readelf --dynamic \
	target/usr/lib/libicui18n.so.78.2 | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libicuuc.so.78]
 0x0000000000000001 (NEEDED)             Shared library: [libicudata.so.78]
 0x0000000000000001 (NEEDED)             Shared library: [libatomic.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]

The command line tools are necessary for building the data library, but not used on the target. The extra libraries are normally not needed on the target system.

After optimization, adding Unicode now grows the file system by 8.2 MiB. Not nice, but tolerable :-)

Andreas Ziegler (3):
DEVELOPERS: add Andreas Ziegler for icu package/icu: rebase patches and add upstream tags package/icu: Fix /enhance customizing for size

 Config.in.legacy                              | 14 +++++
 DEVELOPERS                                    |  1 +
 ...0001-dont-build-static-dynamic-twice.patch | 14 +++--
 .../icu/0002-link-icudata-as-data-only.patch  | 27 +++++-----
 package/icu/Config.in                         | 47 +++++++++++++---
 package/icu/icu.mk                            | 54 +++++++++++++------
 6 files changed, 117 insertions(+), 40 deletions(-)
Signature · 6 lines
2.53.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot