Sorry for being naïve, please see the changes below and kindly let me know if the changes look right. In the first case, cc-version passes $(CC) anyway so I think that is not necessary. In the second case, $($(1)) within a foreach doesnot seem to do a recursive expansion. So $(o) seems to be empty. I might be wrong but that's what I see happening! Thanks, -Romit diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index d64e6ba..bb73b13 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -128,7 +128,7 @@ cc-fullversion = $(shell $(CONFIG_SHELL) \ # cc-ifversion # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) -cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) +cc-ifversion = $(shell [ $(call cc-version) $(1) $(2) ] && echo $(3)) # ld-option # Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both) @@ -147,7 +147,7 @@ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile. addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1 # Find all -I options and call addtree -flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) +flags = $(foreach o,$(1),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) # echo command. # Short version is used, if $(quiet) equals `quiet_', otherwise full one. -- 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