support/scripts/gen-bootlin-toolchains: add missing glibc toolchain dependencies
authorRomain Naour <romain.naour@gmail.com>
Sun, 27 Sep 2020 14:37:50 +0000 (16:37 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 14 Oct 2020 21:55:56 +0000 (23:55 +0200)
glibc toolchains must be disabled for static only configuration.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/scripts/gen-bootlin-toolchains

index ac1a19b3c0128ef49b326c3962b2b70825a0272c..bfc7237d482ef944cf94b98ed62d212a665be64d 100755 (executable)
@@ -233,14 +233,19 @@ class Toolchain:
         f.write("config %s\n" % self.option_name)
         f.write("\tbool \"%s %s %s %s\"\n" %
                 (self.arch, self.libc, self.variant, self.version))
-        for c in arches[self.arch]['conditions']:
-            f.write("\tdepends on %s\n" % c)
+        depends = []
         selects = []
+
+        for c in arches[self.arch]['conditions']:
+            depends.append(c)
+
         for frag in self.fragment:
             # libc type
             if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC"):
                 selects.append("BR2_TOOLCHAIN_EXTERNAL_UCLIBC")
             elif frag.startswith("BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC"):
+                # glibc doesn't support static only configuration
+                depends.append("!BR2_STATIC_LIBS")
                 selects.append("BR2_TOOLCHAIN_EXTERNAL_GLIBC")
                 # all glibc toolchains have RPC support
                 selects.append("BR2_TOOLCHAIN_HAS_NATIVE_RPC")
@@ -303,6 +308,9 @@ class Toolchain:
             if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_OPENMP"):
                 selects.append("BR2_TOOLCHAIN_HAS_OPENMP")
 
+        for depend in depends:
+            f.write("\tdepends on %s\n" % depend)
+
         for select in selects:
             f.write("\tselect %s\n" % select)