[Buildroot] [git commit] support/scripts/gen-bootlin-toolchains: properly take into account !BR2_STATIC_LIBS for glibc toolchains
Yann E. MORIN
yann.morin.1998 at free.fr
Mon Jun 6 13:15:01 UTC 2022
commit: https://git.buildroot.net/buildroot/commit/?id=fc63ec92928909d34c121817f0aa24d77412667e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
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 <thomas.petazzoni at bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
---
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")
More information about the buildroot
mailing list