All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eglibc: Make it configurable by tuning eglibc options
@ 2011-01-07  9:28 Khem Raj
  2011-01-07 13:47 ` Otavio Salvador
  2011-01-08 13:39 ` Bernhard Reutner-Fischer
  0 siblings, 2 replies; 10+ messages in thread
From: Khem Raj @ 2011-01-07  9:28 UTC (permalink / raw)
  To: openembedded-devel

* Look for disabled features in DISTRO_FEATURES and disable them while building eglibc
* By default all features are built
* One can disable a feature by specifying DISTRO_FEATURES += "noinet6 nobsd ...." e.g.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 recipes/eglibc/eglibc-options.inc |   50 +++++++++++++++++++++++++++++++++++++
 recipes/eglibc/eglibc.inc         |    7 ++++-
 2 files changed, 56 insertions(+), 1 deletions(-)
 create mode 100644 recipes/eglibc/eglibc-options.inc

diff --git a/recipes/eglibc/eglibc-options.inc b/recipes/eglibc/eglibc-options.inc
new file mode 100644
index 0000000..d552bbc
--- /dev/null
+++ b/recipes/eglibc/eglibc-options.inc
@@ -0,0 +1,50 @@
+def eglibc_cfg(feature, features, tokens, cnf ):
+        if type(tokens) == type(""):
+                tokens = [tokens]
+        if type(features) == type([]) and feature in features:
+                cnf.extend([token + ' = n' for token in tokens])
+
+# Map distro features to eglibc options settings
+def features_to_eglibc_settings(d):
+        cnf = ([])
+        distro_features = bb.data.getVar('DISTRO_FEATURES', d, True).split()
+        eglibc_cfg('noinet6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
+        eglibc_cfg('nobacktrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
+        eglibc_cfg('nobig-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
+        eglibc_cfg('nobsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
+        eglibc_cfg('nocxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
+        eglibc_cfg('nocatgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
+        eglibc_cfg('nocharsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
+        eglibc_cfg('nocrypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
+        eglibc_cfg('nocrypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
+        eglibc_cfg('nodb-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
+        eglibc_cfg('noenvz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
+        eglibc_cfg('nofcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
+        eglibc_cfg('nofmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
+        eglibc_cfg('nofstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
+        eglibc_cfg('noftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
+        eglibc_cfg('nogetlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
+        eglibc_cfg('noidn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
+        eglibc_cfg('noinet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
+        eglibc_cfg('noinet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
+        eglibc_cfg('nolibm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
+        eglibc_cfg('nolibm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
+        eglibc_cfg('nolocales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
+        eglibc_cfg('nolocale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
+        eglibc_cfg('nomemusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
+        eglibc_cfg('nonis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
+        eglibc_cfg('nonsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
+        eglibc_cfg('norcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
+        eglibc_cfg('nortld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
+        eglibc_cfg('nospawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
+        eglibc_cfg('nostreams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
+        eglibc_cfg('nosunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
+        eglibc_cfg('noutmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
+        eglibc_cfg('noutmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
+        eglibc_cfg('nowordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
+        eglibc_cfg('noposix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
+        eglibc_cfg('noposix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
+        eglibc_cfg('noposix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
+        eglibc_cfg('noposix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
+        return "\n".join(cnf)
+
diff --git a/recipes/eglibc/eglibc.inc b/recipes/eglibc/eglibc.inc
index 0644d49..c9765dd 100644
--- a/recipes/eglibc/eglibc.inc
+++ b/recipes/eglibc/eglibc.inc
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home"
 SECTION = "libs"
 PRIORITY = "required"
 LICENSE = "LGPL"
-INC_PR = "r19"
+INC_PR = "r20"
 # nptl needs unwind support in gcc, which can't be built without glibc.
 DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
 #this leads to circular deps, so lets not add it yet
@@ -17,6 +17,7 @@ RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
 PROVIDES_${PN}-dbg = "glibc-dbg"
 
 inherit autotools
+require eglibc-options.inc
 
 LEAD_SONAME = "libc.so"
 
@@ -41,3 +42,7 @@ do_move_ports() {
 	    mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/
 	fi
 }
+OE_FEATURES := "${@features_to_eglibc_settings(d)}"
+do_configure_prepend() {
+	echo '${OE_FEATURES}' > ${S}/option-groups.config
+}
-- 
1.7.2.3




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

* Re: [PATCH] eglibc: Make it configurable by tuning eglibc options
  2011-01-07  9:28 [PATCH] eglibc: Make it configurable by tuning eglibc options Khem Raj
@ 2011-01-07 13:47 ` Otavio Salvador
  2011-01-07 14:17   ` Andreas Oberritter
  2011-01-08 13:39 ` Bernhard Reutner-Fischer
  1 sibling, 1 reply; 10+ messages in thread
From: Otavio Salvador @ 2011-01-07 13:47 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jan 7, 2011 at 07:28, Khem Raj <raj.khem@gmail.com> wrote:
> * Look for disabled features in DISTRO_FEATURES and disable them while building eglibc
> * By default all features are built
> * One can disable a feature by specifying DISTRO_FEATURES += "noinet6 nobsd ...." e.g.

Awesome.

Do you think we could do something similar to busybox to avoid having
many defconfigs?

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



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

* Re: [PATCH] eglibc: Make it configurable by tuning eglibc options
  2011-01-07 13:47 ` Otavio Salvador
@ 2011-01-07 14:17   ` Andreas Oberritter
  2011-01-07 17:24     ` Otavio Salvador
  2011-01-07 17:30     ` Khem Raj
  0 siblings, 2 replies; 10+ messages in thread
From: Andreas Oberritter @ 2011-01-07 14:17 UTC (permalink / raw)
  To: openembedded-devel

On 01/07/2011 02:47 PM, Otavio Salvador wrote:
> On Fri, Jan 7, 2011 at 07:28, Khem Raj <raj.khem@gmail.com> wrote:
>> * Look for disabled features in DISTRO_FEATURES and disable them while building eglibc
>> * By default all features are built
>> * One can disable a feature by specifying DISTRO_FEATURES += "noinet6 nobsd ...." e.g.
> 
> Awesome.
> 
> Do you think we could do something similar to busybox to avoid having
> many defconfigs?
> 

Maybe it would be better to introduce EGLIBC_FEATURES and
BUSYBOX_FEATURES, possibly presetting some values with options already
present in DISTRO_FEATURES.

Now it seems to be possible to specify both ipv6 and noipv6, which seems
inintuitive to me. It's not defined, which one would take precedence
over the other, or whether such conflicts could be catched to display an
error message.

Also, as an example, nobsd's name doesn't contain an implicit
relationship to eglibc, so one might think that it would affect other
packages as well.

Regards,
Andreas



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

* Re: [PATCH] eglibc: Make it configurable by tuning eglibc options
  2011-01-07 14:17   ` Andreas Oberritter
@ 2011-01-07 17:24     ` Otavio Salvador
  2011-01-07 17:30     ` Khem Raj
  1 sibling, 0 replies; 10+ messages in thread
From: Otavio Salvador @ 2011-01-07 17:24 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jan 7, 2011 at 12:17, Andreas Oberritter <obi@opendreambox.org> wrote:
> On 01/07/2011 02:47 PM, Otavio Salvador wrote:
>> On Fri, Jan 7, 2011 at 07:28, Khem Raj <raj.khem@gmail.com> wrote:
>>> * Look for disabled features in DISTRO_FEATURES and disable them while building eglibc
>>> * By default all features are built
>>> * One can disable a feature by specifying DISTRO_FEATURES += "noinet6 nobsd ...." e.g.
>>
>> Awesome.
>>
>> Do you think we could do something similar to busybox to avoid having
>> many defconfigs?
>>
>
> Maybe it would be better to introduce EGLIBC_FEATURES and
> BUSYBOX_FEATURES, possibly presetting some values with options already
> present in DISTRO_FEATURES.

This does look better IMO.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



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

* Re: [PATCH] eglibc: Make it configurable by tuning eglibc options
  2011-01-07 14:17   ` Andreas Oberritter
  2011-01-07 17:24     ` Otavio Salvador
@ 2011-01-07 17:30     ` Khem Raj
  2011-01-07 18:15       ` Otavio Salvador
  1 sibling, 1 reply; 10+ messages in thread
From: Khem Raj @ 2011-01-07 17:30 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jan 7, 2011 at 6:17 AM, Andreas Oberritter <obi@opendreambox.org> wrote:
> On 01/07/2011 02:47 PM, Otavio Salvador wrote:
>> On Fri, Jan 7, 2011 at 07:28, Khem Raj <raj.khem@gmail.com> wrote:
>>> * Look for disabled features in DISTRO_FEATURES and disable them while building eglibc
>>> * By default all features are built
>>> * One can disable a feature by specifying DISTRO_FEATURES += "noinet6 nobsd ...." e.g.
>>
>> Awesome.
>>
>> Do you think we could do something similar to busybox to avoid having
>> many defconfigs?
>>
>
> Maybe it would be better to introduce EGLIBC_FEATURES and
> BUSYBOX_FEATURES, possibly presetting some values with options already
> present in DISTRO_FEATURES.
>

I think it can get to many knobs and confusion in settings. With
system library any feature en|disable
is system  wide so having it as a distro policy is right way to go imo.

> Now it seems to be possible to specify both ipv6 and noipv6, which seems
> inintuitive to me. It's not defined, which one would take precedence
> over the other, or whether such conflicts could be catched to display an
> error message.

good one
hmm yes ipv6 exists already so probably I could reuse that one in eglibc

>
> Also, as an example, nobsd's name doesn't contain an implicit
> relationship to eglibc, so one might think that it would affect other
> packages as well.

Its a system wide feature not limited to eglibc if we disable BSD
functions in libc then we better not use them in applications
so this feature knob is the way to handle that for more than eglibc
possibly so are others.
>
> Regards,
> Andreas
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [PATCH] eglibc: Make it configurable by tuning eglibc options
  2011-01-07 17:30     ` Khem Raj
@ 2011-01-07 18:15       ` Otavio Salvador
  2011-01-07 19:29         ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Otavio Salvador @ 2011-01-07 18:15 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jan 7, 2011 at 15:30, Khem Raj <raj.khem@gmail.com> wrote:
>> Maybe it would be better to introduce EGLIBC_FEATURES and
>> BUSYBOX_FEATURES, possibly presetting some values with options already
>> present in DISTRO_FEATURES.
>>
>
> I think it can get to many knobs and confusion in settings. With
> system library any feature en|disable
> is system  wide so having it as a distro policy is right way to go imo.

We can use DISTRO_EGLIBC_FEATURES or DISTRO_LIBC_FEATURES (so we can
add to uclibc support for it too). Spliting it from DISTRO_FEATURES
makes sense IMO since we'd use the same concept to recipes (as
busybox) that are ofthen customized.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



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

* Re: [PATCH] eglibc: Make it configurable by tuning eglibc options
  2011-01-07 18:15       ` Otavio Salvador
@ 2011-01-07 19:29         ` Khem Raj
  2011-01-08 12:42           ` Otavio Salvador
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2011-01-07 19:29 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jan 7, 2011 at 10:15 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Fri, Jan 7, 2011 at 15:30, Khem Raj <raj.khem@gmail.com> wrote:
>>> Maybe it would be better to introduce EGLIBC_FEATURES and
>>> BUSYBOX_FEATURES, possibly presetting some values with options already
>>> present in DISTRO_FEATURES.
>>>
>>
>> I think it can get to many knobs and confusion in settings. With
>> system library any feature en|disable
>> is system  wide so having it as a distro policy is right way to go imo.
>
> We can use DISTRO_EGLIBC_FEATURES or DISTRO_LIBC_FEATURES (so we can
> add to uclibc support for it too). Spliting it from DISTRO_FEATURES
> makes sense IMO since we'd use the same concept to recipes (as
> busybox) that are ofthen customized.

so what would be difference between DISTRO_FEATURES and DISTRO_EGLIBC_FEATURES
and what will be their relation

>
> --
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [PATCH] eglibc: Make it configurable by tuning eglibc options
  2011-01-07 19:29         ` Khem Raj
@ 2011-01-08 12:42           ` Otavio Salvador
  0 siblings, 0 replies; 10+ messages in thread
From: Otavio Salvador @ 2011-01-08 12:42 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jan 7, 2011 at 17:29, Khem Raj <raj.khem@gmail.com> wrote:
> On Fri, Jan 7, 2011 at 10:15 AM, Otavio Salvador
>> We can use DISTRO_EGLIBC_FEATURES or DISTRO_LIBC_FEATURES (so we can
>> add to uclibc support for it too). Spliting it from DISTRO_FEATURES
>> makes sense IMO since we'd use the same concept to recipes (as
>> busybox) that are ofthen customized.
>
> so what would be difference between DISTRO_FEATURES and DISTRO_EGLIBC_FEATURES
> and what will be their relation

I think makes more clear it is distro related.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



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

* Re: [PATCH] eglibc: Make it configurable by tuning eglibc options
  2011-01-07  9:28 [PATCH] eglibc: Make it configurable by tuning eglibc options Khem Raj
  2011-01-07 13:47 ` Otavio Salvador
@ 2011-01-08 13:39 ` Bernhard Reutner-Fischer
  2011-01-08 20:41   ` Khem Raj
  1 sibling, 1 reply; 10+ messages in thread
From: Bernhard Reutner-Fischer @ 2011-01-08 13:39 UTC (permalink / raw)
  To: openembedded-devel

"Khem Raj" <raj.khem@gmail.com> wrote:

>* Look for disabled features in DISTRO_FEATURES and disable them while
>building eglibc
>* By default all features are built
>* One can disable a feature by specifying DISTRO_FEATURES += "noinet6
>nobsd ...." e.g.
>
>Signed-off-by: Khem Raj <raj.khem@gmail.com>
>---
>recipes/eglibc/eglibc-options.inc |   50
>+++++++++++++++++++++++++++++++++++++
> recipes/eglibc/eglibc.inc         |    7 ++++-
> 2 files changed, 56 insertions(+), 1 deletions(-)
> create mode 100644 recipes/eglibc/eglibc-options.inc
>
>diff --git a/recipes/eglibc/eglibc-options.inc
>b/recipes/eglibc/eglibc-options.inc
>new file mode 100644
>index 0000000..d552bbc
>--- /dev/null
>+++ b/recipes/eglibc/eglibc-options.inc
>@@ -0,0 +1,50 @@
>+def eglibc_cfg(feature, features, tokens, cnf ):
>+        if type(tokens) == type(""):
>+                tokens = [tokens]
>+        if type(features) == type([]) and feature in features:
>+                cnf.extend([token + ' = n' for token in tokens])
>+
>+# Map distro features to eglibc options settings
>+def features_to_eglibc_settings(d):
>+        cnf = ([])
>+        distro_features = bb.data.getVar('DISTRO_FEATURES', d,
>True).split()
>+        eglibc_cfg('noinet6',      distro_features,
>'OPTION_EGLIBC_ADVANCED_INET6', cnf)
>+        eglibc_cfg('nobacktrace',      distro_features,
>'OPTION_EGLIBC_BACKTRACE', cnf)
>+        eglibc_cfg('nobig-macros',      distro_features,
>'OPTION_EGLIBC_BIG_MACROS', cnf)
>+        eglibc_cfg('nobsd',      distro_features, 'OPTION_EGLIBC_BSD',
>cnf)
>+        eglibc_cfg('nocxx-tests',      distro_features,
>'OPTION_EGLIBC_CXX_TESTS', cnf)
>+        eglibc_cfg('nocatgets',      distro_features,
>'OPTION_EGLIBC_CATGETS', cnf)
>+        eglibc_cfg('nocharsets',      distro_features,
>'OPTION_EGLIBC_CHARSETS', cnf)
>+        eglibc_cfg('nocrypt',      distro_features,
>'OPTION_EGLIBC_CRYPT', cnf)
>+        eglibc_cfg('nocrypt-ufc',      distro_features,
>'OPTION_EGLIBC_CRYPT_UFC', cnf)
>+        eglibc_cfg('nodb-aliases',      distro_features,
>'OPTION_EGLIBC_DB_ALIASES', cnf)
>+        eglibc_cfg('noenvz',      distro_features,
>'OPTION_EGLIBC_ENVZ', cnf)
>+        eglibc_cfg('nofcvt',      distro_features,
>'OPTION_EGLIBC_FCVT', cnf)
>+        eglibc_cfg('nofmtmsg',      distro_features,
>'OPTION_EGLIBC_FMTMSG', cnf)
>+        eglibc_cfg('nofstab',      distro_features,
>'OPTION_EGLIBC_FSTAB', cnf)
>+        eglibc_cfg('noftraverse',      distro_features,
>'OPTION_EGLIBC_FTRAVERSE', cnf)
>+        eglibc_cfg('nogetlogin',      distro_features,
>'OPTION_EGLIBC_GETLOGIN', cnf)
>+        eglibc_cfg('noidn',      distro_features, 'OPTION_EGLIBC_IDN',
>cnf)
>+        eglibc_cfg('noinet',      distro_features,
>'OPTION_EGLIBC_INET', cnf)
>+        eglibc_cfg('noinet-anl',      distro_features,
>'OPTION_EGLIBC_INET_ANL', cnf)
>+        eglibc_cfg('nolibm',      distro_features,
>'OPTION_EGLIBC_LIBM', cnf)
>+        eglibc_cfg('nolibm-big',      distro_features,
>'OPTION_EGLIBC_LIBM_BIG', cnf)
>+        eglibc_cfg('nolocales',      distro_features,
>'OPTION_EGLIBC_LOCALES', cnf)
>+        eglibc_cfg('nolocale-code',      distro_features,
>'OPTION_EGLIBC_LOCALE_CODE', cnf)
>+        eglibc_cfg('nomemusage',      distro_features,
>'OPTION_EGLIBC_MEMUSAGE', cnf)
>+        eglibc_cfg('nonis',      distro_features, 'OPTION_EGLIBC_NIS',
>cnf)
>+        eglibc_cfg('nonsswitch',      distro_features,
>'OPTION_EGLIBC_NSSWITCH', cnf)
>+        eglibc_cfg('norcmd',      distro_features,
>'OPTION_EGLIBC_RCMD', cnf)
>+        eglibc_cfg('nortld-debug',      distro_features,
>'OPTION_EGLIBC_RTLD_DEBUG', cnf)
>+        eglibc_cfg('nospawn',      distro_features,
>'OPTION_EGLIBC_SPAWN', cnf)
>+        eglibc_cfg('nostreams',      distro_features,
>'OPTION_EGLIBC_STREAMS', cnf)
>+        eglibc_cfg('nosunrpc',      distro_features,
>'OPTION_EGLIBC_SUNRPC', cnf)
>+        eglibc_cfg('noutmp',      distro_features,
>'OPTION_EGLIBC_UTMP', cnf)
>+        eglibc_cfg('noutmpx',      distro_features,
>'OPTION_EGLIBC_UTMPX', cnf)
>+        eglibc_cfg('nowordexp',      distro_features,
>'OPTION_EGLIBC_WORDEXP', cnf)
>+        eglibc_cfg('noposix-clang-wchar',      distro_features,
>'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
>+        eglibc_cfg('noposix-regexp',      distro_features,
>'OPTION_POSIX_REGEXP', cnf)
>+        eglibc_cfg('noposix-regexp-glibc',      distro_features,
>'OPTION_POSIX_REGEXP_GLIBC', cnf)
>+        eglibc_cfg('noposix-wchar-io',      distro_features,
>'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
>+        return "\n".join(cnf)
>+
>diff --git a/recipes/eglibc/eglibc.inc b/recipes/eglibc/eglibc.inc
>index 0644d49..c9765dd 100644
>--- a/recipes/eglibc/eglibc.inc
>+++ b/recipes/eglibc/eglibc.inc
>@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home"
> SECTION = "libs"
> PRIORITY = "required"
> LICENSE = "LGPL"
>-INC_PR = "r19"
>+INC_PR = "r20"
># nptl needs unwind support in gcc, which can't be built without glibc.
>DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
> #this leads to circular deps, so lets not add it yet
>@@ -17,6 +17,7 @@ RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
> PROVIDES_${PN}-dbg = "glibc-dbg"
> 
> inherit autotools
>+require eglibc-options.inc
> 
> LEAD_SONAME = "libc.so"
> 
>@@ -41,3 +42,7 @@ do_move_ports() {
> 	    mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/
> 	fi
> }
>+OE_FEATURES := "${@features_to_eglibc_settings(d)}"
>+do_configure_prepend() {
>+	echo '${OE_FEATURES}' > ${S}/option-groups.config
>+}
>-- 
>1.7.2.3
>
>
>_______________________________________________
>Openembedded-devel mailing list
>Openembedded-devel@lists.openembedded.org
>http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Hi,

The logic should IMO be: Disable every feature unless explicitly specified otherwise.
Take "ipv4" or "ipv6" (note: not inet6) as example: if noone asks for ipv6 then it is disabled.
This is the logic we are already using for uClibc.



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

* Re: [PATCH] eglibc: Make it configurable by tuning eglibc options
  2011-01-08 13:39 ` Bernhard Reutner-Fischer
@ 2011-01-08 20:41   ` Khem Raj
  0 siblings, 0 replies; 10+ messages in thread
From: Khem Raj @ 2011-01-08 20:41 UTC (permalink / raw)
  To: openembedded-devel

People already ship eglibc which is fully featured so I wanted that
these distros don't have to make change but it seems that will be a
better option

On 1/8/11, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
> "Khem Raj" <raj.khem@gmail.com> wrote:
>
>>* Look for disabled features in DISTRO_FEATURES and disable them while
>>building eglibc
>>* By default all features are built
>>* One can disable a feature by specifying DISTRO_FEATURES += "noinet6
>>nobsd ...." e.g.
>>
>>Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>---
>>recipes/eglibc/eglibc-options.inc |   50
>>+++++++++++++++++++++++++++++++++++++
>> recipes/eglibc/eglibc.inc         |    7 ++++-
>> 2 files changed, 56 insertions(+), 1 deletions(-)
>> create mode 100644 recipes/eglibc/eglibc-options.inc
>>
>>diff --git a/recipes/eglibc/eglibc-options.inc
>>b/recipes/eglibc/eglibc-options.inc
>>new file mode 100644
>>index 0000000..d552bbc
>>--- /dev/null
>>+++ b/recipes/eglibc/eglibc-options.inc
>>@@ -0,0 +1,50 @@
>>+def eglibc_cfg(feature, features, tokens, cnf ):
>>+        if type(tokens) == type(""):
>>+                tokens = [tokens]
>>+        if type(features) == type([]) and feature in features:
>>+                cnf.extend([token + ' = n' for token in tokens])
>>+
>>+# Map distro features to eglibc options settings
>>+def features_to_eglibc_settings(d):
>>+        cnf = ([])
>>+        distro_features = bb.data.getVar('DISTRO_FEATURES', d,
>>True).split()
>>+        eglibc_cfg('noinet6',      distro_features,
>>'OPTION_EGLIBC_ADVANCED_INET6', cnf)
>>+        eglibc_cfg('nobacktrace',      distro_features,
>>'OPTION_EGLIBC_BACKTRACE', cnf)
>>+        eglibc_cfg('nobig-macros',      distro_features,
>>'OPTION_EGLIBC_BIG_MACROS', cnf)
>>+        eglibc_cfg('nobsd',      distro_features, 'OPTION_EGLIBC_BSD',
>>cnf)
>>+        eglibc_cfg('nocxx-tests',      distro_features,
>>'OPTION_EGLIBC_CXX_TESTS', cnf)
>>+        eglibc_cfg('nocatgets',      distro_features,
>>'OPTION_EGLIBC_CATGETS', cnf)
>>+        eglibc_cfg('nocharsets',      distro_features,
>>'OPTION_EGLIBC_CHARSETS', cnf)
>>+        eglibc_cfg('nocrypt',      distro_features,
>>'OPTION_EGLIBC_CRYPT', cnf)
>>+        eglibc_cfg('nocrypt-ufc',      distro_features,
>>'OPTION_EGLIBC_CRYPT_UFC', cnf)
>>+        eglibc_cfg('nodb-aliases',      distro_features,
>>'OPTION_EGLIBC_DB_ALIASES', cnf)
>>+        eglibc_cfg('noenvz',      distro_features,
>>'OPTION_EGLIBC_ENVZ', cnf)
>>+        eglibc_cfg('nofcvt',      distro_features,
>>'OPTION_EGLIBC_FCVT', cnf)
>>+        eglibc_cfg('nofmtmsg',      distro_features,
>>'OPTION_EGLIBC_FMTMSG', cnf)
>>+        eglibc_cfg('nofstab',      distro_features,
>>'OPTION_EGLIBC_FSTAB', cnf)
>>+        eglibc_cfg('noftraverse',      distro_features,
>>'OPTION_EGLIBC_FTRAVERSE', cnf)
>>+        eglibc_cfg('nogetlogin',      distro_features,
>>'OPTION_EGLIBC_GETLOGIN', cnf)
>>+        eglibc_cfg('noidn',      distro_features, 'OPTION_EGLIBC_IDN',
>>cnf)
>>+        eglibc_cfg('noinet',      distro_features,
>>'OPTION_EGLIBC_INET', cnf)
>>+        eglibc_cfg('noinet-anl',      distro_features,
>>'OPTION_EGLIBC_INET_ANL', cnf)
>>+        eglibc_cfg('nolibm',      distro_features,
>>'OPTION_EGLIBC_LIBM', cnf)
>>+        eglibc_cfg('nolibm-big',      distro_features,
>>'OPTION_EGLIBC_LIBM_BIG', cnf)
>>+        eglibc_cfg('nolocales',      distro_features,
>>'OPTION_EGLIBC_LOCALES', cnf)
>>+        eglibc_cfg('nolocale-code',      distro_features,
>>'OPTION_EGLIBC_LOCALE_CODE', cnf)
>>+        eglibc_cfg('nomemusage',      distro_features,
>>'OPTION_EGLIBC_MEMUSAGE', cnf)
>>+        eglibc_cfg('nonis',      distro_features, 'OPTION_EGLIBC_NIS',
>>cnf)
>>+        eglibc_cfg('nonsswitch',      distro_features,
>>'OPTION_EGLIBC_NSSWITCH', cnf)
>>+        eglibc_cfg('norcmd',      distro_features,
>>'OPTION_EGLIBC_RCMD', cnf)
>>+        eglibc_cfg('nortld-debug',      distro_features,
>>'OPTION_EGLIBC_RTLD_DEBUG', cnf)
>>+        eglibc_cfg('nospawn',      distro_features,
>>'OPTION_EGLIBC_SPAWN', cnf)
>>+        eglibc_cfg('nostreams',      distro_features,
>>'OPTION_EGLIBC_STREAMS', cnf)
>>+        eglibc_cfg('nosunrpc',      distro_features,
>>'OPTION_EGLIBC_SUNRPC', cnf)
>>+        eglibc_cfg('noutmp',      distro_features,
>>'OPTION_EGLIBC_UTMP', cnf)
>>+        eglibc_cfg('noutmpx',      distro_features,
>>'OPTION_EGLIBC_UTMPX', cnf)
>>+        eglibc_cfg('nowordexp',      distro_features,
>>'OPTION_EGLIBC_WORDEXP', cnf)
>>+        eglibc_cfg('noposix-clang-wchar',      distro_features,
>>'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
>>+        eglibc_cfg('noposix-regexp',      distro_features,
>>'OPTION_POSIX_REGEXP', cnf)
>>+        eglibc_cfg('noposix-regexp-glibc',      distro_features,
>>'OPTION_POSIX_REGEXP_GLIBC', cnf)
>>+        eglibc_cfg('noposix-wchar-io',      distro_features,
>>'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
>>+        return "\n".join(cnf)
>>+
>>diff --git a/recipes/eglibc/eglibc.inc b/recipes/eglibc/eglibc.inc
>>index 0644d49..c9765dd 100644
>>--- a/recipes/eglibc/eglibc.inc
>>+++ b/recipes/eglibc/eglibc.inc
>>@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home"
>> SECTION = "libs"
>> PRIORITY = "required"
>> LICENSE = "LGPL"
>>-INC_PR = "r19"
>>+INC_PR = "r20"
>># nptl needs unwind support in gcc, which can't be built without glibc.
>>DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
>> #this leads to circular deps, so lets not add it yet
>>@@ -17,6 +17,7 @@ RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
>> PROVIDES_${PN}-dbg = "glibc-dbg"
>>
>> inherit autotools
>>+require eglibc-options.inc
>>
>> LEAD_SONAME = "libc.so"
>>
>>@@ -41,3 +42,7 @@ do_move_ports() {
>> 	    mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/
>> 	fi
>> }
>>+OE_FEATURES := "${@features_to_eglibc_settings(d)}"
>>+do_configure_prepend() {
>>+	echo '${OE_FEATURES}' > ${S}/option-groups.config
>>+}
>>--
>>1.7.2.3
>>
>>
>>_______________________________________________
>>Openembedded-devel mailing list
>>Openembedded-devel@lists.openembedded.org
>>http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
> Hi,
>
> The logic should IMO be: Disable every feature unless explicitly specified
> otherwise.
> Take "ipv4" or "ipv6" (note: not inet6) as example: if noone asks for ipv6
> then it is disabled.
> This is the logic we are already using for uClibc.
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>

-- 
Sent from my mobile device

-Khem



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

end of thread, other threads:[~2011-01-08 20:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07  9:28 [PATCH] eglibc: Make it configurable by tuning eglibc options Khem Raj
2011-01-07 13:47 ` Otavio Salvador
2011-01-07 14:17   ` Andreas Oberritter
2011-01-07 17:24     ` Otavio Salvador
2011-01-07 17:30     ` Khem Raj
2011-01-07 18:15       ` Otavio Salvador
2011-01-07 19:29         ` Khem Raj
2011-01-08 12:42           ` Otavio Salvador
2011-01-08 13:39 ` Bernhard Reutner-Fischer
2011-01-08 20:41   ` Khem Raj

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.