public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH] modpost: Fix secondary errors seen if a single module build fails
Date: Tue, 17 Sep 2013 06:17:01 -0700	[thread overview]
Message-ID: <5238564D.6010307@roeck-us.net> (raw)
In-Reply-To: <52384C72.4040403@suse.cz>

On 09/17/2013 05:34 AM, Michal Marek wrote:
> Dne 15.9.2013 06:39, Guenter Roeck napsal(a):
>> Commit ea4054a23 (modpost: handle huge numbers of modules) added
>> support for building a large number of modules.
>>
>> Unfortunately, the commit changed the semantics of the makefile: Instead of
>> passing only existing object files to modpost, make now passes all expected
>> object files. If make was started with option -i, this results in a modpost
>> error if a single file failed to build.
>>
>> Example with the current btrfs build falure on m68k:
>>
>> fs/btrfs/btrfs.o: No such file or directory
>> make[1]: [__modpost] Error 1 (ignored)
>>
>> This error is followed by lots of errors such as:
>>
>> m68k-linux-gcc: error: arch/m68k/emu/nfcon.mod.c: No such file or directory
>> m68k-linux-gcc: fatal error: no input files
>> compilation terminated.
>> make[1]: [arch/m68k/emu/nfcon.mod.o] Error 1 (ignored)
>>
>> This doesn't matter much for normal builds, but it is annoying for builds
>> started with "make -i" due to the large number of secondary errors.
>> Those errors unnececessarily clog any error log and make it difficult
>> to find the real errors in the build.
>>
>> Fix the problem by only passing existing object files to modpost.
>>
>> Cc: Rusty Russell <rusty@rustcorp.com.au>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   scripts/Makefile.modpost |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
>> index 8dcdca2..387c806 100644
>> --- a/scripts/Makefile.modpost
>> +++ b/scripts/Makefile.modpost
>> @@ -81,7 +81,8 @@ modpost = scripts/mod/modpost                    \
>>
>>   # We can go over command line length here, so be careful.
>>   quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
>> -      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) -s -T -
>> +      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | \
>> +	while read a; do [ -f $$a ] && echo $$a; done | $(modpost) -s -T -
>
> Can you do this filtering only if make -i is used ('i' is present in
> $(MAKEFLAGS)), to not hide potential buildsystem bugs? Regarding shell
> loop vs. ls, maybe the cleanest way would be to add an option to modpost
> to ignore missing files.
>

Possibly, but I don't really see the point, as the rest of the makefile
does and always did the same filtering already (using $(wildcard ...)
and it doesn't make sense to even try to run modpost on a file that
does not exist.

Sure, it might be a possibility to drop all the wildcard and other filtering
conditionally and only keep it if -i was specified, but I think that should
be a separate patch as it would add its own risks and complexities.

Guenter


  reply	other threads:[~2013-09-17 13:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-15  4:39 [PATCH] modpost: Fix secondary errors seen if a single module build fails Guenter Roeck
2013-09-15  8:15 ` Geert Uytterhoeven
2013-09-15 15:06   ` Guenter Roeck
2013-09-16 18:33   ` Guenter Roeck
2013-09-17 12:34 ` Michal Marek
2013-09-17 13:17   ` Guenter Roeck [this message]
2013-09-18 14:05   ` Guenter Roeck
2013-09-25  9:15     ` Michal Marek

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=5238564D.6010307@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=rusty@rustcorp.com.au \
    /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