Re: compiling kernel with debug and optimization

From: Andi Kleen (
Date: Tue Feb 11 2003 - 06:11:12 EST

Pavel Machek <> writes:

> Hi!
> > Does compiling with -g option degrade performance? IMO it should NOT.
> >
> > If that's true, then why dont we compile kernels with both -g and -O2
> > always?
> Build with -g takes *a lot* of diskspace, like 1Gig.

With gcc 3.x and its dwarf2 default.

It's a lot smaller when you compile with -gstabs (on i386)
stabs works as well for 32bit, but is much more compact.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:33 EST