Code for --disable-debug is very old. From what I remember... Jeff Janes <[email protected]> writes: > After running ./bootstrap, the resulting "./configure --help" > advertises a --disable-debug option. To me this suggests that > debugging symbols are included by default.
The "--disable-debug" option is not about debugging symbols, but about debugging *code* that is included by default, and activated using the "-d" flag. It was contrary to your expectations, but it's not far off, and I'm pretty sure I've seen "debug" being used in that meaning elsewhere. In today's day and age the idea that someone would want to build an executable leaner by several kilobytes by eliding some (infrequently needed) functionality does seem somewhat unusual. Still, reducing code size is still useful in embedded systems, or on installations with drastic storage limits, such as rescue CD distributions. > the ./configure script also accepts --enable-debug (but does not > advertise it in help), but that option doesn't do anything, at least > not for gcc. --enable-debug is the exact opposite of --disable-debug, and it's not advertised because the debugging support is compiled in by default. > I've found that I can get debuggings symbols by manually forcing it, using: > > make CFLAGS='-g -O2 -Wall' That is the way this kind of thing is normally done. If you specifically need to use gdb on Wget to debug a problem, you might want to consider dropping -O2 as well.
