On 2015-08-20 13:03, RaphaelWu@xxxxxxxxxxxxxx wrote: > Let me show the simplified piece. > > obj-m += test.o > KBUILD_CFLAGS := $(subst -pg,,$(KBUILD_CFLAGS)) > > all: > @echo $(KBUILD_CFLAGS) > $(MAKE) -C /lib/modules/`uname`/build M=$(PWD) modules > > So if it's not a kbuild makefile, why the -pg flag can be successful removed through KBUILD_CFLAGS. There are no all: rules in kbuild files. Michal -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html