* [GIT PULL 2/2] Kconfig updates for v4.18
@ 2018-06-06 17:18 Masahiro Yamada
2018-06-06 18:41 ` Linus Torvalds
2018-06-18 13:25 ` Eric W. Biederman
0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2018-06-06 17:18 UTC (permalink / raw)
To: Linus Torvalds
Cc: Linux Kbuild mailing list, Linux Kernel Mailing List, masahiroy
Hi Linus,
Please pull Kconfig updates for v4.18
(The follow-up cleanup works are not included in this PR.
I will send them later on because I need to wait for
some prerequisite patches from the PowerPC subsystem.)
You will see a conflict in the top-level Makefile.
It should be resolved as follows:
(The correct fix is also available in linux-next)
------------------------------------------
diff --cc Makefile
index 0d5cdaa,defb383..bbc979a
--- a/Makefile
+++ b/Makefile
@@@ -807,7 -806,8 +806,7 @@@ KBUILD_CFLAGS_KERNEL += $(call cc-optio
endif
# arch Makefile may override CC so keep this after arch Makefile is included
- NOSTDINC_FLAGS += -nostdinc -isystem $(call shell-cached,$(CC)
-print-file-name=include)
+ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
-CHECKFLAGS += $(NOSTDINC_FLAGS)
# warn about C99 declaration after statement
KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
-------------------------------------------
The following changes since commit b04e217704b7f879c6b91222b066983a44a7a09f:
Linux 4.17-rc7 (2018-05-27 13:01:47 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
tags/kconfig-v4.18
for you to fetch changes up to 2ae89c7a82ea9d81a19b4fc2df23bef4b112f24e:
kconfig: Avoid format overflow warning from GCC 8.1 (2018-06-05
22:07:21 +0900)
----------------------------------------------------------------
Kconfig updates for v4.18
Kconfig now supports new functionality to perform textual substitution.
It has been a while since Linus suggested to move compiler option tests
from makefiles to Kconfig. Finally, here it is. The implementation has
been generalized into a Make-like macro language. Some built-in functions
such as 'shell' are provided. Variables and user-defined functions are
also supported so that 'cc-option', 'ld-option', etc. are implemented as
macros.
Summary:
- refactor package checks for building {m,n,q,g}conf
- remove unused/unmaintained localization support
- remove Kbuild cache
- drop CONFIG_CROSS_COMPILE support
- replace 'option env=' with direct variable expansion
- add built-in functions such as 'shell'
- support variables and user-defined functions
- add helper macros as as 'cc-option'
- add unit tests and a document of the new macro language
- add 'testconfig' to help
- fix warnings from GCC 8.1
----------------------------------------------------------------
Masahiro Yamada (26):
kbuild: do not display CHK for filechk
kconfig: refactor Qt package checks for building qconf
kconfig: refactor GTK+ package checks for building gconf
kconfig: refactor ncurses package checks for building mconf and nconf
kbuild: remove kbuild cache
kbuild: remove CONFIG_CROSS_COMPILE support
kconfig: reference environment variables directly and remove 'option env='
kconfig: remove string expansion in file_lookup()
kconfig: remove string expansion for mainmenu after yyparse()
kconfig: remove sym_expand_string_value()
kconfig: make default prompt of mainmenu less specific
kconfig: add built-in function support
kconfig: add 'shell' built-in function
kconfig: replace $(UNAME_RELEASE) with function call
kconfig: begin PARAM state only when seeing a command keyword
kconfig: support user-defined function and recursively expanded variable
kconfig: support simply expanded variable
kconfig: support append assignment operator
kconfig: expand lefthand side of assignment statement
kconfig: add 'info', 'warning-if', and 'error-if' built-in functions
kconfig: add 'filename' and 'lineno' built-in variables
kconfig: error out if a recursive variable references itself
Documentation: kconfig: document a new Kconfig macro language
kconfig: test: add Kconfig macro language tests
kconfig: show compiler version text in the top comment
kconfig: add basic helper macros to scripts/Kconfig.include
Nathan Chancellor (1):
kconfig: Avoid format overflow warning from GCC 8.1
Petr Vorel (2):
kconfig: Add testconfig into make help output
kbuild: Move last word of nconfig help to the previous line
Sam Ravnborg (1):
kconfig: drop localization support
Documentation/kbuild/kconfig-language.txt | 8 -
Documentation/kbuild/kconfig-macro-language.txt | 242 +++++++++
Kconfig | 10 +-
MAINTAINERS | 3 +-
Makefile | 10 +-
arch/sh/Kconfig | 4 +-
arch/sparc/Kconfig | 4 +-
arch/um/Kconfig.common | 4 -
arch/x86/Kconfig | 4 +-
arch/x86/um/Kconfig | 10 +-
init/Kconfig | 25 +-
scripts/Kbuild.include | 102 +---
scripts/Kconfig.include | 27 +
scripts/kconfig/.gitignore | 4 -
scripts/kconfig/Makefile | 194 ++------
scripts/kconfig/POTFILES.in | 12 -
scripts/kconfig/check.sh | 14 -
scripts/kconfig/conf.c | 51 +-
scripts/kconfig/confdata.c | 39 +-
scripts/kconfig/gconf-cfg.sh | 23 +
scripts/kconfig/gconf.c | 46 +-
scripts/kconfig/kconf_id.c | 1 -
scripts/kconfig/kxgettext.c | 235 ---------
scripts/kconfig/lkc.h | 19 +-
scripts/kconfig/lkc_proto.h | 15 +-
scripts/kconfig/lxdialog/check-lxdialog.sh | 93 ----
scripts/kconfig/lxdialog/checklist.c | 4 +-
scripts/kconfig/lxdialog/dialog.h | 8 +-
scripts/kconfig/lxdialog/inputbox.c | 4 +-
scripts/kconfig/lxdialog/menubox.c | 10 +-
scripts/kconfig/lxdialog/textbox.c | 2 +-
scripts/kconfig/lxdialog/yesno.c | 4 +-
scripts/kconfig/mconf-cfg.sh | 44 ++
scripts/kconfig/mconf.c | 141 +++---
scripts/kconfig/menu.c | 23 +-
scripts/kconfig/nconf-cfg.sh | 44 ++
scripts/kconfig/nconf.c | 148 +++---
scripts/kconfig/nconf.h | 1 -
scripts/kconfig/preprocess.c | 572
++++++++++++++++++++++
scripts/kconfig/qconf-cfg.sh | 25 +
scripts/kconfig/qconf.cc | 104 ++--
scripts/kconfig/symbol.c | 109 -----
.../tests/no_write_if_dep_unmet/expected_config | 2 +-
scripts/kconfig/tests/preprocess/builtin_func/Kconfig | 27 +
.../kconfig/tests/preprocess/builtin_func/__init__.py | 9 +
.../tests/preprocess/builtin_func/expected_stderr | 5 +
.../tests/preprocess/builtin_func/expected_stdout | 1 +
.../tests/preprocess/circular_expansion/Kconfig | 5 +
.../tests/preprocess/circular_expansion/__init__.py | 11 +
.../preprocess/circular_expansion/expected_stderr | 1 +
scripts/kconfig/tests/preprocess/escape/Kconfig | 44 ++
scripts/kconfig/tests/preprocess/escape/__init__.py | 8 +
.../kconfig/tests/preprocess/escape/expected_stderr | 10 +
scripts/kconfig/tests/preprocess/variable/Kconfig | 53 ++
scripts/kconfig/tests/preprocess/variable/__init__.py | 8 +
.../kconfig/tests/preprocess/variable/expected_stderr | 9 +
scripts/kconfig/util.c | 33 +-
scripts/kconfig/zconf.l | 95 +++-
scripts/kconfig/zconf.y | 46 +-
59 files changed, 1666 insertions(+), 1143 deletions(-)
create mode 100644 Documentation/kbuild/kconfig-macro-language.txt
create mode 100644 scripts/Kconfig.include
delete mode 100644 scripts/kconfig/POTFILES.in
delete mode 100755 scripts/kconfig/check.sh
create mode 100755 scripts/kconfig/gconf-cfg.sh
delete mode 100644 scripts/kconfig/kxgettext.c
delete mode 100755 scripts/kconfig/lxdialog/check-lxdialog.sh
create mode 100755 scripts/kconfig/mconf-cfg.sh
create mode 100644 scripts/kconfig/nconf-cfg.sh
create mode 100644 scripts/kconfig/preprocess.c
create mode 100755 scripts/kconfig/qconf-cfg.sh
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/__init__.py
create mode 100644
scripts/kconfig/tests/preprocess/builtin_func/expected_stderr
create mode 100644
scripts/kconfig/tests/preprocess/builtin_func/expected_stdout
create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/Kconfig
create mode 100644
scripts/kconfig/tests/preprocess/circular_expansion/__init__.py
create mode 100644
scripts/kconfig/tests/preprocess/circular_expansion/expected_stderr
create mode 100644 scripts/kconfig/tests/preprocess/escape/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/escape/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/escape/expected_stderr
create mode 100644 scripts/kconfig/tests/preprocess/variable/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/variable/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/variable/expected_stderr
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL 2/2] Kconfig updates for v4.18
2018-06-06 17:18 [GIT PULL 2/2] Kconfig updates for v4.18 Masahiro Yamada
@ 2018-06-06 18:41 ` Linus Torvalds
2018-06-18 13:25 ` Eric W. Biederman
1 sibling, 0 replies; 5+ messages in thread
From: Linus Torvalds @ 2018-06-06 18:41 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Linux Kbuild mailing list, Linux Kernel Mailing List, masahiroy
On Wed, Jun 6, 2018 at 10:19 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Please pull Kconfig updates for v4.18
Thanks, pulled, going through my build testing now.
I just wanted to say how much I like the new Kconfig syntax
extensions, even if this tree didn't contain the nice cleanups to
actually use the new syntax.
Of course, maybe it causes unforseen problems and I'll grow to hate it
over time, but at least for now this really looks *so* nice to have
the ability move nasty things from Makefiles to the Kconfig phase.
Thanks,
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL 2/2] Kconfig updates for v4.18
2018-06-06 17:18 [GIT PULL 2/2] Kconfig updates for v4.18 Masahiro Yamada
2018-06-06 18:41 ` Linus Torvalds
@ 2018-06-18 13:25 ` Eric W. Biederman
2018-06-23 16:54 ` Randy Dunlap
2018-06-24 2:36 ` Masahiro Yamada
1 sibling, 2 replies; 5+ messages in thread
From: Eric W. Biederman @ 2018-06-18 13:25 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Linus Torvalds, Linux Kbuild mailing list,
Linux Kernel Mailing List, masahiroy
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> - drop CONFIG_CROSS_COMPILE support
aka
> commit f1089c92da791034af73478159626007cba7f092
> Author: Masahiro Yamada <yamada.masahiro@socionext.com>
> Date: Mon May 28 18:21:39 2018 +0900
>
> kbuild: remove CONFIG_CROSS_COMPILE support
>
> Kbuild provides a couple of ways to specify CROSS_COMPILE:
>
> [1] Command line
> [2] Environment
> [3] arch/*/Makefile (only some architectures)
> [4] CONFIG_CROSS_COMPILE
>
> [4] is problematic for the compiler capability tests in Kconfig.
> CONFIG_CROSS_COMPILE allows users to change the compiler prefix from
> 'make menuconfig', etc. It means, the compiler options would have
> to be all re-calculated everytime CONFIG_CROSS_COMPILE is changed.
>
> To avoid complexity and performance issues, I'd like to evaluate
> the shell commands statically, i.e. only parsing Kconfig files.
>
> I guess the majority is [1] or [2]. Currently, there are only
> 5 defconfig files that specify CONFIG_CROSS_COMPILE.
> arch/arm/configs/lpc18xx_defconfig
> arch/hexagon/configs/comet_defconfig
> arch/nds32/configs/defconfig
> arch/openrisc/configs/or1ksim_defconfig
> arch/openrisc/configs/simple_smp_defconfig
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Kees Cook <keescook@chromium.org>
>
I just started working against 4.18-rc1 and discovered this.
This has broken my setup for building and testing changes on other
architectures. I have to put the name of the compiler prefix somewhere.
The mapping between the prefix to gcc and the linux architecture is
non-trivial. Especially with a lot of architectures in the test pool.
I am tired and frustrated this morning as this is going to keep me from
getting done what I had planned today.
This is a regression pure and simple. It breaks my workflow. Please
fix it.
Eric
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL 2/2] Kconfig updates for v4.18
2018-06-18 13:25 ` Eric W. Biederman
@ 2018-06-23 16:54 ` Randy Dunlap
2018-06-24 2:36 ` Masahiro Yamada
1 sibling, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2018-06-23 16:54 UTC (permalink / raw)
To: Eric W. Biederman, Masahiro Yamada
Cc: Linus Torvalds, Linux Kbuild mailing list,
Linux Kernel Mailing List, masahiroy
On 06/18/2018 06:25 AM, Eric W. Biederman wrote:
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>
>> - drop CONFIG_CROSS_COMPILE support
>
> aka
>> commit f1089c92da791034af73478159626007cba7f092
>> Author: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Date: Mon May 28 18:21:39 2018 +0900
>>
>> kbuild: remove CONFIG_CROSS_COMPILE support
>>
>> Kbuild provides a couple of ways to specify CROSS_COMPILE:
>>
>> [1] Command line
>> [2] Environment
>> [3] arch/*/Makefile (only some architectures)
>> [4] CONFIG_CROSS_COMPILE
>>
>> [4] is problematic for the compiler capability tests in Kconfig.
>> CONFIG_CROSS_COMPILE allows users to change the compiler prefix from
>> 'make menuconfig', etc. It means, the compiler options would have
>> to be all re-calculated everytime CONFIG_CROSS_COMPILE is changed.
>>
>> To avoid complexity and performance issues, I'd like to evaluate
>> the shell commands statically, i.e. only parsing Kconfig files.
>>
>> I guess the majority is [1] or [2]. Currently, there are only
>> 5 defconfig files that specify CONFIG_CROSS_COMPILE.
>> arch/arm/configs/lpc18xx_defconfig
>> arch/hexagon/configs/comet_defconfig
>> arch/nds32/configs/defconfig
>> arch/openrisc/configs/or1ksim_defconfig
>> arch/openrisc/configs/simple_smp_defconfig
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Reviewed-by: Kees Cook <keescook@chromium.org>
>>
>
> I just started working against 4.18-rc1 and discovered this.
>
> This has broken my setup for building and testing changes on other
> architectures. I have to put the name of the compiler prefix somewhere.
> The mapping between the prefix to gcc and the linux architecture is
> non-trivial. Especially with a lot of architectures in the test pool.
>
> I am tired and frustrated this morning as this is going to keep me from
> getting done what I had planned today.
>
> This is a regression pure and simple. It breaks my workflow. Please
> fix it.
Hi Eric,
I haven't seen any replies to your email.
FWIW, every bump in kernel major version number breaks my scripts, and I just
update them.
Anyway, I can offer you my cross-build scripts if you want them.
Then are named xbuild_$(ARCH).sh (well, mostly) and they (mostly) replace
and work like "make". E.g. this is how I use one of them:
$ xbuild_arm.sh allmodconfig
$ xbuild_arm.sh all >armall.out 2>&1
I used Arnd's crosstool builds from https://cdn.kernel.org/pub/tools/crosstool/.
Or you could check out the kbuild test robot make.cross script that is
mentioned in every build-errors report:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout ee076e81fc14ca79334d02970cea66604f183a14
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=sparc
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL 2/2] Kconfig updates for v4.18
2018-06-18 13:25 ` Eric W. Biederman
2018-06-23 16:54 ` Randy Dunlap
@ 2018-06-24 2:36 ` Masahiro Yamada
1 sibling, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2018-06-24 2:36 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Linus Torvalds, Linux Kbuild mailing list, Linux Kernel Mailing List
Hi.
2018-06-18 22:25 GMT+09:00 Eric W. Biederman <ebiederm@xmission.com>:
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>
>> - drop CONFIG_CROSS_COMPILE support
>
> aka
>> commit f1089c92da791034af73478159626007cba7f092
>> Author: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Date: Mon May 28 18:21:39 2018 +0900
>>
>> kbuild: remove CONFIG_CROSS_COMPILE support
>>
>> Kbuild provides a couple of ways to specify CROSS_COMPILE:
>>
>> [1] Command line
>> [2] Environment
>> [3] arch/*/Makefile (only some architectures)
>> [4] CONFIG_CROSS_COMPILE
>>
>> [4] is problematic for the compiler capability tests in Kconfig.
>> CONFIG_CROSS_COMPILE allows users to change the compiler prefix from
>> 'make menuconfig', etc. It means, the compiler options would have
>> to be all re-calculated everytime CONFIG_CROSS_COMPILE is changed.
>>
>> To avoid complexity and performance issues, I'd like to evaluate
>> the shell commands statically, i.e. only parsing Kconfig files.
>>
>> I guess the majority is [1] or [2]. Currently, there are only
>> 5 defconfig files that specify CONFIG_CROSS_COMPILE.
>> arch/arm/configs/lpc18xx_defconfig
>> arch/hexagon/configs/comet_defconfig
>> arch/nds32/configs/defconfig
>> arch/openrisc/configs/or1ksim_defconfig
>> arch/openrisc/configs/simple_smp_defconfig
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Reviewed-by: Kees Cook <keescook@chromium.org>
>>
>
> I just started working against 4.18-rc1 and discovered this.
>
> This has broken my setup for building and testing changes on other
> architectures. I have to put the name of the compiler prefix somewhere.
> The mapping between the prefix to gcc and the linux architecture is
> non-trivial. Especially with a lot of architectures in the test pool.
>
> I am tired and frustrated this morning as this is going to keep me from
> getting done what I had planned today.
>
> This is a regression pure and simple. It breaks my workflow. Please
> fix it.
>
> Eric
>
Sorry, I cannot fix.
As I mentioned in the commit log,
CONFIG_CROSS_COMPILE cannot co-exist with the new Kconfig feature.
Only the possible fix is to revert almost all Kbuild/Kconfig commits
merged in the previous MW, but I do not want to.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-06-24 2:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06 17:18 [GIT PULL 2/2] Kconfig updates for v4.18 Masahiro Yamada
2018-06-06 18:41 ` Linus Torvalds
2018-06-18 13:25 ` Eric W. Biederman
2018-06-23 16:54 ` Randy Dunlap
2018-06-24 2:36 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.