biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / security / tracee / use-our-libbpf.patch
blob4f6dc5957a773061b36d2823dc8078fcd70783b8
1 diff --git a/Makefile b/Makefile
2 index 29be1ae71..b88f31cba 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -54,6 +54,7 @@ CMD_CONTROLLER_GEN ?= controller-gen
6 # libs
9 +LIB_BPF ?= libbpf
10 LIB_ELF ?= libelf
11 LIB_ZLIB ?= zlib
13 @@ -299,8 +300,6 @@ OUTPUT_DIR = ./dist
14 $(OUTPUT_DIR):
16 @$(CMD_MKDIR) -p $@
17 - $(CMD_MKDIR) -p $@/libbpf
18 - $(CMD_MKDIR) -p $@/libbpf/obj
21 # embedded btfhub
22 @@ -353,7 +352,6 @@ TRACEE_EBPF_OBJ_HEADERS = $(shell find pkg/ebpf/c -name *.h)
23 bpf: $(OUTPUT_DIR)/tracee.bpf.o
25 $(OUTPUT_DIR)/tracee.bpf.o: \
26 - $(OUTPUT_DIR)/libbpf/libbpf.a \
27 $(TRACEE_EBPF_OBJ_SRC) \
28 $(TRACEE_EBPF_OBJ_HEADERS)
30 @@ -391,8 +389,8 @@ endif
31 TRACEE_SRC_DIRS = ./cmd/ ./pkg/ ./signatures/
32 TRACEE_SRC = $(shell find $(TRACEE_SRC_DIRS) -type f -name '*.go' ! -name '*_test.go')
34 -CUSTOM_CGO_CFLAGS = "-I$(abspath $(OUTPUT_DIR)/libbpf)"
35 -CUSTOM_CGO_LDFLAGS = "$(shell $(call pkg_config, $(LIB_ELF))) $(shell $(call pkg_config, $(LIB_ZLIB))) $(abspath $(OUTPUT_DIR)/libbpf/libbpf.a)"
36 +CUSTOM_CGO_CFLAGS = ""
37 +CUSTOM_CGO_LDFLAGS = "$(shell $(call pkg_config, $(LIB_BPF))) $(shell $(call pkg_config, $(LIB_ELF))) $(shell $(call pkg_config, $(LIB_ZLIB)))"
39 GO_ENV_EBPF =
40 GO_ENV_EBPF += GOOS=linux
41 @@ -437,6 +435,7 @@ $(OUTPUT_DIR)/tracee: \
42 $(OUTPUT_DIR)/tracee.bpf.o \
43 $(TRACEE_SRC) \
44 | .checkver_$(CMD_GO) \
45 + .checklib_$(LIB_BPF) \
46 .checklib_$(LIB_ELF) \
47 .checklib_$(LIB_ZLIB) \
48 btfhub \