]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bpf: disable -fstack-protector in meson
authorSam James <sam@gentoo.org>
Fri, 13 Jan 2023 05:17:56 +0000 (05:17 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 19 Jan 2023 13:12:15 +0000 (13:12 +0000)
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

index f65401617a93e0f9895f5d67580fe1d6004b3a7a..28e703664f2d2d7c51c40017d49aab397c5cc5cd 100644 (file)
@@ -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',