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.
This commit is contained in:
parent
1fce7d29eb
commit
3b81f5c4d8
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue