Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'kbuild-fixes-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- fix documents

- fix warning in 'make localmodconfig'

* tag 'kbuild-fixes-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: remove redundant assignment prompt = prompt
kbuild: Documentation: clean up makefiles.rst
kconfig: streamline_config.pl: check defined(ENV variable) before using it
Documentation/llvm: Improve formatting of commands, variables, and arguments

+26 -24
+13 -13
Documentation/kbuild/llvm.rst
··· 23 23 Clang 24 24 ----- 25 25 26 - The compiler used can be swapped out via `CC=` command line argument to `make`. 27 - `CC=` should be set when selecting a config and during a build. 26 + The compiler used can be swapped out via ``CC=`` command line argument to ``make``. 27 + ``CC=`` should be set when selecting a config and during a build. :: 28 28 29 29 make CC=clang defconfig 30 30 ··· 34 34 --------------- 35 35 36 36 A single Clang compiler binary will typically contain all supported backends, 37 - which can help simplify cross compiling. 37 + which can help simplify cross compiling. :: 38 38 39 39 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang 40 40 41 - `CROSS_COMPILE` is not used to prefix the Clang compiler binary, instead 42 - `CROSS_COMPILE` is used to set a command line flag: `--target <triple>`. For 43 - example: 41 + ``CROSS_COMPILE`` is not used to prefix the Clang compiler binary, instead 42 + ``CROSS_COMPILE`` is used to set a command line flag: ``--target <triple>``. For 43 + example: :: 44 44 45 45 clang --target aarch64-linux-gnu foo.c 46 46 47 47 LLVM Utilities 48 48 -------------- 49 49 50 - LLVM has substitutes for GNU binutils utilities. Kbuild supports `LLVM=1` 51 - to enable them. 50 + LLVM has substitutes for GNU binutils utilities. Kbuild supports ``LLVM=1`` 51 + to enable them. :: 52 52 53 53 make LLVM=1 54 54 55 - They can be enabled individually. The full list of the parameters: 55 + They can be enabled individually. The full list of the parameters: :: 56 56 57 - make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\ 58 - OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \\ 59 - READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \\ 57 + make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \ 58 + OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \ 59 + READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \ 60 60 HOSTLD=ld.lld 61 61 62 62 Currently, the integrated assembler is disabled by default. You can pass 63 - `LLVM_IAS=1` to enable it. 63 + ``LLVM_IAS=1`` to enable it. 64 64 65 65 Getting Help 66 66 ------------
+9 -9
Documentation/kbuild/makefiles.rst
··· 16 16 --- 3.5 Library file goals - lib-y 17 17 --- 3.6 Descending down in directories 18 18 --- 3.7 Compilation flags 19 - --- 3.8 Command line dependency 19 + --- 3.8 <deleted> 20 20 --- 3.9 Dependency tracking 21 21 --- 3.10 Special Rules 22 22 --- 3.11 $(CC) support functions ··· 39 39 40 40 === 7 Architecture Makefiles 41 41 --- 7.1 Set variables to tweak the build to the architecture 42 - --- 7.2 Add prerequisites to archheaders: 43 - --- 7.3 Add prerequisites to archprepare: 42 + --- 7.2 Add prerequisites to archheaders 43 + --- 7.3 Add prerequisites to archprepare 44 44 --- 7.4 List directories to visit when descending 45 45 --- 7.5 Architecture-specific boot images 46 46 --- 7.6 Building non-kbuild targets ··· 129 129 be used and if both a 'Makefile' and a 'Kbuild' file exists, then the 'Kbuild' 130 130 file will be used. 131 131 132 - Section 3.1 "Goal definitions" is a quick intro, further chapters provide 132 + Section 3.1 "Goal definitions" is a quick intro; further chapters provide 133 133 more details, with real examples. 134 134 135 135 3.1 Goal definitions ··· 965 965 KBUILD_LDFLAGS := -m elf_s390 966 966 967 967 Note: ldflags-y can be used to further customise 968 - the flags used. See chapter 3.7. 968 + the flags used. See section 3.7. 969 969 970 970 LDFLAGS_vmlinux 971 971 Options for $(LD) when linking vmlinux ··· 1121 1121 1122 1122 In this example, the file target maketools will be processed 1123 1123 before descending down in the subdirectories. 1124 - See also chapter XXX-TODO that describe how kbuild supports 1124 + See also chapter XXX-TODO that describes how kbuild supports 1125 1125 generating offset header files. 1126 1126 1127 1127 ··· 1261 1261 always be built. 1262 1262 Assignments to $(targets) are without $(obj)/ prefix. 1263 1263 if_changed may be used in conjunction with custom commands as 1264 - defined in 6.8 "Custom kbuild commands". 1264 + defined in 7.8 "Custom kbuild commands". 1265 1265 1266 1266 Note: It is a typical mistake to forget the FORCE prerequisite. 1267 1267 Another common pitfall is that whitespace is sometimes ··· 1411 1411 that may be shared between individual architectures. 1412 1412 The recommended approach how to use a generic header file is 1413 1413 to list the file in the Kbuild file. 1414 - See "7.2 generic-y" for further info on syntax etc. 1414 + See "8.2 generic-y" for further info on syntax etc. 1415 1415 1416 1416 7.11 Post-link pass 1417 1417 ------------------- ··· 1601 1601 1602 1602 - Describe how kbuild supports shipped files with _shipped. 1603 1603 - Generating offset header files. 1604 - - Add more variables to section 7? 1604 + - Add more variables to chapters 7 or 9?
-1
scripts/kconfig/nconf.c
··· 755 755 switch (ptype) { 756 756 case P_MENU: 757 757 child_count++; 758 - prompt = prompt; 759 758 if (single_menu_mode) { 760 759 item_make(menu, 'm', 761 760 "%s%*c%s",
+4 -1
scripts/kconfig/streamline_config.pl
··· 593 593 } 594 594 595 595 my %setconfigs; 596 - my @preserved_kconfigs = split(/:/,$ENV{LMC_KEEP}); 596 + my @preserved_kconfigs; 597 + if (defined($ENV{'LMC_KEEP'})) { 598 + @preserved_kconfigs = split(/:/,$ENV{LMC_KEEP}); 599 + } 597 600 598 601 sub in_preserved_kconfigs { 599 602 my $kconfig = $config2kfile{$_[0]};