]> Git Repo - linux.git/commitdiff
Merge tag 'kbuild-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
authorLinus Torvalds <[email protected]>
Thu, 14 Sep 2017 20:46:33 +0000 (13:46 -0700)
committerLinus Torvalds <[email protected]>
Thu, 14 Sep 2017 20:46:33 +0000 (13:46 -0700)
Pull Kbuild updates from Masahiro Yamada:

 - Use Make-builtin $(abspath ...) helper to get absolute path

 - Add W=2 extra warning option to detect unused macros

 - Use more KCONFIG_CONFIG instead hard-coded .config

 - Fix bugs of tar*-pkg targets

* tag 'kbuild-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: buildtar: do not print successful message if tar returns error
  kbuild: buildtar: fix tar error when CONFIG_MODULES is disabled
  kbuild: Use KCONFIG_CONFIG in buildtar
  Kbuild: enable -Wunused-macros warning for "make W=2"
  kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd)

1  2 
Makefile
tools/scripts/Makefile.include

diff --combined Makefile
index ab067d51ddf15786df7daef7d388e4ce7c8ac3b3,eca6cffa3cd7f7ddcd3c0f689e3bab76bb519ab1..6585339586a679f0a2c82d2ca311a36269fb99b0
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 4
  PATCHLEVEL = 13
  SUBLEVEL = 0
 -EXTRAVERSION = -rc4
 +EXTRAVERSION =
  NAME = Fearless Coyote
  
  # *DOCUMENTATION*
@@@ -130,8 -130,8 +130,8 @@@ endi
  ifneq ($(KBUILD_OUTPUT),)
  # check that the output directory actually exists
  saved-output := $(KBUILD_OUTPUT)
- KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
                                                              && /bin/pwd)
+ $(shell [ -d $(KBUILD_OUTPUT) ] || mkdir -p $(KBUILD_OUTPUT))
KBUILD_OUTPUT := $(realpath $(KBUILD_OUTPUT))
  $(if $(KBUILD_OUTPUT),, \
       $(error failed to create output directory "$(saved-output)"))
  
@@@ -396,7 -396,7 +396,7 @@@ LINUXINCLUDE    := 
  KBUILD_CPPFLAGS := -D__KERNEL__
  
  KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
 -                 -fno-strict-aliasing -fno-common \
 +                 -fno-strict-aliasing -fno-common -fshort-wchar \
                   -Werror-implicit-function-declaration \
                   -Wno-format-security \
                   -std=gnu89 $(call cc-option,-fno-PIE)
@@@ -442,7 -442,7 +442,7 @@@ export RCS_TAR_IGNORE := --exclude SCC
  # ===========================================================================
  # Rules shared between *config targets and build targets
  
 -# Basic helpers built in scripts/
 +# Basic helpers built in scripts/basic/
  PHONY += scripts_basic
  scripts_basic:
        $(Q)$(MAKE) $(build)=scripts/basic
@@@ -505,7 -505,7 +505,7 @@@ ifeq ($(KBUILD_EXTMOD),
                  endif
          endif
  endif
 -# install and module_install need also be processed one by one
 +# install and modules_install need also be processed one by one
  ifneq ($(filter install,$(MAKECMDGOALS)),)
          ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
                mixed-targets := 1
@@@ -964,7 -964,7 +964,7 @@@ export KBUILD_VMLINUX_MAIN := $(core-y
  export KBUILD_VMLINUX_LIBS := $(libs-y1)
  export KBUILD_LDS          := arch/$(SRCARCH)/kernel/vmlinux.lds
  export LDFLAGS_vmlinux
 -# used by scripts/pacmage/Makefile
 +# used by scripts/package/Makefile
  export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools)
  
  vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) $(KBUILD_VMLINUX_LIBS)
@@@ -978,7 -978,7 +978,7 @@@ ifdef CONFIG_HEADERS_CHEC
        $(Q)$(MAKE) -f $(srctree)/Makefile headers_check
  endif
  ifdef CONFIG_GDB_SCRIPTS
-       $(Q)ln -fsn `cd $(srctree) && /bin/pwd`/scripts/gdb/vmlinux-gdb.py
+       $(Q)ln -fsn $(abspath $(srctree)/scripts/gdb/vmlinux-gdb.py)
  endif
  ifdef CONFIG_TRIM_UNUSED_KSYMS
        $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
@@@ -992,8 -992,8 +992,8 @@@ include/generated/autoksyms.h: FORC
  ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
  
  # Final link of vmlinux with optional arch pass after final link
 -    cmd_link-vmlinux =                                                 \
 -      $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ;       \
 +cmd_link-vmlinux =                                                 \
 +      $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ;    \
        $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
  
  vmlinux: scripts/link-vmlinux.sh vmlinux_prereq $(vmlinux-deps) FORCE
@@@ -1184,7 -1184,6 +1184,7 @@@ PHONY += kselftes
  kselftest:
        $(Q)$(MAKE) -C tools/testing/selftests run_tests
  
 +PHONY += kselftest-clean
  kselftest-clean:
        $(Q)$(MAKE) -C tools/testing/selftests clean
  
@@@ -1238,7 -1237,7 +1238,7 @@@ _modinst_
        @rm -rf $(MODLIB)/kernel
        @rm -f $(MODLIB)/source
        @mkdir -p $(MODLIB)/kernel
-       @ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source
+       @ln -s $(abspath $(srctree)) $(MODLIB)/source
        @if [ ! $(objtree) -ef  $(MODLIB)/build ]; then \
                rm -f $(MODLIB)/build ; \
                ln -s $(CURDIR) $(MODLIB)/build ; \
@@@ -1468,7 -1467,7 +1468,7 @@@ $(help-board-dirs): help-%
  
  # Documentation targets
  # ---------------------------------------------------------------------------
 -DOC_TARGETS := xmldocs sgmldocs psdocs latexdocs pdfdocs htmldocs mandocs installmandocs epubdocs cleandocs linkcheckdocs
 +DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs linkcheckdocs
  PHONY += $(DOC_TARGETS)
  $(DOC_TARGETS): scripts_basic FORCE
        $(Q)$(MAKE) $(build)=Documentation $@
@@@ -1630,11 -1629,11 +1630,11 @@@ image_name
  # Clear a bunch of variables before executing the submake
  tools/: FORCE
        $(Q)mkdir -p $(objtree)/tools
-       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/
+       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(src)/tools/
  
  tools/%: FORCE
        $(Q)mkdir -p $(objtree)/tools
-       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ $*
+       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(src)/tools/ $*
  
  # Single targets
  # ---------------------------------------------------------------------------
index 1e8b6116ba3c4ee03e137b737b84aaa26d133b94,57a850978cef2fe5e5040659c00a57d88c760682..9dc8f078a83c87e361883569e06fd86889a9164e
@@@ -1,7 -1,7 +1,7 @@@
  ifneq ($(O),)
  ifeq ($(origin O), command line)
-       dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
-       ABSOLUTE_O := $(shell cd $(O) ; pwd)
+       ABSOLUTE_O := $(realpath $(O))
+       dummy := $(if $(ABSOLUTE_O),,$(error O=$(O) does not exist))
        OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
        COMMAND_O := O=$(ABSOLUTE_O)
  ifeq ($(objtree),)
@@@ -12,7 -12,7 +12,7 @@@ endi
  
  # check that the output directory actually exists
  ifneq ($(OUTPUT),)
- OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
+ OUTDIR := $(realpath $(OUTPUT))
  $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
  endif
  
@@@ -39,9 -39,7 +39,9 @@@ EXTRA_WARNINGS += -Wunde
  EXTRA_WARNINGS += -Wwrite-strings
  EXTRA_WARNINGS += -Wformat
  
 -ifneq ($(CC), clang)
 +CC_NO_CLANG := $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)
 +
 +ifeq ($(CC_NO_CLANG), 1)
  EXTRA_WARNINGS += -Wstrict-aliasing=3
  endif
  
This page took 0.069119 seconds and 4 git commands to generate.