tools/llvm-bpf: filter out STAGING_DIR_HOST/include from cflags on non-linux systems
authorFelix Fietkau <nbd@nbd.name>
Fri, 20 Sep 2024 14:55:45 +0000 (16:55 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 20 Sep 2024 15:43:57 +0000 (17:43 +0200)
Avoids picking up an incompatible libuuid from util-linux

Signed-off-by: Felix Fietkau <nbd@nbd.name>
tools/llvm-bpf/Makefile

index b8c2005de8850ec81c3025f18ddd7de819fa39fb..a36ca0647fd6d3cd03332e555301d43e1d3d6965 100644 (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)