summaryrefslogtreecommitdiffstats
path: root/Documentation/kbuild/kconfig-language.rst
AgeCommit message (Collapse)AuthorFilesLines
2022-08-21asm goto: eradicate CC_HAS_ASM_GOTONick Desaulniers1-2/+2
GCC has supported asm goto since 4.5, and Clang has since version 9.0.0. The minimum supported versions of these tools for the build according to Documentation/process/changes.rst are 5.1 and 11.0.0 respectively. Remove the feature detection script, Kconfig option, and clean up some fallback code that is no longer supported. The removed script was also testing for a GCC specific bug that was fixed in the 4.7 release. Also remove workarounds for bpftrace using clang older than 9.0.0, since other BPF backend fixes are required at this point. Link: https://lore.kernel.org/lkml/CAK7LNATSr=BXKfkdW8f-H5VT_w=xBpT2ZQcZ7rm6JfkdE+QnmA@mail.gmail.com/ Link: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48637 Acked-by: Borislav Petkov <bp@suse.de> Suggested-by: Masahiro Yamada <masahiroy@kernel.org> Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-07-27docs: kbuild: fix typoBaruch Siach1-1/+1
on -> one. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-04-06docs: kbuild: add references on Kconfig semanticsNecip Fazil Yildiran1-0/+6
Add references to 1) a research paper which provides a definition of Kconfig semantics, 2) the kismet tool, which checks for unmet direct dependency bugs in Kconfig specifications. Signed-off-by: Paul Gazzillo <paul@pgazz.com> Signed-off-by: Necip Fazil Yildiran <fazilyildiran@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-01-08doc: kbuild: fix default in `imply` tableMiguel Ojeda1-1/+1
`BAZ` takes `FOO`'s value as default (as far as `BAR` allows it). Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2021-04-14kconfig: change "modules" from sub-option to first-level attributeMasahiro Yamada1-10/+4
Now "modules" is the only member of the "option" property. Remove "option", and move "modules" to the top level property. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2021-04-14kconfig: remove allnoconfig_y optionMasahiro Yamada1-4/+0
Now that the only user, CONFIG_EMBEDDED has stopped using this option, remove it entirely. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2021-04-14kconfig: change defconfig_list option to environment variableMasahiro Yamada1-5/+0
"defconfig_list" is a weird option that defines a static symbol that declares the list of base config files in case the .config does not exist yet. This is quite different from other normal symbols; we just abused the "string" type and the "default" properties to list out the input files. They must be fixed values since these are searched for and loaded in the parse stage. It is an ugly hack, and should not exist in the first place. Providing this feature as an environment variable is a saner approach. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-12-21Documentation/kbuild: Document platform dependency practisesGeert Uytterhoeven1-0/+24
Document best practises for using architecture and platform dependencies. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-12-21Documentation/kbuild: Document COMPILE_TEST dependenciesGeert Uytterhoeven1-0/+11
Document best practises for using COMPILE_TEST dependencies. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-09Merge tag 'kbuild-v5.9' of ↵Linus Torvalds1-9/+9
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - run the checker (e.g. sparse) after the compiler - remove unneeded cc-option tests for old compiler flags - fix tar-pkg to install dtbs - introduce ccflags-remove-y and asflags-remove-y syntax - allow to trace functions in sub-directories of lib/ - introduce hostprogs-always-y and userprogs-always-y syntax - various Makefile cleanups * tag 'kbuild-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: stop filtering out $(GCC_PLUGINS_CFLAGS) from cc-option base kbuild: include scripts/Makefile.* only when relevant CONFIG is enabled kbuild: introduce hostprogs-always-y and userprogs-always-y kbuild: sort hostprogs before passing it to ifneq kbuild: move host .so build rules to scripts/gcc-plugins/Makefile kbuild: Replace HTTP links with HTTPS ones kbuild: trace functions in subdirectories of lib/ kbuild: introduce ccflags-remove-y and asflags-remove-y kbuild: do not export LDFLAGS_vmlinux kbuild: always create directories of targets powerpc/boot: add DTB to 'targets' kbuild: buildtar: add dtbs support kbuild: remove cc-option test of -ffreestanding kbuild: remove cc-option test of -fno-stack-protector Revert "kbuild: Create directory for target DTB" kbuild: run the checker after the compiler
2020-08-10kbuild: Replace HTTP links with HTTPS onesAlexander A. Klimov1-7/+7
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-13Documentation: kbuild/kconfig-language: eliminate duplicated wordRandy Dunlap1-1/+1
Drop the doubled word "the". Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Masahiro Yamada <masahiroy@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Michal Marek <michal.lkml@markovi.net> Cc: linux-kbuild@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-11-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-07-07kbuild: remove cc-option test of -fno-stack-protectorMasahiro Yamada1-2/+2
Some Makefiles already pass -fno-stack-protector unconditionally. For example, arch/arm64/kernel/vdso/Makefile, arch/x86/xen/Makefile. No problem report so far about hard-coding this option. So, we can assume all supported compilers know -fno-stack-protector. GCC 4.8 and Clang support this option (https://godbolt.org/z/_HDGzN) Get rid of cc-option from -fno-stack-protector. Remove CONFIG_CC_HAS_STACKPROTECTOR_NONE, which is always 'y'. Note: arch/mips/vdso/Makefile adds -fno-stack-protector twice, first unconditionally, and second conditionally. I removed the second one. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
2020-03-13kconfig: make 'imply' obey the direct dependencyMasahiro Yamada1-2/+13
The 'imply' statement may create unmet direct dependency when the implied symbol depends on m. [Test Code] config FOO tristate "foo" imply BAZ config BAZ tristate "baz" depends on BAR config BAR def_tristate m config MODULES def_bool y option modules If you set FOO=y, BAZ is also promoted to y, which results in the following .config file: CONFIG_FOO=y CONFIG_BAZ=y CONFIG_BAR=m CONFIG_MODULES=y This does not meet the dependency 'BAZ depends on BAR'. Unlike 'select', what is worse, Kconfig never shows the 'WARNING: unmet direct dependencies detected for ...' for this case. Because 'imply' is considered to be weaker than 'depends on', Kconfig should take the direct dependency into account. For clarification, describe this case in kconfig-language.rst too. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Nicolas Pitre <nico@fluxnic.net> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-03-13kconfig: allow symbols implied by y to become mMasahiro Yamada1-1/+11
The 'imply' keyword restricts a symbol to y or n, excluding m when it is implied by y. This is the original behavior since commit 237e3ad0f195 ("Kconfig: Introduce the "imply" keyword"). However, the author of this feature, Nicolas Pitre, stated that the 'imply' keyword should not impose any restrictions. (https://lkml.org/lkml/2020/2/19/714) I agree, and want to get rid of this tricky behavior. Suggested-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Nicolas Pitre <nico@fluxnic.net>
2020-01-22kconfig: fix documentation typosBjorn Helgaas1-3/+4
Fix a couple typos in kconfig-language documentation. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2019-12-18kconfig: remove ---help--- from documentationMasahiro Yamada1-4/+1
Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over '---help---'"), scripts/checkpatch.pl warns the use of ---help---. Kconfig still supports ---help---, but new code should avoid using it. Let's stop advertising it in documentation. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2019-07-15docs: kbuild: fix build with pdf and fix some minor issuesMauro Carvalho Chehab1-0/+12
The tag ".. include" should be replaced by ".. literalinclude" at issues.rst, otherwise it causes TeX to crash due to excessive usage of stack with Sphinx 2.0. While here, solve a few minor issues at the kbuild book output by adding extra blank lines. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-14docs: kbuild: convert docs to ReST and rename to *.rstMauro Carvalho Chehab1-0/+689
The kbuild documentation clearly shows that the documents there are written at different times: some use markdown, some use their own peculiar logic to split sections. Convert everything to ReST without affecting too much the author's style and avoiding adding uneeded markups. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>