Commit b3a320417484a6d6b9d28098944df58341353992

Authored by Andrew Morton
Committed by Ingo Molnar
1 parent f2f8458e75

kbuild: ftrace: don't assume that scripts/recordmcount.pl is executable

CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC      scripts/mod/empty.o
/bin/sh: /usr/src/25/scripts/recordmcount.pl: Permission denied

We shouldn't assume that files have their `x' bits set.  There are various
ways in which file permissions get lost, including use of patch(1).

It might not be correct to assume that perl lives in $PATH?

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff

scripts/Makefile.build
... ... @@ -199,8 +199,9 @@
199 199 endif
200 200  
201 201 ifdef CONFIG_FTRACE_MCOUNT_RECORD
202   -cmd_record_mcount = $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
203   - "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" "$(@)";
  202 +cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl \
  203 + "$(ARCH)" "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" \
  204 + "$(MV)" "$(@)";
204 205 endif
205 206  
206 207 define rule_cc_o_c