From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: gcc-patches@gcc.gnu.org
Subject: [COMMITTED] bpf: disable tail call optimization in BPF targets
Date: Fri, 28 Jul 2023 21:03:04 +0200 [thread overview]
Message-ID: <20230728190304.8849-1-jose.marchesi@oracle.com> (raw)
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 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc
index b5b5674edbb..57817cdf2f8 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
--
2.30.2
reply other threads:[~2023-07-28 19:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230728190304.8849-1-jose.marchesi@oracle.com \
--to=jose.marchesi@oracle.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).