From: Ben Hutchings Date: Sun, 14 Jan 2018 19:27:18 +0000 (+0000) Subject: Revert "objtool: Fix CONFIG_STACK_VALIDATION=y warning for out-of-tree modules" X-Git-Tag: archive/raspbian/4.15.17-1+rpi1^2~57 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fa323725bb0189fc17aac49a20d241c6a7114b84;p=linux.git Revert "objtool: Fix CONFIG_STACK_VALIDATION=y warning for out-of-tree modules" This reverts commit 9f0c18aec620bc9d82268b3cb937568dd07b43ff. This check doesn't make sense for OOT modules as they should always use a pre-built objtool. Gbp-Pq: Topic debian Gbp-Pq: Name revert-objtool-fix-config_stack_validation-y-warning.patch --- diff --git a/Makefile b/Makefile index f8d54b51e79..a7b285f7130 100644 --- a/Makefile +++ b/Makefile @@ -938,22 +938,6 @@ mod_sign_cmd = true endif export mod_sign_cmd -ifdef CONFIG_STACK_VALIDATION - has_libelf := $(call try-run,\ - echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0) - ifeq ($(has_libelf),1) - objtool_target := tools/objtool FORCE - else - ifdef CONFIG_UNWINDER_ORC - $(error "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") - else - $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") - endif - SKIP_STACK_VALIDATION := 1 - export SKIP_STACK_VALIDATION - endif -endif - ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ @@ -1090,6 +1074,22 @@ uapi-asm-generic: $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ src=uapi/asm obj=arch/$(SRCARCH)/include/generated/uapi/asm +ifdef CONFIG_STACK_VALIDATION + has_libelf := $(call try-run,\ + echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0) + ifeq ($(has_libelf),1) + objtool_target := tools/objtool FORCE + else + ifdef CONFIG_UNWINDER_ORC + $(error "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") + else + $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") + endif + SKIP_STACK_VALIDATION := 1 + export SKIP_STACK_VALIDATION + endif +endif + PHONY += prepare-objtool prepare-objtool: $(objtool_target)