author: Masahiro Yamada <masahiroy@kernel.org> 2020-04-29 12:45:13 +0900
committer: Masahiro Yamada <masahiroy@kernel.org> 2020-05-17 18:52:01 +0900
commit: 9371f86ecb60f6f1f120e3d93fe892bbb70d04c0
parent: 59721d4eb7f66f27440ad74f875b97e64133ee3b
Commit Summary:
Diffstat:
1 file changed, 4 insertions, 0 deletions
diff --git a/usr/include/Makefile b/usr/include/Makefile
index 5a7ee3e5ed86..55362f3ab393 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -8,6 +8,10 @@
# We cannot go as far as adding -Wpedantic since it emits too many warnings.
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))
+
override c_flags = $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I$(objtree)/usr/include
# The following are excluded for now because they fail to build.