]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bpf: disable tail call optimization in BPF targets
authorJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 28 Jul 2023 19:01:08 +0000 (21:01 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 28 Jul 2023 19:02:29 +0000 (21:02 +0200)
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.

gcc/config/bpf/bpf.cc

index b5b5674edbb5d9e571604eecfb7b99b0a8ddd3ae..57817cdf2f86d64bb73c48384232124ffccf2f78 100644 (file)
@@ -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