From: Felix Fietkau Date: Fri, 20 Sep 2024 14:55:45 +0000 (+0200) Subject: tools/llvm-bpf: filter out STAGING_DIR_HOST/include from cflags on non-linux systems X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8043e2e7464befb6f3fd8b42e891ba35248c0fa4;p=openwrt%2Fopenwrt.git 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 --- 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)