From 8043e2e7464befb6f3fd8b42e891ba35248c0fa4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 20 Sep 2024 16:55:45 +0200 Subject: [PATCH] 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 --- tools/llvm-bpf/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile index b8c2005de88..a36ca0647fd 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)