Explorar o código

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 <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Thomas Petazzoni %!s(int64=3) %!d(string=hai) anos
pai
achega
fc63ec9292
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      support/scripts/gen-bootlin-toolchains

+ 4 - 1
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("config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCH_SUPPORTS\n")
         f.write("\tbool\n")
         f.write("\tbool\n")
         for arch, details in arches.items():
         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("\n")
 
 
         f.write("if BR2_TOOLCHAIN_EXTERNAL_BOOTLIN\n\n")
         f.write("if BR2_TOOLCHAIN_EXTERNAL_BOOTLIN\n\n")