public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-5230] bpf: disable -fstack-protector in BPF
@ 2023-01-17 16:19 Jose E. Marchesi
0 siblings, 0 replies; only message in thread
From: Jose E. Marchesi @ 2023-01-17 16:19 UTC (permalink / raw)
To: gcc-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-17 16:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-17 16:19 [gcc r13-5230] bpf: disable -fstack-protector in BPF Jose E. Marchesi
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).