[Buildroot] [PATCH 1/1] minizip: fix display of comment

Fabrice Fontaine fontaine.fabrice at gmail.com
Sun Dec 2 13:44:08 UTC 2018


Le dim. 2 déc. 2018 à 14:41, Baruch Siach <baruch at tkos.co.il> a écrit :
>
> Hi Fabrice,
>
> Fabrice Fontaine writes:
> > Le dim. 2 déc. 2018 à 12:56, Baruch Siach <baruch at tkos.co.il> a écrit :
> >> Fabrice Fontaine writes:
> >> > Le dim. 2 déc. 2018 à 11:32, Baruch Siach <baruch at tkos.co.il> a écrit :
> >> >> Fabrice Fontaine writes:
> >> >> > Commit e13855c48f21eaee07a81f8b02678839be274a45 wrongly added
> >> >> > depends on BR2_TOOLCHAIN_USES_UCLIBC && !BR2_USE_MMU
> >> >> > to display the comment "minizip needs a toolchain w/ threads, wchar"
> >> >>
> >> >> Why is it wrong? This dependency is meant to hide the comment in the
> >> >> !(BR2_TOOLCHAIN_USES_UCLIBC && !BR2_USE_MMU) case.
> >> > It is wrong because, in commit
> >> > e13855c48f21eaee07a81f8b02678839be274a45, I added in minizip/Config.in
> >> > (and in libbsd/Config.in):
> >> > config BR2_PACKAGE_MINIZIP
> >> >    depends on !(BR2_TOOLCHAIN_USES_UCLIBC && !BR2_USE_MMU) # libbsd
> >> > [...]
> >> > comment "minizip needs a toolchain w/ threads, wchar"
> >> >     depends on BR2_TOOLCHAIN_USES_UCLIBC && !BR2_USE_MMU
> >> >     depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
> >> >
> >> > As a result, the comment is not displayed with an uclibc toolchain
> >> > with MMU but without wchar.
> >> > So, the user don't know that it has just to select wchar to be able to
> >> > select minizip.
> >>
> >> I always find negative logic confusing, so let's do it one step at a
> >> time.
> >>
> >> In the case of non wchar uClibc toolchain with MMU:
> >>
> >> The expression
> >>
> >>   depends on BR2_TOOLCHAIN_USES_UCLIBC && !BR2_USE_MMU
> >>
> >> is true because both conditions are true.
> > Nope, in case of uClibc toolchain with MMU, BR2_USE_MMU is true and so
> > !BR2_USE_MMU is false. So the latest condition is false.
>
> You are right. Sorry for the noise.
That's fine, I should have made it right the first time ;-)
>
> baruch
>
> >> The expression
> >>
> >>   depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
> >>
> >> is also true because the right condition (!BR2_USE_WCHAR) is true.
> >>
> >> End result: the comment is displayed.
> >>
> >> What is the issue you are fixing here?
> >>
> >> The same question applies to your libbsd patch.
> >>
> >> baruch
> >>
> >> >> > Set the correct dependency:
> >> >> > depends on !(BR2_TOOLCHAIN_USES_UCLIBC && !BR2_USE_MMU)
> >> >> >
> >> >> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> >> >> > ---
> >> >> >  package/minizip/Config.in | 2 +-
> >> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >> >
> >> >> > diff --git a/package/minizip/Config.in b/package/minizip/Config.in
> >> >> > index 4bc12a0d7e..ff8b5b209a 100644
> >> >> > --- a/package/minizip/Config.in
> >> >> > +++ b/package/minizip/Config.in
> >> >> > @@ -20,5 +20,5 @@ config BR2_PACKAGE_MINIZIP_DEMOS
> >> >> >
> >> >> >  comment "minizip needs a toolchain w/ threads, wchar"
> >> >> >       depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS
> >> >> > -     depends on BR2_TOOLCHAIN_USES_UCLIBC && !BR2_USE_MMU
> >> >> > +     depends on !(BR2_TOOLCHAIN_USES_UCLIBC && !BR2_USE_MMU)
> >> >> >       depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
>
> --
>      http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
Fabrice


More information about the buildroot mailing list