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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull Kbuild fixes from Masahiro Yamada:

- fix O= building on dash

- remove unused dependency in Makefile

- fix default of a choice in Kconfig

- fix typos and documentation style

- fix command options unrecognized by sparse

* tag 'kbuild-fixes-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: clang: fix build failures with sparse check
kbuild doc: a bundle of fixes on makefiles.txt
Makefile: kselftest: fix grammar typo
kbuild: Fix optimization level choice default
kbuild: drop unused symverfile in Makefile.modpost
kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd)

+28 -24
+18 -13
Documentation/kbuild/makefiles.txt
··· 1108 1108 ld 1109 1109 Link target. Often, LDFLAGS_$@ is used to set specific options to ld. 1110 1110 1111 - objcopy 1112 - Copy binary. Uses OBJCOPYFLAGS usually specified in 1113 - arch/$(ARCH)/Makefile. 1114 - OBJCOPYFLAGS_$@ may be used to set additional options. 1115 - 1116 - gzip 1117 - Compress target. Use maximum compression to compress target. 1118 - 1119 1111 Example: 1120 1112 #arch/x86/boot/Makefile 1121 1113 LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary ··· 1130 1138 Note: It is a common mistake to forget the "targets :=" assignment, 1131 1139 resulting in the target file being recompiled for no 1132 1140 obvious reason. 1141 + 1142 + objcopy 1143 + Copy binary. Uses OBJCOPYFLAGS usually specified in 1144 + arch/$(ARCH)/Makefile. 1145 + OBJCOPYFLAGS_$@ may be used to set additional options. 1146 + 1147 + gzip 1148 + Compress target. Use maximum compression to compress target. 1149 + 1150 + Example: 1151 + #arch/x86/boot/compressed/Makefile 1152 + $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE 1153 + $(call if_changed,gzip) 1133 1154 1134 1155 dtc 1135 1156 Create flattened device tree blob object suitable for linking ··· 1224 1219 that may be shared between individual architectures. 1225 1220 The recommended approach how to use a generic header file is 1226 1221 to list the file in the Kbuild file. 1227 - See "7.3 generic-y" for further info on syntax etc. 1222 + See "7.2 generic-y" for further info on syntax etc. 1228 1223 1229 1224 --- 6.11 Post-link pass 1230 1225 ··· 1259 1254 arch/<arch>/include/asm/ to list asm files coming from asm-generic. 1260 1255 See subsequent chapter for the syntax of the Kbuild file. 1261 1256 1262 - --- 7.1 no-export-headers 1257 + --- 7.1 no-export-headers 1263 1258 1264 1259 no-export-headers is essentially used by include/uapi/linux/Kbuild to 1265 1260 avoid exporting specific headers (e.g. kvm.h) on architectures that do 1266 1261 not support it. It should be avoided as much as possible. 1267 1262 1268 - --- 7.2 generic-y 1263 + --- 7.2 generic-y 1269 1264 1270 1265 If an architecture uses a verbatim copy of a header from 1271 1266 include/asm-generic then this is listed in the file ··· 1292 1287 Example: termios.h 1293 1288 #include <asm-generic/termios.h> 1294 1289 1295 - --- 7.3 generated-y 1290 + --- 7.3 generated-y 1296 1291 1297 1292 If an architecture generates other header files alongside generic-y 1298 1293 wrappers, generated-y specifies them. ··· 1304 1299 #arch/x86/include/asm/Kbuild 1305 1300 generated-y += syscalls_32.h 1306 1301 1307 - --- 7.5 mandatory-y 1302 + --- 7.4 mandatory-y 1308 1303 1309 1304 mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm 1310 1305 to define the minimum set of headers that must be exported in
+5 -5
Makefile
··· 130 130 ifneq ($(KBUILD_OUTPUT),) 131 131 # check that the output directory actually exists 132 132 saved-output := $(KBUILD_OUTPUT) 133 - $(shell [ -d $(KBUILD_OUTPUT) ] || mkdir -p $(KBUILD_OUTPUT)) 134 - KBUILD_OUTPUT := $(realpath $(KBUILD_OUTPUT)) 133 + KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ 134 + && /bin/pwd) 135 135 $(if $(KBUILD_OUTPUT),, \ 136 136 $(error failed to create output directory "$(saved-output)")) 137 137 ··· 697 697 698 698 ifeq ($(cc-name),clang) 699 699 ifneq ($(CROSS_COMPILE),) 700 - CLANG_TARGET := -target $(notdir $(CROSS_COMPILE:%-=%)) 700 + CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) 701 701 GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..) 702 702 endif 703 703 ifneq ($(GCC_TOOLCHAIN),) 704 - CLANG_GCC_TC := -gcc-toolchain $(GCC_TOOLCHAIN) 704 + CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) 705 705 endif 706 706 KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) 707 707 KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) ··· 1399 1399 @echo ' Build, install, and boot kernel before' 1400 1400 @echo ' running kselftest on it' 1401 1401 @echo ' kselftest-clean - Remove all generated kselftest files' 1402 - @echo ' kselftest-merge - Merge all the config dependencies of kselftest to existed' 1402 + @echo ' kselftest-merge - Merge all the config dependencies of kselftest to existing' 1403 1403 @echo ' .config.' 1404 1404 @echo '' 1405 1405 @echo 'Userspace tools targets:'
+1 -1
init/Kconfig
··· 1033 1033 1034 1034 choice 1035 1035 prompt "Compiler optimization level" 1036 - default CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE 1036 + default CC_OPTIMIZE_FOR_PERFORMANCE 1037 1037 1038 1038 config CC_OPTIMIZE_FOR_PERFORMANCE 1039 1039 bool "Optimize for performance"
-1
scripts/Makefile.modpost
··· 97 97 $(call cmd,kernel-mod) 98 98 99 99 # Declare generated files as targets for modpost 100 - $(symverfile): __modpost ; 101 100 $(modules:.ko=.mod.c): __modpost ; 102 101 103 102
+1 -1
tools/power/cpupower/Makefile
··· 26 26 27 27 ifneq ($(OUTPUT),) 28 28 # check that the output directory actually exists 29 - OUTDIR := $(realpath $(OUTPUT)) 29 + OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) 30 30 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 31 31 endif 32 32
+3 -3
tools/scripts/Makefile.include
··· 1 1 ifneq ($(O),) 2 2 ifeq ($(origin O), command line) 3 - ABSOLUTE_O := $(realpath $(O)) 4 - dummy := $(if $(ABSOLUTE_O),,$(error O=$(O) does not exist)) 3 + dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),) 4 + ABSOLUTE_O := $(shell cd $(O) ; pwd) 5 5 OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/) 6 6 COMMAND_O := O=$(ABSOLUTE_O) 7 7 ifeq ($(objtree),) ··· 12 12 13 13 # check that the output directory actually exists 14 14 ifneq ($(OUTPUT),) 15 - OUTDIR := $(realpath $(OUTPUT)) 15 + OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) 16 16 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 17 17 endif 18 18