public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Sam Ravnborg <sam@ravnborg.org>, George Spelvin <linux@horizon.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	linux-kbuild@vger.kernel.org, yann.morin.1998@free.fr
Subject: Re: [PATCH] Documentation/kbuild/makefiles.txt: Improve description of lib-* targets
Date: Tue, 10 Jun 2014 14:47:46 +0200	[thread overview]
Message-ID: <5396FE72.5030705@suse.cz> (raw)
In-Reply-To: <20140516101433.GB10187@ravnborg.org>

On 2014-05-16 12:14, Sam Ravnborg wrote:
> On Wed, May 14, 2014 at 02:21:07PM -0700, Randy Dunlap wrote:
>> On 05/10/2014 10:02 PM, George Spelvin wrote:
>>> I had to ask on the mailing list, so save developers the bother of
>>> answering the question again.  (Wanna-be kernel developers might also
>>> be helped, but who cares about them?)
>>>
>>> Signed-off-by: George Spelvin <linux@horizon.com>
>>> ---
>>> As with most documentation patches, this is also an exercise in eliciting
>>> corrections by proposing a wrong answer which will be jumped on.
>>
>> Hi Michal,
>>
>> Any comments on this patch?
>>
>> Thanks.
>>
>>>
>>>  Documentation/kbuild/makefiles.txt | 23 +++++++++++++++++++++--
>>>  1 file changed, 21 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
>>> index d567a7cc55..f6cc266163 100644
>>> --- a/Documentation/kbuild/makefiles.txt
>>> +++ b/Documentation/kbuild/makefiles.txt
>>> @@ -237,10 +237,29 @@ more details, with real examples.
>>>  	be included in a library, lib.a.
>>>  	All objects listed with lib-y are combined in a single
>>>  	library for that directory.
>>> +
>>> +	The entire kernel is then linked against these libraries,
>>> +	so the linker will include the code in the final kernel only
>>> +	if it is referenced somewhere.  Thus, lib-* goals may be
>>> +	designed with false positives.
>>> +
>>>  	Objects that are listed in obj-y and additionally listed in
>>>  	lib-y will not be included in the library, since they will
>>>  	be accessible anyway.
>>> -	For consistency, objects listed in lib-m will be included in lib.a.
>>> +
>>> +	For consistency, objects listed in lib-m will be included
>>> +	in lib.a, but this will probably not do what you want.
> 
> So maybe we should catch this and error out?

(sorry for the late reply)

That makes sense to me. Check if $(lib-m) is non-empty and throw an
error. George, do you feel like submitting a patch that does this, plus
changing the documentation to clearly state that lib-* is only meant for
built-in code?

Thanks,
Michal

  parent reply	other threads:[~2014-06-10 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-11  2:24 Searching for insight into lib-y and lib-m George Spelvin
2014-05-11  4:28 ` Randy Dunlap
2014-05-11  5:02   ` [PATCH] Documentation/kbuild/makefiles.txt: Improve description of lib-* targets George Spelvin
2014-05-14 21:21     ` Randy Dunlap
2014-05-16 10:14       ` Sam Ravnborg
2014-05-16 10:32         ` George Spelvin
2014-06-10 12:47         ` Michal Marek [this message]
2014-06-08  4:35       ` George Spelvin
2014-05-11 12:34   ` Searching for insight into lib-y and lib-m Tejun Heo
2014-05-11  7:31 ` Sam Ravnborg

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=5396FE72.5030705@suse.cz \
    --to=mmarek@suse.cz \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=rdunlap@infradead.org \
    --cc=sam@ravnborg.org \
    --cc=yann.morin.1998@free.fr \
    /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