]> err.no Git - linux-2.6/commitdiff
inlining: do not allow gcc below version 4 to optimize inlining
authorIngo Molnar <mingo@elte.hu>
Tue, 29 Apr 2008 22:15:31 +0000 (00:15 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:42:49 +0000 (08:42 -0700)
fix the condition to match intention: always use the old inlining
behavior on all gcc versions below 4.

this should solve the UML build problem.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/compiler-gcc.h

index b2fd7547b58deaa5e90b0fa5b384c0581da19d58..5c8351b859f03f2fb62c1de00c5150b3e40b8c92 100644 (file)
   BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
 
 /*
- * Force always-inline if the user requests it so via the .config:
+ * Force always-inline if the user requests it so via the .config,
+ * or if gcc is too old:
  */
 #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
-    !defined(CONFIG_OPTIMIZE_INLINING) && (__GNUC__ >= 4)
+    !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
 # define inline                inline          __attribute__((always_inline))
 # define __inline__    __inline__      __attribute__((always_inline))
 # define __inline      __inline        __attribute__((always_inline))