Compiling with -g slows down compilation and link, mainly because of
the extra debugging data that has to be copied around. -g
significantly increases disk usage.
>If that's true, then why dont we compile kernels with both -g and -O2
>always? Also does using -g AND -O2 cause some optimizations to be
>missed out?
With gcc, compiling with -g should have no effect on the kernel. One
of my occasional tests is to build vmlinux with and without -g, run
both through strip -g and compare the results. They should be
identical except for the build timestamp.
-
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/