This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]