Skip to content

Commit 340e311

Browse files
lorddoskiasNobody
authored andcommitted
bpftool: Allow building statically
Sometime it can be useful to haul around a statically built version of bpftool. Simply add support for passing STATIC=1 while building to build the tool statically. Signed-off-by: Nikolay Borisov <[email protected]>
1 parent 9f3d7c7 commit 340e311

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/bpf/bpftool/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ else
1313
Q = @
1414
endif
1515

16+
ifeq ($(STATIC),1)
17+
CFLAGS += --static
18+
endif
19+
1620
BPF_DIR = $(srctree)/tools/lib/bpf
1721

1822
ifneq ($(OUTPUT),)

0 commit comments

Comments
 (0)