* gcc 4.1 Options for Maximum Debugging (also ecos synth).
@ 2006-03-09 21:43 John Carter
0 siblings, 0 replies; only message in thread
From: John Carter @ 2006-03-09 21:43 UTC (permalink / raw)
To: gcc-help
We have two builds. One that runs on our embedded target and has -Os and
another that runs on our Linux desktop machines and is just for running
unit tests and debugging.
Current the desktop build is built -O0, but I suspect that isn't really
what I want.
-O0 means "no optimization".
In practice is means "be a dumb stupid compiler" and don't...
* Don't do enough work to make the assembler readable, clutter it with
lead in / lead out code for each fragment.
* Don't do enough data flow analysis to give initialized variables
warnings.
* Don't do any global analysis to detect bad code.
So what I want is..
* Assembler that is easy to read and correlates well with the source.
* In depth data flow / static analysis to give good warnings.
* Stack and bounds checking to the maximum. (Hey, the desktop PC is about
a 1000 times faster than the embedded target and has no memory / real
time constraints.)
My current guess as to the gcc settings I want are...
-O1 -fno-delayed-branch -fno-guess-branch-probability \
-fno-cprop-registers -fno-loop-optimize -funit-at-a-time
I tried -fstack-protector but it then seemed to want a bunch of extra
libraries.
Question 1:
Which optimization / -f options on gcc 4.1 would you recommend for
maximum warnings / analysis / debuggability? (Assuming all appropriate
-W options are switched on already...)
Question 2:
Has anybody got -fstack-protector working with ECos synthetic platform?
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter@tait.co.nz
New Zealand
Carter's Clarification of Murphy's Law.
"Things only ever go right so that they may go more spectacularly wrong later."
From this principle, all of life and physics may be deduced.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-09 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-09 21:43 gcc 4.1 Options for Maximum Debugging (also ecos synth) John Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).