linux-stable/scripts/kconfig
Masahiro Yamada 07a422bb21 kbuild: restore autoksyms.h touch to the top Makefile
Commit d3fc425e81 ("kbuild: make sure autoksyms.h exists early")
moved the code that touches autoksyms.h to scripts/kconfig/Makefile
with obscure reason.

From Nicolas' comment [1], he did not seem to be sure about the root
cause.

I guess I figured it out, so here is a fix-up I think is more correct.
According to the error log in the original post [2], the build failed
in scripts/mod/devicetable-offsets.c

scripts/mod/Makefile is descended from scripts/Makefile, which is
invoked from the top-level Makefile by the 'scripts' target.

To build vmlinux and/or modules, Kbuild descend into $(vmlinux-dirs).
This depends on 'prepare' and 'scripts' as follows:

  $(vmlinux-dirs): prepare scripts

Because there is no dependency between 'prepare' and 'scripts', the
parallel building can execute them simultaneously.

'prepare' depends on 'prepare1', which touched autoksyms.h, while
'scripts' descends into script/, then scripts/mod/, which needs
<generated/autoksyms.h> if CONFIG_TRIM_UNUSED_KSYMS.  It was the
reason of the race.

I am not happy to have unrelated code in the Kconfig Makefile, so
getting it back to the top Makefile.

I removed the standalone test target because I want to use it to
create an empty autoksyms.h file.  Here is a little improvement;
unnecessary autoksyms.h is not created when CONFIG_TRIM_UNUSED_KSYMS
is disabled.

[1] https://lkml.org/lkml/2016/11/30/734
[2] https://lkml.org/lkml/2016/11/30/531

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
2018-03-26 02:01:22 +09:00
..
lxdialog kconfig: Update ncurses package names for menuconfig 2018-03-02 09:20:57 +09:00
.gitignore kconfig: remove 'config*' pattern from .gitignnore 2018-02-09 04:10:09 +09:00
Makefile kbuild: restore autoksyms.h touch to the top Makefile 2018-03-26 02:01:22 +09:00
POTFILES.in
check.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
conf.c kconfig: send error messages to stderr 2018-02-09 04:10:10 +09:00
confdata.c kconfig: add xstrdup() helper 2018-03-02 00:26:47 +09:00
expr.c kconfig: send error messages to stderr 2018-02-09 04:10:10 +09:00
expr.h kconfig: make "Selected by:" and "Implied by:" readable 2018-01-25 21:53:00 +09:00
gconf.c gconfig: remove misleading parentheses around a condition 2017-03-22 02:56:33 +09:00
gconf.glade scripts/kconfig/gconf.glade Update broken web addresses. 2010-09-17 16:54:42 +02:00
images.c
kconf_id.c kconfig: drop 'boolean' keyword 2018-01-22 00:49:29 +09:00
kxgettext.c kconfig: add xstrdup() helper 2018-03-02 00:26:47 +09:00
list.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lkc.h kconfig: add xstrdup() helper 2018-03-02 00:26:47 +09:00
lkc_proto.h kconfig: remove const qualifier from sym_expand_string_value() 2018-02-10 11:31:49 +09:00
mconf.c kconfig: drop 'boolean' keyword 2018-01-22 00:49:29 +09:00
menu.c kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list 2018-03-02 09:20:44 +09:00
merge_config.sh kconfig/merge_config.sh: Accept a single file 2015-10-14 16:19:37 +02:00
nconf.c kconfig: fix sparse warnings in nconfig 2017-06-23 06:00:52 +09:00
nconf.gui.c kconfig: add xrealloc() helper 2018-02-10 11:26:04 +09:00
nconf.h scripts/kconfig/nconf: dynamically alloc dialog_input_result 2011-09-09 14:40:08 +02:00
qconf.cc xconfig: fix missing suboption and help panels on first run 2016-12-11 21:40:54 +01:00
qconf.h Port xconfig to Qt5 - Source format. 2015-10-14 14:59:03 +02:00
streamline_config.pl scripts: Switch to more portable Perl shebang 2017-05-14 11:20:44 +09:00
symbol.c kconfig: add xstrdup() helper 2018-03-02 00:26:47 +09:00
util.c kconfig: add xstrdup() helper 2018-03-02 00:26:47 +09:00
zconf.l kconfig: fix line number in recursive inclusion error message 2018-03-03 00:44:47 +09:00
zconf.y kconfig: Don't leak choice names during parsing 2018-03-02 09:20:55 +09:00