From: Guenter Roeck <linux@roeck-us.net>
To: Douglas Anderson <dianders@chromium.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
malat@debian.org, dave.hansen@intel.com, yang.s@alibaba-inc.com,
Matthias Kaehlcke <mka@chromium.org>,
Cao jin <caoj.fnst@cn.fujitsu.com>, Arnd Bergmann <arnd@arndb.de>,
Mark Charlebois <charlebm@gmail.com>,
linux-kernel@vger.kernel.org,
Josh Poimboeuf <jpoimboe@redhat.com>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 1/2] kbuild: Require a 'make clean' if we detect gcc changed underneath us
Date: Fri, 22 Dec 2017 13:58:50 -0800 [thread overview]
Message-ID: <20171222215850.GA504@roeck-us.net> (raw)
On Thu, Dec 21, 2017 at 05:53:02PM -0800, Douglas Anderson wrote:
> Several people reported that the commit 3298b690b21c ("kbuild: Add a
> cache for generated variables") caused them problems when they updated
> gcc versions. Specifically the reports all looked something similar
> to this:
>
> > In file included from ./include/uapi/linux/uuid.h:21:0,
> > from ./include/linux/uuid.h:19,
> > from ./include/linux/mod_devicetable.h:12,
> > from scripts/mod/devicetable-offsets.c:2:
> > ./include/linux/string.h:8:20: fatal error: stdarg.h: No such file or
> > directory
> > #include <stdarg.h>
>
> Masahiro Yamada determined that the problem was with:
>
> NOSTDINC_FLAGS += -nostdinc -isystem $(call shell-cached,$(CC)
> -print-file-name=include)
>
> Specifically that the stale result of -print-file-name is stored in
> the cache file. It was determined that a "make clean" fixed the
> problems in all cases.
>
> In this particular case we could certainly try to clean just the cache
> when we detect a gcc update, but it seems like overall it's a bad idea
> to do an incremental build when gcc changes. We should warn the user
> and tell them that they need a 'make clean'.
>
> Fixes: 3298b690b21c ("kbuild: Add a cache for generated variables")
> Reported-by: Yang Shi <yang.s@alibaba-inc.com>
> Reported-by: Dave Hansen <dave.hansen@intel.com>
> Reported-by: Mathieu Malaterre <malat@debian.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
Unfortunately, it doesn't work as-is. Trying to build for mips with two
different compilers, and trying to run "make clean" with the 2nd compiler
version, results in:
scripts/Kbuild.include:490: *** Detected new CC version (050400 vs 040803).
Please 'make clean'. Stop.
Makefile:1297: recipe for target '_clean_.' failed
make: *** [_clean_.] Error 2
make: *** Waiting for unfinished jobs....
scripts/Kbuild.include:490: *** Detected new CC version (050400 vs 040803).
Please 'make clean'. Stop.
Makefile:1297: recipe for target '_clean_arch/mips' failed
make: *** [_clean_arch/mips] Error 2
scripts/Kbuild.include:490: *** Detected new CC version (050400 vs 040803).
Please 'make clean'. Stop.
Makefile:1297: recipe for target '_clean_arch/mips/boot/dts' failed
make: *** [_clean_arch/mips/boot/dts] Error 2
make: *** wait: No child processes. Stop.
Guenter
next reply other threads:[~2017-12-22 21:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-22 21:58 Guenter Roeck [this message]
2017-12-22 22:15 ` Doug Anderson
-- strict thread matches above, loose matches on Subject: below --
2017-12-22 1:53 [PATCH 0/2] kbuild: Fix corner caches with .cache.mk Douglas Anderson
2017-12-22 1:53 ` [PATCH 1/2] kbuild: Require a 'make clean' if we detect gcc changed underneath us Douglas Anderson
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=20171222215850.GA504@roeck-us.net \
--to=linux@roeck-us.net \
--cc=arnd@arndb.de \
--cc=caoj.fnst@cn.fujitsu.com \
--cc=charlebm@gmail.com \
--cc=dave.hansen@intel.com \
--cc=dianders@chromium.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=malat@debian.org \
--cc=mingo@kernel.org \
--cc=mka@chromium.org \
--cc=yamada.masahiro@socionext.com \
--cc=yang.s@alibaba-inc.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
all inboxes | Powered by JetHome®