All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: torvalds@osdl.org, akpm@osdl.org, rth@redhat.com,
	linux-kernel@vger.kernel.org, jh@suse.cz
Subject: [PATCH] Use -fno-unit-at-a-time if gcc supports it
Date: Fri, 5 Sep 2003 02:47:10 +0200	[thread overview]
Message-ID: <20030905004710.GA31000@averell> (raw)


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

             reply	other threads:[~2003-09-05  0:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-05  0:47 Andi Kleen [this message]
2003-09-05  1:05 ` [PATCH] Use -fno-unit-at-a-time if gcc supports it 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030905004710.GA31000@averell \
    --to=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=jh@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@redhat.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.