Re: compiling kernel with debug and optimization

Andi Kleen (ak@suse.de)
11 Feb 2003 12:11:12 +0100


Pavel Machek <pavel@ucw.cz> 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.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/