lkml.org 
[lkml]   [2004]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] gcc3 does not inline some functions
Date
# cut 2.4.25/System.map -d' ' -f3 | sort | uniq -c | sort -r | head -10
216 __constant_c_and_count_memset
120 __constant_memcpy
67 __constant_copy_to_user
66 __constant_copy_from_user
50 version
23 debug
17 max_interrupt_work
16 rx_copybreak
16 options
16 mdio_write

Fix is below. Backported from 2.6. Untested.
--
vda
--- linux-2.4.25/include/linux/compiler.h.orig Sun Mar 21 23:50:13 2004
+++ linux-2.4.25/include/linux/compiler.h Sun Mar 21 23:51:06 2004
@@ -13,4 +13,12 @@
#define likely(x) __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0)

+#if __GNUC__ == 3
+#if __GNUC_MINOR__ >= 1
+# define inline __inline__ __attribute__((always_inline))
+# define __inline__ __inline__ __attribute__((always_inline))
+# define __inline __inline__ __attribute__((always_inline))
+#endif
+#endif
+
#endif /* __LINUX_COMPILER_H */
\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.181 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site