aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-03-18 07:22:11 +0100
committerFelix Fietkau <nbd@nbd.name>2021-04-04 11:39:51 +0200
commit95b838f75bd96705d5192acc56af34801ed6854d (patch)
tree7ea498bd24ae449398058a8e8ca99b57f027fbd7 /include
parent609033767918a67e92046b266230cd88ac4a37f6 (diff)
downloadupstream-95b838f75bd96705d5192acc56af34801ed6854d.tar.gz
upstream-95b838f75bd96705d5192acc56af34801ed6854d.tar.bz2
upstream-95b838f75bd96705d5192acc56af34801ed6854d.zip
build: use -nostdinc and -isystem in NOSTDINC_FLAGS for out-of-tree kernel modules
This resolves issues uncovered by musl updates Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 9ac47ee46918c45b91f4e4d1fa76b1e26b9d57fe)
Diffstat (limited to 'include')
-rw-r--r--include/kernel.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/kernel.mk b/include/kernel.mk
index d2a5b42138..e4074a48f4 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -118,6 +118,9 @@ KERNEL_MAKE_FLAGS = \
cmd_syscalls= \
$(if $(__package_mk),KBUILD_EXTRA_SYMBOLS="$(wildcard $(PKG_SYMVERS_DIR)/*.symvers)")
+KERNEL_NOSTDINC_FLAGS = \
+ -nostdinc $(if $(DUMP),, -isystem $(shell $(TARGET_CC) -print-file-name=include))
+
ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
KERNEL_MAKE_FLAGS += \
KERNELRELEASE=$(LINUX_VERSION)