[Buildroot] [PATCH 6/7] support/scripts/gen-bootlin-toolchains: properly take into account !BR2_STATIC_LIBS for glibc toolchains
Yann E. MORIN
yann.morin.1998 at free.fr
Sun Jun 5 20:28:03 UTC 2022
Thomas, All,
On 2022-06-05 22:24 +0200, Yann E. MORIN spake thusly:
> On 2022-06-05 21:42 +0200, Thomas Petazzoni spake thusly:
> > 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>
> > ---
> > 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']):
>
> What about:
> if 'glibc' in [t.libc for t in toolchains if t.arch == arch]
Nah, that does not test that there is *only* glibc; forget it...
Regards,
Yann E. MORIN.
>
> > + 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")
> > --
> > 2.35.3
> >
>
> --
> .-----------------.--------------------.------------------.--------------------.
> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list