lkml.org 
[lkml]   [2004]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix compilation on gcc 3.4

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))


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.040 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site