This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should -Os imply -shared-libgcc?
- From: Paul Koning <pkoning at equallogic dot com>
- To: ian at airs dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 29 Nov 2004 15:20:19 -0500
- Subject: Re: Should -Os imply -shared-libgcc?
- References: <m3wtw4wia0.fsf@gossamer.airs.com>
>>>>> "Ian" == Ian Lance Taylor <ian@airs.com> writes:
Ian> It occurred to me that on appropriate platforms, -shared-libgcc
Ian> will typically generate a slightly smaller program. Does
Ian> anybody have an opinion on whether the use of -Os on the link
Ian> line should imply -shared-libgcc?
It should not.
Using shared libraries helps total memory usage if there are enough
processes using the library in question. If only one or two use the
library, then shared libraries hurt overall memory usage. Where
exactly the breakeven point is depends on which library functions are
actually used by given applications.
I've been through this in an embedded system optimization exercise...
paul