On Wed, 2009-04-15 at 10:34 -0700, Chris Dearman wrote: > Zhang Le wrote: > > I got ftrace working on fuloong 2f box, finally. > > > > The patch could be get here: > > http://repo.or.cz/w/linux-2.6/linux-loongson.git?a=shortlog;h=refs/heads/linux-2.6.29-stable-ftrace-from-wu > > > > It is the second last patch in the above git repo. > > I pulled this patch into my local tree to try it out. The attached patch > removes spurious warnings about linking pic and non-pic object files. > > It might be better to pass KBUILD_CFLAGS into the script to get the same > build options as the rest of the kernel. Was there a reason not to do this? > This is a "history problem", for not modify the original source code of scripts/recordmcount.pl a lot, I just added a line to pass the "endian" argument in from scripts/Makefile.build ifdef CONFIG_FTRACE_MCOUNT_RECORD cmd_record_mcount = 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)" "$(@)"; endif but current method is not flexible, currently, the other compile/link options are ignored or hard-coded there. so, a substitution of implementation method should be considered. but pass KBUILD_CFLAGS seems not enough for we need make up the options for cc, ld, objdump, objcopy tools in scripts/recordmcount.pl. perhaps CFLAGS, LDFLAGS and something else should be passed from scripts/Makefile.build to scripts/recordmcount.pl respectively. thanks! Wu Zhangjin