Remove -stack-protector:default as none is now the default

This commit is contained in:
gingerBill
2026-06-19 09:14:11 +01:00
parent 11e7cff116
commit 85db8c68a9
2 changed files with 8 additions and 15 deletions

View File

@@ -279,7 +279,6 @@ enum RelocMode : u8 {
};
enum StackProtector : u8 {
StackProtector_Default,
StackProtector_None,
StackProtector_Ssp,
StackProtector_SspReq,
@@ -1955,17 +1954,14 @@ gb_internal void init_build_context(TargetMetrics *cross_target, Subtarget subta
}
if (metrics->os == TargetOs_windows ||
metrics->os == TargetOs_darwin ||
metrics->os == TargetOs_linux ||
metrics->os == TargetOs_freebsd ||
metrics->os == TargetOs_openbsd ||
metrics->os == TargetOs_netbsd) {
if (bc->stack_protector == StackProtector_Default) {
bc->stack_protector = StackProtector_None;
}
metrics->os == TargetOs_darwin ||
metrics->os == TargetOs_linux ||
metrics->os == TargetOs_freebsd ||
metrics->os == TargetOs_openbsd ||
metrics->os == TargetOs_netbsd) {
// -stack-protector is supported
} else {
if (bc->stack_protector != StackProtector_Default &&
bc->stack_protector != StackProtector_None) {
if (bc->stack_protector != StackProtector_None) {
gb_printf_err("-stack-protector is not supported on this target\n");
gb_exit(1);
}