mirror of https://github.com/torvalds/linux.git
kbuild: uapi: reuse KBUILD_USERCFLAGS
The toplevel Makefile already provides the compiler flags necessary to build userspace applications for the target. Make use of them instead of duplicating the logic. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20251014-kbuild-uapi-usercflags-v1-1-c162f9059c47@linutronix.de Signed-off-by: Nicolas Schier <nsc@kernel.org>
This commit is contained in:
parent
bfb046f67a
commit
c4cb34aee1
|
|
@ -6,16 +6,9 @@
|
||||||
#
|
#
|
||||||
# -std=c90 (equivalent to -ansi) catches the violation of those.
|
# -std=c90 (equivalent to -ansi) catches the violation of those.
|
||||||
# We cannot go as far as adding -Wpedantic since it emits too many warnings.
|
# We cannot go as far as adding -Wpedantic since it emits too many warnings.
|
||||||
UAPI_CFLAGS := -std=c90 -Wall -Werror=implicit-function-declaration
|
UAPI_CFLAGS := -std=c90 -Werror=implicit-function-declaration
|
||||||
|
|
||||||
# In theory, we do not care -m32 or -m64 for header compile tests.
|
override c_flags = $(KBUILD_USERCFLAGS) $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I $(obj) -I $(srctree)/usr/dummy-include
|
||||||
# It is here just because CONFIG_CC_CAN_LINK is tested with -m32 or -m64.
|
|
||||||
UAPI_CFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
|
|
||||||
|
|
||||||
# USERCFLAGS might contain sysroot location for CC.
|
|
||||||
UAPI_CFLAGS += $(USERCFLAGS)
|
|
||||||
|
|
||||||
override c_flags = $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I $(obj) -I $(srctree)/usr/dummy-include
|
|
||||||
|
|
||||||
# The following are excluded for now because they fail to build.
|
# The following are excluded for now because they fail to build.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue