All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] eglibc: migrate configurability from oe V3
@ 2011-06-07  9:42 ` Kang Kai
  0 siblings, 0 replies; 29+ messages in thread
From: Kang Kai @ 2011-06-07  9:42 UTC (permalink / raw)
  To: richard.purdie; +Cc: Kang, poky, openembedded-core

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

Hi Richard,

I add a new local.extended.conf to put the DISTRO_FEATURES there, and I am not quit sure that 
is the right use of it. 

Update to check DISTRO_FEATURES to get eglibc configuration options.
Update to set or not set PACKAGE_NO_GCONV automatically.

Any suggestion will be appreciated!
Thanks & Regards,
Kai

The following changes since commit 7f34cd1eb2a459709006ae985a14decd4d2152e6:

  tzcode: Update to 2011g (2011-06-06 15:58:42 +0100)

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

Kang Kai (2):
  bitbake: add another local configuration file
  eglibc: migrate configurability from oe

 meta-yocto/conf/local.conf.sample.extended         |    5 ++
 meta/conf/bitbake.conf                             |    1 +
 meta/conf/distro/include/default-distrovars.inc    |    8 ++-
 .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
 meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc                |    6 ++
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 scripts/oe-setup-builddir                          |   19 ++++++
 8 files changed, 123 insertions(+), 2 deletions(-)
 create mode 100644 meta-yocto/conf/local.conf.sample.extended
 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] 29+ messages in thread

* [PATCH 0/2] eglibc: migrate configurability from oe V3
@ 2011-06-07  9:42 ` Kang Kai
  0 siblings, 0 replies; 29+ messages in thread
From: Kang Kai @ 2011-06-07  9:42 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

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

Hi Richard,

I add a new local.extended.conf to put the DISTRO_FEATURES there, and I am not quit sure that 
is the right use of it. 

Update to check DISTRO_FEATURES to get eglibc configuration options.
Update to set or not set PACKAGE_NO_GCONV automatically.

Any suggestion will be appreciated!
Thanks & Regards,
Kai

The following changes since commit 7f34cd1eb2a459709006ae985a14decd4d2152e6:

  tzcode: Update to 2011g (2011-06-06 15:58:42 +0100)

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

Kang Kai (2):
  bitbake: add another local configuration file
  eglibc: migrate configurability from oe

 meta-yocto/conf/local.conf.sample.extended         |    5 ++
 meta/conf/bitbake.conf                             |    1 +
 meta/conf/distro/include/default-distrovars.inc    |    8 ++-
 .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
 meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc                |    6 ++
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 scripts/oe-setup-builddir                          |   19 ++++++
 8 files changed, 123 insertions(+), 2 deletions(-)
 create mode 100644 meta-yocto/conf/local.conf.sample.extended
 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] 29+ messages in thread

* [PATCH 1/2] bitbake: add another local configuration file
  2011-06-07  9:42 ` Kang Kai
@ 2011-06-07  9:42   ` Kang Kai
  -1 siblings, 0 replies; 29+ messages in thread
From: Kang Kai @ 2011-06-07  9:42 UTC (permalink / raw)
  To: richard.purdie; +Cc: Kang, poky, openembedded-core

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

Add a new local configuration file local.conf.sample.extended, and more advanced
settings what user can configure could put in this file.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta-yocto/conf/local.conf.sample.extended |    5 +++++
 meta/conf/bitbake.conf                     |    1 +
 scripts/oe-setup-builddir                  |   19 +++++++++++++++++++
 3 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 meta-yocto/conf/local.conf.sample.extended

diff --git a/meta-yocto/conf/local.conf.sample.extended b/meta-yocto/conf/local.conf.sample.extended
new file mode 100644
index 0000000..048d641
--- /dev/null
+++ b/meta-yocto/conf/local.conf.sample.extended
@@ -0,0 +1,5 @@
+# eglibc configurability is used to reduce minimal images's size.
+# the all supported eglibc options are default enabled by adding
+# to DISTRO_FEATURES in default-distrovars.inc
+# put the options what you want to enable below and uncomment it
+#DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index de94316..1b1cf6b 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -641,6 +641,7 @@ CPU_FEATURES_arm ?= "vfp"
 include conf/site.conf
 include conf/auto.conf
 include conf/local.conf
+include conf/local.extended.conf
 include conf/build/${BUILD_SYS}.conf
 include conf/target/${TARGET_SYS}.conf
 include conf/machine/${MACHINE}.conf
diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index 5fc8b19..7af2373 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -55,6 +55,7 @@ if [ "x" != "x$TEMPLATECONF" ]; then
     fi
     OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample"
     OECORELOCALCONF="$TEMPLATECONF/local.conf.sample"
+    OECORELOCALCONFEXTENDED="$TEMPLATECONF/local.conf.sample.extended"
 fi
 
 if [ "x" = "x$OECORELOCALCONF" ]; then
@@ -79,6 +80,24 @@ EOM
     cp -f $OECORELOCALCONF $BUILDDIR/conf/local.conf
 fi
 
+if ! (test -r "$BUILDDIR/conf/local.extended.conf"); then
+cat <<EOM
+You had no conf/local.conf file. This configuration file has therefore been
+created for you with some default values. You may wish to edit it to use
+different eglibc configuration options for example. See the file for more
+information as common configuration options are commented.
+
+The Yocto Project has extensive documentation about OE including a reference manual
+which can be found at:
+    http://yoctoproject.org/community/documentation
+
+For more information about OpenEmbedded see their website:
+    http://www.openembedded.org/
+
+EOM
+	cp -f $OECORELOCALCONFEXTENDED $BUILDDIR/conf/local.extended.conf
+fi
+
 if [ "x" = "x$OECORELAYERCONF" ]; then
     OECORELAYERCONF="$OEROOT/meta/conf/bblayers.conf.sample"
 fi
-- 
1.7.5.1.300.gc565c




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

* [PATCH 1/2] bitbake: add another local configuration file
@ 2011-06-07  9:42   ` Kang Kai
  0 siblings, 0 replies; 29+ messages in thread
From: Kang Kai @ 2011-06-07  9:42 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

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

Add a new local configuration file local.conf.sample.extended, and more advanced
settings what user can configure could put in this file.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta-yocto/conf/local.conf.sample.extended |    5 +++++
 meta/conf/bitbake.conf                     |    1 +
 scripts/oe-setup-builddir                  |   19 +++++++++++++++++++
 3 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 meta-yocto/conf/local.conf.sample.extended

diff --git a/meta-yocto/conf/local.conf.sample.extended b/meta-yocto/conf/local.conf.sample.extended
new file mode 100644
index 0000000..048d641
--- /dev/null
+++ b/meta-yocto/conf/local.conf.sample.extended
@@ -0,0 +1,5 @@
+# eglibc configurability is used to reduce minimal images's size.
+# the all supported eglibc options are default enabled by adding
+# to DISTRO_FEATURES in default-distrovars.inc
+# put the options what you want to enable below and uncomment it
+#DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index de94316..1b1cf6b 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -641,6 +641,7 @@ CPU_FEATURES_arm ?= "vfp"
 include conf/site.conf
 include conf/auto.conf
 include conf/local.conf
+include conf/local.extended.conf
 include conf/build/${BUILD_SYS}.conf
 include conf/target/${TARGET_SYS}.conf
 include conf/machine/${MACHINE}.conf
diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index 5fc8b19..7af2373 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -55,6 +55,7 @@ if [ "x" != "x$TEMPLATECONF" ]; then
     fi
     OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample"
     OECORELOCALCONF="$TEMPLATECONF/local.conf.sample"
+    OECORELOCALCONFEXTENDED="$TEMPLATECONF/local.conf.sample.extended"
 fi
 
 if [ "x" = "x$OECORELOCALCONF" ]; then
@@ -79,6 +80,24 @@ EOM
     cp -f $OECORELOCALCONF $BUILDDIR/conf/local.conf
 fi
 
+if ! (test -r "$BUILDDIR/conf/local.extended.conf"); then
+cat <<EOM
+You had no conf/local.conf file. This configuration file has therefore been
+created for you with some default values. You may wish to edit it to use
+different eglibc configuration options for example. See the file for more
+information as common configuration options are commented.
+
+The Yocto Project has extensive documentation about OE including a reference manual
+which can be found at:
+    http://yoctoproject.org/community/documentation
+
+For more information about OpenEmbedded see their website:
+    http://www.openembedded.org/
+
+EOM
+	cp -f $OECORELOCALCONFEXTENDED $BUILDDIR/conf/local.extended.conf
+fi
+
 if [ "x" = "x$OECORELAYERCONF" ]; then
     OECORELAYERCONF="$OEROOT/meta/conf/bblayers.conf.sample"
 fi
-- 
1.7.5.1.300.gc565c



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

* [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-07  9:42 ` Kang Kai
@ 2011-06-07  9:42   ` Kang Kai
  -1 siblings, 0 replies; 29+ messages in thread
From: Kang Kai @ 2011-06-07  9:42 UTC (permalink / raw)
  To: richard.purdie; +Cc: Kang, poky, openembedded-core

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

Migrate configurability from oe, try to shrink minimal image size

Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
the options are enabled by default.

Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
what options you want to enable there.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/conf/distro/include/default-distrovars.inc    |    8 ++-
 .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
 meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc                |    6 ++
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 4b68a0a..16ac681 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
 ENABLE_BINARY_LOCALE_GENERATION ?= "1"
 LOCALE_UTF8_ONLY ?= "0"
 
-DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
+DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
+		libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+		libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+		libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+		libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+		libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+		libc-posix-wchar-io"
 
 IMAGE_FEATURES ?= ""
 
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..9214a0c
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-options.inc
@@ -0,0 +1,62 @@
+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', d, True) or '').split()
+        eglibc_cfg('libc-ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
+        eglibc_cfg('libc-backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
+        eglibc_cfg('libc-big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
+        eglibc_cfg('libc-bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
+        eglibc_cfg('libc-cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
+        eglibc_cfg('libc-catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
+        eglibc_cfg('libc-charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
+        eglibc_cfg('libc-crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
+        eglibc_cfg('libc-crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
+        eglibc_cfg('libc-db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
+        eglibc_cfg('libc-envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
+        eglibc_cfg('libc-fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
+        eglibc_cfg('libc-fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
+        eglibc_cfg('libc-fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
+        eglibc_cfg('libc-ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
+        eglibc_cfg('libc-getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
+        eglibc_cfg('libc-idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
+        eglibc_cfg('libc-inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
+        eglibc_cfg('libc-inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
+        eglibc_cfg('libc-libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
+        eglibc_cfg('libc-libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
+        eglibc_cfg('libc-locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
+        eglibc_cfg('libc-locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
+        eglibc_cfg('libc-memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
+        eglibc_cfg('libc-nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
+        eglibc_cfg('libc-nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
+        eglibc_cfg('libc-rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
+        eglibc_cfg('libc-rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
+        eglibc_cfg('libc-spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
+        eglibc_cfg('libc-streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
+        eglibc_cfg('libc-sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
+        eglibc_cfg('libc-utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
+        eglibc_cfg('libc-utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
+        eglibc_cfg('libc-wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
+        eglibc_cfg('libc-posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
+        eglibc_cfg('libc-posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
+        eglibc_cfg('libc-posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
+        eglibc_cfg('libc-posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
+
+        # try to fix disable charsets/locales/locale-code compile fail
+        if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
+            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
+        else:
+            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
+
+        return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 46ffa82..616f1af 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,8 @@ 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"
+
+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] 29+ messages in thread

* [PATCH 2/2] eglibc: migrate configurability from oe
@ 2011-06-07  9:42   ` Kang Kai
  0 siblings, 0 replies; 29+ messages in thread
From: Kang Kai @ 2011-06-07  9:42 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

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

Migrate configurability from oe, try to shrink minimal image size

Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
the options are enabled by default.

Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
what options you want to enable there.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/conf/distro/include/default-distrovars.inc    |    8 ++-
 .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
 meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc                |    6 ++
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 4b68a0a..16ac681 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
 ENABLE_BINARY_LOCALE_GENERATION ?= "1"
 LOCALE_UTF8_ONLY ?= "0"
 
-DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
+DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
+		libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+		libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+		libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+		libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+		libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+		libc-posix-wchar-io"
 
 IMAGE_FEATURES ?= ""
 
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..9214a0c
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-options.inc
@@ -0,0 +1,62 @@
+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', d, True) or '').split()
+        eglibc_cfg('libc-ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
+        eglibc_cfg('libc-backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
+        eglibc_cfg('libc-big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
+        eglibc_cfg('libc-bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
+        eglibc_cfg('libc-cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
+        eglibc_cfg('libc-catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
+        eglibc_cfg('libc-charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
+        eglibc_cfg('libc-crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
+        eglibc_cfg('libc-crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
+        eglibc_cfg('libc-db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
+        eglibc_cfg('libc-envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
+        eglibc_cfg('libc-fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
+        eglibc_cfg('libc-fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
+        eglibc_cfg('libc-fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
+        eglibc_cfg('libc-ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
+        eglibc_cfg('libc-getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
+        eglibc_cfg('libc-idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
+        eglibc_cfg('libc-inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
+        eglibc_cfg('libc-inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
+        eglibc_cfg('libc-libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
+        eglibc_cfg('libc-libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
+        eglibc_cfg('libc-locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
+        eglibc_cfg('libc-locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
+        eglibc_cfg('libc-memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
+        eglibc_cfg('libc-nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
+        eglibc_cfg('libc-nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
+        eglibc_cfg('libc-rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
+        eglibc_cfg('libc-rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
+        eglibc_cfg('libc-spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
+        eglibc_cfg('libc-streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
+        eglibc_cfg('libc-sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
+        eglibc_cfg('libc-utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
+        eglibc_cfg('libc-utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
+        eglibc_cfg('libc-wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
+        eglibc_cfg('libc-posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
+        eglibc_cfg('libc-posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
+        eglibc_cfg('libc-posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
+        eglibc_cfg('libc-posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
+
+        # try to fix disable charsets/locales/locale-code compile fail
+        if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
+            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
+        else:
+            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
+
+        return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 46ffa82..616f1af 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,8 @@ 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"
+
+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] 29+ messages in thread

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-07  9:42   ` Kang Kai
  (?)
@ 2011-06-07  9:48   ` Koen Kooi
  2011-06-08  1:45     ` Kang Kai
  -1 siblings, 1 reply; 29+ messages in thread
From: Koen Kooi @ 2011-06-07  9:48 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 7 jun 2011, om 11:42 heeft Kang Kai het volgende geschreven:

> From: Kang Kai <kai.kang@windriver.com>
> 
> Migrate configurability from oe, try to shrink minimal image size
> 
> Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
> the options are enabled by default.
> 
> Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
> what options you want to enable there.
> 
> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
> meta/conf/distro/include/default-distrovars.inc    |    8 ++-
> .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
> meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
> meta/recipes-core/eglibc/eglibc.inc                |    6 ++
> meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
> 5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
> index 4b68a0a..16ac681 100644
> --- a/meta/conf/distro/include/default-distrovars.inc
> +++ b/meta/conf/distro/include/default-distrovars.inc
> @@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
> ENABLE_BINARY_LOCALE_GENERATION ?= "1"
> LOCALE_UTF8_ONLY ?= "0"
> 
> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
> +		libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
> +		libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
> +		libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
> +		libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
> +		libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
> +		libc-posix-wchar-io"

I think a seperate DISTRO_LIBC_FEATURES var would be cleaner and easier to override.

regards,

Koen


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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-07  9:42   ` Kang Kai
  (?)
  (?)
@ 2011-06-07  9:53   ` Phil Blundell
  2011-06-08  1:59     ` Kang Kai
  -1 siblings, 1 reply; 29+ messages in thread
From: Phil Blundell @ 2011-06-07  9:53 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, 2011-06-07 at 17:42 +0800, Kang Kai wrote:
> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
> +		libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \

I don't think it is a good idea to invent a new "libc-ipv6" feature; you
can just use the existing "ipv6" one.  This is probably true for some of
your others too.

> +        # try to fix disable charsets/locales/locale-code compile fail
> +        if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
> +            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
> +        else:
> +            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)

Does that actually work?

p.




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

* Re: [PATCH 1/2] bitbake: add another local configuration file
  2011-06-07  9:42   ` Kang Kai
@ 2011-06-07 15:56     ` Saul Wold
  -1 siblings, 0 replies; 29+ messages in thread
From: Saul Wold @ 2011-06-07 15:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Kang, poky

On 06/07/2011 02:42 AM, Kang Kai wrote:
> From: Kang Kai<kai.kang@windriver.com>
>
> Add a new local configuration file local.conf.sample.extended, and more advanced
> settings what user can configure could put in this file.
>
> Signed-off-by: Kang Kai<kai.kang@windriver.com>
> ---
>   meta-yocto/conf/local.conf.sample.extended |    5 +++++
>   meta/conf/bitbake.conf                     |    1 +
>   scripts/oe-setup-builddir                  |   19 +++++++++++++++++++
>   3 files changed, 25 insertions(+), 0 deletions(-)
>   create mode 100644 meta-yocto/conf/local.conf.sample.extended
>
You seem to have inconsistent naming of your local.extended.conf sample 
file, this should probably named local.extended.conf.sample to be more 
consistent.

Sau!

> diff --git a/meta-yocto/conf/local.conf.sample.extended b/meta-yocto/conf/local.conf.sample.extended
> new file mode 100644
> index 0000000..048d641
> --- /dev/null
> +++ b/meta-yocto/conf/local.conf.sample.extended
> @@ -0,0 +1,5 @@
> +# eglibc configurability is used to reduce minimal images's size.
> +# the all supported eglibc options are default enabled by adding
> +# to DISTRO_FEATURES in default-distrovars.inc
> +# put the options what you want to enable below and uncomment it
> +#DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index de94316..1b1cf6b 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -641,6 +641,7 @@ CPU_FEATURES_arm ?= "vfp"
>   include conf/site.conf
>   include conf/auto.conf
>   include conf/local.conf
> +include conf/local.extended.conf
>   include conf/build/${BUILD_SYS}.conf
>   include conf/target/${TARGET_SYS}.conf
>   include conf/machine/${MACHINE}.conf
> diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
> index 5fc8b19..7af2373 100755
> --- a/scripts/oe-setup-builddir
> +++ b/scripts/oe-setup-builddir
> @@ -55,6 +55,7 @@ if [ "x" != "x$TEMPLATECONF" ]; then
>       fi
>       OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample"
>       OECORELOCALCONF="$TEMPLATECONF/local.conf.sample"
> +    OECORELOCALCONFEXTENDED="$TEMPLATECONF/local.conf.sample.extended"
>   fi
>
>   if [ "x" = "x$OECORELOCALCONF" ]; then
> @@ -79,6 +80,24 @@ EOM
>       cp -f $OECORELOCALCONF $BUILDDIR/conf/local.conf
>   fi
>
> +if ! (test -r "$BUILDDIR/conf/local.extended.conf"); then
> +cat<<EOM
> +You had no conf/local.conf file. This configuration file has therefore been
> +created for you with some default values. You may wish to edit it to use
> +different eglibc configuration options for example. See the file for more
> +information as common configuration options are commented.
> +
> +The Yocto Project has extensive documentation about OE including a reference manual
> +which can be found at:
> +    http://yoctoproject.org/community/documentation
> +
> +For more information about OpenEmbedded see their website:
> +    http://www.openembedded.org/
> +
> +EOM
> +	cp -f $OECORELOCALCONFEXTENDED $BUILDDIR/conf/local.extended.conf
> +fi
> +
>   if [ "x" = "x$OECORELAYERCONF" ]; then
>       OECORELAYERCONF="$OEROOT/meta/conf/bblayers.conf.sample"
>   fi



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

* Re: [OE-core] [PATCH 1/2] bitbake: add another local configuration file
@ 2011-06-07 15:56     ` Saul Wold
  0 siblings, 0 replies; 29+ messages in thread
From: Saul Wold @ 2011-06-07 15:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Kang, poky

On 06/07/2011 02:42 AM, Kang Kai wrote:
> From: Kang Kai<kai.kang@windriver.com>
>
> Add a new local configuration file local.conf.sample.extended, and more advanced
> settings what user can configure could put in this file.
>
> Signed-off-by: Kang Kai<kai.kang@windriver.com>
> ---
>   meta-yocto/conf/local.conf.sample.extended |    5 +++++
>   meta/conf/bitbake.conf                     |    1 +
>   scripts/oe-setup-builddir                  |   19 +++++++++++++++++++
>   3 files changed, 25 insertions(+), 0 deletions(-)
>   create mode 100644 meta-yocto/conf/local.conf.sample.extended
>
You seem to have inconsistent naming of your local.extended.conf sample 
file, this should probably named local.extended.conf.sample to be more 
consistent.

Sau!

> diff --git a/meta-yocto/conf/local.conf.sample.extended b/meta-yocto/conf/local.conf.sample.extended
> new file mode 100644
> index 0000000..048d641
> --- /dev/null
> +++ b/meta-yocto/conf/local.conf.sample.extended
> @@ -0,0 +1,5 @@
> +# eglibc configurability is used to reduce minimal images's size.
> +# the all supported eglibc options are default enabled by adding
> +# to DISTRO_FEATURES in default-distrovars.inc
> +# put the options what you want to enable below and uncomment it
> +#DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index de94316..1b1cf6b 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -641,6 +641,7 @@ CPU_FEATURES_arm ?= "vfp"
>   include conf/site.conf
>   include conf/auto.conf
>   include conf/local.conf
> +include conf/local.extended.conf
>   include conf/build/${BUILD_SYS}.conf
>   include conf/target/${TARGET_SYS}.conf
>   include conf/machine/${MACHINE}.conf
> diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
> index 5fc8b19..7af2373 100755
> --- a/scripts/oe-setup-builddir
> +++ b/scripts/oe-setup-builddir
> @@ -55,6 +55,7 @@ if [ "x" != "x$TEMPLATECONF" ]; then
>       fi
>       OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample"
>       OECORELOCALCONF="$TEMPLATECONF/local.conf.sample"
> +    OECORELOCALCONFEXTENDED="$TEMPLATECONF/local.conf.sample.extended"
>   fi
>
>   if [ "x" = "x$OECORELOCALCONF" ]; then
> @@ -79,6 +80,24 @@ EOM
>       cp -f $OECORELOCALCONF $BUILDDIR/conf/local.conf
>   fi
>
> +if ! (test -r "$BUILDDIR/conf/local.extended.conf"); then
> +cat<<EOM
> +You had no conf/local.conf file. This configuration file has therefore been
> +created for you with some default values. You may wish to edit it to use
> +different eglibc configuration options for example. See the file for more
> +information as common configuration options are commented.
> +
> +The Yocto Project has extensive documentation about OE including a reference manual
> +which can be found at:
> +    http://yoctoproject.org/community/documentation
> +
> +For more information about OpenEmbedded see their website:
> +    http://www.openembedded.org/
> +
> +EOM
> +	cp -f $OECORELOCALCONFEXTENDED $BUILDDIR/conf/local.extended.conf
> +fi
> +
>   if [ "x" = "x$OECORELAYERCONF" ]; then
>       OECORELAYERCONF="$OEROOT/meta/conf/bblayers.conf.sample"
>   fi


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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-07  9:42   ` Kang Kai
                     ` (2 preceding siblings ...)
  (?)
@ 2011-06-07 17:50   ` Khem Raj
  2011-06-08  2:04     ` Kang Kai
  -1 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2011-06-07 17:50 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Jun 7, 2011 at 2:42 AM, Kang Kai <kai.kang@windriver.com> wrote:
> From: Kang Kai <kai.kang@windriver.com>
>
> Migrate configurability from oe, try to shrink minimal image size
>
> Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
> the options are enabled by default.
>
> Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
> what options you want to enable there.
>
> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
>  meta/conf/distro/include/default-distrovars.inc    |    8 ++-
>  .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
>  meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
>  meta/recipes-core/eglibc/eglibc.inc                |    6 ++
>  meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>  5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
> index 4b68a0a..16ac681 100644
> --- a/meta/conf/distro/include/default-distrovars.inc
> +++ b/meta/conf/distro/include/default-distrovars.inc
> @@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
>  ENABLE_BINARY_LOCALE_GENERATION ?= "1"
>  LOCALE_UTF8_ONLY ?= "0"
>
> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
> +               libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
> +               libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
> +               libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
> +               libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
> +               libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
> +               libc-posix-wchar-io"
>

libc-ipv6 should be merged with existing ipv6 DISTRO_FEATURE we do not
need two keywords for same feature
we also need documentation on these features and probably mention in
local.conf.sample or may be a new file
for adavanced configuration

>  IMAGE_FEATURES ?= ""
>
> 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..9214a0c
> --- /dev/null
> +++ b/meta/recipes-core/eglibc/eglibc-options.inc
> @@ -0,0 +1,62 @@
> +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', d, True) or '').split()
> +        eglibc_cfg('libc-ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
> +        eglibc_cfg('libc-backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
> +        eglibc_cfg('libc-big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
> +        eglibc_cfg('libc-bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
> +        eglibc_cfg('libc-cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
> +        eglibc_cfg('libc-catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
> +        eglibc_cfg('libc-charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
> +        eglibc_cfg('libc-crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
> +        eglibc_cfg('libc-crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
> +        eglibc_cfg('libc-db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
> +        eglibc_cfg('libc-envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
> +        eglibc_cfg('libc-fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
> +        eglibc_cfg('libc-fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
> +        eglibc_cfg('libc-fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
> +        eglibc_cfg('libc-ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
> +        eglibc_cfg('libc-getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
> +        eglibc_cfg('libc-idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
> +        eglibc_cfg('libc-inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
> +        eglibc_cfg('libc-inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
> +        eglibc_cfg('libc-libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
> +        eglibc_cfg('libc-libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
> +        eglibc_cfg('libc-locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
> +        eglibc_cfg('libc-locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
> +        eglibc_cfg('libc-memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
> +        eglibc_cfg('libc-nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
> +        eglibc_cfg('libc-nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
> +        eglibc_cfg('libc-rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
> +        eglibc_cfg('libc-rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
> +        eglibc_cfg('libc-spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
> +        eglibc_cfg('libc-streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
> +        eglibc_cfg('libc-sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
> +        eglibc_cfg('libc-utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
> +        eglibc_cfg('libc-utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
> +        eglibc_cfg('libc-wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
> +        eglibc_cfg('libc-posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
> +        eglibc_cfg('libc-posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
> +        eglibc_cfg('libc-posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
> +        eglibc_cfg('libc-posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
> +
> +        # try to fix disable charsets/locales/locale-code compile fail
> +        if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
> +            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
> +        else:
> +            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
> +
> +        return "\n".join(cnf)
> diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
> index 46ffa82..616f1af 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,8 @@ 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"
> +
> +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
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-07  9:48   ` Koen Kooi
@ 2011-06-08  1:45     ` Kang Kai
  2011-06-08  6:25       ` Koen Kooi
  0 siblings, 1 reply; 29+ messages in thread
From: Kang Kai @ 2011-06-08  1:45 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Koen Kooi

On 2011年06月07日 17:48, Koen Kooi wrote:
> Op 7 jun 2011, om 11:42 heeft Kang Kai het volgende geschreven:
>
>> From: Kang Kai<kai.kang@windriver.com>
>>
>> Migrate configurability from oe, try to shrink minimal image size
>>
>> Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
>> the options are enabled by default.
>>
>> Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
>> what options you want to enable there.
>>
>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> ---
>> meta/conf/distro/include/default-distrovars.inc    |    8 ++-
>> .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
>> meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
>> meta/recipes-core/eglibc/eglibc.inc                |    6 ++
>> meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>> 5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
>> index 4b68a0a..16ac681 100644
>> --- a/meta/conf/distro/include/default-distrovars.inc
>> +++ b/meta/conf/distro/include/default-distrovars.inc
>> @@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
>> ENABLE_BINARY_LOCALE_GENERATION ?= "1"
>> LOCALE_UTF8_ONLY ?= "0"
>>
>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
>> +		libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
>> +		libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
>> +		libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
>> +		libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
>> +		libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
>> +		libc-posix-wchar-io"
Hi Koen,
> I think a seperate DISTRO_LIBC_FEATURES var would be cleaner and easier to override.
I used DISTRO_FEATURES_EGLIBC before, but it didn't make Richard happy. :)

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




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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-07  9:53   ` Phil Blundell
@ 2011-06-08  1:59     ` Kang Kai
  2011-06-08  2:34       ` Khem Raj
  0 siblings, 1 reply; 29+ messages in thread
From: Kang Kai @ 2011-06-08  1:59 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 2011年06月07日 17:53, Phil Blundell wrote:
> On Tue, 2011-06-07 at 17:42 +0800, Kang Kai wrote:
Hi Phil,

Thanks for your comment.
>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
>> +		libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
> I don't think it is a good idea to invent a new "libc-ipv6" feature; you
> can just use the existing "ipv6" one.  This is probably true for some of
> your others too.

eglibc needs to support ipv6 by default, but if other application such 
as iptables doesn't want to support ipv6, remove "ipv6" will also 
disable eglibc ipv6 support。
If it is ok to disable or enable ipv6 at same time, I will update the 
patch with "ipv6".

>> +        # try to fix disable charsets/locales/locale-code compile fail
>> +        if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
>> +            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
>> +        else:
>> +            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
> Does that actually work?

Yes, it works. I can build eglic after uncomment the line in 
local.extended.conf to disable all configurable options. But remove the 
codes above, it will fail.
> p.
>
>
Regards,
Kai
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-07 17:50   ` Khem Raj
@ 2011-06-08  2:04     ` Kang Kai
  0 siblings, 0 replies; 29+ messages in thread
From: Kang Kai @ 2011-06-08  2:04 UTC (permalink / raw)
  To: openembedded-core

On 2011年06月08日 01:50, Khem Raj wrote:
> On Tue, Jun 7, 2011 at 2:42 AM, Kang Kai<kai.kang@windriver.com>  wrote:
>> From: Kang Kai<kai.kang@windriver.com>
>>
>> Migrate configurability from oe, try to shrink minimal image size
>>
>> Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
>> the options are enabled by default.
>>
>> Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
>> what options you want to enable there.
>>
>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> ---
>>   meta/conf/distro/include/default-distrovars.inc    |    8 ++-
>>   .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
>>   meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
>>   meta/recipes-core/eglibc/eglibc.inc                |    6 ++
>>   meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>>   5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
>> index 4b68a0a..16ac681 100644
>> --- a/meta/conf/distro/include/default-distrovars.inc
>> +++ b/meta/conf/distro/include/default-distrovars.inc
>> @@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
>>   ENABLE_BINARY_LOCALE_GENERATION ?= "1"
>>   LOCALE_UTF8_ONLY ?= "0"
>>
>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
>> +               libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
>> +               libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
>> +               libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
>> +               libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
>> +               libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
>> +               libc-posix-wchar-io"
>>

Hi Khem,
> libc-ipv6 should be merged with existing ipv6 DISTRO_FEATURE we do not
> need two keywords for same feature
> we also need documentation on these features and probably mention in
> local.conf.sample or may be a new file
> for adavanced configuration
>
I put some information in conf/local.extended.conf in my first patch.

diff --git a/meta-yocto/conf/local.conf.sample.extended b/meta-yocto/conf/local.conf.sample.extended
new file mode 100644
index 0000000..048d641
--- /dev/null
+++ b/meta-yocto/conf/local.conf.sample.extended
@@ -0,0 +1,5 @@
+# eglibc configurability is used to reduce minimal images's size.
+# the all supported eglibc options are default enabled by adding
+# to DISTRO_FEATURES in default-distrovars.inc
+# put the options what you want to enable below and uncomment it
+#DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"


Is that enough or not?

Thanks and Regards,
Kai




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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-08  1:59     ` Kang Kai
@ 2011-06-08  2:34       ` Khem Raj
  0 siblings, 0 replies; 29+ messages in thread
From: Khem Raj @ 2011-06-08  2:34 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Jun 7, 2011 at 6:59 PM, Kang Kai <Kai.Kang@windriver.com> wrote:
> On 2011年06月07日 17:53, Phil Blundell wrote:
>>
>> On Tue, 2011-06-07 at 17:42 +0800, Kang Kai wrote:
>
> Hi Phil,
>
> Thanks for your comment.
>>>
>>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost
>>> wifi nfs zeroconf pci"
>>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost
>>> wifi nfs zeroconf pci \
>>> +               libc-ipv6 libc-backtrace libc-big-macros libc-bsd
>>> libc-cxx-tests libc-catgets libc-charsets libc-crypt \
>>
>> I don't think it is a good idea to invent a new "libc-ipv6" feature; you
>> can just use the existing "ipv6" one.  This is probably true for some of
>> your others too.
>
> eglibc needs to support ipv6 by default, but if other application such as
> iptables doesn't want to support ipv6, remove "ipv6" will also disable
> eglibc ipv6 support。

I think if one distro does not need ipv6 then having it in eglibc is not needed
too

> If it is ok to disable or enable ipv6 at same time, I will update the patch
> with "ipv6".
>
>>> +        # try to fix disable charsets/locales/locale-code compile fail
>>> +        if 'libc-charsets' in distro_features and 'libc-locales' in
>>> distro_features and 'libc-locale-code' in distro_features:
>>> +            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
>>> +        else:
>>> +            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
>>
>> Does that actually work?
>
> Yes, it works. I can build eglic after uncomment the line in
> local.extended.conf to disable all configurable options. But remove the
> codes above, it will fail.
>>
>> p.
>>
>>
> Regards,
> Kai
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-08  1:45     ` Kang Kai
@ 2011-06-08  6:25       ` Koen Kooi
  2011-06-08  6:35         ` Kang Kai
  0 siblings, 1 reply; 29+ messages in thread
From: Koen Kooi @ 2011-06-08  6:25 UTC (permalink / raw)
  To: Kang Kai, Patches and discussions about the oe-core layer


Op 8 jun 2011, om 03:45 heeft Kang Kai het volgende geschreven:

> On 2011年06月07日 17:48, Koen Kooi wrote:
>> Op 7 jun 2011, om 11:42 heeft Kang Kai het volgende geschreven:
>> 
>>> From: Kang Kai<kai.kang@windriver.com>
>>> 
>>> Migrate configurability from oe, try to shrink minimal image size
>>> 
>>> Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
>>> the options are enabled by default.
>>> 
>>> Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
>>> what options you want to enable there.
>>> 
>>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>>> ---
>>> meta/conf/distro/include/default-distrovars.inc    |    8 ++-
>>> .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
>>> meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
>>> meta/recipes-core/eglibc/eglibc.inc                |    6 ++
>>> meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>>> 5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
>>> index 4b68a0a..16ac681 100644
>>> --- a/meta/conf/distro/include/default-distrovars.inc
>>> +++ b/meta/conf/distro/include/default-distrovars.inc
>>> @@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
>>> ENABLE_BINARY_LOCALE_GENERATION ?= "1"
>>> LOCALE_UTF8_ONLY ?= "0"
>>> 
>>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
>>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
>>> +		libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
>>> +		libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
>>> +		libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
>>> +		libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
>>> +		libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
>>> +		libc-posix-wchar-io"
> Hi Koen,
>> I think a seperate DISTRO_LIBC_FEATURES var would be cleaner and easier to override.
> I used DISTRO_FEATURES_EGLIBC before, but it didn't make Richard happy. :)

So how does one easily override LIBC features without touching other features?


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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-08  6:25       ` Koen Kooi
@ 2011-06-08  6:35         ` Kang Kai
  2011-06-08  6:42           ` Martin Jansa
  0 siblings, 1 reply; 29+ messages in thread
From: Kang Kai @ 2011-06-08  6:35 UTC (permalink / raw)
  To: Koen Kooi; +Cc: Patches and discussions about the oe-core layer

On 2011年06月08日 14:25, Koen Kooi wrote:
> Op 8 jun 2011, om 03:45 heeft Kang Kai het volgende geschreven:
>
>> On 2011年06月07日 17:48, Koen Kooi wrote:
>>> Op 7 jun 2011, om 11:42 heeft Kang Kai het volgende geschreven:
>>>
>>>> From: Kang Kai<kai.kang@windriver.com>
>>>>
>>>> Migrate configurability from oe, try to shrink minimal image size
>>>>
>>>> Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
>>>> the options are enabled by default.
>>>>
>>>> Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
>>>> what options you want to enable there.
>>>>
>>>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>>>> ---
>>>> meta/conf/distro/include/default-distrovars.inc    |    8 ++-
>>>> .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
>>>> meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
>>>> meta/recipes-core/eglibc/eglibc.inc                |    6 ++
>>>> meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>>>> 5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
>>>> index 4b68a0a..16ac681 100644
>>>> --- a/meta/conf/distro/include/default-distrovars.inc
>>>> +++ b/meta/conf/distro/include/default-distrovars.inc
>>>> @@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
>>>> ENABLE_BINARY_LOCALE_GENERATION ?= "1"
>>>> LOCALE_UTF8_ONLY ?= "0"
>>>>
>>>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
>>>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
>>>> +		libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
>>>> +		libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
>>>> +		libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
>>>> +		libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
>>>> +		libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
>>>> +		libc-posix-wchar-io"
>> Hi Koen,
>>> I think a seperate DISTRO_LIBC_FEATURES var would be cleaner and easier to override.
>> I used DISTRO_FEATURES_EGLIBC before, but it didn't make Richard happy. :)
> So how does one easily override LIBC features without touching other features?
That is why use libc-spawn not "spawn" itself.



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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-08  6:35         ` Kang Kai
@ 2011-06-08  6:42           ` Martin Jansa
  0 siblings, 0 replies; 29+ messages in thread
From: Martin Jansa @ 2011-06-08  6:42 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Koen Kooi

[-- Attachment #1: Type: text/plain, Size: 3563 bytes --]

On Wed, Jun 08, 2011 at 02:35:18PM +0800, Kang Kai wrote:
> On 2011年06月08日 14:25, Koen Kooi wrote:
> > Op 8 jun 2011, om 03:45 heeft Kang Kai het volgende geschreven:
> >
> >> On 2011年06月07日 17:48, Koen Kooi wrote:
> >>> Op 7 jun 2011, om 11:42 heeft Kang Kai het volgende geschreven:
> >>>
> >>>> From: Kang Kai<kai.kang@windriver.com>
> >>>>
> >>>> Migrate configurability from oe, try to shrink minimal image size
> >>>>
> >>>> Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
> >>>> the options are enabled by default.
> >>>>
> >>>> Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
> >>>> what options you want to enable there.
> >>>>
> >>>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
> >>>> ---
> >>>> meta/conf/distro/include/default-distrovars.inc    |    8 ++-
> >>>> .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
> >>>> meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
> >>>> meta/recipes-core/eglibc/eglibc.inc                |    6 ++
> >>>> meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
> >>>> 5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
> >>>> index 4b68a0a..16ac681 100644
> >>>> --- a/meta/conf/distro/include/default-distrovars.inc
> >>>> +++ b/meta/conf/distro/include/default-distrovars.inc
> >>>> @@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
> >>>> ENABLE_BINARY_LOCALE_GENERATION ?= "1"
> >>>> LOCALE_UTF8_ONLY ?= "0"
> >>>>
> >>>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
> >>>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
> >>>> +		libc-ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
> >>>> +		libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
> >>>> +		libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
> >>>> +		libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
> >>>> +		libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
> >>>> +		libc-posix-wchar-io"
> >> Hi Koen,
> >>> I think a seperate DISTRO_LIBC_FEATURES var would be cleaner and easier to override.
> >> I used DISTRO_FEATURES_EGLIBC before, but it didn't make Richard happy. :)
> > So how does one easily override LIBC features without touching other features?
> That is why use libc-spawn not "spawn" itself.

I agree with koen, when distro wants to keep all default libc-* but
alter other DISTRO_FEATURES it has to list all libc-* in it's own
config.

IMHO DISTRO_FEATURES_EGLIBC had wrong only suffix as it's not _EGLIBC
specific,

DISTRO_FEATURES_LIBC or proposed DISTRO_LIBC_FEATURES will allow
distributions to override it like this:
DISTRO_FEATURES = "foo bar ${DISTRO_FEATURES_LIBC}" which is much better
then 6 lines of libc-* features which need to resync when someone adds
new feature with new *libc version.

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-13 10:00             ` Martin Jansa
@ 2011-06-13 11:07               ` Phil Blundell
  0 siblings, 0 replies; 29+ messages in thread
From: Phil Blundell @ 2011-06-13 11:07 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-06-13 at 12:00 +0200, Martin Jansa wrote:
> On Mon, Jun 13, 2011 at 11:42 AM, Phil Blundell <pb@pbcl.net> wrote:
> > FWIW, I think ipv6 should probably be set on in default-distrovar's
> > DISTRO_FEATURES, but I guess some higher authority would need to make
> > that decision.
>
> I see your point
> 
> but ipv6 as DISTRO_FEATURES_LIBC ends in DISTRO_FEATURES as well
> DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost
> wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"

Oh, so it does.  So the effect of this is that we will end up with ipv6
on in DISTRO_FEATURES anyway.  I guess I would consider this a good
result, if perhaps for the wrong reasons :-)

p.





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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-13  9:42           ` Phil Blundell
@ 2011-06-13 10:00             ` Martin Jansa
  2011-06-13 11:07               ` Phil Blundell
  0 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2011-06-13 10:00 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, Jun 13, 2011 at 11:42 AM, Phil Blundell <pb@pbcl.net> wrote:
> On Mon, 2011-06-13 at 17:34 +0800, Kang Kai wrote:
>> It seems DISTRO_FEATURE doesn't want to enable ipv6 by default, but
>> eglibc needs supports it.
>
> That doesn't seem like it can be right.  Why would you want ipv6 in
> eglibc if your DISTRO isn't using it?
>
> The whole point of DISTRO_FEATURES is that it's meant to give you a
> coherent set of system-wide options.
>
> FWIW, I think ipv6 should probably be set on in default-distrovar's
> DISTRO_FEATURES, but I guess some higher authority would need to make
> that decision.
>
> p.

I see your point

but ipv6 as DISTRO_FEATURES_LIBC ends in DISTRO_FEATURES as well
DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost
wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
so I'm fine with ipv6 in DISTRO_FEATURES_LIBC

this way I can expect *libc to be tweaked by DISTRO_FEATURES_LIBC only
and the rest of image by whole DISTRO_FEATURES (including libc-* flags
and ipv6 from DISTRO_FEATURES_LIBC)

Regards,



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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-13  9:34         ` Kang Kai
@ 2011-06-13  9:42           ` Phil Blundell
  2011-06-13 10:00             ` Martin Jansa
  0 siblings, 1 reply; 29+ messages in thread
From: Phil Blundell @ 2011-06-13  9:42 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-06-13 at 17:34 +0800, Kang Kai wrote:
> It seems DISTRO_FEATURE doesn't want to enable ipv6 by default, but 
> eglibc needs supports it.

That doesn't seem like it can be right.  Why would you want ipv6 in
eglibc if your DISTRO isn't using it?  

The whole point of DISTRO_FEATURES is that it's meant to give you a
coherent set of system-wide options.

FWIW, I think ipv6 should probably be set on in default-distrovar's
DISTRO_FEATURES, but I guess some higher authority would need to make
that decision.

p.





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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-13  9:27       ` Phil Blundell
@ 2011-06-13  9:34         ` Kang Kai
  2011-06-13  9:42           ` Phil Blundell
  0 siblings, 1 reply; 29+ messages in thread
From: Kang Kai @ 2011-06-13  9:34 UTC (permalink / raw)
  To: openembedded-core

On 2011年06月13日 17:27, Phil Blundell wrote:
> On Mon, 2011-06-13 at 17:15 +0800, Kang Kai wrote:
>> On 2011年06月13日 17:05, Phil Blundell wrote:
>>> On Mon, 2011-06-13 at 17:01 +0800, Kang Kai wrote:
>>>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
>>>> +DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
>>>> +					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
>>>> +					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
>>>> +					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
>>>> +					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
>>>> +					libc-posix-wchar-io"
>>>> +
>>>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
>>> Why is ipv6 in DISTRO_FEATURES_LIBC rather than DISTRO_FEATURES?
>> Because eglibc has a feature libc-ipv6, and DISTRO_FEATURES has a ipv6
>> already. It is not needed to import a new feature name on the same
>> things, so use original ipv6. And eglibc still needs provide this
>> option, then put it in DISTRO_FEATURES_LIBC.
> I'm not quite sure I understood what you wrote above.  But I think what
> I was asking was, why doesn't eglibc just look at the existing ipv6
> DISTRO_FEATURE?

It seems DISTRO_FEATURE doesn't want to enable ipv6 by default, but 
eglibc needs supports it.

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




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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-13  9:15     ` Kang Kai
@ 2011-06-13  9:27       ` Phil Blundell
  2011-06-13  9:34         ` Kang Kai
  0 siblings, 1 reply; 29+ messages in thread
From: Phil Blundell @ 2011-06-13  9:27 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-06-13 at 17:15 +0800, Kang Kai wrote:
> On 2011年06月13日 17:05, Phil Blundell wrote:
> > On Mon, 2011-06-13 at 17:01 +0800, Kang Kai wrote:
> >> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
> >> +DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
> >> +					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
> >> +					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
> >> +					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
> >> +					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
> >> +					libc-posix-wchar-io"
> >> +
> >> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
> > Why is ipv6 in DISTRO_FEATURES_LIBC rather than DISTRO_FEATURES?
> 
> Because eglibc has a feature libc-ipv6, and DISTRO_FEATURES has a ipv6 
> already. It is not needed to import a new feature name on the same 
> things, so use original ipv6. And eglibc still needs provide this 
> option, then put it in DISTRO_FEATURES_LIBC.

I'm not quite sure I understood what you wrote above.  But I think what
I was asking was, why doesn't eglibc just look at the existing ipv6
DISTRO_FEATURE?

p.





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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-13  9:05   ` Phil Blundell
@ 2011-06-13  9:15     ` Kang Kai
  2011-06-13  9:27       ` Phil Blundell
  0 siblings, 1 reply; 29+ messages in thread
From: Kang Kai @ 2011-06-13  9:15 UTC (permalink / raw)
  To: openembedded-core

On 2011年06月13日 17:05, Phil Blundell wrote:
> On Mon, 2011-06-13 at 17:01 +0800, Kang Kai wrote:
>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
>> +DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
>> +					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
>> +					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
>> +					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
>> +					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
>> +					libc-posix-wchar-io"
>> +
>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
> Why is ipv6 in DISTRO_FEATURES_LIBC rather than DISTRO_FEATURES?

Because eglibc has a feature libc-ipv6, and DISTRO_FEATURES has a ipv6 
already. It is not needed to import a new feature name on the same 
things, so use original ipv6. And eglibc still needs provide this 
option, then put it in DISTRO_FEATURES_LIBC.

> p.
>

Regards,
Kai

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




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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-13  9:01 ` [PATCH 2/2] eglibc: migrate configurability from oe Kang Kai
@ 2011-06-13  9:05   ` Phil Blundell
  2011-06-13  9:15     ` Kang Kai
  0 siblings, 1 reply; 29+ messages in thread
From: Phil Blundell @ 2011-06-13  9:05 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-06-13 at 17:01 +0800, Kang Kai wrote:
> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
> +DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
> +					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
> +					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
> +					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
> +					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
> +					libc-posix-wchar-io"
> +
> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"

Why is ipv6 in DISTRO_FEATURES_LIBC rather than DISTRO_FEATURES?

p.





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

* [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-13  9:01 [PATCH 0/2] eglibc: migrate configurability from oe V5 Kang Kai
@ 2011-06-13  9:01 ` Kang Kai
  2011-06-13  9:05   ` Phil Blundell
  0 siblings, 1 reply; 29+ messages in thread
From: Kang Kai @ 2011-06-13  9:01 UTC (permalink / raw)
  To: sgw; +Cc: openembedded-core

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

Migrate configurability from oe, try to shrink minimal image size

All eglibc configuration options are included in conf/distro/include/default-distrovars.inc.
Define DISTRO_FEATURES_LIBC and DISTRO_FEATURES in local.conf with the same way
in local.conf.sample.extended to enable those options.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/conf/distro/include/default-distrovars.inc |    9 +++-
 meta/recipes-core/eglibc/eglibc-options.inc     |   62 +++++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc             |    6 ++
 3 files changed, 76 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc

diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 4b68a0a..2cde46c 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -10,7 +10,14 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
 ENABLE_BINARY_LOCALE_GENERATION ?= "1"
 LOCALE_UTF8_ONLY ?= "0"
 
-DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
+DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+					libc-posix-wchar-io"
+
+DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
 
 IMAGE_FEATURES ?= ""
 
diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
new file mode 100644
index 0000000..119ceef
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-options.inc
@@ -0,0 +1,62 @@
+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', d, True) or '').split()
+        eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
+        eglibc_cfg('libc-backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
+        eglibc_cfg('libc-big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
+        eglibc_cfg('libc-bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
+        eglibc_cfg('libc-cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
+        eglibc_cfg('libc-catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
+        eglibc_cfg('libc-charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
+        eglibc_cfg('libc-crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
+        eglibc_cfg('libc-crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
+        eglibc_cfg('libc-db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
+        eglibc_cfg('libc-envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
+        eglibc_cfg('libc-fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
+        eglibc_cfg('libc-fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
+        eglibc_cfg('libc-fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
+        eglibc_cfg('libc-ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
+        eglibc_cfg('libc-getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
+        eglibc_cfg('libc-idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
+        eglibc_cfg('libc-inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
+        eglibc_cfg('libc-inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
+        eglibc_cfg('libc-libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
+        eglibc_cfg('libc-libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
+        eglibc_cfg('libc-locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
+        eglibc_cfg('libc-locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
+        eglibc_cfg('libc-memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
+        eglibc_cfg('libc-nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
+        eglibc_cfg('libc-nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
+        eglibc_cfg('libc-rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
+        eglibc_cfg('libc-rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
+        eglibc_cfg('libc-spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
+        eglibc_cfg('libc-streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
+        eglibc_cfg('libc-sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
+        eglibc_cfg('libc-utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
+        eglibc_cfg('libc-utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
+        eglibc_cfg('libc-wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
+        eglibc_cfg('libc-posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
+        eglibc_cfg('libc-posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
+        eglibc_cfg('libc-posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
+        eglibc_cfg('libc-posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
+
+        # try to fix disable charsets/locales/locale-code compile fail
+        if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
+            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
+        else:
+            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
+
+        return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 46ffa82..616f1af 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,8 @@ 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"
+
+OE_FEATURES = "${@features_to_eglibc_settings(d)}"
+do_configure_prepend() {
+	echo '${OE_FEATURES}' > ${B}/option-groups.config
+}
-- 
1.7.5.1.300.gc565c




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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-10  3:13   ` Khem Raj
@ 2011-06-10  3:25     ` Kang Kai
  0 siblings, 0 replies; 29+ messages in thread
From: Kang Kai @ 2011-06-10  3:25 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

Hi Khem,

> On 06/07/2011 10:56 PM, Kang Kai wrote:
>> From: Kang Kai<kai.kang@windriver.com>
>>
>> Migrate configurability from oe, try to shrink minimal image size
>>
>> Update to get eglibc configuration options from DISTRO_FEATURES and 
>> enable them. All
>> the options are enabled by default.
>>
>> Uncomment the line in conf/local.extended.conf to define 
>> DISTRO_FEATURES, so put
>> what options you want to enable there.
>>
>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> ---
>>   meta/conf/distro/include/default-distrovars.inc    |    8 ++-
>>   .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
>>   meta/recipes-core/eglibc/eglibc-options.inc        |   62 
>> ++++++++++++++++++++
>>   meta/recipes-core/eglibc/eglibc.inc                |    6 ++
>>   meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>>   5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc 
>> b/meta/conf/distro/include/default-distrovars.inc
>> index 4b68a0a..052f9e6 100644
>> --- a/meta/conf/distro/include/default-distrovars.inc
>> +++ b/meta/conf/distro/include/default-distrovars.inc
>> @@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
>>   ENABLE_BINARY_LOCALE_GENERATION ?= "1"
>>   LOCALE_UTF8_ONLY ?= "0"
>>
>> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget 
>> usbhost wifi nfs zeroconf pci"
>> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget 
>> usbhost wifi nfs zeroconf pci \
>> +        ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests 
>> libc-catgets libc-charsets libc-crypt \
>> +        libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt 
>> libc-fmtmsg libc-fstab libc-ftraverse \
>> +        libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm 
>> libc-libm-big libc-locales libc-locale-code \
>> +        libc-memusage libc-nis libc-nsswitch libc-rcmd 
>> libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
>> +        libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar 
>> libc-posix-regexp libc-posix-regexp-glibc \
>> +        libc-posix-wchar-io"
>>
>>   IMAGE_FEATURES ?= ""
>>
>> 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;
>> +             }
>
>
> this patch does not seem correct to me. It should be using 
> GLRO_dl_debug_mask instead here

Yes, you are right, this patch is not correct.
And got respond this morning from eglibc maillist, this will be fix in 
eglibc branch 2.13

Thanks.
Kai

>
>> diff --git a/meta/recipes-core/eglibc/eglibc-options.inc 
>> b/meta/recipes-core/eglibc/eglibc-options.inc
>> new file mode 100644
>> index 0000000..119ceef
>> --- /dev/null
>> +++ b/meta/recipes-core/eglibc/eglibc-options.inc
>> @@ -0,0 +1,62 @@
>> +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', d, 
>> True) or '').split()
>> +        eglibc_cfg('ipv6',      distro_features, 
>> 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
>> +        eglibc_cfg('libc-backtrace',      distro_features, 
>> 'OPTION_EGLIBC_BACKTRACE', cnf)
>> +        eglibc_cfg('libc-big-macros',      distro_features, 
>> 'OPTION_EGLIBC_BIG_MACROS', cnf)
>> +        eglibc_cfg('libc-bsd',      distro_features, 
>> 'OPTION_EGLIBC_BSD', cnf)
>> +        eglibc_cfg('libc-cxx-tests',      distro_features, 
>> 'OPTION_EGLIBC_CXX_TESTS', cnf)
>> +        eglibc_cfg('libc-catgets',      distro_features, 
>> 'OPTION_EGLIBC_CATGETS', cnf)
>> +        eglibc_cfg('libc-charsets',      distro_features, 
>> 'OPTION_EGLIBC_CHARSETS', cnf)
>> +        eglibc_cfg('libc-crypt',      distro_features, 
>> 'OPTION_EGLIBC_CRYPT', cnf)
>> +        eglibc_cfg('libc-crypt-ufc',      distro_features, 
>> 'OPTION_EGLIBC_CRYPT_UFC', cnf)
>> +        eglibc_cfg('libc-db-aliases',      distro_features, 
>> 'OPTION_EGLIBC_DB_ALIASES', cnf)
>> +        eglibc_cfg('libc-envz',      distro_features, 
>> 'OPTION_EGLIBC_ENVZ', cnf)
>> +        eglibc_cfg('libc-fcvt',      distro_features, 
>> 'OPTION_EGLIBC_FCVT', cnf)
>> +        eglibc_cfg('libc-fmtmsg',      distro_features, 
>> 'OPTION_EGLIBC_FMTMSG', cnf)
>> +        eglibc_cfg('libc-fstab',      distro_features, 
>> 'OPTION_EGLIBC_FSTAB', cnf)
>> +        eglibc_cfg('libc-ftraverse',      distro_features, 
>> 'OPTION_EGLIBC_FTRAVERSE', cnf)
>> +        eglibc_cfg('libc-getlogin',      distro_features, 
>> 'OPTION_EGLIBC_GETLOGIN', cnf)
>> +        eglibc_cfg('libc-idn',      distro_features, 
>> 'OPTION_EGLIBC_IDN', cnf)
>> +        eglibc_cfg('libc-inet',      distro_features, 
>> 'OPTION_EGLIBC_INET', cnf)
>> +        eglibc_cfg('libc-inet-anl',      distro_features, 
>> 'OPTION_EGLIBC_INET_ANL', cnf)
>> +        eglibc_cfg('libc-libm',      distro_features, 
>> 'OPTION_EGLIBC_LIBM', cnf)
>> +        eglibc_cfg('libc-libm-big',      distro_features, 
>> 'OPTION_EGLIBC_LIBM_BIG', cnf)
>> +        eglibc_cfg('libc-locales',      distro_features, 
>> 'OPTION_EGLIBC_LOCALES', cnf)
>> +        eglibc_cfg('libc-locale-code',      distro_features, 
>> 'OPTION_EGLIBC_LOCALE_CODE', cnf)
>> +        eglibc_cfg('libc-memusage',      distro_features, 
>> 'OPTION_EGLIBC_MEMUSAGE', cnf)
>> +        eglibc_cfg('libc-nis',      distro_features, 
>> 'OPTION_EGLIBC_NIS', cnf)
>> +        eglibc_cfg('libc-nsswitch',      distro_features, 
>> 'OPTION_EGLIBC_NSSWITCH', cnf)
>> +        eglibc_cfg('libc-rcmd',      distro_features, 
>> 'OPTION_EGLIBC_RCMD', cnf)
>> +        eglibc_cfg('libc-rtld-debug',      distro_features, 
>> 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
>> +        eglibc_cfg('libc-spawn',      distro_features, 
>> 'OPTION_EGLIBC_SPAWN', cnf)
>> +        eglibc_cfg('libc-streams',      distro_features, 
>> 'OPTION_EGLIBC_STREAMS', cnf)
>> +        eglibc_cfg('libc-sunrpc',      distro_features, 
>> 'OPTION_EGLIBC_SUNRPC', cnf)
>> +        eglibc_cfg('libc-utmp',      distro_features, 
>> 'OPTION_EGLIBC_UTMP', cnf)
>> +        eglibc_cfg('libc-utmpx',      distro_features, 
>> 'OPTION_EGLIBC_UTMPX', cnf)
>> +        eglibc_cfg('libc-wordexp',      distro_features, 
>> 'OPTION_EGLIBC_WORDEXP', cnf)
>> +        eglibc_cfg('libc-posix-clang-wchar',      distro_features, 
>> 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
>> +        eglibc_cfg('libc-posix-regexp',      distro_features, 
>> 'OPTION_POSIX_REGEXP', cnf)
>> +        eglibc_cfg('libc-posix-regexp-glibc',      distro_features, 
>> 'OPTION_POSIX_REGEXP_GLIBC', cnf)
>> +        eglibc_cfg('libc-posix-wchar-io',      distro_features, 
>> 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
>> +
>> +        # try to fix disable charsets/locales/locale-code compile fail
>> +        if 'libc-charsets' in distro_features and 'libc-locales' in 
>> distro_features and 'libc-locale-code' in distro_features:
>> +            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
>> +        else:
>> +            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
>> +
>> +        return "\n".join(cnf)
>> diff --git a/meta/recipes-core/eglibc/eglibc.inc 
>> b/meta/recipes-core/eglibc/eglibc.inc
>> index 46ffa82..616f1af 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,8 @@ 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"
>> +
>> +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 \
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




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

* Re: [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-08  5:56 ` [PATCH 2/2] eglibc: migrate configurability from oe Kang Kai
@ 2011-06-10  3:13   ` Khem Raj
  2011-06-10  3:25     ` Kang Kai
  0 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2011-06-10  3:13 UTC (permalink / raw)
  To: openembedded-core

On 06/07/2011 10:56 PM, Kang Kai wrote:
> From: Kang Kai<kai.kang@windriver.com>
>
> Migrate configurability from oe, try to shrink minimal image size
>
> Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
> the options are enabled by default.
>
> Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
> what options you want to enable there.
>
> Signed-off-by: Kang Kai<kai.kang@windriver.com>
> ---
>   meta/conf/distro/include/default-distrovars.inc    |    8 ++-
>   .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
>   meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
>   meta/recipes-core/eglibc/eglibc.inc                |    6 ++
>   meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
>   5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
> index 4b68a0a..052f9e6 100644
> --- a/meta/conf/distro/include/default-distrovars.inc
> +++ b/meta/conf/distro/include/default-distrovars.inc
> @@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
>   ENABLE_BINARY_LOCALE_GENERATION ?= "1"
>   LOCALE_UTF8_ONLY ?= "0"
>
> -DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
> +DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
> +		ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
> +		libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
> +		libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
> +		libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
> +		libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
> +		libc-posix-wchar-io"
>
>   IMAGE_FEATURES ?= ""
>
> 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;
> + 		    }


this patch does not seem correct to me. It should be using 
GLRO_dl_debug_mask instead here

> diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
> new file mode 100644
> index 0000000..119ceef
> --- /dev/null
> +++ b/meta/recipes-core/eglibc/eglibc-options.inc
> @@ -0,0 +1,62 @@
> +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', d, True) or '').split()
> +        eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
> +        eglibc_cfg('libc-backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
> +        eglibc_cfg('libc-big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
> +        eglibc_cfg('libc-bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
> +        eglibc_cfg('libc-cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
> +        eglibc_cfg('libc-catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
> +        eglibc_cfg('libc-charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
> +        eglibc_cfg('libc-crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
> +        eglibc_cfg('libc-crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
> +        eglibc_cfg('libc-db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
> +        eglibc_cfg('libc-envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
> +        eglibc_cfg('libc-fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
> +        eglibc_cfg('libc-fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
> +        eglibc_cfg('libc-fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
> +        eglibc_cfg('libc-ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
> +        eglibc_cfg('libc-getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
> +        eglibc_cfg('libc-idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
> +        eglibc_cfg('libc-inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
> +        eglibc_cfg('libc-inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
> +        eglibc_cfg('libc-libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
> +        eglibc_cfg('libc-libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
> +        eglibc_cfg('libc-locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
> +        eglibc_cfg('libc-locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
> +        eglibc_cfg('libc-memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
> +        eglibc_cfg('libc-nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
> +        eglibc_cfg('libc-nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
> +        eglibc_cfg('libc-rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
> +        eglibc_cfg('libc-rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
> +        eglibc_cfg('libc-spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
> +        eglibc_cfg('libc-streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
> +        eglibc_cfg('libc-sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
> +        eglibc_cfg('libc-utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
> +        eglibc_cfg('libc-utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
> +        eglibc_cfg('libc-wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
> +        eglibc_cfg('libc-posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
> +        eglibc_cfg('libc-posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
> +        eglibc_cfg('libc-posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
> +        eglibc_cfg('libc-posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
> +
> +        # try to fix disable charsets/locales/locale-code compile fail
> +        if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
> +            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
> +        else:
> +            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
> +
> +        return "\n".join(cnf)
> diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
> index 46ffa82..616f1af 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,8 @@ 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"
> +
> +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] 29+ messages in thread

* [PATCH 2/2] eglibc: migrate configurability from oe
  2011-06-08  5:56 [PATCH 0/2] eglibc: migrate configurability from oe V4 Kang Kai
@ 2011-06-08  5:56 ` Kang Kai
  2011-06-10  3:13   ` Khem Raj
  0 siblings, 1 reply; 29+ messages in thread
From: Kang Kai @ 2011-06-08  5:56 UTC (permalink / raw)
  To: openembedded-core, poky

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

Migrate configurability from oe, try to shrink minimal image size

Update to get eglibc configuration options from DISTRO_FEATURES and enable them. All
the options are enabled by default.

Uncomment the line in conf/local.extended.conf to define DISTRO_FEATURES, so put
what options you want to enable there.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/conf/distro/include/default-distrovars.inc    |    8 ++-
 .../eglibc-2.13-fix-macro-RTLD_DEBUG.patch         |   20 ++++++
 meta/recipes-core/eglibc/eglibc-options.inc        |   62 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc                |    6 ++
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    4 +-
 5 files changed, 98 insertions(+), 2 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/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 4b68a0a..052f9e6 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -10,7 +10,13 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
 ENABLE_BINARY_LOCALE_GENERATION ?= "1"
 LOCALE_UTF8_ONLY ?= "0"
 
-DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
+DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci \
+		ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+		libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+		libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+		libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+		libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+		libc-posix-wchar-io"
 
 IMAGE_FEATURES ?= ""
 
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..119ceef
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-options.inc
@@ -0,0 +1,62 @@
+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', d, True) or '').split()
+        eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
+        eglibc_cfg('libc-backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
+        eglibc_cfg('libc-big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
+        eglibc_cfg('libc-bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
+        eglibc_cfg('libc-cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
+        eglibc_cfg('libc-catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
+        eglibc_cfg('libc-charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
+        eglibc_cfg('libc-crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
+        eglibc_cfg('libc-crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
+        eglibc_cfg('libc-db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
+        eglibc_cfg('libc-envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
+        eglibc_cfg('libc-fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
+        eglibc_cfg('libc-fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
+        eglibc_cfg('libc-fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
+        eglibc_cfg('libc-ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
+        eglibc_cfg('libc-getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
+        eglibc_cfg('libc-idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
+        eglibc_cfg('libc-inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
+        eglibc_cfg('libc-inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
+        eglibc_cfg('libc-libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
+        eglibc_cfg('libc-libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
+        eglibc_cfg('libc-locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
+        eglibc_cfg('libc-locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
+        eglibc_cfg('libc-memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
+        eglibc_cfg('libc-nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
+        eglibc_cfg('libc-nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
+        eglibc_cfg('libc-rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
+        eglibc_cfg('libc-rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
+        eglibc_cfg('libc-spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
+        eglibc_cfg('libc-streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
+        eglibc_cfg('libc-sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
+        eglibc_cfg('libc-utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
+        eglibc_cfg('libc-utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
+        eglibc_cfg('libc-wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
+        eglibc_cfg('libc-posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
+        eglibc_cfg('libc-posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
+        eglibc_cfg('libc-posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
+        eglibc_cfg('libc-posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
+
+        # try to fix disable charsets/locales/locale-code compile fail
+        if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
+            bb.data.setVar('PACKAGE_NO_GCONV', '0', d)
+        else:
+            bb.data.setVar('PACKAGE_NO_GCONV', '1', d)
+
+        return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 46ffa82..616f1af 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,8 @@ 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"
+
+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] 29+ messages in thread

end of thread, other threads:[~2011-06-13 11:10 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-07  9:42 [PATCH 0/2] eglibc: migrate configurability from oe V3 Kang Kai
2011-06-07  9:42 ` Kang Kai
2011-06-07  9:42 ` [PATCH 1/2] bitbake: add another local configuration file Kang Kai
2011-06-07  9:42   ` Kang Kai
2011-06-07 15:56   ` Saul Wold
2011-06-07 15:56     ` [OE-core] " Saul Wold
2011-06-07  9:42 ` [PATCH 2/2] eglibc: migrate configurability from oe Kang Kai
2011-06-07  9:42   ` Kang Kai
2011-06-07  9:48   ` Koen Kooi
2011-06-08  1:45     ` Kang Kai
2011-06-08  6:25       ` Koen Kooi
2011-06-08  6:35         ` Kang Kai
2011-06-08  6:42           ` Martin Jansa
2011-06-07  9:53   ` Phil Blundell
2011-06-08  1:59     ` Kang Kai
2011-06-08  2:34       ` Khem Raj
2011-06-07 17:50   ` Khem Raj
2011-06-08  2:04     ` Kang Kai
2011-06-08  5:56 [PATCH 0/2] eglibc: migrate configurability from oe V4 Kang Kai
2011-06-08  5:56 ` [PATCH 2/2] eglibc: migrate configurability from oe Kang Kai
2011-06-10  3:13   ` Khem Raj
2011-06-10  3:25     ` Kang Kai
2011-06-13  9:01 [PATCH 0/2] eglibc: migrate configurability from oe V5 Kang Kai
2011-06-13  9:01 ` [PATCH 2/2] eglibc: migrate configurability from oe Kang Kai
2011-06-13  9:05   ` Phil Blundell
2011-06-13  9:15     ` Kang Kai
2011-06-13  9:27       ` Phil Blundell
2011-06-13  9:34         ` Kang Kai
2011-06-13  9:42           ` Phil Blundell
2011-06-13 10:00             ` Martin Jansa
2011-06-13 11:07               ` 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.