Jelajahi Sumber

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>
James Hilliard 3 tahun lalu
induk
melakukan
3b3105328e
2 mengubah file dengan 7 tambahan dan 0 penghapusan
  1. 2 0
      Config.in
  2. 5 0
      toolchain/toolchain-buildroot/Config.in

+ 2 - 0
Config.in

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

+ 5 - 0
toolchain/toolchain-buildroot/Config.in

@@ -20,6 +20,11 @@ config BR2_TOOLCHAIN_BUILDROOT_VENDOR
 
 
 	  If you're not sure, just leave the default "buildroot" value.
 	  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
 choice
 	prompt "C library"
 	prompt "C library"
 	default BR2_TOOLCHAIN_BUILDROOT_UCLIBC
 	default BR2_TOOLCHAIN_BUILDROOT_UCLIBC