From: Michal Marek <mmarek@suse.cz>
To: Noam Camus <noamc@ezchip.com>
Cc: "linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: Makefile race between jobs
Date: Mon, 10 Dec 2012 10:45:15 +0100 [thread overview]
Message-ID: <20121210094515.GA31121@sepie.suse.cz> (raw)
In-Reply-To: <264C179F799EF24AB26D5319053335E80CC31B9D41@ezexch.ezchip.com>
On Mon, Dec 10, 2012 at 11:02:25AM +0200, Noam Camus wrote:
> Target "scripts_basic" by itself is indeed not creating the dependency issue.
> The relevant target is "scripts".
> Sorry for the confusion, thanks for the example.
> So I call target "defconfig" and then I call target "vmlinux" which by dependency calls target "scripts", e.g.:
> $ make ARCH=arc O=/dev/shm/_build/ defconfig scripts
> HOSTCC scripts/basic/fixdep
> GEN /dev/shm/_build/Makefile
> HOSTCC scripts/kconfig/conf.o
> SHIPPED scripts/kconfig/zconf.tab.c
> SHIPPED scripts/kconfig/zconf.lex.c
> SHIPPED scripts/kconfig/zconf.hash.c
> HOSTCC scripts/kconfig/zconf.tab.o
> HOSTLD scripts/kconfig/conf
> #
> # configuration written to .config
> #
> GEN /dev/shm/_build/Makefile
> scripts/kconfig/conf --silentoldconfig Kconfig
> CC scripts/mod/empty.o
> In file included from /tmp/linux/include/linux/thread_info.h:10,
> from /tmp/linux/arch/arc/include/asm/current.h:24,
> from <command-line>:0:
> /tmp/linux/include/linux/types.h:4:23: error: asm/types.h: No such file or directory
>
> The inclusion of asm/current.h comes from use of LINUXINCLUDE in my
> architecture Makefile.
> And asm/types.h is missing since it suppose to be created by target
> "asm-generic".
OK, so there is a new architecture 'arc' that adds '-include asm/current.h'
to global cflags in arch/arc/Makefile. Added Arnd to CC.
> I think the point here that I try to emphasize is that target
> "asm-generic" should be completed before any non-host source is
> compiled.
> In our case scripts/mod/empty.c is the first non-host source to be
> compiled and by bad coincidence it depends upon auto generated
> headers.
I see the problem now. However, so far, no other architecture has been
doing this. 'grep -e -include arch/*/Makefile' shows only one instance
in arch/arm, but that include is a static file with no dependencies. Is
it really necessary to include asm/current.h when compiling _every_
file? Sure, you get it via many common headers, but then you don't need
to add it explicitly :). But if Arnd thinks this is OK, I will merge a
patch that serializes scripts/mod/empty.o and asm-generic.
Michal
next parent reply other threads:[~2012-12-10 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <264C179F799EF24AB26D5319053335E80CC3049A10@ezexch.ezchip.com>
[not found] ` <50C4B8F3.6030704@suse.cz>
[not found] ` <264C179F799EF24AB26D5319053335E80CC31B9D41@ezexch.ezchip.com>
2012-12-10 9:45 ` Michal Marek [this message]
2012-12-10 10:06 ` Makefile race between jobs Noam Camus
2012-12-10 10:11 ` Vineet Gupta
2012-12-10 10:30 ` Michal Marek
2012-12-10 10:36 ` Vineet Gupta
2012-12-10 10:59 ` Arnd Bergmann
2012-12-10 11:23 ` Vineet Gupta
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=20121210094515.GA31121@sepie.suse.cz \
--to=mmarek@suse.cz \
--cc=arnd@arndb.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noamc@ezchip.com \
/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