Re: [PATCH] prepare kconfig inline optimization for all architectures

Ingo Molnar
2008-04-27T23:41:10Z

* Linus Torvalds <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> wrote:

> On Sun, 27 Apr 2008, Arjan van de Ven wrote:
> >
> > (actually, other than some obscure commandline options, the only
> > sane way to avoid gcc doing this too agressive is using -Os)
>
> Well, CC_OPTIMIZE_FOR_SIZE has been defaulting to 'y' for a *loong*
> time, but it's hidden behind a EXPERIMENTAL (unless you were on some
> embedded architectures), so many people won't see it.
>
> Perhaps it is time to remove the EXPERIMENTAL? I think the gcc
> warnings were mostly bogus - it's not as if there haven't been
> compiler bugs without -Os too..

i was wondering about that when doing the OPTIMIZE_INLINING change -
lets do something like the patch below?

Ingo

-------------->
Subject: make CC_OPTIMIZE_FOR_SIZE non-experimental
From: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
Date: Mon Apr 28 01:39:43 CEST 2008

this option has been the default on a wide range of distributions
for a long time - time to make it non-experimental.

Signed-off-by: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
---
init/Kconfig | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

Index: linux-x86.q/init/Kconfig
===================================================================
--- linux-x86.q.orig/init/Kconfig
+++ linux-x86.q/init/Kconfig
@@ -496,16 +496,12 @@ source "usr/Kconfig"
endif

config CC_OPTIMIZE_FOR_SIZE
- bool "Optimize for size (Look out for broken compilers!)"
+ bool "Optimize for size"
default y
- depends on ARM || H8300 || SUPERH || EXPERIMENTAL
help
Enabling this option will pass "-Os" instead of "-O2" to gcc
resulting in a smaller kernel.

- WARNING: some versions of gcc may generate incorrect code with this
- option. If problems are observed, a gcc upgrade may be needed.
-
If unsure, say N.

config SYSCTL