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@nbd.name>
This commit is contained in:
Felix Fietkau 2024-09-20 16:55:45 +02:00
parent 852ed0379a
commit 8043e2e746
1 changed files with 5 additions and 0 deletions

View File

@ -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)