kbuild: add --target to correctly cross-compile UAPI headers with Clang
[linux-2.6-block.git] / usr / include / Makefile
index ac206fb27c652320d002e3bc0a7999ccdf7b6d61..4215801e1110ba2f00fc3148f37d22c2430538b9 100644 (file)
@@ -10,7 +10,7 @@ UAPI_CFLAGS := -std=c90 -Wall -Werror=implicit-function-declaration
 
 # In theory, we do not care -m32 or -m64 for header compile tests.
 # It is here just because CONFIG_CC_CAN_LINK is tested with -m32 or -m64.
-UAPI_CFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS))
+UAPI_CFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
 
 # USERCFLAGS might contain sysroot location for CC.
 UAPI_CFLAGS += $(USERCFLAGS)