aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/kernel.mk3
-rw-r--r--package/kernel/ath10k-ct/Makefile3
-rw-r--r--package/kernel/mt76/Makefile3
-rw-r--r--package/kernel/mwlwifi/Makefile3
-rw-r--r--package/kernel/rtl8812au-ct/Makefile3
5 files changed, 11 insertions, 4 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)
diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index 32b294a69f..a225bd8b19 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -52,7 +52,8 @@ $(call KernelPackage/ath10k-ct)
VARIANT:=smallbuffers
endef
-NOSTDINC_FLAGS = \
+NOSTDINC_FLAGS := \
+ $(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 810ee4c3d4..45375ef564 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -235,7 +235,8 @@ endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
-NOSTDINC_FLAGS = \
+NOSTDINC_FLAGS := \
+ $(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
index 749fbbe90f..eb986dca03 100644
--- a/package/kernel/mwlwifi/Makefile
+++ b/package/kernel/mwlwifi/Makefile
@@ -34,7 +34,8 @@ define KernelPackage/mwlwifi
AUTOLOAD:=$(call AutoLoad,50,mwlwifi)
endef
-NOSTDINC_FLAGS = \
+NOSTDINC_FLAGS := \
+ $(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
diff --git a/package/kernel/rtl8812au-ct/Makefile b/package/kernel/rtl8812au-ct/Makefile
index aac754de7f..4dab3fd232 100644
--- a/package/kernel/rtl8812au-ct/Makefile
+++ b/package/kernel/rtl8812au-ct/Makefile
@@ -31,7 +31,8 @@ define KernelPackage/rtl8812au-ct
PROVIDES:=kmod-rtl8812au
endef
-NOSTDINC_FLAGS = \
+NOSTDINC_FLAGS := \
+ $(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \