[GRASS5] Re: getting gdb to work

Glynn Clements glynn.clements at virgin.net
Tue Sep 23 04:40:41 EDT 2003


Hamish wrote:

> Binaries will be a lot bigger (compiled source dir now close to 1GB).
> I guess you could leave off the -ggdb and add it to Gmakefiles as
> needed, but that wouldn't help you with any library calls.

You could also add -g in the Gmakefiles for the relevant libraries
(primarily libgis), although that will probably mean that you don't
actually save very much (see below for rationale).

For Linux, you also have the option of using shared libraries (see
mk/README). I suspect that a lot of the extra space is from having
~470 executables statically linked against a version of libgis which
includes debug info. Many of the modules only comprise a single object
file; in such cases, the bulk of the executable will be library code.

Yet another option would be to build everything with CFLAGS=-g and
LDFLAGS=-s (i.e. add the debug info to all of the object files then
strip it from the executables), then delete and rebuild the relevant
executables after removing -s from LINK_FLAGS in head.<arch>.

FWIW, I normally use the alternate build mechanism and shared
libraries, and build everything with debug info. The source tree
totals 149Mb, while the build directory (object files, libraries and
executables) totals 193Mb, of which dist.<arch> (i.e. the executables)
accounts for 78Mb. That suggests that up to 2/3 of your 1Gb figure may
be due to static linking.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list