From e3342b2d3f268987d3cd4c7f76a0e085c88a5e58 Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 13 Jan 2023 05:17:56 +0000 Subject: [PATCH] bpf: disable -fstack-protector in meson In Gentoo, we recently started making Clang behave the same way as our GCC, with -fstack-protector and some friends enabled by default. SSP doesn't make sense for BPF, so disable it explicitly. See also e.g. https://www.spinics.net/lists/netdev/msg556400.html. Bug: https://bugs.gentoo.org/890004 --- src/core/bpf/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/bpf/meson.build b/src/core/bpf/meson.build index f65401617a9..28e703664f2 100644 --- a/src/core/bpf/meson.build +++ b/src/core/bpf/meson.build @@ -7,6 +7,7 @@ endif bpf_clang_flags = [ '-std=gnu11', '-Wno-compare-distinct-pointer-types', + '-fno-stack-protector', '-O2', '-target', 'bpf', @@ -16,6 +17,7 @@ bpf_clang_flags = [ bpf_gcc_flags = [ '-std=gnu11', + '-fno-stack-protector', '-O2', '-mkernel=5.2', '-mcpu=v3',