]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'kselftest/next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 8 Mar 2016 04:50:55 +0000 (15:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 8 Mar 2016 04:50:55 +0000 (15:50 +1100)
1  2 
Makefile

diff --combined Makefile
index 30bf729be464d7c8006552802d168e45b462f807,42e3d1e111bb21529a591f7aaa3b9c95795264ec..6060cca16d27715e231680d5a4d1da9e9ca37c54
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 4
  PATCHLEVEL = 5
  SUBLEVEL = 0
 -EXTRAVERSION = -rc1
 +EXTRAVERSION = -rc7
  NAME = Blurry Fish Butt
  
  # *DOCUMENTATION*
@@@ -773,9 -773,6 +773,9 @@@ KBUILD_CFLAGS   += $(call cc-option,-We
  # Prohibit date/time macros, which would make the build non-deterministic
  KBUILD_CFLAGS   += $(call cc-option,-Werror=date-time)
  
 +# enforce correct pointer usage
 +KBUILD_CFLAGS   += $(call cc-option,-Werror=incompatible-pointer-types)
 +
  # use the deterministic mode of AR if available
  KBUILD_ARFLAGS := $(call ar-option,D)
  
@@@ -996,21 -993,7 +996,21 @@@ prepare0: archprepare FORC
        $(Q)$(MAKE) $(build)=.
  
  # All the preparing..
 -prepare: prepare0
 +prepare: prepare0 prepare-objtool
 +
 +ifdef CONFIG_STACK_VALIDATION
 +  has_libelf := $(shell echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf - &> /dev/null && echo 1 || echo 0)
 +  ifeq ($(has_libelf),1)
 +    objtool_target := tools/objtool FORCE
 +  else
 +    $(warning "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev or elfutils-libelf-devel")
 +    SKIP_STACK_VALIDATION := 1
 +    export SKIP_STACK_VALIDATION
 +  endif
 +endif
 +
 +PHONY += prepare-objtool
 +prepare-objtool: $(objtool_target)
  
  # Generate some files
  # ---------------------------------------------------------------------------
@@@ -1104,6 -1087,14 +1104,14 @@@ kselftest
  kselftest-clean:
        $(Q)$(MAKE) -C tools/testing/selftests clean
  
+ PHONY += kselftest-merge
+ kselftest-merge:
+       $(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!))
+       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
+               -m $(objtree)/.config \
+               $(srctree)/tools/testing/selftests/*/config
+       +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
  # ---------------------------------------------------------------------------
  # Modules
  
@@@ -1312,6 -1303,8 +1320,8 @@@ help
        @echo  '                    Build, install, and boot kernel before'
        @echo  '                    running kselftest on it'
        @echo  '  kselftest-clean - Remove all generated kselftest files'
+       @echo  '  kselftest-merge - Merge all the config dependencies of kselftest to existed'
+       @echo  '                    .config.'
        @echo  ''
        @echo  'Kernel packaging:'
        @$(MAKE) $(build)=$(package-dir) help
@@@ -1523,11 -1516,11 +1533,11 @@@ image_name
  # Clear a bunch of variables before executing the submake
  tools/: FORCE
        $(Q)mkdir -p $(objtree)/tools
 -      $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/
 +      $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/
  
  tools/%: FORCE
        $(Q)mkdir -p $(objtree)/tools
 -      $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ $*
 +      $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ $*
  
  # Single targets
  # ---------------------------------------------------------------------------