Skip to content

Commit

Permalink
fix(bpf): Compile eBPF probe with -Wno-unknown-attributes
Browse files Browse the repository at this point in the history
In some cases we use clang 7 to build the eBPF probe.
That version of clang is too old to support some of the compiler
attributes which appear in the source code for more modern kernel
versions.  So disable warnings associated with unknown attributes.

Signed-off-by: Joseph Pittman <joseph.pittman@sysdig.com>
Signed-off-by: Luca Guerra <luca@guerra.sh>
  • Loading branch information
jcpittman144 authored and poiana committed Jul 17, 2023
1 parent 140f9cc commit 30d2635
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions driver/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ $(obj)/probe.o: $(src)/probe.c \
-fno-jump-tables \
-fno-stack-protector \
-Wno-tautological-compare \
-Wno-unknown-attributes \
-O2 -g -emit-llvm -c $< -o $(patsubst %.o,%.ll,$@)
$(LLC) -march=bpf -filetype=obj -o $@ $(patsubst %.o,%.ll,$@)

0 comments on commit 30d2635

Please sign in to comment.