how small can gcc get?

Dale Johannesen dalej@apple.com
Sun Apr 24 17:36:00 GMT 2005


On Apr 24, 2005, at 6:43 AM, Mike Stump wrote:
> On Saturday, April 23, 2005, at 05:05  PM, Philip George wrote:
>> What's the smallest size I can squeeze gcc down to and how would I go 
>> about compiling it in such a way?
>
> My take:
>
> #define optimize 0

"optimize" is a variable and "int 0" won't parse, so that won't come 
close.
What did you really mean?

Turning off optimization is not going to get you the smallest code 
size, since many
optimizations reduce it...the option intended to produce smallest code
is -Os.  Configuring with --disable-checking is also important.

> and then rebuild with dead code stripping.  :-)  You'd be the first to 
> do this that I know of, so, won't necessarily be easy, but, might be a 
> bit smaller than you'd get otherwise.



More information about the Gcc mailing list