objtool: Detect and warn if libelf is missing and don't break the build
[linux-2.6-block.git] / scripts / Makefile.build
index 130a452d42eee515318f0c6a6ad65322c02c6a9a..e1bc1907090e871eb18fc8cf7fb5ec501eaa560a 100644 (file)
@@ -242,6 +242,7 @@ cmd_record_mcount =                                         \
 endif
 
 ifdef CONFIG_STACK_VALIDATION
+ifneq ($(SKIP_STACK_VALIDATION),1)
 
 __objtool_obj := $(objtree)/tools/objtool/objtool
 
@@ -260,6 +261,7 @@ objtool_obj = $(if $(patsubst y%,, \
        $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n), \
        $(__objtool_obj))
 
+endif # SKIP_STACK_VALIDATION
 endif # CONFIG_STACK_VALIDATION
 
 define rule_cc_o_c