public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use -fno-unit-at-a-time if gcc supports it
@ 2003-09-05  0:47 Andi Kleen
  2003-09-05  1:05 ` Aaron Lehmann
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Andi Kleen @ 2003-09-05  0:47 UTC (permalink / raw)
  To: torvalds, akpm, rth, linux-kernel, jh


Hallo,

gcc 3.4 current has switched to default -fno-unit-at-a-time mode for -O2. 
The 3.3-Hammer branch compiler used in some distributions also does this.

Unfortunately the kernel doesn't compile with unit-at-a-time currently,
it cannot tolerate the reordering of functions in relation to inline
assembly.

This patch just turns it off when gcc supports the option.

I only did it for i386 for now. The problem is actually not i386 specific
(other architectures break too), so it may make sense to move the check_gcc 
stuff into the main Makefile and do it for everybody.

-Andi

--- linux-2.6.0test4-work/arch/i386/Makefile-o	2003-08-23 13:03:08.000000000 +0200
+++ linux-2.6.0test4-work/arch/i386/Makefile	2003-09-05 02:14:07.000000000 +0200
@@ -26,6 +26,10 @@
 # prevent gcc from keeping the stack 16 byte aligned
 CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
 
+# gcc 3.4/3.3-hammer support -funit-at-a-time mode, but the Kernel is not ready
+# for it yet
+CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
+
 align := $(subst -functions=0,,$(call check_gcc,-falign-functions=0,-malign-functions=0))
 
 cflags-$(CONFIG_M386)		+= -march=i386

^ permalink raw reply	[flat|nested] 17+ messages in thread
[parent not found: <sqnW.3zE.13@gated-at.bofh.it>]

end of thread, other threads:[~2003-09-08 20:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-05  0:47 [PATCH] Use -fno-unit-at-a-time if gcc supports it Andi Kleen
2003-09-05  1:05 ` Aaron Lehmann
2003-09-05  1:24   ` Andi Kleen
2003-09-05  5:37 ` Jan Hubicka
2003-09-05 17:27   ` Andi Kleen
2003-09-05 17:59     ` Jeff Garzik
2003-09-06  7:08     ` Jan Hubicka
2003-09-05 14:54 ` Linus Torvalds
2003-09-05 15:17   ` Andreas Jaeger
2003-09-05 16:16     ` Robert Love
2003-09-05 16:10       ` Andreas Jaeger
2003-09-06  7:06       ` Jan Hubicka
2003-09-05 17:19     ` Jakub Jelinek
2003-09-05 17:30     ` Andi Kleen
2003-09-08  9:48     ` Helge Hafting
     [not found] <sqnW.3zE.13@gated-at.bofh.it>
     [not found] ` <sqHd.3Yj.1@gated-at.bofh.it>
     [not found]   ` <srtA.53H.1@gated-at.bofh.it>
     [not found]     ` <sFmW.78P.13@gated-at.bofh.it>
2003-09-06  8:10       ` David Mosberger-Tang
2003-09-08 20:32         ` David Mosberger

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