Skip to contentSkip to conversation

tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount

PATCH New Steven Rostedt 1 participant 1 message Jun 23, 2018 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 5/5 tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount

From: Greg Thelen <[email protected]>

Non gcc-5 builds with CONFIG_STACK_VALIDATION=y and SKIP_STACK_VALIDATION=1 fail.
Example output:
/bin/sh: init/.tmp_main.o: Permission denied

commit 96f60dfa5819 ("trace: Use -mcount-record for dynamic ftrace"), added a mismatched endif. This causes cmd_objtool to get mistakenly set.

Relocate endif to balance the newly added -record-mcount check.

Fixes 96f60dfa5819 ("trace: Use -mcount-record for dynamic ftrace")
---
 scripts/Makefile.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.build +1 -1
index 34d9e9ce97c2..e7889f486ca1 100644
@@ -239,6 +239,7 @@ cmd_record_mcount =						\
 	     "$(CC_FLAGS_FTRACE)" ]; then			\
 		$(sub_cmd_record_mcount)			\
 	fi;
+endif # -record-mcount
 endif # CONFIG_FTRACE_MCOUNT_RECORD
 
 ifdef CONFIG_STACK_VALIDATION
@@ -263,7 +264,6 @@ ifneq ($(RETPOLINE_CFLAGS),)
   objtool_args += --retpoline
 endif
 endif
-endif
 
 
 ifdef CONFIG_MODVERSIONS
Signature · 1 line
2.17.1