From e78799f5610c04c609efc89f29ff6a45fbeb6c96 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 14 Apr 2024 21:37:44 +0800 Subject: [PATCH] fix: -stack-protect default to Normal --- RedPandaIDE/compiler/compilerinfo.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/RedPandaIDE/compiler/compilerinfo.cpp b/RedPandaIDE/compiler/compilerinfo.cpp index 0e326989..4de787f0 100644 --- a/RedPandaIDE/compiler/compilerinfo.cpp +++ b/RedPandaIDE/compiler/compilerinfo.cpp @@ -173,10 +173,11 @@ void CompilerInfo::prepareCompilerOptions() addOption(CC_CMD_OPT_WARNING_AS_ERROR, QObject::tr("Make all warnings into errors (-Werror)"), groupName, true, true, false, "-Werror"); addOption(CC_CMD_OPT_ABORT_ON_ERROR , QObject::tr("Abort compilation on first error (-Wfatal-errors)"), groupName, true, true, false, "-Wfatal-errors"); sl.clear(); - sl.append(QPair("Normal","")); - sl.append(QPair("Strong","-strong")); - sl.append(QPair("All","-all")); - addOption(CC_CMD_OPT_STACK_PROTECTOR , QObject::tr("Check for stack smashing attacks (-fstack-protector)"), groupName, false, false, true, "-fstack-protector", CompilerOptionType::Choice, sl); + sl.append(QPair("Normal","protector")); + sl.append(QPair("Explicit","protector-explicit")); + sl.append(QPair("Strong","protector-strong")); + sl.append(QPair("All","protector-all")); + addOption(CC_CMD_OPT_STACK_PROTECTOR , QObject::tr("Check for stack smashing attacks (-fstack-protector)"), groupName, false, false, true, "-fstack-", CompilerOptionType::Choice, sl); sl.clear(); sl.append(QPair("Address","address")); sl.append(QPair("Hwaddress","hwaddress"));