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

Pull more Kbuild updates from Masahiro Yamada:

- use 'pwd' instead of '/bin/pwd' for portability

- clean up Makefiles

- fix ld-option for clang

- fix malloc'ed data size in Kconfig

- fix parallel building along with coccicheck

- fix a minor issue of package building

- prompt to use "rpm-pkg" instead of "rpm"

- clean up *.i and *.lst patterns by "make clean"

* tag 'kbuild-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: drop $(extra-y) from real-objs-y
kbuild: clean up *.i and *.lst patterns by make clean
kbuild: rpm: prompt to use "rpm-pkg" if "rpm" target is used
kbuild: pkg: use --transform option to prefix paths in tar
coccinelle: fix parallel build with CHECK=scripts/coccicheck
kconfig/symbol.c: use correct pointer type argument for sizeof
kbuild: Set KBUILD_CFLAGS before incl. arch Makefile
kbuild: remove all dummy assignments to obj-
kbuild: create built-in.o automatically if parent directory wants it
kbuild: /bin/pwd -> pwd

+58 -113
+1 -1
Documentation/ia64/xen.txt
··· 41 42 5. make initrd for Dom0/DomU 43 # make -C linux-2.6.18-xen.hg ARCH=ia64 modules_install \ 44 - O=$(/bin/pwd)/build-linux-2.6.18-xen_ia64 45 # mkinitrd -f /boot/efi/efi/redhat/initrd-2.6.18.8-xen.img \ 46 2.6.18.8-xen --builtin mptspi --builtin mptbase \ 47 --builtin mptscsih --builtin uhci-hcd --builtin ohci-hcd \
··· 41 42 5. make initrd for Dom0/DomU 43 # make -C linux-2.6.18-xen.hg ARCH=ia64 modules_install \ 44 + O=$(pwd)/build-linux-2.6.18-xen_ia64 45 # mkinitrd -f /boot/efi/efi/redhat/initrd-2.6.18.8-xen.img \ 46 2.6.18.8-xen --builtin mptspi --builtin mptbase \ 47 --builtin mptscsih --builtin uhci-hcd --builtin ohci-hcd \
+39 -38
Makefile
··· 132 # check that the output directory actually exists 133 saved-output := $(KBUILD_OUTPUT) 134 KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ 135 - && /bin/pwd) 136 $(if $(KBUILD_OUTPUT),, \ 137 $(error failed to create output directory "$(saved-output)")) 138 ··· 474 $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) 475 endif 476 477 ifeq ($(config-targets),1) 478 # =========================================================================== 479 # *config targets only - make sure prerequisites are updated, and descend ··· 715 stackp-check := $(wildcard $(stackp-path)) 716 endif 717 KBUILD_CFLAGS += $(stackp-flag) 718 - 719 - ifeq ($(cc-name),clang) 720 - ifneq ($(CROSS_COMPILE),) 721 - CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) 722 - GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..) 723 - endif 724 - ifneq ($(GCC_TOOLCHAIN),) 725 - CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) 726 - endif 727 - KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) 728 - KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) 729 - KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) 730 - KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable) 731 - KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) 732 - KBUILD_CFLAGS += $(call cc-disable-warning, gnu) 733 - KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) 734 - # Quiet clang warning: comparison of unsigned expression < 0 is always false 735 - KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) 736 - # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the 737 - # source of a reference will be _MergedGlobals and not on of the whitelisted names. 738 - # See modpost pattern 2 739 - KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) 740 - KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior) 741 - KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) 742 - KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) 743 - else 744 - 745 - # These warnings generated too much noise in a regular build. 746 - # Use make W=1 to enable them (see scripts/Makefile.extrawarn) 747 - KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) 748 - KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) 749 - endif 750 751 ifdef CONFIG_FRAME_POINTER 752 KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls ··· 1009 1010 PHONY += $(vmlinux-dirs) 1011 $(vmlinux-dirs): prepare scripts 1012 - $(Q)$(MAKE) $(build)=$@ 1013 1014 define filechk_kernel.release 1015 echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" ··· 1337 $(Q)$(MAKE) $(build)=$(package-dir) $@ 1338 %pkg: include/config/kernel.release FORCE 1339 $(Q)$(MAKE) $(build)=$(package-dir) $@ 1340 - rpm: include/config/kernel.release FORCE 1341 - $(Q)$(MAKE) $(build)=$(package-dir) $@ 1342 1343 1344 # Brief documentation of the typical targets used ··· 1547 $(call cmd,rmdirs) 1548 $(call cmd,rmfiles) 1549 @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ 1550 - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ 1551 -o -name '*.ko.*' -o -name '*.dtb' -o -name '*.dtb.S' \ 1552 - -o -name '*.dwo' \ 1553 -o -name '*.su' \ 1554 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ 1555 -o -name '*.symtypes' -o -name 'modules.order' \
··· 132 # check that the output directory actually exists 133 saved-output := $(KBUILD_OUTPUT) 134 KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ 135 + && pwd) 136 $(if $(KBUILD_OUTPUT),, \ 137 $(error failed to create output directory "$(saved-output)")) 138 ··· 474 $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) 475 endif 476 477 + ifeq ($(cc-name),clang) 478 + ifneq ($(CROSS_COMPILE),) 479 + CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) 480 + GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..) 481 + endif 482 + ifneq ($(GCC_TOOLCHAIN),) 483 + CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) 484 + endif 485 + KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) 486 + KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) 487 + KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) 488 + KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable) 489 + KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) 490 + KBUILD_CFLAGS += $(call cc-disable-warning, gnu) 491 + KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) 492 + # Quiet clang warning: comparison of unsigned expression < 0 is always false 493 + KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) 494 + # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the 495 + # source of a reference will be _MergedGlobals and not on of the whitelisted names. 496 + # See modpost pattern 2 497 + KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) 498 + KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior) 499 + KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) 500 + KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) 501 + else 502 + 503 + # These warnings generated too much noise in a regular build. 504 + # Use make W=1 to enable them (see scripts/Makefile.extrawarn) 505 + KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) 506 + KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) 507 + endif 508 + 509 ifeq ($(config-targets),1) 510 # =========================================================================== 511 # *config targets only - make sure prerequisites are updated, and descend ··· 683 stackp-check := $(wildcard $(stackp-path)) 684 endif 685 KBUILD_CFLAGS += $(stackp-flag) 686 687 ifdef CONFIG_FRAME_POINTER 688 KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls ··· 1009 1010 PHONY += $(vmlinux-dirs) 1011 $(vmlinux-dirs): prepare scripts 1012 + $(Q)$(MAKE) $(build)=$@ need-builtin=1 1013 1014 define filechk_kernel.release 1015 echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" ··· 1337 $(Q)$(MAKE) $(build)=$(package-dir) $@ 1338 %pkg: include/config/kernel.release FORCE 1339 $(Q)$(MAKE) $(build)=$(package-dir) $@ 1340 + rpm: rpm-pkg 1341 + @echo " WARNING: \"rpm\" target will be removed after Linux 4.18" 1342 + @echo " Please use \"rpm-pkg\" instead." 1343 1344 1345 # Brief documentation of the typical targets used ··· 1546 $(call cmd,rmdirs) 1547 $(call cmd,rmfiles) 1548 @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ 1549 + \( -name '*.[aios]' -o -name '*.ko' -o -name '.*.cmd' \ 1550 -o -name '*.ko.*' -o -name '*.dtb' -o -name '*.dtb.S' \ 1551 + -o -name '*.dwo' -o -name '*.lst' \ 1552 -o -name '*.su' \ 1553 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ 1554 -o -name '*.symtypes' -o -name 'modules.order' \
-1
arch/arm/mach-uniphier/Makefile
··· 1 - obj- += dummy.o
···
-3
arch/mips/boot/dts/brcm/Makefile
··· 35 bcm97435svmb.dtb 36 37 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 38 - 39 - # Force kbuild to make empty built-in.o if necessary 40 - obj- += dummy.o
··· 35 bcm97435svmb.dtb 36 37 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
-3
arch/mips/boot/dts/cavium-octeon/Makefile
··· 2 dtb-$(CONFIG_CAVIUM_OCTEON_SOC) += octeon_3xxx.dtb octeon_68xx.dtb 3 4 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 5 - 6 - # Force kbuild to make empty built-in.o if necessary 7 - obj- += dummy.o
··· 2 dtb-$(CONFIG_CAVIUM_OCTEON_SOC) += octeon_3xxx.dtb octeon_68xx.dtb 3 4 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
-3
arch/mips/boot/dts/img/Makefile
··· 3 4 dtb-$(CONFIG_MACH_PISTACHIO) += pistachio_marduk.dtb 5 obj-$(CONFIG_MACH_PISTACHIO) += pistachio_marduk.dtb.o 6 - 7 - # Force kbuild to make empty built-in.o if necessary 8 - obj- += dummy.o
··· 3 4 dtb-$(CONFIG_MACH_PISTACHIO) += pistachio_marduk.dtb 5 obj-$(CONFIG_MACH_PISTACHIO) += pistachio_marduk.dtb.o
-3
arch/mips/boot/dts/ingenic/Makefile
··· 3 dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb 4 5 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 6 - 7 - # Force kbuild to make empty built-in.o if necessary 8 - obj- += dummy.o
··· 3 dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb 4 5 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
-3
arch/mips/boot/dts/lantiq/Makefile
··· 2 dtb-$(CONFIG_DT_EASY50712) += easy50712.dtb 3 4 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 5 - 6 - # Force kbuild to make empty built-in.o if necessary 7 - obj- += dummy.o
··· 2 dtb-$(CONFIG_DT_EASY50712) += easy50712.dtb 3 4 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
-3
arch/mips/boot/dts/mti/Makefile
··· 3 dtb-$(CONFIG_LEGACY_BOARD_SEAD3) += sead3.dtb 4 5 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 6 - 7 - # Force kbuild to make empty built-in.o if necessary 8 - obj- += dummy.o
··· 3 dtb-$(CONFIG_LEGACY_BOARD_SEAD3) += sead3.dtb 4 5 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
-3
arch/mips/boot/dts/netlogic/Makefile
··· 6 dtb-$(CONFIG_DT_XLP_RVP) += xlp_rvp.dtb 7 8 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 9 - 10 - # Force kbuild to make empty built-in.o if necessary 11 - obj- += dummy.o
··· 6 dtb-$(CONFIG_DT_XLP_RVP) += xlp_rvp.dtb 7 8 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
-3
arch/mips/boot/dts/ni/Makefile
··· 1 dtb-$(CONFIG_FIT_IMAGE_FDT_NI169445) += 169445.dtb 2 - 3 - # Force kbuild to make empty built-in.o if necessary 4 - obj- += dummy.o
··· 1 dtb-$(CONFIG_FIT_IMAGE_FDT_NI169445) += 169445.dtb
-3
arch/mips/boot/dts/pic32/Makefile
··· 5 pic32mzda_sk.dtb 6 7 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 8 - 9 - # Force kbuild to make empty built-in.o if necessary 10 - obj- += dummy.o
··· 5 pic32mzda_sk.dtb 6 7 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
-3
arch/mips/boot/dts/qca/Makefile
··· 5 dtb-$(CONFIG_ATH79) += ar9331_dragino_ms14.dtb 6 dtb-$(CONFIG_ATH79) += ar9331_omega.dtb 7 dtb-$(CONFIG_ATH79) += ar9331_tl_mr3020.dtb 8 - 9 - # Force kbuild to make empty built-in.o if necessary 10 - obj- += dummy.o
··· 5 dtb-$(CONFIG_ATH79) += ar9331_dragino_ms14.dtb 6 dtb-$(CONFIG_ATH79) += ar9331_omega.dtb 7 dtb-$(CONFIG_ATH79) += ar9331_tl_mr3020.dtb
-3
arch/mips/boot/dts/ralink/Makefile
··· 7 dtb-$(CONFIG_DTB_VOCORE2) += vocore2.dtb 8 9 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 10 - 11 - # Force kbuild to make empty built-in.o if necessary 12 - obj- += dummy.o
··· 7 dtb-$(CONFIG_DTB_VOCORE2) += vocore2.dtb 8 9 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
-3
arch/mips/boot/dts/xilfpga/Makefile
··· 2 dtb-$(CONFIG_FIT_IMAGE_FDT_XILFPGA) += nexys4ddr.dtb 3 4 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 5 - 6 - # Force kbuild to make empty built-in.o if necessary 7 - obj- += dummy.o
··· 2 dtb-$(CONFIG_FIT_IMAGE_FDT_XILFPGA) += nexys4ddr.dtb 3 4 obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
-3
firmware/Makefile
··· 59 60 targets := $(patsubst $(obj)/%,%, \ 61 $(shell find $(obj) -name \*.gen.S 2>/dev/null)) 62 - # Without this, built-in.o won't be created when it's empty, and the 63 - # final vmlinux link will fail. 64 - obj- := dummy
··· 59 60 targets := $(patsubst $(obj)/%,%, \ 61 $(shell find $(obj) -name \*.gen.S 2>/dev/null))
-3
samples/bpf/Makefile
··· 1 # SPDX-License-Identifier: GPL-2.0 2 - # kbuild trick to avoid linker error. Can be omitted if a module is built. 3 - obj- := dummy.o 4 - 5 # List of programs to build 6 hostprogs-y := test_lru_dist 7 hostprogs-y += sock_example
··· 1 # SPDX-License-Identifier: GPL-2.0 2 # List of programs to build 3 hostprogs-y := test_lru_dist 4 hostprogs-y += sock_example
-3
samples/hidraw/Makefile
··· 1 # SPDX-License-Identifier: GPL-2.0 2 - # kbuild trick to avoid linker error. Can be omitted if a module is built. 3 - obj- := dummy.o 4 - 5 # List of programs to build 6 hostprogs-y := hid-example 7
··· 1 # SPDX-License-Identifier: GPL-2.0 2 # List of programs to build 3 hostprogs-y := hid-example 4
-3
samples/seccomp/Makefile
··· 1 # SPDX-License-Identifier: GPL-2.0 2 - # kbuild trick to avoid linker error. Can be omitted if a module is built. 3 - obj- := dummy.o 4 - 5 hostprogs-$(CONFIG_SAMPLE_SECCOMP) := bpf-fancy dropper bpf-direct 6 7 HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include
··· 1 # SPDX-License-Identifier: GPL-2.0 2 hostprogs-$(CONFIG_SAMPLE_SECCOMP) := bpf-fancy dropper bpf-direct 3 4 HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include
-3
samples/sockmap/Makefile
··· 1 - # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 - obj- := dummy.o 3 - 4 # List of programs to build 5 hostprogs-y := sockmap 6
··· 1 # List of programs to build 2 hostprogs-y := sockmap 3
-3
samples/statx/Makefile
··· 1 - # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 - obj- := dummy.o 3 - 4 # List of programs to build 5 hostprogs-$(CONFIG_SAMPLE_STATX) := test-statx 6
··· 1 # List of programs to build 2 hostprogs-$(CONFIG_SAMPLE_STATX) := test-statx 3
-3
samples/uhid/Makefile
··· 1 - # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 - obj- := dummy.o 3 - 4 # List of programs to build 5 hostprogs-y := uhid-example 6
··· 1 # List of programs to build 2 hostprogs-y := uhid-example 3
+2 -2
scripts/Makefile.build
··· 76 obj-y += $(obj)/lib-ksyms.o 77 endif 78 79 - ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),) 80 builtin-target := $(obj)/built-in.o 81 endif 82 ··· 566 567 PHONY += $(subdir-ym) 568 $(subdir-ym): 569 - $(Q)$(MAKE) $(build)=$@ 570 571 # Add FORCE to the prequisites of a target to force it to be always rebuilt. 572 # ---------------------------------------------------------------------------
··· 76 obj-y += $(obj)/lib-ksyms.o 77 endif 78 79 + ifneq ($(strip $(obj-y) $(need-builtin)),) 80 builtin-target := $(obj)/built-in.o 81 endif 82 ··· 566 567 PHONY += $(subdir-ym) 568 $(subdir-ym): 569 + $(Q)$(MAKE) $(build)=$@ need-builtin=$(if $(findstring $@,$(subdir-obj-y)),1) 570 571 # Add FORCE to the prequisites of a target to force it to be always rebuilt. 572 # ---------------------------------------------------------------------------
+1 -1
scripts/Makefile.lib
··· 57 subdir-obj-y := $(filter %/built-in.o, $(obj-y)) 58 59 # Replace multi-part objects by their individual parts, look at local dir only 60 - real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y) 61 real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m))) 62 63 # DTB
··· 57 subdir-obj-y := $(filter %/built-in.o, $(obj-y)) 58 59 # Replace multi-part objects by their individual parts, look at local dir only 60 + real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) 61 real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m))) 62 63 # DTB
+9 -6
scripts/coccicheck
··· 30 VERBOSE=0 31 fi 32 33 - if [ -z "$J" ]; then 34 - NPROC=$(getconf _NPROCESSORS_ONLN) 35 - else 36 - NPROC="$J" 37 - fi 38 - 39 FLAGS="--very-quiet" 40 41 # You can use SPFLAGS to append extra arguments to coccicheck or override any ··· 64 # Take only the last argument, which is the C file to test 65 shift $(( $# - 1 )) 66 OPTIONS="$COCCIINCLUDE $1" 67 else 68 ONLINE=0 69 if [ "$KBUILD_EXTMOD" = "" ] ; then 70 OPTIONS="--dir $srctree $COCCIINCLUDE" 71 else 72 OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE" 73 fi 74 fi 75
··· 30 VERBOSE=0 31 fi 32 33 FLAGS="--very-quiet" 34 35 # You can use SPFLAGS to append extra arguments to coccicheck or override any ··· 70 # Take only the last argument, which is the C file to test 71 shift $(( $# - 1 )) 72 OPTIONS="$COCCIINCLUDE $1" 73 + 74 + # No need to parallelize Coccinelle since this mode takes one input file. 75 + NPROC=1 76 else 77 ONLINE=0 78 if [ "$KBUILD_EXTMOD" = "" ] ; then 79 OPTIONS="--dir $srctree $COCCIINCLUDE" 80 else 81 OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE" 82 + fi 83 + 84 + if [ -z "$J" ]; then 85 + NPROC=$(getconf _NPROCESSORS_ONLN) 86 + else 87 + NPROC="$J" 88 fi 89 fi 90
+1 -1
scripts/kconfig/symbol.c
··· 1061 } 1062 if (sym_match_arr) { 1063 qsort(sym_match_arr, cnt, sizeof(struct sym_match), sym_rel_comp); 1064 - sym_arr = malloc((cnt+1) * sizeof(struct symbol)); 1065 if (!sym_arr) 1066 goto sym_re_search_free; 1067 for (i = 0; i < cnt; i++)
··· 1061 } 1062 if (sym_match_arr) { 1063 qsort(sym_match_arr, cnt, sizeof(struct sym_match), sym_rel_comp); 1064 + sym_arr = malloc((cnt+1) * sizeof(struct symbol *)); 1065 if (!sym_arr) 1066 goto sym_re_search_free; 1067 for (i = 0; i < cnt; i++)
+3 -4
scripts/package/Makefile
··· 39 false; \ 40 fi ; \ 41 $(srctree)/scripts/setlocalversion --save-scmversion; \ 42 - ln -sf $(srctree) $(2); \ 43 tar -cz $(RCS_TAR_IGNORE) -f $(2).tar.gz \ 44 - $(addprefix $(2)/,$(TAR_CONTENT) $(3)); \ 45 - rm -f $(2) $(objtree)/.scmversion 46 47 # rpm-pkg 48 # --------------------------------------------------------------------------- 49 - rpm-pkg rpm: FORCE 50 $(MAKE) clean 51 $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec 52 $(call cmd,src_tar,$(KERNELPATH),kernel.spec)
··· 39 false; \ 40 fi ; \ 41 $(srctree)/scripts/setlocalversion --save-scmversion; \ 42 tar -cz $(RCS_TAR_IGNORE) -f $(2).tar.gz \ 43 + --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \ 44 + rm -f $(objtree)/.scmversion 45 46 # rpm-pkg 47 # --------------------------------------------------------------------------- 48 + rpm-pkg: FORCE 49 $(MAKE) clean 50 $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec 51 $(call cmd,src_tar,$(KERNELPATH),kernel.spec)
+1 -1
tools/power/cpupower/Makefile
··· 26 27 ifneq ($(OUTPUT),) 28 # check that the output directory actually exists 29 - OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) 30 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 31 endif 32
··· 26 27 ifneq ($(OUTPUT),) 28 # check that the output directory actually exists 29 + OUTDIR := $(shell cd $(OUTPUT) && pwd) 30 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 31 endif 32
+1 -1
tools/scripts/Makefile.include
··· 13 14 # check that the output directory actually exists 15 ifneq ($(OUTPUT),) 16 - OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) 17 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 18 endif 19
··· 13 14 # check that the output directory actually exists 15 ifneq ($(OUTPUT),) 16 + OUTDIR := $(shell cd $(OUTPUT) && pwd) 17 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 18 endif 19