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]

Re: optimize option in macros or somevalue (-O2 or -O3)


Don't post to both lists, if you want to work on the compiler, gcc is fine, otherwise gcc-help.

On Nov 12, 2006, at 9:29 AM, Niklaus wrote:
Is there any way to specify in the code the optimization value like
(-O2 or -O3) instead of on the command line.

In Apple's branch, we've added support for #pragma to control these things, but in the mainline compiler, no.


The problem is i can't modify the makefile.

This is a rather poor reason to want to the feature. Use make CC='gcc -O2' instead, that doesn't modify the makefile and yet optimizes.



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