[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNATb66XMABK91ZoEpZSekpcROtPEO+KjSBYZ+OOy7QoHuA@mail.gmail.com>
Date: Thu, 19 Oct 2017 01:53:24 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Cc: Sam Ravnborg <sam@...nborg.org>,
Douglas Anderson <dianders@...omium.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kbuild: do not call cc-option before KBUILD_CFLAGS initialization
2017-10-12 18:22 GMT+09:00 Masahiro Yamada <yamada.masahiro@...ionext.com>:
> Some $(call cc-option,...) are invoked very early, even before
> KBUILD_CFLAGS, etc. are initialized.
>
> The returned string from $(call cc-option,...) depends on
> KBUILD_CPPFLAGS, KBUILD_CFLAGS, and GCC_PLUGINS_CFLAGS.
>
> Since they are exported, they are not empty when the top Makefile
> is recursively invoked.
>
> The recursion occurs in several places. For example, the top
> Makefile invokes itself for silentoldconfig. "make tinyconfig",
> "make rpm-pkg" are the cases, too.
>
> In those cases, the second call of cc-option from the same line
> runs a different shell command due to non-pristine KBUILD_CFLAGS.
>
> To get the same result all the time, KBUILD_* and GCC_PLUGINS_CFLAGS
> must be initialized before any call of cc-option. This avoids
> garbage data in the .cache.mk file.
>
> Move all calls of cc-option below the config targets because target
> compiler flags are unnecessary for Kconfig.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---
Applied to linux-kbuild/kbuild.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists