linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: akpm@osdl.org
Cc: jh@suse.cz, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix compilation on gcc 3.4
Date: Wed, 14 Jan 2004 09:37:00 +0100	[thread overview]
Message-ID: <20040114083700.GA1820@averell> (raw)


The upcomming gcc 3.4 has a new inlining algorithm which sometimes
fails to inline some "dumb" inlines in the kernel. This sometimes leads
to undefined symbols while linking.

To make the kernel compile again this patch drops the always inline
for gcc 3.4.  The new algorithm should be good enough to do the right
thing on its own. 

-Andi

diff -u linux-34/include/linux/compiler-gcc3.h-o linux-34/include/linux/compiler-gcc3.h
--- linux-34/include/linux/compiler-gcc3.h-o	2003-09-28 10:53:23.000000000 +0200
+++ linux-34/include/linux/compiler-gcc3.h	2004-01-13 22:36:22.000000000 +0100
@@ -3,7 +3,9 @@
 /* These definitions are for GCC v3.x.  */
 #include <linux/compiler-gcc.h>
 
-#if __GNUC_MINOR__ >= 1
+/* gcc 3.4 has a new inlining algorithm and always_inline seems to 
+   do more harm than good now. */
+#if __GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 4
 # define inline		__inline__ __attribute__((always_inline))
 # define __inline__	__inline__ __attribute__((always_inline))
 # define __inline	__inline__ __attribute__((always_inline))




             reply	other threads:[~2004-01-14  8:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-14  8:37 Andi Kleen [this message]
2004-01-14  8:47 ` [PATCH] Fix compilation on gcc 3.4 Jakub Jelinek
2004-01-14  8:58   ` Andi Kleen
2004-01-14 10:53     ` Jan Hubicka
2004-01-14  8:49 ` Andrew Morton
2004-01-14  9:04   ` Andi Kleen

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=20040114083700.GA1820@averell \
    --to=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=jh@suse.cz \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).