[openwrt/openwrt] tools/llvm-bpf: filter out STAGING_DIR_HOST/include from cflags on non-linux systems

LEDE Commits lede-commits at lists.infradead.org
Fri Sep 20 08:44:05 PDT 2024


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8043e2e7464befb6f3fd8b42e891ba35248c0fa4

commit 8043e2e7464befb6f3fd8b42e891ba35248c0fa4
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Sep 20 16:55:45 2024 +0200

    tools/llvm-bpf: filter out STAGING_DIR_HOST/include from cflags on non-linux systems
    
    Avoids picking up an incompatible libuuid from util-linux
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 tools/llvm-bpf/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile
index b8c2005de8..a36ca0647f 100644
--- a/tools/llvm-bpf/Makefile
+++ b/tools/llvm-bpf/Makefile
@@ -22,6 +22,11 @@ CMAKE_SOURCE_SUBDIR := llvm
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
 
+ifneq ($(HOST_OS),Linux)
+  HOST_CFLAGS := $(filter-out -I$(STAGING_DIR_HOST)/include,$(HOST_CFLAGS))
+  HOST_CXXFLAGS := $(filter-out -I$(STAGING_DIR_HOST)/include,$(HOST_CXXFLAGS))
+endif
+
 LLVM_BPF_PREFIX = llvm-bpf-$(PKG_VERSION).$(HOST_OS)-$(HOST_ARCH)
 
 CMAKE_HOST_INSTALL_PREFIX = $(STAGING_DIR_HOST)/$(LLVM_BPF_PREFIX)




More information about the lede-commits mailing list