ifeq ($(cc-name),clang)
CC_ARM32 := $(cc-name) $(CLANG_TARGET_ARM32) -no-integrated-as
+ GCC_ARM32_TC := $(realpath $(dir $(shell which $(CROSS_COMPILE_ARM32)ld))/..)
+ifneq ($(GCC_ARM32_TC),)
+ CC_ARM32 += --gcc-toolchain=$(GCC_ARM32_TC)
+endif
else
CC_ARM32 := $(CROSS_COMPILE_ARM32)$(cc-name)
endif
# NOSTDINC_FLAGS
VDSO_CPPFLAGS := -nostdinc -isystem $(shell $(CC_ARM32) -print-file-name=include)
VDSO_CPPFLAGS += $(LINUXINCLUDE)
-VDSO_CPPFLAGS += $(KBUILD_CPPFLAGS)
+VDSO_CPPFLAGS += -D__KERNEL__
+VDSO_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
+VDSO_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS)
# Common C and assembly flags
# From top-level Makefile