Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] minizip: fix display of comment
Date: Sun, 02 Dec 2018 15:41:05 +0200	[thread overview]
Message-ID: <87zhtojbbi.fsf@tkos.co.il> (raw)
In-Reply-To: <CAPi7W81z-ARirTK4wdQnvBY7FDTiLq1O+g7dvJ-XExwYGHMm8Q@mail.gmail.com>

Hi Fabrice,

Fabrice Fontaine writes:
> Le dim. 2 d?c. 2018 ? 12:56, Baruch Siach <baruch@tkos.co.il> a ?crit :
>> Fabrice Fontaine writes:
>> > Le dim. 2 d?c. 2018 ? 11:32, Baruch Siach <baruch@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.

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@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 -

  reply	other threads:[~2018-12-02 13:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-02 10:24 [Buildroot] [PATCH 1/1] minizip: fix display of comment Fabrice Fontaine
2018-12-02 10:32 ` Baruch Siach
2018-12-02 11:23   ` Fabrice Fontaine
2018-12-02 11:56     ` Baruch Siach
2018-12-02 12:07       ` Fabrice Fontaine
2018-12-02 13:41         ` Baruch Siach [this message]
2018-12-02 13:44           ` Fabrice Fontaine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhtojbbi.fsf@tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox