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>
This commit is contained in:
parent
acb8c17ecc
commit
9ac47ee469
@ -118,6 +118,9 @@ KERNEL_MAKE_FLAGS = \
|
|||||||
cmd_syscalls= \
|
cmd_syscalls= \
|
||||||
$(if $(__package_mk),KBUILD_EXTRA_SYMBOLS="$(wildcard $(PKG_SYMVERS_DIR)/*.symvers)")
|
$(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)),)
|
ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
|
||||||
KERNEL_MAKE_FLAGS += \
|
KERNEL_MAKE_FLAGS += \
|
||||||
KERNELRELEASE=$(LINUX_VERSION)
|
KERNELRELEASE=$(LINUX_VERSION)
|
||||||
|
@ -52,7 +52,8 @@ $(call KernelPackage/ath10k-ct)
|
|||||||
VARIANT:=smallbuffers
|
VARIANT:=smallbuffers
|
||||||
endef
|
endef
|
||||||
|
|
||||||
NOSTDINC_FLAGS = \
|
NOSTDINC_FLAGS := \
|
||||||
|
$(KERNEL_NOSTDINC_FLAGS) \
|
||||||
-I$(PKG_BUILD_DIR) \
|
-I$(PKG_BUILD_DIR) \
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||||
|
@ -235,7 +235,8 @@ endef
|
|||||||
|
|
||||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
|
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
|
||||||
|
|
||||||
NOSTDINC_FLAGS = \
|
NOSTDINC_FLAGS := \
|
||||||
|
$(KERNEL_NOSTDINC_FLAGS) \
|
||||||
-I$(PKG_BUILD_DIR) \
|
-I$(PKG_BUILD_DIR) \
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||||
|
@ -33,7 +33,8 @@ define KernelPackage/mwlwifi
|
|||||||
AUTOLOAD:=$(call AutoLoad,50,mwlwifi)
|
AUTOLOAD:=$(call AutoLoad,50,mwlwifi)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
NOSTDINC_FLAGS = \
|
NOSTDINC_FLAGS := \
|
||||||
|
$(KERNEL_NOSTDINC_FLAGS) \
|
||||||
-I$(PKG_BUILD_DIR) \
|
-I$(PKG_BUILD_DIR) \
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||||
|
@ -31,7 +31,8 @@ define KernelPackage/rtl8812au-ct
|
|||||||
PROVIDES:=kmod-rtl8812au
|
PROVIDES:=kmod-rtl8812au
|
||||||
endef
|
endef
|
||||||
|
|
||||||
NOSTDINC_FLAGS = \
|
NOSTDINC_FLAGS := \
|
||||||
|
$(KERNEL_NOSTDINC_FLAGS) \
|
||||||
-I$(PKG_BUILD_DIR) \
|
-I$(PKG_BUILD_DIR) \
|
||||||
-I$(PKG_BUILD_DIR)/include \
|
-I$(PKG_BUILD_DIR)/include \
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||||
|
Loading…
Reference in New Issue
Block a user