public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jose E. Marchesi <jemarch@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5230] bpf: disable -fstack-protector in BPF Date: Tue, 17 Jan 2023 16:19:44 +0000 (GMT) [thread overview] Message-ID: <20230117161944.39C293858D28@sourceware.org> (raw) https://gcc.gnu.org/g:3b81f5c4d8e0d79cbd6927d004185707c14e54b2 commit r13-5230-g3b81f5c4d8e0d79cbd6927d004185707c14e54b2 Author: Jose E. Marchesi <jose.marchesi@oracle.com> Date: Tue Jan 17 17:16:32 2023 +0100 bpf: disable -fstack-protector in BPF The stack protector is not supported in BPF. This patch disables -fstack-protector in bpf-* targets, along with the emission of a note indicating that the feature is not supported in this platform. Regtested in bpf-unknown-none. gcc/ChangeLog: * config/bpf/bpf.cc (bpf_option_override): Disable -fstack-protector. Diff: --- gcc/config/bpf/bpf.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc index 576a1fe8eab..b268801d00c 100644 --- a/gcc/config/bpf/bpf.cc +++ b/gcc/config/bpf/bpf.cc @@ -253,6 +253,14 @@ bpf_option_override (void) if (bpf_has_jmp32 == -1) bpf_has_jmp32 = (bpf_isa >= ISA_V3); + /* Disable -fstack-protector as it is not supported in BPF. */ + if (flag_stack_protect) + { + inform (input_location, + "%<-fstack-protector%> does not work " + " on this architecture"); + flag_stack_protect = 0; + } } #undef TARGET_OPTION_OVERRIDE
reply other threads:[~2023-01-17 16:19 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=20230117161944.39C293858D28@sourceware.org \ --to=jemarch@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).