* [Buildroot] add option to enable AI_ADDRCONFIG support
@ 2012-03-07 22:38 Sven Neumann
2012-03-07 22:38 ` [Buildroot] [PATCH 1/2] toolchain: add option to enable AI_ADDRCONFIG support in uclibc Sven Neumann
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Sven Neumann @ 2012-03-07 22:38 UTC (permalink / raw)
To: buildroot
This patchset adds a buildroot option to enable AI_ADDRCONFIG support
in uClibC. It also changes the mrouted package to select the new option
instead of hinting the user in a comment that it depends on it.
If this is accepted I will also re-submit the gupnp packages that I
tried to get into buildroot before. Until now this failed because
gssdp needs ifaddr.h which is only available with uClibC if
AI_ADDRCONFIG support is enabled.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 1/2] toolchain: add option to enable AI_ADDRCONFIG support in uclibc
2012-03-07 22:38 [Buildroot] add option to enable AI_ADDRCONFIG support Sven Neumann
@ 2012-03-07 22:38 ` Sven Neumann
2012-03-11 20:53 ` Peter Korsgaard
2012-03-07 22:38 ` [Buildroot] [PATCH 2/2] mrouted: select BR2_TOOLCHAIN_BUILDROOT_INET_ADDRCONFIG Sven Neumann
2012-03-08 8:17 ` [Buildroot] add option to enable AI_ADDRCONFIG support Thomas Petazzoni
2 siblings, 1 reply; 9+ messages in thread
From: Sven Neumann @ 2012-03-07 22:38 UTC (permalink / raw)
To: buildroot
Some packages need ifaddr.h which is only included in uclibc if
UCLIBC_SUPPORT_AI_ADDRCONFIG is selected. Make this configurable
as a buildroot option so that those packages can select it.
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
---
toolchain/toolchain-buildroot/Config.in.2 | 7 +++++++
toolchain/uClibc/uclibc.mk | 7 +++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
index 7f2f68f..700d728 100644
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -25,6 +25,13 @@ config BR2_TOOLCHAIN_BUILDROOT_INET_RPC
Enable this option if you want your toolchain to support
RPC (needed for NFS, for example).
+config BR2_TOOLCHAIN_BUILDROOT_INET_ADDRCONFIG
+ bool "Enable AI ADDRCONFIG support"
+ help
+ Enable this option if you want your toolchain to support
+ the AI_ADDRCONFIG flag to query interfaces to find both
+ ipv4 and ipv6 support.
+
config BR2_TOOLCHAIN_BUILDROOT_WCHAR
bool "Enable WCHAR support"
select BR2_USE_WCHAR
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index ee474bb..638f918 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -259,6 +259,13 @@ else
-e 's,^.*UCLIBC_HAS_REENTRANT_RPC.*,UCLIBC_HAS_REENTRANT_RPC=n,g' \
$(UCLIBC_DIR)/.oldconfig
endif
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_INET_ADDRCONFIG),y)
+ $(SED) 's,^.*UCLIBC_SUPPORT_AI_ADDRCONFIG.*,UCLIBC_SUPPORT_AI_ADDRCONFIG=y,g' $(UCLIBC_DIR)/.oldconfig
+else
+ $(SED) 's,.*UCLIBC_SUPPORT_AI_ADDRCONFIG.*,UCLIBC_SUPPORT_AI_ADDRCONFIG=n,g' $(UCLIBC_DIR)/.oldconfig
+ $(SED) '/.*UCLIBC_SUPPORT_AI_ADDRCONFIG.*/d' $(UCLIBC_DIR)/.oldconfig
+ echo "# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set" >> $(UCLIBC_DIR)/.oldconfig
+endif
ifeq ($(BR2_SOFT_FLOAT),y)
$(SED) 's,.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=n,g' \
-e 's,^[^_]*HAS_FPU.*,HAS_FPU=n,g' \
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 2/2] mrouted: select BR2_TOOLCHAIN_BUILDROOT_INET_ADDRCONFIG
2012-03-07 22:38 [Buildroot] add option to enable AI_ADDRCONFIG support Sven Neumann
2012-03-07 22:38 ` [Buildroot] [PATCH 1/2] toolchain: add option to enable AI_ADDRCONFIG support in uclibc Sven Neumann
@ 2012-03-07 22:38 ` Sven Neumann
2012-03-08 8:17 ` [Buildroot] add option to enable AI_ADDRCONFIG support Thomas Petazzoni
2 siblings, 0 replies; 9+ messages in thread
From: Sven Neumann @ 2012-03-07 22:38 UTC (permalink / raw)
To: buildroot
Remove the comment that explains that UCLIBC_SUPPORT_AI_ADDRCONFIG
needs to be selected and select it automatically by means of the
new BR2_TOOLCHAIN_BUILDROOT_INET_ADDRCONFIG option.
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
---
package/mrouted/Config.in | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/package/mrouted/Config.in b/package/mrouted/Config.in
index 1503cc6..ba68fbb 100644
--- a/package/mrouted/Config.in
+++ b/package/mrouted/Config.in
@@ -1,9 +1,7 @@
config BR2_PACKAGE_MROUTED
bool "mrouted"
+ select BR2_TOOLCHAIN_BUILDROOT_INET_ADDRCONFIG
help
An implementation of the DVMRP multicast routing protocol.
- If built with uClibc, then UCLIBC_SUPPORT_AI_ADDRCONFIG is
- needed in uClibc configuration.
-
http://github.com/troglobit/mrouted
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] add option to enable AI_ADDRCONFIG support
2012-03-07 22:38 [Buildroot] add option to enable AI_ADDRCONFIG support Sven Neumann
2012-03-07 22:38 ` [Buildroot] [PATCH 1/2] toolchain: add option to enable AI_ADDRCONFIG support in uclibc Sven Neumann
2012-03-07 22:38 ` [Buildroot] [PATCH 2/2] mrouted: select BR2_TOOLCHAIN_BUILDROOT_INET_ADDRCONFIG Sven Neumann
@ 2012-03-08 8:17 ` Thomas Petazzoni
2012-03-11 20:56 ` Peter Korsgaard
2 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2012-03-08 8:17 UTC (permalink / raw)
To: buildroot
Hello Sven,
Le Wed, 7 Mar 2012 23:38:16 +0100,
Sven Neumann <s.neumann@raumfeld.com> a ?crit :
> This patchset adds a buildroot option to enable AI_ADDRCONFIG support
> in uClibC. It also changes the mrouted package to select the new option
> instead of hinting the user in a comment that it depends on it.
I don't know if this question has been asked in the past, but do you
know what is the binary size impact of enabling AI_ADDRCONFIG in
uClibc? If the impact is rather minimal, then I'd rather have it
enabled in our default configuration instead of adding yet another
toolchain config knob.
Anyway some comments about your patches (but don't work on updating
them before we decide if a new option is really needed) :
* Your PATCH 1/2 also needs to address the cases of external
toolchains and crosstool-ng toolchains ;
* Your PATCH 2/2 should use a depends on rather than a select. We use
depends on for all the dependencies of packages on toolchain
options, together with a comment displayed when the toolchain
options isn't present, so that the user is aware that mrouted is
available, but only if AI_ADDRCONFIG is enabled as a toolchain
option.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 1/2] toolchain: add option to enable AI_ADDRCONFIG support in uclibc
2012-03-07 22:38 ` [Buildroot] [PATCH 1/2] toolchain: add option to enable AI_ADDRCONFIG support in uclibc Sven Neumann
@ 2012-03-11 20:53 ` Peter Korsgaard
0 siblings, 0 replies; 9+ messages in thread
From: Peter Korsgaard @ 2012-03-11 20:53 UTC (permalink / raw)
To: buildroot
>>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes:
Sven> Some packages need ifaddr.h which is only included in uclibc if
Sven> UCLIBC_SUPPORT_AI_ADDRCONFIG is selected. Make this configurable
Sven> as a buildroot option so that those packages can select it.
Sven> +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_INET_ADDRCONFIG),y)
Sven> + $(SED) 's,^.*UCLIBC_SUPPORT_AI_ADDRCONFIG.*,UCLIBC_SUPPORT_AI_ADDRCONFIG=y,g' $(UCLIBC_DIR)/.oldconfig
Sven> +else
Sven> + $(SED) 's,.*UCLIBC_SUPPORT_AI_ADDRCONFIG.*,UCLIBC_SUPPORT_AI_ADDRCONFIG=n,g' $(UCLIBC_DIR)/.oldconfig
Sven> + $(SED) '/.*UCLIBC_SUPPORT_AI_ADDRCONFIG.*/d' $(UCLIBC_DIR)/.oldconfig
Sven> + echo "# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set" >> $(UCLIBC_DIR)/.oldconfig
Why the complication and not just something like:
$(SED) 's,^.*UCLIBC_SUPPORT_AI_ADDRCONFIG.*,# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set,g' $(UCLIBC_DIR)/.oldconfig
We'll also need to add the option for external toolchains, but I can do
that, thanks for doing the patch.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] add option to enable AI_ADDRCONFIG support
2012-03-08 8:17 ` [Buildroot] add option to enable AI_ADDRCONFIG support Thomas Petazzoni
@ 2012-03-11 20:56 ` Peter Korsgaard
2012-03-15 20:33 ` Thomas Petazzoni
0 siblings, 1 reply; 9+ messages in thread
From: Peter Korsgaard @ 2012-03-11 20:56 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> I don't know if this question has been asked in the past, but do you
Thomas> know what is the binary size impact of enabling AI_ADDRCONFIG in
Thomas> uClibc? If the impact is rather minimal, then I'd rather have it
Thomas> enabled in our default configuration instead of adding yet another
Thomas> toolchain config knob.
I believe it's a fairly small impact, but the problem is external uClibc
toolchains (made by BR, ct-NG or elsewhere) which most likely won't have
AI_ADDRCONFIG enabled, so mrouted (and gupnp) will fail at build time.
Thomas> Anyway some comments about your patches (but don't work on updating
Thomas> them before we decide if a new option is really needed) :
Thomas> * Your PATCH 1/2 also needs to address the cases of external
Thomas> toolchains and crosstool-ng toolchains ;
Thomas> * Your PATCH 2/2 should use a depends on rather than a select. We use
Thomas> depends on for all the dependencies of packages on toolchain
Thomas> options, together with a comment displayed when the toolchain
Thomas> options isn't present, so that the user is aware that mrouted is
Thomas> available, but only if AI_ADDRCONFIG is enabled as a toolchain
Thomas> option.
I agree.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] add option to enable AI_ADDRCONFIG support
2012-03-11 20:56 ` Peter Korsgaard
@ 2012-03-15 20:33 ` Thomas Petazzoni
2012-03-15 20:56 ` Peter Korsgaard
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2012-03-15 20:33 UTC (permalink / raw)
To: buildroot
Le Sun, 11 Mar 2012 21:56:22 +0100,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :
> I believe it's a fairly small impact, but the problem is external uClibc
> toolchains (made by BR, ct-NG or elsewhere) which most likely won't have
> AI_ADDRCONFIG enabled, so mrouted (and gupnp) will fail at build time.
Is it common to have AI_ADDRCONFIG disabled in external toolchains?
Notice that we have a similar problem with ltp-testsuite at the moment.
Do we really want to add one more toolchain option just for this small
feature? Sounds like a big hammer, no?
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] add option to enable AI_ADDRCONFIG support
2012-03-15 20:33 ` Thomas Petazzoni
@ 2012-03-15 20:56 ` Peter Korsgaard
2012-05-02 13:33 ` Gustavo Zacarias
0 siblings, 1 reply; 9+ messages in thread
From: Peter Korsgaard @ 2012-03-15 20:56 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
>> I believe it's a fairly small impact, but the problem is external uClibc
>> toolchains (made by BR, ct-NG or elsewhere) which most likely won't have
>> AI_ADDRCONFIG enabled, so mrouted (and gupnp) will fail at build time.
Thomas> Is it common to have AI_ADDRCONFIG disabled in external toolchains?
Thomas> Notice that we have a similar problem with ltp-testsuite at the moment.
Hard to say, but the config option defaults to 'n' in uClibc - So
chances are that it is.
Thomas> Do we really want to add one more toolchain option just for
Thomas> this small feature? Sounds like a big hammer, no?
True, but it is the safest approach. I don't feel strongly about it
though - Anybody?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] add option to enable AI_ADDRCONFIG support
2012-03-15 20:56 ` Peter Korsgaard
@ 2012-05-02 13:33 ` Gustavo Zacarias
0 siblings, 0 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2012-05-02 13:33 UTC (permalink / raw)
To: buildroot
On 2012-03-15 17:56, Peter Korsgaard wrote:
> Thomas> Is it common to have AI_ADDRCONFIG disabled in external
> toolchains?
> Thomas> Notice that we have a similar problem with ltp-testsuite at
> the moment.
>
> Hard to say, but the config option defaults to 'n' in uClibc - So
> chances are that it is.
>
> Thomas> Do we really want to add one more toolchain option just for
> Thomas> this small feature? Sounds like a big hammer, no?
>
> True, but it is the safest approach. I don't feel strongly about it
> though - Anybody?
IMHO it should be enabled by default, it's been in glibc since version
2.3.
Some programs benefit a lot in the configuration department from it,
for example samba.
Doing a interfaces=192.168.1.1/255/255/255.0 statement versus a
interfaces=eth0 statement in the configuration file is a big bonus to
me.
I'm sending a patch right away.
Regards.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-05-02 13:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 22:38 [Buildroot] add option to enable AI_ADDRCONFIG support Sven Neumann
2012-03-07 22:38 ` [Buildroot] [PATCH 1/2] toolchain: add option to enable AI_ADDRCONFIG support in uclibc Sven Neumann
2012-03-11 20:53 ` Peter Korsgaard
2012-03-07 22:38 ` [Buildroot] [PATCH 2/2] mrouted: select BR2_TOOLCHAIN_BUILDROOT_INET_ADDRCONFIG Sven Neumann
2012-03-08 8:17 ` [Buildroot] add option to enable AI_ADDRCONFIG support Thomas Petazzoni
2012-03-11 20:56 ` Peter Korsgaard
2012-03-15 20:33 ` Thomas Petazzoni
2012-03-15 20:56 ` Peter Korsgaard
2012-05-02 13:33 ` Gustavo Zacarias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox