From: Jose E. Marchesi Date: Fri, 28 Jul 2023 19:01:08 +0000 (+0200) Subject: bpf: disable tail call optimization in BPF targets X-Git-Tag: basepoints/gcc-15~7282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f5372707f920fcf672eca76243c0d6de460f787;p=thirdparty%2Fgcc.git bpf: disable tail call optimization in BPF targets clang disables tail call optimizations in BPF targets. Do the same in GCC. gcc/ChangeLog: * config/bpf/bpf.cc (bpf_option_override): Disable tail-call optimizations in BPF target. --- diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc index b5b5674edbb5..57817cdf2f86 100644 --- a/gcc/config/bpf/bpf.cc +++ b/gcc/config/bpf/bpf.cc @@ -273,6 +273,9 @@ bpf_option_override (void) "on this architecture"); flag_stack_protect = 0; } + + /* The BPF target does not support tail call optimization. */ + flag_optimize_sibling_calls = 0; } #undef TARGET_OPTION_OVERRIDE