This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
optimize option in macros or somevalue (-O2 or -O3)
- From: Niklaus <niklaus at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 12 Nov 2006 22:59:33 +0530
- Subject: optimize option in macros or somevalue (-O2 or -O3)
Hi,
Is there any way to specify in the code the optimization value like
(-O2 or -O3) instead of on the command line.
I want
#include <stdio.h>
...
...
return 0
}
to be compiled with -O2 or -O3 or some better optimization than
standard gcc flags like gcc a.c .I have only 1 file. The problem is i
can't modify the makefile. The constraint is it get it optimized from
the code using some technique like macro for (preprocessor ) or
something. Can anyone help me on this.
Regards
Nik