This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Should -Os imply -shared-libgcc?


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]