Skip to content

Commit 80120cc

Browse files
Ingo Molnartorvalds
Ingo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> --- yaml --- svn_rev: 95345 current_ref: refs/heads/rpi-3.18.7-rt2 current_commit: ae3a006 head_branch: refs/heads/rpi-3.18.7-rt2 migrated_from: v3
1 parent 141cd5c commit 80120cc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/rpi-3.18.7-rt2: 53809d7eaef9503eb2589babdaba5ef0b661bb14
2+
refs/heads/rpi-3.18.7-rt2: ae3a0064e6d69068b1c9fd075095da062430bda9

trunk/include/linux/compiler-gcc.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
3030

3131
/*
32-
* Force always-inline if the user requests it so via the .config:
32+
* Force always-inline if the user requests it so via the .config,
33+
* or if gcc is too old:
3334
*/
3435
#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
35-
!defined(CONFIG_OPTIMIZE_INLINING) && (__GNUC__ >= 4)
36+
!defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
3637
# define inline inline __attribute__((always_inline))
3738
# define __inline__ __inline__ __attribute__((always_inline))
3839
# define __inline __inline __attribute__((always_inline))

0 commit comments

Comments
 (0)