lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Feb 2023 16:15:17 +0100
From:   Alexander Lobakin <aleksander.lobakin@...el.com>
To:     Masahiro Yamada <masahiroy@...nel.org>,
        David Gow <davidgow@...gle.com>
CC:     Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>,
        "Jonathan Corbet" <corbet@....net>,
        Sadiya Kazi <sadiyakazi@...gle.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        <linux-kbuild@...r.kernel.org>, <linux-doc@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Documentation: kbuild: Add note about using (subst m,y)

From: Masahiro Yamada <masahiroy@...nel.org>
Date: Tue, 28 Feb 2023 17:30:09 +0900

> On Tue, Feb 28, 2023 at 12:13 PM David Gow <davidgow@...gle.com> wrote:

[...]

>> +Example::
>> +
>> +  #drivers/Makefile
>> +  obj-$(subst m,y,$(CONFIG_HYPERV)) += hv/
>> +
> 
> 
> I think many subsystems simply do
> 
> obj-y  += hv/

This creates a ton of empty built-in.a, each of them is listed in the
Kbuild output. Someone may think that if a directory contains
built-in.a, then something was built there. Sure it's their problems,
but I'd prefer to not pollute the log and built-in.a contents when
possible (empty files are still listed there IIRC).

> 
> 
> I do not think we need to advertise hyperv's way
> since it does not look very pretty.
> 
> 
> 
> 
> 
> 
> 
> Mostly, it looks like this:
> 
> 
> obj-y  += kunit/
> 
> and
> 
> obj-$(CONFIG_KUNIT_HOOK)   += hook.o
> 
> 
> 
> 
> 
> 
> 
> Bikeshed:
> 
> I think Linus' suggestion is OK, but
> the BSD style seems less ugly,
> of course, that is just a matter of style.
> 
> 
> obj-$(CONFIG_HYPERV:m=y)   += kunit/

I'd vote for this one, it's compact and readable.

> 
> 
> 
> 
>>  Kbuild also supports dedicated syntax, subdir-y and subdir-m, for
>>  descending into subdirectories. It is a good fit when you know they
>>  do not contain kernel-space objects at all. A typical usage is to let
>> --
>> 2.39.2.722.g9855ee24e9-goog
>>
> 
> 
> --
> Best Regards
> Masahiro Yamada
> 

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ