aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samples/sockmap/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/samples/sockmap/Makefile b/samples/sockmap/Makefile
index 9bf2881bd11b..fa53f4d77834 100644
--- a/samples/sockmap/Makefile
+++ b/samples/sockmap/Makefile
@@ -65,11 +65,14 @@ $(src)/*.c: verify_target_bpf
65# asm/sysreg.h - inline assembly used by it is incompatible with llvm. 65# asm/sysreg.h - inline assembly used by it is incompatible with llvm.
66# But, there is no easy way to fix it, so just exclude it since it is 66# But, there is no easy way to fix it, so just exclude it since it is
67# useless for BPF samples. 67# useless for BPF samples.
68#
69# -target bpf option required with SK_MSG programs, this is to ensure
70# reading 'void *' data types for data and data_end are __u64 reads.
68$(obj)/%.o: $(src)/%.c 71$(obj)/%.o: $(src)/%.c
69 $(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) -I$(obj) \ 72 $(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) -I$(obj) \
70 -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ 73 -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
71 -Wno-compare-distinct-pointer-types \ 74 -Wno-compare-distinct-pointer-types \
72 -Wno-gnu-variable-sized-type-not-at-end \ 75 -Wno-gnu-variable-sized-type-not-at-end \
73 -Wno-address-of-packed-member -Wno-tautological-compare \ 76 -Wno-address-of-packed-member -Wno-tautological-compare \
74 -Wno-unknown-warning-option \ 77 -Wno-unknown-warning-option -O2 -target bpf \
75 -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@ 78 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@