Yes, change the template script you're using to create your projects.This can be done by right click on the project type in the "new project wizard" and then hit "edit this script"
Have you inspected if the script adds the -O2 explicitly?No there is no explicit flags modification, you can check yourself, this is default console application script.
function SetupTarget(target,is_debug)
{
...
if (is_debug)
{
...
}
else
{
...
target.AddCompilerOption(_T("-O3")); // <-- Set -o3
}
// all done!
return true;
}
Look at share\CodeBlocks\templates\wizard\common_functions.script, line 173 (or 201, depending on the compiler).Yep, now it is works fine, thanks a lot.