diff mbox

[v2,GIT,PULL] ftrace: Remove recursion between recordmcount and scripts/mod/empty

Message ID 1287437213.16971.333.camel@gandalf.stny.rr.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steven Rostedt Oct. 18, 2010, 9:26 p.m. UTC
None
diff mbox

Patch

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 4db60b2..843bd4f 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -210,7 +210,13 @@  endif
 
 ifdef CONFIG_FTRACE_MCOUNT_RECORD
 ifdef BUILD_C_RECORDMCOUNT
-cmd_record_mcount = $(objtree)/scripts/recordmcount "$(@)";
+# Due to recursion, we must skip empty.o.
+# The empty.o file is created in the make process in order to determine
+#  the target endianness and word size. It is made before all other C
+#  files, including recordmcount.
+cmd_record_mcount = if [ $(@) != "scripts/mod/empty.o" ]; then			\
+			$(objtree)/scripts/recordmcount "$(@)";			\
+		    fi;
 else
 cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
 	"$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \