mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
samples/bpf: fix warning with ignored-attributes
Currently, compiling the bpf programs will result the warning with the ignored attribute as follows. This commit fixes the warning by adding cf-protection option. In file included from ./arch/x86/include/asm/linkage.h:6: ./arch/x86/include/asm/ibt.h:77:8: warning: 'nocf_check' attribute ignored; use -fcf-protection to enable the attribute [-Wignored-attributes] extern __noendbr u64 ibt_save(bool disable); ^ ./arch/x86/include/asm/ibt.h:32:34: note: expanded from macro '__noendbr' ^ Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com> Link: https://lore.kernel.org/r/20230818090119.477441-2-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
5bebd3e3a3
commit
34f6e38f58
@ -440,7 +440,7 @@ $(obj)/%.o: $(src)/%.c
|
|||||||
-Wno-gnu-variable-sized-type-not-at-end \
|
-Wno-gnu-variable-sized-type-not-at-end \
|
||||||
-Wno-address-of-packed-member -Wno-tautological-compare \
|
-Wno-address-of-packed-member -Wno-tautological-compare \
|
||||||
-Wno-unknown-warning-option $(CLANG_ARCH_ARGS) \
|
-Wno-unknown-warning-option $(CLANG_ARCH_ARGS) \
|
||||||
-fno-asynchronous-unwind-tables \
|
-fno-asynchronous-unwind-tables -fcf-protection \
|
||||||
-I$(srctree)/samples/bpf/ -include asm_goto_workaround.h \
|
-I$(srctree)/samples/bpf/ -include asm_goto_workaround.h \
|
||||||
-O2 -emit-llvm -Xclang -disable-llvm-passes -c $< -o - | \
|
-O2 -emit-llvm -Xclang -disable-llvm-passes -c $< -o - | \
|
||||||
$(OPT) -O2 -mtriple=bpf-pc-linux | $(LLVM_DIS) | \
|
$(OPT) -O2 -mtriple=bpf-pc-linux | $(LLVM_DIS) | \
|
||||||
|
Loading…
Reference in New Issue
Block a user