Re: [eigen] preventing gcc from generating debugging symbols for eigen internals? |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Looking further at man gcc and the difference between -g1 (which gives very small code) and -g2: perhaps the huge difference in code size is just source-code line numbers! Anyway to tell gcc "no need to generate line number info" in some section/file? On Tuesday 27 May 2008 08:41:02 Benoît Jacob wrote: > Hi List, > > In preparation for alpha5 I'm playing with various combinations of compiler > flags which we could recommened to our users. Eigen now works great > with -O2 -g, giving almost optimal speed while keeping debugging info. > > However there's a problem: the executable code generated is very big (in > simple examples, it goes up from 12k to 90k), because apparently gcc > generates a ton of debugging info for the internal classes of eigen. > Replacing -g (equivalent to -g2) by -g1 reduces the code size almost to the > level of when debugging is disabled, but we don't want to force our users > to use only -g1. > > I would like to allow our users to generate debugging symbols (-g) for > their app and for the main visible parts of eigen, but not for eigen > internals. > > Note, that the internal functions in eigen do get inlined, as is seen with > the 'nm' tool. So whatever excessive debugging info is compiled, seems to > relate more to internal classes than to internal functions (i suppose that > an inlined function has no existence wrt debugging info). > > Any idea how to disable debugging info in eigen internals? > > Cheers, > Benoit
Attachment:
signature.asc
Description: This is a digitally signed message part.
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |