From fc63ec92928909d34c121817f0aa24d77412667e Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 5 Jun 2022 21:42:58 +0200 Subject: [PATCH] support/scripts/gen-bootlin-toolchains: properly take into account !BR2_STATIC_LIBS for glibc toolchains The Config.in options created for each toolchain were properly taking into account the !BR2_STATIC_LIBS dependency of glibc toolchains. However, this dependency was not taken into account into the main BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCH_SUPPORTS option. Consequently, if an architecture is only supported by glibc, but BR2_STATIC_LIBS is enabled, the main "Bootlin toolchain" option was visible... but with no selectable toolchain. We fix this by making sure that BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCH_SUPPORTS is only true for all architectures supported, taking into account the fact that some architectures can only be supported if !BR2_STATIC_LIBS, when the only available C library is glibc. Signed-off-by: Thomas Petazzoni Signed-off-by: Yann E. MORIN --- support/scripts/gen-bootlin-toolchains | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/support/scripts/gen-bootlin-toolchains b/support/scripts/gen-bootlin-toolchains index f9dd9da9a8..97a744340a 100755 --- a/support/scripts/gen-bootlin-toolchains +++ b/support/scripts/gen-bootlin-toolchains @@ -482,7 +482,10 @@ def gen_config_in_options(toolchains, fpath): f.write("config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCH_SUPPORTS\n") f.write("\tbool\n") for arch, details in arches.items(): - f.write("\tdefault y if %s\n" % " && ".join(details['conditions'])) + conditions = details['conditions'].copy() + if set([t.libc for t in toolchains if t.arch == arch]) == set(['glibc']): + conditions.append("!BR2_STATIC_LIBS") + f.write("\tdefault y if %s\n" % " && ".join(conditions)) f.write("\n") f.write("if BR2_TOOLCHAIN_EXTERNAL_BOOTLIN\n\n")