]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Change llvm flag -mcpu=probe to -mcpu=v3
authorYonghong Song <yhs@fb.com>
Wed, 19 Feb 2020 00:42:36 +0000 (16:42 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 19 Feb 2020 23:15:07 +0000 (15:15 -0800)
commite8adfd6eecffaf74abb7c8a970dbe78c911cd2a8
treea4179458a107426f32ad5346bff8eba664bf4f92
parente18311a11d87ee8862586271fa44439d1c82f802
selftests/bpf: Change llvm flag -mcpu=probe to -mcpu=v3

The latest llvm supports cpu version v3, which is cpu version v1
plus some additional 64bit jmp insns and 32bit jmp insn support.

In selftests/bpf Makefile, the llvm flag -mcpu=probe did runtime
probe into the host system. Depending on compilation environments,
it is possible that runtime probe may fail, e.g., due to
memlock issue. This will cause generated code with cpu version v1.
This may cause confusion as the same compiler and the same C code
generates different byte codes in different environment.

Let us change the llvm flag -mcpu=probe to -mcpu=v3 so the
generated code will be the same regardless of the compilation
environment.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200219004236.2291125-1-yhs@fb.com
tools/testing/selftests/bpf/Makefile