[openwrt/openwrt] bpf: fix broken inclusion of system include

LEDE Commits lede-commits at lists.infradead.org
Fri May 3 05:56:48 PDT 2024


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fc221b065a94dbd9c11218a777a86c1bcdc69ee5

commit fc221b065a94dbd9c11218a777a86c1bcdc69ee5
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri May 3 14:49:58 2024 +0200

    bpf: fix broken inclusion of system include
    
    Commit d82c5884c616 ("treewide: make use of new toolchain define")
    changed $(TOOLCHAIN_DIR)/include to the new variable
    $(TOOLCHAIN_INC_DIRS) that now can contain multiple entry.
    
    Because of this only the first include in $(TOOLCHAIN_INC_DIRS) was
    actually included with -isystem, making the other producing warning with
    ignored inputs.
    
    Fix this by parsing each entry in $(TOOLCHAIN_INC_DIRS) and adding the
    -isystem prefix to correctly include them in the BPF_KERNEL_INCLUDE.
    
    Fixes: d82c5884c616 ("treewide: make use of new toolchain define")
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 include/bpf.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/bpf.mk b/include/bpf.mk
index a3357f0e29..9abc660123 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -33,7 +33,7 @@ BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el)
 BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers
 
 BPF_KERNEL_INCLUDE := \
-	-nostdinc -isystem $(TOOLCHAIN_INC_DIRS) \
+	-nostdinc $(patsubst %,-isystem %,$(TOOLCHAIN_INC_DIRS)) \
 	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \
 	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \
 	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \




More information about the lede-commits mailing list