Messages in this thread | | | Date | Sun, 19 Oct 2003 19:37:13 +0200 | From | Sam Ravnborg <> | Subject | Re: [2.6 patch] add a config option for -Os compilation |
| |
On Sun, Oct 19, 2003 at 03:56:56PM +0200, Ingo Oeser wrote: > Maybe there should be sth. in the build system for that, which is called > $(call optimize_for_speed, $target) and $(call optimize_for_size,$target) > which then can be added on a per file basis and per directory tree, > where it really matters and letting it to the default otherwise. > > That way we can tune gradually and remove GCC options. > > Simple implementation today: > > optimize_for_speed := CFLAGS_$1 += -O3 > optimize_for_size := CFLAGS_$1 += -Os > > > Sam: What do you think?
Focussing on -O2 versus -Os is too narrowscoped for the build system. A much more general solution is needed, without loosing the flexibility we have today. For 2.7 I have planned making it possible to modify CFLAGS, and make the change be effective for all recursive builds. This could be usefull if for example acpi decides to use -Werror for all files. One change in one makefile and the desired effect is achieved. The same infrastructure will be possible to use for -Owhatever.
We sould stick with -O2 for 2.6, lets play with other settings for 2.7. Router people and others with special needs can finetune it at will in 2.6 - it is one line in the top-level makefile so not a big deal.
Sam - 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/
| |