As we now support the glibc's internal iconv, we also should install more
converter libraries on demand.
BTW: Installing the chinese language modules is currently broken: One can
select the menu entry, but there is no install code in the rule file. Adding
some of these modules is also part of this patch. But I'm not sure, if these
three modules are the right ones (for example I didn't find a GB2312 as it
is stated in the menu entry help text).
UTF conversion tested on a i586 target.
Signed-off-by: Juergen Beisert j...@pengutronix.de
Index: glibc.make
===
--- glibc.make
+++ glibc.make
@@ -145,13 +145,29 @@
@$(call install_copy_toolchain_lib, glibc, libnsl.so)
endif
-ifdef PTXCONF_GLIBC_GCONV_DEF
+ifdef PTXCONF_GLIBC_GCONF_BASE
@$(call install_copy, glibc, 0, 0, 0755, /usr/lib/gconv)
@$(call install_copy_toolchain_lib, glibc, gconv/gconv-modules,
/usr/lib/gconv, n)
+endif
+
+ifdef PTXCONF_GLIBC_GCONV_DEF
@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-1.so,
/usr/lib/gconv)
@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-15.so,
/usr/lib/gconv)
endif
+ifdef PTXCONF_GLIBC_GCONV_UTF
+ @$(call install_copy_toolchain_lib, glibc, gconv/UNICODE.so,
/usr/lib/gconv)
+ @$(call install_copy_toolchain_lib, glibc, gconv/UTF-16.so,
/usr/lib/gconv)
+ @$(call install_copy_toolchain_lib, glibc, gconv/UTF-32.so,
/usr/lib/gconv)
+ @$(call install_copy_toolchain_lib, glibc, gconv/UTF-7.so,
/usr/lib/gconv)
+endif
+
+ifdef PTXCONF_GLIBC_GCONV_ZH
+ @$(call install_copy_toolchain_lib, glibc, gconv/BIG5.so,
/usr/lib/gconv)
+ @$(call install_copy_toolchain_lib, glibc, gconv/BIG5HKSCS.so,
/usr/lib/gconv)
+ @$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so,
/usr/lib/gconv)
+endif
+
ifdef PTXCONF_GLIBC_I18N_BIN_LOCALE
@$(call install_copy_toolchain_usr, glibc, bin/locale)
endif
Index: glibc.in
===
--- glibc.in
+++ glibc.in
@@ -189,18 +189,30 @@
menu Install gconv libraries
+config GLIBC_GCONF_BASE
+ bool
+
config GLIBC_GCONV_DEF
bool
prompt default gconv modules
+ select GLIBC_GCONF_BASE
default y
help
install the iso8859-1 (Latin Alphabet No.1) and the iso8859-15 (Latin
Alphabet No.9) encoding modules into gconv, this should be ok for most
western languages
+config GLIBC_GCONV_UTF
+ bool
+ prompt gconv modules for UTF
+ select GLIBC_GCONF_BASE
+ help
+ install the gconv modules for UTF conversion
+
config GLIBC_GCONV_ZH
bool
prompt gconv modules for chinese language
+ select GLIBC_GCONF_BASE
help
install the gconv modules for chinese language, including BIG5, GB2312
and GB18030
BTW: There is a tool called iconvconfig. It creates a binary file from
the gconv-modules text file with this simple command line:
/path/to/iconvconfig --nostdlib \
--output=$(ROOTDIR)/usr/lib/gconv/gconv-modules.cache \
--prefix=$(ROOTDIR) \
/usr/lib/gconv
If the /usr/lib/gconv/gconv-modules.cache exists at runtime, glibc will use
it instead of the larger gconv-modules.
-rw-r--r-- 1 jb users 55992 Jun 19 21:12 gconv-modules
-rw-r--r-- 1 jb users 26040 Jun 20 09:46 gconv-modules.cache
The existing host tool works for ARM (little endian) also, but untested on
Powerpc.
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
--
ptxdist mailing list
ptxdist@pengutronix.de