X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2FMakefile.build;h=5ad25e17b6cb2782a2101b59ad7cfd442a8af2ea;hb=63e35cd9bd4c8ae085c8b9a70554595b529c4100;hp=a1a5cf95a68d73bd5179474e07b274f77eb5efaf;hpb=6b5b817f103450444f3f658a498f435d92a197e5;p=pandora-kernel.git diff --git a/scripts/Makefile.build b/scripts/Makefile.build index a1a5cf95a68d..5ad25e17b6cb 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -209,12 +209,23 @@ cmd_modversions = \ endif ifdef CONFIG_FTRACE_MCOUNT_RECORD +ifdef BUILD_C_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)" \ "$(if $(CONFIG_64BIT),64,32)" \ - "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ + "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ + "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ "$(if $(part-of-module),1,0)" "$(@)"; endif +endif define rule_cc_o_c $(call echo-cmd,checksrc) $(cmd_checksrc) \