Hi RaphaelWu Try this: obj-m += test.o $(warning Before-KBUILD_CFLAGS=$(KBUILD_CFLAGS)) KBUILD_CFLAGS := $(subst -pg,,$(KBUILD_CFLAGS)) $(warning After-KBUILD_CFLAGS=$(KBUILD_CFLAGS)) Sam -- 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