Config.in: only allow BR2_STATIC_LIBS on supported libc/arch

It is currently possible to select BR2_STATIC_LIBS while
BR2_TOOLCHAIN_BUILDROOT is selected even when there are no buildroot
toolchains that support BR2_STATIC_LIBS for the selected architecture.

Add BR2_TOOLCHAIN_BUILDROOT_STATIC_LIBS_SUPPORTS so that we can
disable the selection of BR2_STATIC_LIBS when using an unsupported
architecture.

Fixes:
 - http://autobuild.buildroot.net/results/4da59af8193376ec893321c4c2aaf1d25598502d
 - http://autobuild.buildroot.net/results/1950348218a4f097f078d158977c13f8b0a97d6e
 - http://autobuild.buildroot.net/results/2f03f2be32ad9898a990f6f0264d8c8d51991eb1

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: add back James' SoB from:
    https://lore.kernel.org/buildroot/20220516210756.3093190-1-james.hilliard1@gmail.com/
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
James Hilliard 2022-06-05 21:42:56 +02:00 committed by Yann E. MORIN
parent 66496a4056
commit 3b3105328e
2 changed files with 7 additions and 0 deletions

View File

@ -601,6 +601,8 @@ choice
config BR2_STATIC_LIBS
bool "static only"
depends on !BR2_TOOLCHAIN_BUILDROOT || \
BR2_TOOLCHAIN_BUILDROOT_STATIC_LIBS_SUPPORTS
help
Build and use only static libraries. No shared libraries will
be installed on the target. This potentially increases your

View File

@ -20,6 +20,11 @@ config BR2_TOOLCHAIN_BUILDROOT_VENDOR
If you're not sure, just leave the default "buildroot" value.
config BR2_TOOLCHAIN_BUILDROOT_STATIC_LIBS_SUPPORTS
bool
default y if BR2_PACKAGE_UCLIBC_SUPPORTS
default y if BR2_PACKAGE_MUSL_SUPPORTS
choice
prompt "C library"
default BR2_TOOLCHAIN_BUILDROOT_UCLIBC