Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off specific optimization flags in gcc

I want to compile with optimization -O1, but there is a certain flag that it turns on that I do not want to use. How do I turn it off?

like image 865
neuromancer Avatar asked Nov 22 '09 13:11

neuromancer


1 Answers

There is usually an equivalent 'no' flag. For example, fstrict-aliasing can be turned off by fno-strict-aliasing. Check the gcc docs for more flags.

like image 114
int3 Avatar answered Nov 04 '22 02:11

int3