size of code gcc creates (was "m68k-coff-gcc and NOPs")

Fri Aug 11 12:06:00 GMT 2000

	The command line options are applied to the build of the project and
the libraries but not to the build of the compiler (unless you want to make
the compiler shorter, and possible slower).

	I am not sure exactly how the libraries were rebuilt as a colleague
did it and he is not in today. I might be able to find out next week.

Regards, Chris

> -----Original Message-----
> From: Christopher Bahns [ ]
> Sent: 10 August 2000 19:09
> To:;;
> Subject: RE: size of code gcc creates (was "m68k-coff-gcc and NOPs")
> Hello Chris (and Scott),
> Regarding a CrossGCC post you made back in January, I too have to deal
> with size increases going from MRI to GNU. In my case the MRI build is
> about 94k (of 96k available) and the GNU build is about 107k, which is
> over the limit on my flash. If I can just get it close then I can look
> into other methods to reduce it further, but at the moment 
> that would be
> hopeless.
> Here is your post:
> __________________________________________________________________
> Scott,
>         I too have been comparing code size with Microtec's 
> compiler. I
> found the following options useful in reducing it: -Os
> -fomit-frame-pointer
> -fno-force-mem. The results are then comparable to Microtec's.
>         I also noticed that the run time library was much bigger. On
> investigation I found all the string functions had an option to do the
> operations one long word at a time. This makes the code much 
> longer on a
> 68K
> cpu, and also slower. In some cases it also fails to work! Recompiling
> with
> the PREFER_SIZE_OVER_SPEED macro defined, produces more traditional
> implementations which are much smaller.
> Chris
> __________________________________________________________________
> Do you recommend applying the -Os, -fomit-frame-pointer, and
> -fno-force-mem when building the project, the compiler or both (I'm
> already applying the first two when building my program, but none of
> them when building the compiler (at least not that I know of -- just
> using the default options that generates)? If applying to
> the build of the compiler, exactly how do I do this (see next
> paragraph)?
> I have looked into applying -DPREFER_SIZE_OVER_SPEED but it 
> did not seem
> clear exactly how to do this, and what I did try caused the 
> build of the
> compiler to fail. Can you tell EXACTLY how to add this 
> define? Naturally
> I'd prefer to specify it on the make (or configure) command 
> line, since
> editing the make files directly after configuration gets a 
> bit messy and
> makes the automation of the build process a bit more difficult.
> Thanks a lot for any help.
> Chris

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list