From ae3a0064e6d69068b1c9fd075095da062430bda9 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 30 Apr 2008 00:15:31 +0200 Subject: [PATCH] inlining: do not allow gcc below version 4 to optimize inlining 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 Signed-off-by: Linus Torvalds --- include/linux/compiler-gcc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index b2fd7547b58..5c8351b859f 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -29,10 +29,11 @@ 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)) -- 2.32.0.93.g670b81a890