summaryrefslogtreecommitdiff
path: root/include/linux/compiler-gcc3.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-02-18 16:38:18 -0800
committerDavid S. Miller <davem@nuts.davemloft.net>2004-02-18 16:38:18 -0800
commitce9209830680a4f351614fcc07ac6ea03d99012e (patch)
tree61060b62594babcbc95d77d930469beeff168bba /include/linux/compiler-gcc3.h
parentb882d4443755e112e90d1fc7049adff7c75aba17 (diff)
[PATCH] Add noinline attribute
From: Andi Kleen <ak@muc.de> This patch adds the `noinline' function attribute. It can be used to explicitly tell the compiler to not inline functions. We need this due to what is, IMO, a bug present in gcc-3.4 and current gcc-3.5 CVS: the compiler is inlining init/main.c:rest_init() inside init/main.c:start_kernel(), despite the fact that thay are declared to be placed in different text sections.
Diffstat (limited to 'include/linux/compiler-gcc3.h')
-rw-r--r--include/linux/compiler-gcc3.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h
index 22230e40873e..c472cac3029d 100644
--- a/include/linux/compiler-gcc3.h
+++ b/include/linux/compiler-gcc3.h
@@ -21,3 +21,7 @@
#define __attribute_pure__ __attribute__((pure))
#define __attribute_const__ __attribute__((__const__))
+
+#if __GNUC_MINOR__ >= 1
+#define noinline __attribute__((noinline))
+#endif