All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] eglibc: enable eglibc configurability V2
@ 2011-06-03  6:47 ` Kang Kai
  0 siblings, 0 replies; 17+ messages in thread
From: Kang Kai @ 2011-06-03  6:47 UTC (permalink / raw)
  To: sgw; +Cc: Kang, poky, openembedded-core

From: Kang Kai <kai.kang@windriver.com>

Hi Saul,

I update the patch that move "DISTRO_FEATURES_EGLIBC ??=" to eglibc.inc

Migrate configurability from oe, try to shrink minimal image size

The switch is in local.conf.sample, uncomment the line
DISTRO_FEATURES_EGLIBC = ""
and write what options you want to enable.

If want to disable locale-code charsets or locales, you have to uncomment
PACKAGE_NO_GCONV = 1
Because without this, it fails on package_do_split_gconvs in libc-package.bbclass

The following changes since commit 484c4e73245c93a08413cd204513bf5c5698b994:

  clutter-1.6: Add patch to update gettext macro version (2011-06-01 18:34:37 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib.git kangkai/distro
  http://git.pokylinux.org/cgit.cgi//log/?h=kangkai/distro

Kang Kai (1):
  eglibc: migrate configurability from oe

 meta-yocto/conf/local.conf.sample                  |    9 +++
 .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 +++++++
 meta/recipes-core/eglibc/eglibc-options.inc        |   55 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc                |   13 +++++
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 5 files changed, 100 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc

-- 
1.7.5.1.300.gc565c




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 0/1] eglibc: enable eglibc configurability V2
@ 2011-06-03  6:47 ` Kang Kai
  0 siblings, 0 replies; 17+ messages in thread
From: Kang Kai @ 2011-06-03  6:47 UTC (permalink / raw)
  To: sgw; +Cc: poky, openembedded-core

From: Kang Kai <kai.kang@windriver.com>

Hi Saul,

I update the patch that move "DISTRO_FEATURES_EGLIBC ??=" to eglibc.inc

Migrate configurability from oe, try to shrink minimal image size

The switch is in local.conf.sample, uncomment the line
DISTRO_FEATURES_EGLIBC = ""
and write what options you want to enable.

If want to disable locale-code charsets or locales, you have to uncomment
PACKAGE_NO_GCONV = 1
Because without this, it fails on package_do_split_gconvs in libc-package.bbclass

The following changes since commit 484c4e73245c93a08413cd204513bf5c5698b994:

  clutter-1.6: Add patch to update gettext macro version (2011-06-01 18:34:37 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib.git kangkai/distro
  http://git.pokylinux.org/cgit.cgi//log/?h=kangkai/distro

Kang Kai (1):
  eglibc: migrate configurability from oe

 meta-yocto/conf/local.conf.sample                  |    9 +++
 .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 +++++++
 meta/recipes-core/eglibc/eglibc-options.inc        |   55 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc                |   13 +++++
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 5 files changed, 100 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc

-- 
1.7.5.1.300.gc565c



^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/1] eglibc: migrate configurability from oe
  2011-06-03  6:47 ` Kang Kai
@ 2011-06-03  6:47   ` Kang Kai
  -1 siblings, 0 replies; 17+ messages in thread
From: Kang Kai @ 2011-06-03  6:47 UTC (permalink / raw)
  To: sgw; +Cc: Kang, poky, openembedded-core

From: Kang Kai <kai.kang@windriver.com>

Migrate configurability from oe, try to shrink minimal image size

The switch is in local.conf.sample, uncomment the line
DISTRO_FEATURES_EGLIBC = ""
and write what options you want to enable.

If want to disable locale-code charsets or locales, you have to uncomment
PACKAGE_NO_GCONV = 1
Because without this, it fails on package_do_split_gconvs in libc-package.bbclass

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta-yocto/conf/local.conf.sample                  |    9 +++
 .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 +++++++
 meta/recipes-core/eglibc/eglibc-options.inc        |   55 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc                |   13 +++++
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 5 files changed, 100 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc

diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
index 359e510..f68e80a 100644
--- a/meta-yocto/conf/local.conf.sample
+++ b/meta-yocto/conf/local.conf.sample
@@ -87,6 +87,15 @@ PACKAGE_CLASSES ?= "package_rpm package_ipk"
 # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
 USER_CLASSES ?= "image-mklibs image-prelink"
 
+# eglibc configurability is used to reduce minimal images's size.
+# PACKAGE_NO_GCONV should be set to 1, or locale-code posix-clang-wchar
+# charsets locales need to be include in DISTRO_FEATURES_EGLIBC, please check
+# package_do_split_gconvs in libc-package.bbclass for detail
+#PACKAGE_NO_GCONV = 1
+
+# if you want to enable any option listed below, please uncomment next line and copy it here
+#DISTRO_FEATURES_EGLIBC = ""
+
 # POKYMODE controls the characteristics of the generated packages/images by
 # telling poky which type of toolchain to use.
 #
diff --git a/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
new file mode 100644
index 0000000..dffc648
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
@@ -0,0 +1,20 @@
+When disable OPTION_EGLIBC_RTLD_DEBUG, compilation fails.
+Created on Jun 1, 2011 by Kang Kai <kai.kang@windriver.com>
+
+Upstream-Status: Submitted
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+Index: libc/elf/dl-lookup.c
+===================================================================
+--- libc/elf/dl-lookup.c	(revision 13356)
++++ libc/elf/dl-lookup.c	(working copy)
+@@ -423,7 +423,9 @@
+ 		     hash table.  */
+ 		  if (__builtin_expect (tab->size, 0))
+ 		    {
++              #if __OPTION_EGLIBC_RTLD_DEBUG
+ 		      assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
++              #endif
+ 		      __rtld_lock_unlock_recursive (tab->lock);
+ 		      goto success;
+ 		    }
diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
new file mode 100644
index 0000000..7cd0287
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-options.inc
@@ -0,0 +1,55 @@
+def eglibc_cfg(feature, features, tokens, cnf):
+	if type(tokens) == type(""):
+		tokens = [tokens]
+	if type(features) == type([]) and feature in features:
+		cnf.extend([token + ' = y' for token in tokens])
+	else:
+		for token in tokens:
+			cnf.extend([token + ' = n'])
+			if token == 'OPTION_EGLIBC_NSSWITCH':
+				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"])
+				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"])
+
+# Map distro features to eglibc options settings
+def features_to_eglibc_settings(d):
+        cnf = ([])
+        distro_features = (bb.data.getVar('DISTRO_FEATURES_EGLIBC', d, True) or '').split()
+        eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
+        eglibc_cfg('backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
+        eglibc_cfg('big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
+        eglibc_cfg('bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
+        eglibc_cfg('cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
+        eglibc_cfg('catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
+        eglibc_cfg('charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
+        eglibc_cfg('crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
+        eglibc_cfg('crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
+        eglibc_cfg('db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
+        eglibc_cfg('envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
+        eglibc_cfg('fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
+        eglibc_cfg('fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
+        eglibc_cfg('fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
+        eglibc_cfg('ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
+        eglibc_cfg('getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
+        eglibc_cfg('idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
+        eglibc_cfg('inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
+        eglibc_cfg('inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
+        eglibc_cfg('libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
+        eglibc_cfg('libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
+        eglibc_cfg('locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
+        eglibc_cfg('locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
+        eglibc_cfg('memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
+        eglibc_cfg('nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
+        eglibc_cfg('nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
+        eglibc_cfg('rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
+        eglibc_cfg('rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
+        eglibc_cfg('spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
+        eglibc_cfg('streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
+        eglibc_cfg('sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
+        eglibc_cfg('utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
+        eglibc_cfg('utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
+        eglibc_cfg('wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
+        eglibc_cfg('posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
+        eglibc_cfg('posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
+        eglibc_cfg('posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
+        eglibc_cfg('posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
+        return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 46ffa82..2d05d53 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -28,6 +28,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
 inherit autotools
+require eglibc-options.inc
 
 LEAD_SONAME = "libc.so"
 
@@ -43,3 +44,15 @@ EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
 PARALLEL_MAKE = ""
 
 PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
+
+DISTRO_FEATURES_EGLIBC ??= "ipv6 backtrace big-macros bsd cxx-tests catgets charsets \
+                          crypt crypt-ufc db-aliases envz fcvt fmtmsg fstab ftraverse \
+                          getlogin idn inet inet-anl libm libm-big locales locale-code \
+                          memusage nis nsswitch rcmd rtld-debug spawn streams sunrpc utmp \
+                          utmpx wordexp posix-clang-wchar posix-regexp posix-regexp-glibc \
+                          posix-wchar-io "
+
+OE_FEATURES = "${@features_to_eglibc_settings(d)}"
+do_configure_prepend() {
+	echo '${OE_FEATURES}' > ${B}/option-groups.config
+}
diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
index 398da69..894eb88 100644
--- a/meta/recipes-core/eglibc/eglibc_2.13.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
@@ -4,7 +4,7 @@ SRCREV = "13356"
 
 DEPENDS += "gperf-native"
 FILESPATHPKG =. "eglibc-svn:"
-PR = "r0"
+PR = "r1"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_13"
@@ -16,7 +16,9 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
            file://stack-protector-test.patch \
            file://etc/ld.so.conf \
            file://generate-supported.mk \
+           file://eglibc-2.13-fix-macro-RTLD_DEBUG.patch \
 	   "
+
 LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
       file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
-- 
1.7.5.1.300.gc565c




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 1/1] eglibc: migrate configurability from oe
@ 2011-06-03  6:47   ` Kang Kai
  0 siblings, 0 replies; 17+ messages in thread
From: Kang Kai @ 2011-06-03  6:47 UTC (permalink / raw)
  To: sgw; +Cc: poky, openembedded-core

From: Kang Kai <kai.kang@windriver.com>

Migrate configurability from oe, try to shrink minimal image size

The switch is in local.conf.sample, uncomment the line
DISTRO_FEATURES_EGLIBC = ""
and write what options you want to enable.

If want to disable locale-code charsets or locales, you have to uncomment
PACKAGE_NO_GCONV = 1
Because without this, it fails on package_do_split_gconvs in libc-package.bbclass

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta-yocto/conf/local.conf.sample                  |    9 +++
 .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 +++++++
 meta/recipes-core/eglibc/eglibc-options.inc        |   55 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc                |   13 +++++
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 5 files changed, 100 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc

diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
index 359e510..f68e80a 100644
--- a/meta-yocto/conf/local.conf.sample
+++ b/meta-yocto/conf/local.conf.sample
@@ -87,6 +87,15 @@ PACKAGE_CLASSES ?= "package_rpm package_ipk"
 # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
 USER_CLASSES ?= "image-mklibs image-prelink"
 
+# eglibc configurability is used to reduce minimal images's size.
+# PACKAGE_NO_GCONV should be set to 1, or locale-code posix-clang-wchar
+# charsets locales need to be include in DISTRO_FEATURES_EGLIBC, please check
+# package_do_split_gconvs in libc-package.bbclass for detail
+#PACKAGE_NO_GCONV = 1
+
+# if you want to enable any option listed below, please uncomment next line and copy it here
+#DISTRO_FEATURES_EGLIBC = ""
+
 # POKYMODE controls the characteristics of the generated packages/images by
 # telling poky which type of toolchain to use.
 #
diff --git a/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
new file mode 100644
index 0000000..dffc648
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
@@ -0,0 +1,20 @@
+When disable OPTION_EGLIBC_RTLD_DEBUG, compilation fails.
+Created on Jun 1, 2011 by Kang Kai <kai.kang@windriver.com>
+
+Upstream-Status: Submitted
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+Index: libc/elf/dl-lookup.c
+===================================================================
+--- libc/elf/dl-lookup.c	(revision 13356)
++++ libc/elf/dl-lookup.c	(working copy)
+@@ -423,7 +423,9 @@
+ 		     hash table.  */
+ 		  if (__builtin_expect (tab->size, 0))
+ 		    {
++              #if __OPTION_EGLIBC_RTLD_DEBUG
+ 		      assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
++              #endif
+ 		      __rtld_lock_unlock_recursive (tab->lock);
+ 		      goto success;
+ 		    }
diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
new file mode 100644
index 0000000..7cd0287
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-options.inc
@@ -0,0 +1,55 @@
+def eglibc_cfg(feature, features, tokens, cnf):
+	if type(tokens) == type(""):
+		tokens = [tokens]
+	if type(features) == type([]) and feature in features:
+		cnf.extend([token + ' = y' for token in tokens])
+	else:
+		for token in tokens:
+			cnf.extend([token + ' = n'])
+			if token == 'OPTION_EGLIBC_NSSWITCH':
+				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"])
+				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"])
+
+# Map distro features to eglibc options settings
+def features_to_eglibc_settings(d):
+        cnf = ([])
+        distro_features = (bb.data.getVar('DISTRO_FEATURES_EGLIBC', d, True) or '').split()
+        eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
+        eglibc_cfg('backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
+        eglibc_cfg('big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
+        eglibc_cfg('bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
+        eglibc_cfg('cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
+        eglibc_cfg('catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
+        eglibc_cfg('charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
+        eglibc_cfg('crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
+        eglibc_cfg('crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
+        eglibc_cfg('db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
+        eglibc_cfg('envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
+        eglibc_cfg('fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
+        eglibc_cfg('fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
+        eglibc_cfg('fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
+        eglibc_cfg('ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
+        eglibc_cfg('getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
+        eglibc_cfg('idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
+        eglibc_cfg('inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
+        eglibc_cfg('inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
+        eglibc_cfg('libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
+        eglibc_cfg('libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
+        eglibc_cfg('locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
+        eglibc_cfg('locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
+        eglibc_cfg('memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
+        eglibc_cfg('nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
+        eglibc_cfg('nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
+        eglibc_cfg('rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
+        eglibc_cfg('rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
+        eglibc_cfg('spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
+        eglibc_cfg('streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
+        eglibc_cfg('sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
+        eglibc_cfg('utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
+        eglibc_cfg('utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
+        eglibc_cfg('wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
+        eglibc_cfg('posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
+        eglibc_cfg('posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
+        eglibc_cfg('posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
+        eglibc_cfg('posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
+        return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 46ffa82..2d05d53 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -28,6 +28,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
 inherit autotools
+require eglibc-options.inc
 
 LEAD_SONAME = "libc.so"
 
@@ -43,3 +44,15 @@ EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
 PARALLEL_MAKE = ""
 
 PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
+
+DISTRO_FEATURES_EGLIBC ??= "ipv6 backtrace big-macros bsd cxx-tests catgets charsets \
+                          crypt crypt-ufc db-aliases envz fcvt fmtmsg fstab ftraverse \
+                          getlogin idn inet inet-anl libm libm-big locales locale-code \
+                          memusage nis nsswitch rcmd rtld-debug spawn streams sunrpc utmp \
+                          utmpx wordexp posix-clang-wchar posix-regexp posix-regexp-glibc \
+                          posix-wchar-io "
+
+OE_FEATURES = "${@features_to_eglibc_settings(d)}"
+do_configure_prepend() {
+	echo '${OE_FEATURES}' > ${B}/option-groups.config
+}
diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
index 398da69..894eb88 100644
--- a/meta/recipes-core/eglibc/eglibc_2.13.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
@@ -4,7 +4,7 @@ SRCREV = "13356"
 
 DEPENDS += "gperf-native"
 FILESPATHPKG =. "eglibc-svn:"
-PR = "r0"
+PR = "r1"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_13"
@@ -16,7 +16,9 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
            file://stack-protector-test.patch \
            file://etc/ld.so.conf \
            file://generate-supported.mk \
+           file://eglibc-2.13-fix-macro-RTLD_DEBUG.patch \
 	   "
+
 LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
       file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
-- 
1.7.5.1.300.gc565c



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/1] eglibc: migrate configurability from oe
  2011-06-03  6:47   ` Kang Kai
@ 2011-06-03  8:22     ` Richard Purdie
  -1 siblings, 0 replies; 17+ messages in thread
From: Richard Purdie @ 2011-06-03  8:22 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Kang, poky

On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
> From: Kang Kai <kai.kang@windriver.com>
> 
> Migrate configurability from oe, try to shrink minimal image size
> 
> The switch is in local.conf.sample, uncomment the line
> DISTRO_FEATURES_EGLIBC = ""
> and write what options you want to enable.
> 
> If want to disable locale-code charsets or locales, you have to uncomment
> PACKAGE_NO_GCONV = 1
> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass

I have some comments:

a) I think these should become flags in DISTRO_FEATURES with an
"eglibc-" prefix so something like "spawn" would become "eglibc-spawn"

b) I think we need to create a local.conf.sample.extended which has
information about more advanced settings a user can configure. I don't
want every setting in local.conf as standard as it gives the user the
impression they have to change them which they don't. Some existing data
in local.conf.sample can be moved over.

c) The code triggered by PACKAGE_NO_GCONV should also trigger if you set
the appropriate eglibc- feature flags automatically. Having two
variables you have to keep track of the combinations of is just plain
wrong. They should be controlled by one flag only. If there is generic
packaging code that handles these we might not need the "eglibc-" prefix
for those options.

Cheers,

Richard

> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
>  meta-yocto/conf/local.conf.sample                  |    9 +++
>  .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 +++++++
>  meta/recipes-core/eglibc/eglibc-options.inc        |   55 ++++++++++++++++++++
>  meta/recipes-core/eglibc/eglibc.inc                |   13 +++++
>  meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>  5 files changed, 100 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
>  create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc
> 
> diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
> index 359e510..f68e80a 100644
> --- a/meta-yocto/conf/local.conf.sample
> +++ b/meta-yocto/conf/local.conf.sample
> @@ -87,6 +87,15 @@ PACKAGE_CLASSES ?= "package_rpm package_ipk"
>  # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
>  USER_CLASSES ?= "image-mklibs image-prelink"
>  
> +# eglibc configurability is used to reduce minimal images's size.
> +# PACKAGE_NO_GCONV should be set to 1, or locale-code posix-clang-wchar
> +# charsets locales need to be include in DISTRO_FEATURES_EGLIBC, please check
> +# package_do_split_gconvs in libc-package.bbclass for detail
> +#PACKAGE_NO_GCONV = 1
> +
> +# if you want to enable any option listed below, please uncomment next line and copy it here
> +#DISTRO_FEATURES_EGLIBC = ""
> +
>  # POKYMODE controls the characteristics of the generated packages/images by
>  # telling poky which type of toolchain to use.
>  #
> diff --git a/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
> new file mode 100644
> index 0000000..dffc648
> --- /dev/null
> +++ b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
> @@ -0,0 +1,20 @@
> +When disable OPTION_EGLIBC_RTLD_DEBUG, compilation fails.
> +Created on Jun 1, 2011 by Kang Kai <kai.kang@windriver.com>
> +
> +Upstream-Status: Submitted
> +
> +Signed-off-by: Kang Kai <kai.kang@windriver.com>
> +Index: libc/elf/dl-lookup.c
> +===================================================================
> +--- libc/elf/dl-lookup.c	(revision 13356)
> ++++ libc/elf/dl-lookup.c	(working copy)
> +@@ -423,7 +423,9 @@
> + 		     hash table.  */
> + 		  if (__builtin_expect (tab->size, 0))
> + 		    {
> ++              #if __OPTION_EGLIBC_RTLD_DEBUG
> + 		      assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
> ++              #endif
> + 		      __rtld_lock_unlock_recursive (tab->lock);
> + 		      goto success;
> + 		    }
> diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
> new file mode 100644
> index 0000000..7cd0287
> --- /dev/null
> +++ b/meta/recipes-core/eglibc/eglibc-options.inc
> @@ -0,0 +1,55 @@
> +def eglibc_cfg(feature, features, tokens, cnf):
> +	if type(tokens) == type(""):
> +		tokens = [tokens]
> +	if type(features) == type([]) and feature in features:
> +		cnf.extend([token + ' = y' for token in tokens])
> +	else:
> +		for token in tokens:
> +			cnf.extend([token + ' = n'])
> +			if token == 'OPTION_EGLIBC_NSSWITCH':
> +				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"])
> +				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"])
> +
> +# Map distro features to eglibc options settings
> +def features_to_eglibc_settings(d):
> +        cnf = ([])
> +        distro_features = (bb.data.getVar('DISTRO_FEATURES_EGLIBC', d, True) or '').split()
> +        eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
> +        eglibc_cfg('backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
> +        eglibc_cfg('big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
> +        eglibc_cfg('bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
> +        eglibc_cfg('cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
> +        eglibc_cfg('catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
> +        eglibc_cfg('charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
> +        eglibc_cfg('crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
> +        eglibc_cfg('crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
> +        eglibc_cfg('db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
> +        eglibc_cfg('envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
> +        eglibc_cfg('fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
> +        eglibc_cfg('fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
> +        eglibc_cfg('fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
> +        eglibc_cfg('ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
> +        eglibc_cfg('getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
> +        eglibc_cfg('idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
> +        eglibc_cfg('inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
> +        eglibc_cfg('inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
> +        eglibc_cfg('libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
> +        eglibc_cfg('libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
> +        eglibc_cfg('locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
> +        eglibc_cfg('locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
> +        eglibc_cfg('memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
> +        eglibc_cfg('nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
> +        eglibc_cfg('nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
> +        eglibc_cfg('rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
> +        eglibc_cfg('rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
> +        eglibc_cfg('spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
> +        eglibc_cfg('streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
> +        eglibc_cfg('sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
> +        eglibc_cfg('utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
> +        eglibc_cfg('utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
> +        eglibc_cfg('wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
> +        eglibc_cfg('posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
> +        eglibc_cfg('posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
> +        eglibc_cfg('posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
> +        eglibc_cfg('posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
> +        return "\n".join(cnf)
> diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
> index 46ffa82..2d05d53 100644
> --- a/meta/recipes-core/eglibc/eglibc.inc
> +++ b/meta/recipes-core/eglibc/eglibc.inc
> @@ -28,6 +28,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
>  PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
>  PROVIDES += "virtual/libintl virtual/libiconv"
>  inherit autotools
> +require eglibc-options.inc
>  
>  LEAD_SONAME = "libc.so"
>  
> @@ -43,3 +44,15 @@ EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
>  PARALLEL_MAKE = ""
>  
>  PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
> +
> +DISTRO_FEATURES_EGLIBC ??= "ipv6 backtrace big-macros bsd cxx-tests catgets charsets \
> +                          crypt crypt-ufc db-aliases envz fcvt fmtmsg fstab ftraverse \
> +                          getlogin idn inet inet-anl libm libm-big locales locale-code \
> +                          memusage nis nsswitch rcmd rtld-debug spawn streams sunrpc utmp \
> +                          utmpx wordexp posix-clang-wchar posix-regexp posix-regexp-glibc \
> +                          posix-wchar-io "
> +
> +OE_FEATURES = "${@features_to_eglibc_settings(d)}"
> +do_configure_prepend() {
> +	echo '${OE_FEATURES}' > ${B}/option-groups.config
> +}
> diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
> index 398da69..894eb88 100644
> --- a/meta/recipes-core/eglibc/eglibc_2.13.bb
> +++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
> @@ -4,7 +4,7 @@ SRCREV = "13356"
>  
>  DEPENDS += "gperf-native"
>  FILESPATHPKG =. "eglibc-svn:"
> -PR = "r0"
> +PR = "r1"
>  PR_append = "+svnr${SRCPV}"
>  
>  EGLIBC_BRANCH="eglibc-2_13"
> @@ -16,7 +16,9 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
>             file://stack-protector-test.patch \
>             file://etc/ld.so.conf \
>             file://generate-supported.mk \
> +           file://eglibc-2.13-fix-macro-RTLD_DEBUG.patch \
>  	   "
> +
>  LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
>        file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
>        file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [OE-core] [PATCH 1/1] eglibc: migrate configurability from oe
@ 2011-06-03  8:22     ` Richard Purdie
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Purdie @ 2011-06-03  8:22 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Kang, poky

On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
> From: Kang Kai <kai.kang@windriver.com>
> 
> Migrate configurability from oe, try to shrink minimal image size
> 
> The switch is in local.conf.sample, uncomment the line
> DISTRO_FEATURES_EGLIBC = ""
> and write what options you want to enable.
> 
> If want to disable locale-code charsets or locales, you have to uncomment
> PACKAGE_NO_GCONV = 1
> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass

I have some comments:

a) I think these should become flags in DISTRO_FEATURES with an
"eglibc-" prefix so something like "spawn" would become "eglibc-spawn"

b) I think we need to create a local.conf.sample.extended which has
information about more advanced settings a user can configure. I don't
want every setting in local.conf as standard as it gives the user the
impression they have to change them which they don't. Some existing data
in local.conf.sample can be moved over.

c) The code triggered by PACKAGE_NO_GCONV should also trigger if you set
the appropriate eglibc- feature flags automatically. Having two
variables you have to keep track of the combinations of is just plain
wrong. They should be controlled by one flag only. If there is generic
packaging code that handles these we might not need the "eglibc-" prefix
for those options.

Cheers,

Richard

> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
>  meta-yocto/conf/local.conf.sample                  |    9 +++
>  .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 +++++++
>  meta/recipes-core/eglibc/eglibc-options.inc        |   55 ++++++++++++++++++++
>  meta/recipes-core/eglibc/eglibc.inc                |   13 +++++
>  meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>  5 files changed, 100 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
>  create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc
> 
> diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
> index 359e510..f68e80a 100644
> --- a/meta-yocto/conf/local.conf.sample
> +++ b/meta-yocto/conf/local.conf.sample
> @@ -87,6 +87,15 @@ PACKAGE_CLASSES ?= "package_rpm package_ipk"
>  # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
>  USER_CLASSES ?= "image-mklibs image-prelink"
>  
> +# eglibc configurability is used to reduce minimal images's size.
> +# PACKAGE_NO_GCONV should be set to 1, or locale-code posix-clang-wchar
> +# charsets locales need to be include in DISTRO_FEATURES_EGLIBC, please check
> +# package_do_split_gconvs in libc-package.bbclass for detail
> +#PACKAGE_NO_GCONV = 1
> +
> +# if you want to enable any option listed below, please uncomment next line and copy it here
> +#DISTRO_FEATURES_EGLIBC = ""
> +
>  # POKYMODE controls the characteristics of the generated packages/images by
>  # telling poky which type of toolchain to use.
>  #
> diff --git a/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
> new file mode 100644
> index 0000000..dffc648
> --- /dev/null
> +++ b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
> @@ -0,0 +1,20 @@
> +When disable OPTION_EGLIBC_RTLD_DEBUG, compilation fails.
> +Created on Jun 1, 2011 by Kang Kai <kai.kang@windriver.com>
> +
> +Upstream-Status: Submitted
> +
> +Signed-off-by: Kang Kai <kai.kang@windriver.com>
> +Index: libc/elf/dl-lookup.c
> +===================================================================
> +--- libc/elf/dl-lookup.c	(revision 13356)
> ++++ libc/elf/dl-lookup.c	(working copy)
> +@@ -423,7 +423,9 @@
> + 		     hash table.  */
> + 		  if (__builtin_expect (tab->size, 0))
> + 		    {
> ++              #if __OPTION_EGLIBC_RTLD_DEBUG
> + 		      assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
> ++              #endif
> + 		      __rtld_lock_unlock_recursive (tab->lock);
> + 		      goto success;
> + 		    }
> diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
> new file mode 100644
> index 0000000..7cd0287
> --- /dev/null
> +++ b/meta/recipes-core/eglibc/eglibc-options.inc
> @@ -0,0 +1,55 @@
> +def eglibc_cfg(feature, features, tokens, cnf):
> +	if type(tokens) == type(""):
> +		tokens = [tokens]
> +	if type(features) == type([]) and feature in features:
> +		cnf.extend([token + ' = y' for token in tokens])
> +	else:
> +		for token in tokens:
> +			cnf.extend([token + ' = n'])
> +			if token == 'OPTION_EGLIBC_NSSWITCH':
> +				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"])
> +				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"])
> +
> +# Map distro features to eglibc options settings
> +def features_to_eglibc_settings(d):
> +        cnf = ([])
> +        distro_features = (bb.data.getVar('DISTRO_FEATURES_EGLIBC', d, True) or '').split()
> +        eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
> +        eglibc_cfg('backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
> +        eglibc_cfg('big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
> +        eglibc_cfg('bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
> +        eglibc_cfg('cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
> +        eglibc_cfg('catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
> +        eglibc_cfg('charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
> +        eglibc_cfg('crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
> +        eglibc_cfg('crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
> +        eglibc_cfg('db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
> +        eglibc_cfg('envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
> +        eglibc_cfg('fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
> +        eglibc_cfg('fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
> +        eglibc_cfg('fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
> +        eglibc_cfg('ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
> +        eglibc_cfg('getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
> +        eglibc_cfg('idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
> +        eglibc_cfg('inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
> +        eglibc_cfg('inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
> +        eglibc_cfg('libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
> +        eglibc_cfg('libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
> +        eglibc_cfg('locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
> +        eglibc_cfg('locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
> +        eglibc_cfg('memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
> +        eglibc_cfg('nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
> +        eglibc_cfg('nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
> +        eglibc_cfg('rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
> +        eglibc_cfg('rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
> +        eglibc_cfg('spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
> +        eglibc_cfg('streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
> +        eglibc_cfg('sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
> +        eglibc_cfg('utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
> +        eglibc_cfg('utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
> +        eglibc_cfg('wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
> +        eglibc_cfg('posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
> +        eglibc_cfg('posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
> +        eglibc_cfg('posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
> +        eglibc_cfg('posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
> +        return "\n".join(cnf)
> diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
> index 46ffa82..2d05d53 100644
> --- a/meta/recipes-core/eglibc/eglibc.inc
> +++ b/meta/recipes-core/eglibc/eglibc.inc
> @@ -28,6 +28,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
>  PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
>  PROVIDES += "virtual/libintl virtual/libiconv"
>  inherit autotools
> +require eglibc-options.inc
>  
>  LEAD_SONAME = "libc.so"
>  
> @@ -43,3 +44,15 @@ EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
>  PARALLEL_MAKE = ""
>  
>  PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
> +
> +DISTRO_FEATURES_EGLIBC ??= "ipv6 backtrace big-macros bsd cxx-tests catgets charsets \
> +                          crypt crypt-ufc db-aliases envz fcvt fmtmsg fstab ftraverse \
> +                          getlogin idn inet inet-anl libm libm-big locales locale-code \
> +                          memusage nis nsswitch rcmd rtld-debug spawn streams sunrpc utmp \
> +                          utmpx wordexp posix-clang-wchar posix-regexp posix-regexp-glibc \
> +                          posix-wchar-io "
> +
> +OE_FEATURES = "${@features_to_eglibc_settings(d)}"
> +do_configure_prepend() {
> +	echo '${OE_FEATURES}' > ${B}/option-groups.config
> +}
> diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
> index 398da69..894eb88 100644
> --- a/meta/recipes-core/eglibc/eglibc_2.13.bb
> +++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
> @@ -4,7 +4,7 @@ SRCREV = "13356"
>  
>  DEPENDS += "gperf-native"
>  FILESPATHPKG =. "eglibc-svn:"
> -PR = "r0"
> +PR = "r1"
>  PR_append = "+svnr${SRCPV}"
>  
>  EGLIBC_BRANCH="eglibc-2_13"
> @@ -16,7 +16,9 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
>             file://stack-protector-test.patch \
>             file://etc/ld.so.conf \
>             file://generate-supported.mk \
> +           file://eglibc-2.13-fix-macro-RTLD_DEBUG.patch \
>  	   "
> +
>  LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
>        file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
>        file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/1] eglibc: migrate configurability from oe
  2011-06-03  8:22     ` [OE-core] " Richard Purdie
@ 2011-06-03  8:54       ` Kang Kai
  -1 siblings, 0 replies; 17+ messages in thread
From: Kang Kai @ 2011-06-03  8:54 UTC (permalink / raw)
  To: Richard Purdie
  Cc: Kang, poky, Patches and discussions about the oe-core layer

Hi Richard,

Thanks for your comments. And I have one question:

> On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
>> From: Kang Kai<kai.kang@windriver.com>
>>
>> Migrate configurability from oe, try to shrink minimal image size
>>
>> The switch is in local.conf.sample, uncomment the line
>> DISTRO_FEATURES_EGLIBC = ""
>> and write what options you want to enable.
>>
>> If want to disable locale-code charsets or locales, you have to uncomment
>> PACKAGE_NO_GCONV = 1
>> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass
> I have some comments:
>
> a) I think these should become flags in DISTRO_FEATURES with an
> "eglibc-" prefix so something like "spawn" would become "eglibc-spawn"
Do you mean every option in DISTRO_FEATURES_EGLIBC should be a single 
flag in DISTRO_FEATURES?

In that case, DISTRO_FEATURES_EGLIBC is not needed, right?

> b) I think we need to create a local.conf.sample.extended which has
> information about more advanced settings a user can configure. I don't
> want every setting in local.conf as standard as it gives the user the
> impression they have to change them which they don't. Some existing data
> in local.conf.sample can be moved over.
> c) The code triggered by PACKAGE_NO_GCONV should also trigger if you set
> the appropriate eglibc- feature flags automatically. Having two
> variables you have to keep track of the combinations of is just plain
> wrong. They should be controlled by one flag only. If there is generic
> packaging code that handles these we might not need the "eglibc-" prefix
> for those options.
Ok, I will use one flag only.
> Cheers,
>
> Richard
Thanks & Regards,
Kai
>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> ---
>>   meta-yocto/conf/local.conf.sample                  |    9 +++
>>   .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 +++++++
>>   meta/recipes-core/eglibc/eglibc-options.inc        |   55 ++++++++++++++++++++
>>   meta/recipes-core/eglibc/eglibc.inc                |   13 +++++
>>   meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>>   5 files changed, 100 insertions(+), 1 deletions(-)
>>   create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
>>   create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc
>>
>> diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
>> index 359e510..f68e80a 100644
>> --- a/meta-yocto/conf/local.conf.sample
>> +++ b/meta-yocto/conf/local.conf.sample
>> @@ -87,6 +87,15 @@ PACKAGE_CLASSES ?= "package_rpm package_ipk"
>>   # NOTE: if listing mklibs&  prelink both, then make sure mklibs is before prelink
>>   USER_CLASSES ?= "image-mklibs image-prelink"
>>
>> +# eglibc configurability is used to reduce minimal images's size.
>> +# PACKAGE_NO_GCONV should be set to 1, or locale-code posix-clang-wchar
>> +# charsets locales need to be include in DISTRO_FEATURES_EGLIBC, please check
>> +# package_do_split_gconvs in libc-package.bbclass for detail
>> +#PACKAGE_NO_GCONV = 1
>> +
>> +# if you want to enable any option listed below, please uncomment next line and copy it here
>> +#DISTRO_FEATURES_EGLIBC = ""
>> +
>>   # POKYMODE controls the characteristics of the generated packages/images by
>>   # telling poky which type of toolchain to use.
>>   #
>> diff --git a/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
>> new file mode 100644
>> index 0000000..dffc648
>> --- /dev/null
>> +++ b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
>> @@ -0,0 +1,20 @@
>> +When disable OPTION_EGLIBC_RTLD_DEBUG, compilation fails.
>> +Created on Jun 1, 2011 by Kang Kai<kai.kang@windriver.com>
>> +
>> +Upstream-Status: Submitted
>> +
>> +Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> +Index: libc/elf/dl-lookup.c
>> +===================================================================
>> +--- libc/elf/dl-lookup.c	(revision 13356)
>> ++++ libc/elf/dl-lookup.c	(working copy)
>> +@@ -423,7 +423,9 @@
>> + 		     hash table.  */
>> + 		  if (__builtin_expect (tab->size, 0))
>> + 		    {
>> ++              #if __OPTION_EGLIBC_RTLD_DEBUG
>> + 		      assert (GLRO(dl_debug_mask)&  DL_DEBUG_PRELINK);
>> ++              #endif
>> + 		      __rtld_lock_unlock_recursive (tab->lock);
>> + 		      goto success;
>> + 		    }
>> diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
>> new file mode 100644
>> index 0000000..7cd0287
>> --- /dev/null
>> +++ b/meta/recipes-core/eglibc/eglibc-options.inc
>> @@ -0,0 +1,55 @@
>> +def eglibc_cfg(feature, features, tokens, cnf):
>> +	if type(tokens) == type(""):
>> +		tokens = [tokens]
>> +	if type(features) == type([]) and feature in features:
>> +		cnf.extend([token + ' = y' for token in tokens])
>> +	else:
>> +		for token in tokens:
>> +			cnf.extend([token + ' = n'])
>> +			if token == 'OPTION_EGLIBC_NSSWITCH':
>> +				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"])
>> +				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"])
>> +
>> +# Map distro features to eglibc options settings
>> +def features_to_eglibc_settings(d):
>> +        cnf = ([])
>> +        distro_features = (bb.data.getVar('DISTRO_FEATURES_EGLIBC', d, True) or '').split()
>> +        eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
>> +        eglibc_cfg('backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
>> +        eglibc_cfg('big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
>> +        eglibc_cfg('bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
>> +        eglibc_cfg('cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
>> +        eglibc_cfg('catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
>> +        eglibc_cfg('charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
>> +        eglibc_cfg('crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
>> +        eglibc_cfg('crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
>> +        eglibc_cfg('db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
>> +        eglibc_cfg('envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
>> +        eglibc_cfg('fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
>> +        eglibc_cfg('fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
>> +        eglibc_cfg('fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
>> +        eglibc_cfg('ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
>> +        eglibc_cfg('getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
>> +        eglibc_cfg('idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
>> +        eglibc_cfg('inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
>> +        eglibc_cfg('inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
>> +        eglibc_cfg('libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
>> +        eglibc_cfg('libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
>> +        eglibc_cfg('locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
>> +        eglibc_cfg('locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
>> +        eglibc_cfg('memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
>> +        eglibc_cfg('nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
>> +        eglibc_cfg('nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
>> +        eglibc_cfg('rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
>> +        eglibc_cfg('rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
>> +        eglibc_cfg('spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
>> +        eglibc_cfg('streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
>> +        eglibc_cfg('sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
>> +        eglibc_cfg('utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
>> +        eglibc_cfg('utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
>> +        eglibc_cfg('wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
>> +        eglibc_cfg('posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
>> +        eglibc_cfg('posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
>> +        eglibc_cfg('posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
>> +        eglibc_cfg('posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
>> +        return "\n".join(cnf)
>> diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
>> index 46ffa82..2d05d53 100644
>> --- a/meta/recipes-core/eglibc/eglibc.inc
>> +++ b/meta/recipes-core/eglibc/eglibc.inc
>> @@ -28,6 +28,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
>>   PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
>>   PROVIDES += "virtual/libintl virtual/libiconv"
>>   inherit autotools
>> +require eglibc-options.inc
>>
>>   LEAD_SONAME = "libc.so"
>>
>> @@ -43,3 +44,15 @@ EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
>>   PARALLEL_MAKE = ""
>>
>>   PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
>> +
>> +DISTRO_FEATURES_EGLIBC ??= "ipv6 backtrace big-macros bsd cxx-tests catgets charsets \
>> +                          crypt crypt-ufc db-aliases envz fcvt fmtmsg fstab ftraverse \
>> +                          getlogin idn inet inet-anl libm libm-big locales locale-code \
>> +                          memusage nis nsswitch rcmd rtld-debug spawn streams sunrpc utmp \
>> +                          utmpx wordexp posix-clang-wchar posix-regexp posix-regexp-glibc \
>> +                          posix-wchar-io "
>> +
>> +OE_FEATURES = "${@features_to_eglibc_settings(d)}"
>> +do_configure_prepend() {
>> +	echo '${OE_FEATURES}'>  ${B}/option-groups.config
>> +}
>> diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
>> index 398da69..894eb88 100644
>> --- a/meta/recipes-core/eglibc/eglibc_2.13.bb
>> +++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
>> @@ -4,7 +4,7 @@ SRCREV = "13356"
>>
>>   DEPENDS += "gperf-native"
>>   FILESPATHPKG =. "eglibc-svn:"
>> -PR = "r0"
>> +PR = "r1"
>>   PR_append = "+svnr${SRCPV}"
>>
>>   EGLIBC_BRANCH="eglibc-2_13"
>> @@ -16,7 +16,9 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
>>              file://stack-protector-test.patch \
>>              file://etc/ld.so.conf \
>>              file://generate-supported.mk \
>> +           file://eglibc-2.13-fix-macro-RTLD_DEBUG.patch \
>>   	   "
>> +
>>   LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
>>         file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
>>         file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [OE-core] [PATCH 1/1] eglibc: migrate configurability from oe
@ 2011-06-03  8:54       ` Kang Kai
  0 siblings, 0 replies; 17+ messages in thread
From: Kang Kai @ 2011-06-03  8:54 UTC (permalink / raw)
  To: Richard Purdie
  Cc: Kang, poky, Patches and discussions about the oe-core layer

Hi Richard,

Thanks for your comments. And I have one question:

> On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
>> From: Kang Kai<kai.kang@windriver.com>
>>
>> Migrate configurability from oe, try to shrink minimal image size
>>
>> The switch is in local.conf.sample, uncomment the line
>> DISTRO_FEATURES_EGLIBC = ""
>> and write what options you want to enable.
>>
>> If want to disable locale-code charsets or locales, you have to uncomment
>> PACKAGE_NO_GCONV = 1
>> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass
> I have some comments:
>
> a) I think these should become flags in DISTRO_FEATURES with an
> "eglibc-" prefix so something like "spawn" would become "eglibc-spawn"
Do you mean every option in DISTRO_FEATURES_EGLIBC should be a single 
flag in DISTRO_FEATURES?

In that case, DISTRO_FEATURES_EGLIBC is not needed, right?

> b) I think we need to create a local.conf.sample.extended which has
> information about more advanced settings a user can configure. I don't
> want every setting in local.conf as standard as it gives the user the
> impression they have to change them which they don't. Some existing data
> in local.conf.sample can be moved over.
> c) The code triggered by PACKAGE_NO_GCONV should also trigger if you set
> the appropriate eglibc- feature flags automatically. Having two
> variables you have to keep track of the combinations of is just plain
> wrong. They should be controlled by one flag only. If there is generic
> packaging code that handles these we might not need the "eglibc-" prefix
> for those options.
Ok, I will use one flag only.
> Cheers,
>
> Richard
Thanks & Regards,
Kai
>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> ---
>>   meta-yocto/conf/local.conf.sample                  |    9 +++
>>   .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 +++++++
>>   meta/recipes-core/eglibc/eglibc-options.inc        |   55 ++++++++++++++++++++
>>   meta/recipes-core/eglibc/eglibc.inc                |   13 +++++
>>   meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>>   5 files changed, 100 insertions(+), 1 deletions(-)
>>   create mode 100644 meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
>>   create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc
>>
>> diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
>> index 359e510..f68e80a 100644
>> --- a/meta-yocto/conf/local.conf.sample
>> +++ b/meta-yocto/conf/local.conf.sample
>> @@ -87,6 +87,15 @@ PACKAGE_CLASSES ?= "package_rpm package_ipk"
>>   # NOTE: if listing mklibs&  prelink both, then make sure mklibs is before prelink
>>   USER_CLASSES ?= "image-mklibs image-prelink"
>>
>> +# eglibc configurability is used to reduce minimal images's size.
>> +# PACKAGE_NO_GCONV should be set to 1, or locale-code posix-clang-wchar
>> +# charsets locales need to be include in DISTRO_FEATURES_EGLIBC, please check
>> +# package_do_split_gconvs in libc-package.bbclass for detail
>> +#PACKAGE_NO_GCONV = 1
>> +
>> +# if you want to enable any option listed below, please uncomment next line and copy it here
>> +#DISTRO_FEATURES_EGLIBC = ""
>> +
>>   # POKYMODE controls the characteristics of the generated packages/images by
>>   # telling poky which type of toolchain to use.
>>   #
>> diff --git a/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
>> new file mode 100644
>> index 0000000..dffc648
>> --- /dev/null
>> +++ b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-2.13-fix-macro-RTLD_DEBUG.patch
>> @@ -0,0 +1,20 @@
>> +When disable OPTION_EGLIBC_RTLD_DEBUG, compilation fails.
>> +Created on Jun 1, 2011 by Kang Kai<kai.kang@windriver.com>
>> +
>> +Upstream-Status: Submitted
>> +
>> +Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> +Index: libc/elf/dl-lookup.c
>> +===================================================================
>> +--- libc/elf/dl-lookup.c	(revision 13356)
>> ++++ libc/elf/dl-lookup.c	(working copy)
>> +@@ -423,7 +423,9 @@
>> + 		     hash table.  */
>> + 		  if (__builtin_expect (tab->size, 0))
>> + 		    {
>> ++              #if __OPTION_EGLIBC_RTLD_DEBUG
>> + 		      assert (GLRO(dl_debug_mask)&  DL_DEBUG_PRELINK);
>> ++              #endif
>> + 		      __rtld_lock_unlock_recursive (tab->lock);
>> + 		      goto success;
>> + 		    }
>> diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
>> new file mode 100644
>> index 0000000..7cd0287
>> --- /dev/null
>> +++ b/meta/recipes-core/eglibc/eglibc-options.inc
>> @@ -0,0 +1,55 @@
>> +def eglibc_cfg(feature, features, tokens, cnf):
>> +	if type(tokens) == type(""):
>> +		tokens = [tokens]
>> +	if type(features) == type([]) and feature in features:
>> +		cnf.extend([token + ' = y' for token in tokens])
>> +	else:
>> +		for token in tokens:
>> +			cnf.extend([token + ' = n'])
>> +			if token == 'OPTION_EGLIBC_NSSWITCH':
>> +				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"])
>> +				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"])
>> +
>> +# Map distro features to eglibc options settings
>> +def features_to_eglibc_settings(d):
>> +        cnf = ([])
>> +        distro_features = (bb.data.getVar('DISTRO_FEATURES_EGLIBC', d, True) or '').split()
>> +        eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
>> +        eglibc_cfg('backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
>> +        eglibc_cfg('big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
>> +        eglibc_cfg('bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
>> +        eglibc_cfg('cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
>> +        eglibc_cfg('catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
>> +        eglibc_cfg('charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
>> +        eglibc_cfg('crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
>> +        eglibc_cfg('crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
>> +        eglibc_cfg('db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
>> +        eglibc_cfg('envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
>> +        eglibc_cfg('fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
>> +        eglibc_cfg('fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
>> +        eglibc_cfg('fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
>> +        eglibc_cfg('ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
>> +        eglibc_cfg('getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
>> +        eglibc_cfg('idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
>> +        eglibc_cfg('inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
>> +        eglibc_cfg('inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
>> +        eglibc_cfg('libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
>> +        eglibc_cfg('libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
>> +        eglibc_cfg('locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
>> +        eglibc_cfg('locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
>> +        eglibc_cfg('memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
>> +        eglibc_cfg('nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
>> +        eglibc_cfg('nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
>> +        eglibc_cfg('rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
>> +        eglibc_cfg('rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
>> +        eglibc_cfg('spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
>> +        eglibc_cfg('streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
>> +        eglibc_cfg('sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
>> +        eglibc_cfg('utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
>> +        eglibc_cfg('utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
>> +        eglibc_cfg('wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
>> +        eglibc_cfg('posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
>> +        eglibc_cfg('posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
>> +        eglibc_cfg('posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
>> +        eglibc_cfg('posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
>> +        return "\n".join(cnf)
>> diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
>> index 46ffa82..2d05d53 100644
>> --- a/meta/recipes-core/eglibc/eglibc.inc
>> +++ b/meta/recipes-core/eglibc/eglibc.inc
>> @@ -28,6 +28,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
>>   PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
>>   PROVIDES += "virtual/libintl virtual/libiconv"
>>   inherit autotools
>> +require eglibc-options.inc
>>
>>   LEAD_SONAME = "libc.so"
>>
>> @@ -43,3 +44,15 @@ EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
>>   PARALLEL_MAKE = ""
>>
>>   PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
>> +
>> +DISTRO_FEATURES_EGLIBC ??= "ipv6 backtrace big-macros bsd cxx-tests catgets charsets \
>> +                          crypt crypt-ufc db-aliases envz fcvt fmtmsg fstab ftraverse \
>> +                          getlogin idn inet inet-anl libm libm-big locales locale-code \
>> +                          memusage nis nsswitch rcmd rtld-debug spawn streams sunrpc utmp \
>> +                          utmpx wordexp posix-clang-wchar posix-regexp posix-regexp-glibc \
>> +                          posix-wchar-io "
>> +
>> +OE_FEATURES = "${@features_to_eglibc_settings(d)}"
>> +do_configure_prepend() {
>> +	echo '${OE_FEATURES}'>  ${B}/option-groups.config
>> +}
>> diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
>> index 398da69..894eb88 100644
>> --- a/meta/recipes-core/eglibc/eglibc_2.13.bb
>> +++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
>> @@ -4,7 +4,7 @@ SRCREV = "13356"
>>
>>   DEPENDS += "gperf-native"
>>   FILESPATHPKG =. "eglibc-svn:"
>> -PR = "r0"
>> +PR = "r1"
>>   PR_append = "+svnr${SRCPV}"
>>
>>   EGLIBC_BRANCH="eglibc-2_13"
>> @@ -16,7 +16,9 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
>>              file://stack-protector-test.patch \
>>              file://etc/ld.so.conf \
>>              file://generate-supported.mk \
>> +           file://eglibc-2.13-fix-macro-RTLD_DEBUG.patch \
>>   	   "
>> +
>>   LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
>>         file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
>>         file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/1] eglibc: migrate configurability from oe
  2011-06-03  8:22     ` [OE-core] " Richard Purdie
  (?)
  (?)
@ 2011-06-03  8:57     ` Koen Kooi
  2011-06-03  9:51       ` Richard Purdie
  2011-06-03 18:00       ` Khem Raj
  -1 siblings, 2 replies; 17+ messages in thread
From: Koen Kooi @ 2011-06-03  8:57 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 3 jun 2011, om 10:22 heeft Richard Purdie het volgende geschreven:

> On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
>> From: Kang Kai <kai.kang@windriver.com>
>> 
>> Migrate configurability from oe, try to shrink minimal image size
>> 
>> The switch is in local.conf.sample, uncomment the line
>> DISTRO_FEATURES_EGLIBC = ""
>> and write what options you want to enable.
>> 
>> If want to disable locale-code charsets or locales, you have to uncomment
>> PACKAGE_NO_GCONV = 1
>> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass
> 
> I have some comments:
> 
> a) I think these should become flags in DISTRO_FEATURES with an
> "eglibc-" prefix so something like "spawn" would become "eglibc-spawn"

Taking a step back here, uclibc has the same configurability, so wouldn't it make sense to align both (where possible) and just have 'libc-spawn' in DISTRO_FEATURES?

regards,

Koen


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/1] eglibc: migrate configurability from oe
  2011-06-03  8:22     ` [OE-core] " Richard Purdie
                       ` (2 preceding siblings ...)
  (?)
@ 2011-06-03  9:49     ` Phil Blundell
  -1 siblings, 0 replies; 17+ messages in thread
From: Phil Blundell @ 2011-06-03  9:49 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Kang, poky

On Fri, 2011-06-03 at 09:22 +0100, Richard Purdie wrote:
> On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
> > From: Kang Kai <kai.kang@windriver.com>
> > 
> > Migrate configurability from oe, try to shrink minimal image size
> > 
> > The switch is in local.conf.sample, uncomment the line
> > DISTRO_FEATURES_EGLIBC = ""
> > and write what options you want to enable.
> > 
> > If want to disable locale-code charsets or locales, you have to uncomment
> > PACKAGE_NO_GCONV = 1
> > Because without this, it fails on package_do_split_gconvs in libc-package.bbclass
> 
> I have some comments:
> 
> a) I think these should become flags in DISTRO_FEATURES with an
> "eglibc-" prefix so something like "spawn" would become "eglibc-spawn"

I'm not sure I agree with that.  Some, maybe most, of these flags are
not really specific to eglibc (in concept, even if eglibc is the only
package which respects them at the moment).  Some of them (eg ipv6) are
already established DISTRO_FEATURES which are used in various other
places; others, including perhaps your spawn example, are specifically
bound to the contents of the C library but could equally well be
respected by uclibc.  So, for the latter group, I think just
"libc-spawn" would be better than "eglibc-spawn".  Maybe
"libc-has-spawn" would be even better, to make it clear that we're
talking about a feature within libc and not a specific variant of libc.

In an ideal world there would also be a mechanism for packages to
declare that they require a particular feature from libc, i.e. a recipe
could say

DISTRO_REQUIRED_FEATURES = "libc-spawn"

and it would then be a configuration error to try to build that recipe
for a distro that doesn't admit the necessary things.

> b) I think we need to create a local.conf.sample.extended which has
> information about more advanced settings a user can configure. I don't
> want every setting in local.conf as standard as it gives the user the
> impression they have to change them which they don't. Some existing data
> in local.conf.sample can be moved over.

Agreed.

> c) The code triggered by PACKAGE_NO_GCONV should also trigger if you set
> the appropriate eglibc- feature flags automatically. Having two
> variables you have to keep track of the combinations of is just plain
> wrong. They should be controlled by one flag only. If there is generic
> packaging code that handles these we might not need the "eglibc-" prefix
> for those options.

I didn't fully understand the commentary around PACKAGE_NO_GCONV so I'm
not sure that I have a meaningful opinion on that one yet.  As far as I
know, though, there is no generic packaging code for gconvs (unlike
locales, which are handled generically in package.bbclass) but, again,
the concept of gconvs is not eglibc specific and there are other libs
which might provide them.

p.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/1] eglibc: migrate configurability from oe
  2011-06-03  8:57     ` Koen Kooi
@ 2011-06-03  9:51       ` Richard Purdie
  2011-06-03 18:00       ` Khem Raj
  1 sibling, 0 replies; 17+ messages in thread
From: Richard Purdie @ 2011-06-03  9:51 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2011-06-03 at 10:57 +0200, Koen Kooi wrote:
> Op 3 jun 2011, om 10:22 heeft Richard Purdie het volgende geschreven:
> 
> > On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
> >> From: Kang Kai <kai.kang@windriver.com>
> >> 
> >> Migrate configurability from oe, try to shrink minimal image size
> >> 
> >> The switch is in local.conf.sample, uncomment the line
> >> DISTRO_FEATURES_EGLIBC = ""
> >> and write what options you want to enable.
> >> 
> >> If want to disable locale-code charsets or locales, you have to uncomment
> >> PACKAGE_NO_GCONV = 1
> >> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass
> > 
> > I have some comments:
> > 
> > a) I think these should become flags in DISTRO_FEATURES with an
> > "eglibc-" prefix so something like "spawn" would become "eglibc-spawn"
> 
> Taking a step back here, uclibc has the same configurability, so
> wouldn't it make sense to align both (where possible) and just have
> 'libc-spawn' in DISTRO_FEATURES?

If multiple libc's can support it, it would seem to make sense to have a
common option.

It would really mean a libc should complain loudly when it sees an
option it can't support though (e.g. glibc)...

Cheers,

Richard




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/1] eglibc: migrate configurability from oe
  2011-06-03  8:54       ` [OE-core] " Kang Kai
@ 2011-06-03  9:52         ` Richard Purdie
  -1 siblings, 0 replies; 17+ messages in thread
From: Richard Purdie @ 2011-06-03  9:52 UTC (permalink / raw)
  To: Kang Kai; +Cc: Kang, poky, Patches and discussions about the oe-core layer

On Fri, 2011-06-03 at 16:54 +0800, Kang Kai wrote:
> Hi Richard,
> 
> Thanks for your comments. And I have one question:
> 
> > On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
> >> From: Kang Kai<kai.kang@windriver.com>
> >>
> >> Migrate configurability from oe, try to shrink minimal image size
> >>
> >> The switch is in local.conf.sample, uncomment the line
> >> DISTRO_FEATURES_EGLIBC = ""
> >> and write what options you want to enable.
> >>
> >> If want to disable locale-code charsets or locales, you have to uncomment
> >> PACKAGE_NO_GCONV = 1
> >> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass
> > I have some comments:
> >
> > a) I think these should become flags in DISTRO_FEATURES with an
> > "eglibc-" prefix so something like "spawn" would become "eglibc-spawn"
> Do you mean every option in DISTRO_FEATURES_EGLIBC should be a single 
> flag in DISTRO_FEATURES?

No, you'd still have all the options you currently have but instead of
being called X they would be eglibc-X.

Cheers,

Richard





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [OE-core] [PATCH 1/1] eglibc: migrate configurability from oe
@ 2011-06-03  9:52         ` Richard Purdie
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Purdie @ 2011-06-03  9:52 UTC (permalink / raw)
  To: Kang Kai; +Cc: Kang, poky, Patches and discussions about the oe-core layer

On Fri, 2011-06-03 at 16:54 +0800, Kang Kai wrote:
> Hi Richard,
> 
> Thanks for your comments. And I have one question:
> 
> > On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
> >> From: Kang Kai<kai.kang@windriver.com>
> >>
> >> Migrate configurability from oe, try to shrink minimal image size
> >>
> >> The switch is in local.conf.sample, uncomment the line
> >> DISTRO_FEATURES_EGLIBC = ""
> >> and write what options you want to enable.
> >>
> >> If want to disable locale-code charsets or locales, you have to uncomment
> >> PACKAGE_NO_GCONV = 1
> >> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass
> > I have some comments:
> >
> > a) I think these should become flags in DISTRO_FEATURES with an
> > "eglibc-" prefix so something like "spawn" would become "eglibc-spawn"
> Do you mean every option in DISTRO_FEATURES_EGLIBC should be a single 
> flag in DISTRO_FEATURES?

No, you'd still have all the options you currently have but instead of
being called X they would be eglibc-X.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/1] eglibc: enable eglibc configurability V2
  2011-06-03  6:47 ` Kang Kai
  (?)
  (?)
@ 2011-06-03 11:32 ` Phil Blundell
  2011-06-03 11:50   ` Richard Purdie
  -1 siblings, 1 reply; 17+ messages in thread
From: Phil Blundell @ 2011-06-03 11:32 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
> If want to disable locale-code charsets or locales, you have to uncomment
> PACKAGE_NO_GCONV = 1
> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass

Can we not just fix libc-package.bbclass to stop it failing in that
situation?  It seems a bit sad to require an extra "flip this switch to
make it work" kind of variable.

p.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/1] eglibc: enable eglibc configurability V2
  2011-06-03 11:32 ` [PATCH 0/1] eglibc: enable eglibc configurability V2 Phil Blundell
@ 2011-06-03 11:50   ` Richard Purdie
  2011-06-03 12:06     ` Phil Blundell
  0 siblings, 1 reply; 17+ messages in thread
From: Richard Purdie @ 2011-06-03 11:50 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2011-06-03 at 12:32 +0100, Phil Blundell wrote:
> On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
> > If want to disable locale-code charsets or locales, you have to uncomment
> > PACKAGE_NO_GCONV = 1
> > Because without this, it fails on package_do_split_gconvs in libc-package.bbclass
> 
> Can we not just fix libc-package.bbclass to stop it failing in that
> situation?  It seems a bit sad to require an extra "flip this switch to
> make it work" kind of variable.

That was my point in the earlier email :)

Cheers,

Richard




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/1] eglibc: enable eglibc configurability V2
  2011-06-03 11:50   ` Richard Purdie
@ 2011-06-03 12:06     ` Phil Blundell
  0 siblings, 0 replies; 17+ messages in thread
From: Phil Blundell @ 2011-06-03 12:06 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2011-06-03 at 12:50 +0100, Richard Purdie wrote:
> That was my point in the earlier email :)

Ah right, yes.  Evidently I hadn't had enough of my coffee when I
replied to that one. :-}

p.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/1] eglibc: migrate configurability from oe
  2011-06-03  8:57     ` Koen Kooi
  2011-06-03  9:51       ` Richard Purdie
@ 2011-06-03 18:00       ` Khem Raj
  1 sibling, 0 replies; 17+ messages in thread
From: Khem Raj @ 2011-06-03 18:00 UTC (permalink / raw)
  To: openembedded-core

On 06/03/2011 01:57 AM, Koen Kooi wrote:
> 
> Op 3 jun 2011, om 10:22 heeft Richard Purdie het volgende geschreven:
> 
>> On Fri, 2011-06-03 at 14:47 +0800, Kang Kai wrote:
>>> From: Kang Kai <kai.kang@windriver.com>
>>>
>>> Migrate configurability from oe, try to shrink minimal image size
>>>
>>> The switch is in local.conf.sample, uncomment the line
>>> DISTRO_FEATURES_EGLIBC = ""
>>> and write what options you want to enable.
>>>
>>> If want to disable locale-code charsets or locales, you have to uncomment
>>> PACKAGE_NO_GCONV = 1
>>> Because without this, it fails on package_do_split_gconvs in libc-package.bbclass
>>
>> I have some comments:
>>
>> a) I think these should become flags in DISTRO_FEATURES with an
>> "eglibc-" prefix so something like "spawn" would become "eglibc-spawn"
> 
> Taking a step back here, uclibc has the same configurability, so wouldn't it make sense to align both (where possible) and just have 'libc-spawn' in DISTRO_FEATURES?
> 

uclibc's configurations are not 1 to 1 with eglibc. but I agree the
common configs should be derived from single DISTRO_FEATURE dealing with
that like ipv6

> regards,
> 
> Koen
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-06-03 18:03 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-03  6:47 [PATCH 0/1] eglibc: enable eglibc configurability V2 Kang Kai
2011-06-03  6:47 ` Kang Kai
2011-06-03  6:47 ` [PATCH 1/1] eglibc: migrate configurability from oe Kang Kai
2011-06-03  6:47   ` Kang Kai
2011-06-03  8:22   ` Richard Purdie
2011-06-03  8:22     ` [OE-core] " Richard Purdie
2011-06-03  8:54     ` Kang Kai
2011-06-03  8:54       ` [OE-core] " Kang Kai
2011-06-03  9:52       ` Richard Purdie
2011-06-03  9:52         ` [OE-core] " Richard Purdie
2011-06-03  8:57     ` Koen Kooi
2011-06-03  9:51       ` Richard Purdie
2011-06-03 18:00       ` Khem Raj
2011-06-03  9:49     ` Phil Blundell
2011-06-03 11:32 ` [PATCH 0/1] eglibc: enable eglibc configurability V2 Phil Blundell
2011-06-03 11:50   ` Richard Purdie
2011-06-03 12:06     ` Phil Blundell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.