meson: set -fno-ssa-phiopt when building bpf with gcc

There are bugs in the kernel verifier that cause legitimate code
to be rejected, disabling this optimization makes bpf programs
built with a new enough gcc work again.

Fixes https://github.com/systemd/systemd/issues/31888
This commit is contained in:
Luca Boccassi 2024-04-04 23:42:45 +01:00 committed by Yu Watanabe
parent 57cd604fde
commit 1ce28e5a24

View File

@ -1701,6 +1701,7 @@ if conf.get('BPF_FRAMEWORK') == 1
bpf_gcc_flags = [
'-std=gnu11',
'-fno-stack-protector',
'-fno-ssa-phiopt',
'-O2',
'-mcpu=v3',
'-mco-re',