Re: [2.6 patch] add an -Os config option

From: Kevin P. Fleming
Date: Tue Aug 12 2003 - 11:07:29 EST


Timothy Miller wrote:

Furthermore, it may be that we could benefit from compiling some source files with -Os and others with -O2, depending on how critical they are and how much they are ACTUALLY affected.


At one time last year, there was a brief discussion about modifying the kernel's build process to make it build whole directories of sources as a single "compilation unit". As I remember, this allowed the compiler to make better decisions about how to organize the resulting code, what to keep/discard, optimization, etc.

With the simplifications that have already occurred in the 2.6 makefiles, it seems to me that this would be an easier thing to do now (as opposed to the old makefiles where the build process had a harder time figuring out what source files were going to end up in the same object file). Now that kbuild always builds "built-on.o" in each source directory, could it perform that step by actually feeding gcc all the relevant source files in some combined form?

Granted, this is not something you'd want to use during debugging of kernel code, it would only be relevant for those trying to minimize their kernel size and/or get the last possible bits of speed out of the running kernel.

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