lkml.org 
[lkml]   [2003]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.032 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site