Commit 6680598b44ed3c0052d155522eb21fc5a00de5f3
Committed by
Linus Torvalds
1 parent
b840d79631
Exists in
master
and in
7 other branches
Disallow gcc versions 3.{0,1}
GCC 3.0 and 3.1 are too old to build a working kernel. Signed-off-by: Ingo Molnar <mingo@elte.hu> [ This check got dropped as obsolete when I simplified the gcc header inclusion mess in f153b82121b0366fe0e5f9553545cce237335175, but Willy Tarreau reports actually having those old versions still.. -Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 4 additions and 0 deletions Inline Diff
include/linux/compiler-gcc3.h
1 | #ifndef __LINUX_COMPILER_H | 1 | #ifndef __LINUX_COMPILER_H |
2 | #error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead." | 2 | #error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead." |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #if __GNUC_MINOR__ < 2 | ||
6 | # error Sorry, your compiler is too old - please upgrade it. | ||
7 | #endif | ||
8 | |||
5 | #if __GNUC_MINOR__ >= 3 | 9 | #if __GNUC_MINOR__ >= 3 |
6 | # define __used __attribute__((__used__)) | 10 | # define __used __attribute__((__used__)) |
7 | #else | 11 | #else |
8 | # define __used __attribute__((__unused__)) | 12 | # define __used __attribute__((__unused__)) |
9 | #endif | 13 | #endif |
10 | 14 | ||
11 | #if __GNUC_MINOR__ >= 4 | 15 | #if __GNUC_MINOR__ >= 4 |
12 | #define __must_check __attribute__((warn_unused_result)) | 16 | #define __must_check __attribute__((warn_unused_result)) |
13 | #endif | 17 | #endif |
14 | 18 | ||
15 | /* | 19 | /* |
16 | * A trick to suppress uninitialized variable warning without generating any | 20 | * A trick to suppress uninitialized variable warning without generating any |
17 | * code | 21 | * code |
18 | */ | 22 | */ |
19 | #define uninitialized_var(x) x = x | 23 | #define uninitialized_var(x) x = x |
20 | 24 | ||
21 | #define __always_inline inline __attribute__((always_inline)) | 25 | #define __always_inline inline __attribute__((always_inline)) |
22 | 26 |