Compiling without debug symbols.

Gerard Beekmans gerard at
Thu Jul 20 15:28:50 PDT 2000

> In the Debugging symbols and compiler optimizations section it mentions either using strip or compiling without debug options. What compile flags prevent the generation of all debugging symbols?  (which options will result in equivalent space savings as the strip program)

The first sentense more or less gives it away:
Most programs and libraries by default are compiled with debugging
symbols and optimizing level 2 (gcc options -g and -O2) and are compiled
for a specific CPU

-g is responsible for including debugging symbols. You can either remove
the -g from the command lines (usually it is done by not including -g in
your CFLAGS environment variable but if you need to edit a Makefile file
yourself you have to take the -g out of it). 

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Mail archive:
IRC access: server: port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)

More information about the lfs-dev mailing list