Re: [PATCH] prepare kconfig inline optimization for allarchitectures

From: Ingo Molnar
Date: Sun Apr 27 2008 - 19:42:18 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxx>
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@xxxxxxx>
---
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
--
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/