From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baruch Siach Date: Sun, 02 Dec 2018 15:41:05 +0200 Subject: [Buildroot] [PATCH 1/1] minizip: fix display of comment In-Reply-To: References: <20181202102427.16747-1-fontaine.fabrice@gmail.com> <875zwckymo.fsf@tkos.co.il> <8736rgkuqr.fsf@tkos.co.il> Message-ID: <87zhtojbbi.fsf@tkos.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hi Fabrice, Fabrice Fontaine writes: > Le dim. 2 d?c. 2018 ? 12:56, Baruch Siach a ?crit : >> Fabrice Fontaine writes: >> > Le dim. 2 d?c. 2018 ? 11:32, Baruch Siach 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 >> >> > --- >> >> > 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 -