[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] Add OPTION_EGLIBC_CHARSETS option group



I've committed the following, which allows you to configure out the
loadable modules implementing most of the gconv/iconv character set
conversions.  With that configured out, you're left with ASCII and
various ISO-10646 encodings; details are in option-groups.def.

ChangeLog.eglibc:
2007-06-11  Jim Blandy  <jimb@xxxxxxxxxxxxxxxx>

	Add the OPTION_EGLIBC_CHARSETS option group.

	* option-groups.def (OPTION_EGLIBC_CHARSETS): New entry.
	* option-groups.defaults (OPTION_EGLIBC_CHARSETS): Initialize.
	* Makerules (modules): Add in value of modules-y.
	* iconvdata/Makefile: Include ../option-groups.mak.
	(modules): Move all these into the option group.
	(modules.so): Compute from modules-y.
	(extra-modules-left): Apply extra-module.mk only to modules-y.
	(install-others-y): Move gconv-modules into the option group.
	(iconv-rules): Generate rules based on modules-y.

Index: option-groups.def
===================================================================
--- option-groups.def	(revision 2476)
+++ option-groups.def	(revision 2477)
@@ -43,6 +43,70 @@
        This option group includes functions for accessing message
        catalogs: catopen, catclose, and catgets.
 
+config OPTION_EGLIBC_CHARSETS
+   bool "iconv/gconv character set conversion libraries"
+   help
+
+       This option group includes support for character sets other
+       than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
+       various encodings.  This affects both the character sets
+       supported by the wide and multibyte character functions, and
+       those supported by the 'iconv' functions.
+
+       With this option group disabled, EGLIBC supports only the
+       following character sets:
+
+          ANSI_X3.4         - ASCII
+          ANSI_X3.4-1968
+          ANSI_X3.4-1986
+          ASCII
+          CP367
+          CSASCII
+          IBM367
+          ISO-IR-6
+          ISO646-US
+          ISO_646.IRV:1991
+          OSF00010020
+          US
+          US-ASCII
+
+          10646-1:1993      - ISO 10646, in big-endian UCS4 form
+          10646-1:1993/UCS4
+          CSUCS4
+          ISO-10646
+          ISO-10646/UCS4
+          OSF00010104
+          OSF00010105
+          OSF00010106
+          UCS-4
+          UCS-4BE
+          UCS4
+
+          UCS-4LE           - ISO 10646, in little-endian UCS4 form
+
+          ISO-10646/UTF-8   - ISO 10646, in UTF-8 form
+          ISO-10646/UTF8
+          ISO-IR-193
+          OSF05010001
+          UTF-8
+          UTF8
+
+          ISO-10646/UCS2    - ISO 10646, in target-endian UCS2 form
+          OSF00010100
+          OSF00010101
+          OSF00010102
+          UCS-2
+          UCS2
+
+          UCS-2BE           - ISO 10646, in big-endian UCS2 form
+          UNICODEBIG
+
+          UCS-2LE           - ISO 10646, in little-endian UCS2 form
+          UNICODELITTLE
+
+          WCHAR_T           - EGLIBC's internal form (target-endian,
+                              32-bit ISO 10646)
+         
 config OPTION_EGLIBC_LOCALES
    bool "Locale definitions"
    help
Index: option-groups.defaults
===================================================================
--- option-groups.defaults	(revision 2476)
+++ option-groups.defaults	(revision 2477)
@@ -9,6 +9,7 @@
 #
 # By default, all option groups are enabled.
 OPTION_EGLIBC_CATGETS = y
+OPTION_EGLIBC_CHARSETS = y
 OPTION_EGLIBC_LOCALES = y
 OPTION_EGLIBC_LOCALE_CODE = y
 OPTION_EGLIBC_LIBM = y
Index: Makerules
===================================================================
--- Makerules	(revision 2476)
+++ Makerules	(revision 2477)
@@ -406,19 +406,20 @@
 endif
 
 # Include targets in the selected option groups.
-aux		     += $(aux-y)
-extra-libs	     += $(extra-libs-y)
+aux                  += $(aux-y)
+extra-libs           += $(extra-libs-y)
 extra-libs-others    += $(extra-libs-others-y)
-extra-objs	     += $(extra-objs-y)
-install-bin	     += $(install-bin-y)
-install-others	     += $(install-others-y)
-install-sbin	     += $(install-sbin-y)
-others		     += $(others-y)
-routines	     += $(routines-y)
+extra-objs           += $(extra-objs-y)
+install-bin          += $(install-bin-y)
+install-others       += $(install-others-y)
+install-sbin         += $(install-sbin-y)
+modules              += $(modules-y)
+others               += $(others-y)
+routines             += $(routines-y)
 static-only-routines += $(static-only-routines-y)
-test-srcs	     += $(test-srcs-y)
-tests		     += $(tests-y)
-xtests		     += $(xtests-y)
+test-srcs            += $(test-srcs-y)
+tests                += $(tests-y)
+xtests               += $(xtests-y)
 
 
 # Modify the list of routines we build for different targets
Index: iconvdata/Makefile
===================================================================
--- iconvdata/Makefile	(revision 2476)
+++ iconvdata/Makefile	(revision 2477)
@@ -19,10 +19,13 @@
 #
 #	Makefile for iconv data and code.
 #
+include ../option-groups.mak
+
 subdir	:= iconvdata
 
 # Names of all the shared objects which implement the transformations.
-modules	:= ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5		 \
+modules-$(OPTION_EGLIBC_CHARSETS)					 \
+	:= ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5		 \
 	   ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10		 \
 	   ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16	 \
 	   T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 EBCDIC-AT-DE		 \
@@ -60,7 +63,7 @@
 	   IBM5347 IBM9030 IBM9066 IBM9448 IBM12712 IBM16804             \
 	   IBM1364 IBM1371 IBM1388 IBM1390 IBM1399 ISO_11548-1 MIK BRF
 
-modules.so := $(addsuffix .so, $(modules))
+modules.so := $(addsuffix .so, $(modules-y))
 
 include ../Makeconfig
 
@@ -205,13 +208,13 @@
 # Rule to generate the shared objects.
 charmaps = ../localedata/charmaps
 -include $(objpfx)iconv-rules
-extra-modules-left := $(modules)
+extra-modules-left := $(modules-y)
 include extra-module.mk
 
 
 extra-objs	+= $(modules.so)
-install-others	= $(addprefix $(inst_gconvdir)/, $(modules.so))	\
-		  $(inst_gconvdir)/gconv-modules
+install-others-y += $(addprefix $(inst_gconvdir)/, $(modules.so))
+install-others-$(OPTION_EGLIBC_CHARSETS) += $(inst_gconvdir)/gconv-modules
 
 # We can build the conversion tables for numerous charsets automatically.
 
@@ -275,7 +278,7 @@
 ifndef avoid-generated
 $(objpfx)iconv-rules: Makefile
 	$(make-target-directory)
-	{ echo $(filter-out lib%, $(modules)); \
+	{ echo $(filter-out lib%, $(modules-y)); \
 	  echo 8bit $(gen-8bit-modules); \
 	  echo 8bit-gap $(gen-8bit-gap-modules); } | \
 	$(AWK) 'NR == 1 { \