[M3devel] How to compile m3cc with -O0
Jay K
jay.krell at cornell.edu
Sat Nov 23 12:17:47 CET 2013
Yes?
But anyone, naïve replacement should work, as long as it a little extra thorough. :)
Look in
m3cc/gcc-*/Makefile*.in
m3cc/gcc-*/gcc/Makefile*.in
You could also do in in src/m3makefile via CFLAGS=-O0 or such.
There is a reason it is tricky though, and that is because of bootstrapping.
And I gather they really like libgcc to be optimized, so give it separate flags
to avoid being hit by the other. We don't use libgcc so no matter.
Why?
Because it takes too long to build optimized? Yes, that is annoying.
Because it hard to debug? Yes, that is lame. The C compilers should do better there.
If you are focusing on debugging very particular code, you can also often
sprinkle in volatile to defeat the optimizer.
or "make foo.o", copy/paste what it runs, run it yourself edited, and then make
to continue. Also a bit annoying.
- Jay
> Date: Fri, 22 Nov 2013 09:44:28 -0600
> From: rodney_bates at lcwb.coop
> To: m3devel at elegosoft.com
> Subject: [M3devel] How to compile m3cc with -O0
>
> Before I track this down laboriously, does anybody know right off hand where
> to put the optimization flag -O0 for compiling m3cc? There are dozens of
> CFLAGS and similar in quake variables, make variables, environment variables, etc.,
> getting passed all over the place. Naive replacements of "-O2" by "-O0" so
> far aren't getting through to the compilation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20131123/6849a942/attachment-0002.html>
More information about the M3devel
mailing list