Reducing compilation memory usage

Alejandro Pulver alepulver@FreeBSD.org
Fri Jan 18 06:27:00 GMT 2008


On Thu, 17 Jan 2008 04:06:04 -0800
"John (Eljay) Love-Jensen" <eljay@adobe.com> wrote:

> Hi Alejandro,
> 
> > The strange thing is that when looking at options enabled at different
> -O levels (trying to remove the ones that were using more memory),
> ended up with a GCC 4.2.3 command-line that specified exactly all the
> options enabled by -O2 (as listed in the manpage), and built. But ran
> at the same speed as without them.
> 
> Which -O# level were you using in conjunction with the specified -f?
> 
> Keep in mind, that at -O0, all optimizations are disabled, and the -f to enable a particular optimization have no effect since all optimizations are disabled.
> 

I didn't use them simultaneously. There are 3 scenarios:

1. No options: builds.
2. -O1/-O2/-O3: runs out of memory.
3. -f* (corresponding to when enabling -O2 as manpage says, but NOT
   -O2): builds, but the final program runs at the same speed.

More specifically this step is just the compilation of preprocessed
code to assembly source.

Do you want the preprocessed source (don't know if the mailing lists
accepts attachments, and encoded ones), and the exact -f* options?

I was initially looking for using -O2 with necessary -f-no-* to avoid
running out of memory.

Thanks and Best Regards,
Ale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20080118/d655a586/attachment.sig>


More information about the Gcc-help mailing list