[Buildroot] [RFC 1/2] toolchain: invert glibc <-> !static dependency

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Jul 27 09:24:45 UTC 2022


On Wed,  6 Oct 2021 22:41:32 +0200
"Arnout Vandecappelle (Essensium/Mind)" <arnout at mind.be> wrote:

> Currently, glibc depends on !BR2_STATIC_LIBS in all the toolchain
> variants.
> 
> However, for some architectures, glibc is the only supported libc.
> Therefore, for these, it's possible to select static libs, at which
> point no libc is selectable any more.
> 
> To overcome this situation, invert the dependency between glibc and
> static libs: BR2_STATIC_LIBS depends on !BR2_TOOLCHAIN_USES_GLIBC, and
> all the dependencies on !BR2_STATIC_LIBS are removed from the glibc
> variants of all toolchains.
> 
> Fixes: https://bugs.busybox.net/show_bug.cgi?id=14256
> 
> An alternative (simpler) fix would be to let BR2_STATIC_LIBS depend on
> !BR2_s390x. However, that doesn't solve the problem for the myriad of
> other architectures that only support glibc. In addition, there are some
> architecture variants that only support glibc, etc. etc., which really
> complicates stuff.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>

I have applied this, after making sure it applies on master, since
there were conflicting changes. I rewrote most of the commit log,
because the situation in master was different than what it was when you
wrote this patch: we had already changed BR2_STATIC_LIBS to not be
selectable when the internal backend uses glibc. Your patch generalizes
this to the external toolchain backend as well.

Also, you had forgotten to adjust the gen-bootlin-toolchains script, so
I did that. And I added a Config.in comment inside the static/shared
choice that explains why static is not available.

Thanks for this!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list