diff options
author | Adrian Bunk <bunk@stusta.de> | 2008-01-30 07:30:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:39 -0500 |
commit | 8c4385d7f5b77415156c9b900016cc8161d49f17 (patch) | |
tree | 6b00697bbb6df59a24ee44a1d5fab5d1894ee5e2 | |
parent | 1c69524c2e5b83e52a098ebdeb4a8b52169f6a03 (diff) |
x86: remove -maccumulate-outgoing-args on 32-bit
Contrary to the comment "newer gccs do it by default", newer gcc versions
default to -maccumulate-outgoing-args only with CONFIG_CC_OPTIMIZE_FOR_SIZE=n,
and then only with some CPU settings.
Measured with an i386 defconfig, gcc 4.2.1 and kernel 2.6.23-rc1 ("orig" is
the plain kernel, "changed is with -maccumulate-outgoing-args removed):
$ ls -la vmlinux*
-rwxrwxr-x 1 bunk bunk 6269713 2007-07-24 22:19 vmlinux.changed
-rwxrwxr-x 1 bunk bunk 6425361 2007-07-24 22:19 vmlinux.orig
$ size vmlinux.*
text data bss dec hex filename
4493465 504108 614400 5611973 55a1c5 vmlinux.changed
4646160 504108 614400 5764668 57f63c vmlinux.orig
$
That's a 2.5% size increase that does for sure hurt small systems.
If the stack unwinder ever comes back and needs this as indicated in the
comment, adding it to the cflags when the user enabled the unwinder should be
a better option.
[ tglx: arch/x86 adaptation ]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/Makefile_32 | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/x86/Makefile_32 b/arch/x86/Makefile_32 index f806ceccff7a..b152db71d5b5 100644 --- a/arch/x86/Makefile_32 +++ b/arch/x86/Makefile_32 | |||
@@ -48,10 +48,6 @@ include $(srctree)/arch/x86/Makefile_32.cpu | |||
48 | # temporary until string.h is fixed | 48 | # temporary until string.h is fixed |
49 | cflags-y += -ffreestanding | 49 | cflags-y += -ffreestanding |
50 | 50 | ||
51 | # this works around some issues with generating unwind tables in older gccs | ||
52 | # newer gccs do it by default | ||
53 | cflags-y += -maccumulate-outgoing-args | ||
54 | |||
55 | # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use | 51 | # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use |
56 | # a lot more stack due to the lack of sharing of stacklots: | 52 | # a lot more stack due to the lack of sharing of stacklots: |
57 | KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) | 53 | KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) |