public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 02/2] allow gcc4 to optimize unit-at-a-time
@ 2005-12-28 11:47 Ingo Molnar
  2005-12-28 12:04 ` Jakub Jelinek
  2005-12-28 15:30 ` Andi Kleen
  0 siblings, 2 replies; 11+ messages in thread
From: Ingo Molnar @ 2005-12-28 11:47 UTC (permalink / raw)
  To: lkml; +Cc: Linus Torvalds, Andrew Morton, Arjan van de Ven, Matt Mackall

allow gcc4 compilers to optimize unit-at-a-time - which results in gcc
having a wider scope when optimizing. This also results in smaller code
when optimizing for size. (gcc4 does not have the stack footprint
problem of gcc3 compilers.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
----

 arch/i386/Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Index: linux/arch/i386/Makefile
===================================================================
--- linux.orig/arch/i386/Makefile
+++ linux/arch/i386/Makefile
@@ -42,9 +42,9 @@ include $(srctree)/arch/i386/Makefile.cp
 GCC_VERSION			:= $(call cc-version)
 cflags-$(CONFIG_REGPARM) 	+= $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
 
-# Disable unit-at-a-time mode, it makes gcc use a lot more stack
-# due to the lack of sharing of stacklots.
-CFLAGS += $(call cc-option,-fno-unit-at-a-time)
+# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
+# a lot more stack due to the lack of sharing of stacklots:
+CFLAGS				+= $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "-fno-unit-at-a-time"; fi ;)
 
 CFLAGS += $(cflags-y)
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-12-28 17:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-28 11:47 [patch 02/2] allow gcc4 to optimize unit-at-a-time Ingo Molnar
2005-12-28 12:04 ` Jakub Jelinek
2005-12-28 12:28   ` Sam Ravnborg
2005-12-28 13:04     ` Jakub Jelinek
2005-12-28 12:47       ` Sam Ravnborg
2005-12-28 12:50         ` Sam Ravnborg
2005-12-28 13:06   ` Ingo Molnar
2005-12-28 15:30 ` Andi Kleen
2005-12-28 15:34   ` Matt Mackall
2005-12-28 15:41   ` Ingo Molnar
2005-12-28 17:46     ` Andreas Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox