selftests/bpf: Pass sanitizer flags to linker through LDFLAGS
mainline inclusion from mainline-5.17-rc1 commit 2a2cb45b category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a2cb45b727b7a1041f3d3d93414b774e66454bb ------------------------------------------------- When adding -fsanitize=address to SAN_CFLAGS, it has to be passed both to compiler through CFLAGS as well as linker through LDFLAGS. Add SAN_CFLAGS into LDFLAGS to allow building selftests with ASAN. Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Reviewed-by: NHengqi Chen <hengqi.chen@gmail.com> Link: https://lore.kernel.org/bpf/20211107165521.9240-2-andrii@kernel.org (cherry picked from commit 2a2cb45b) Signed-off-by: NWang Yufen <wangyufen@huawei.com> Conflicts: tools/testing/selftests/bpf/Makefile Signed-off-by: NWang Yufen <wangyufen@huawei.com>
Showing
想要评论请 注册 或 登录