From: Sitsofe Wheeler Date: Wed, 21 Mar 2018 22:35:21 +0000 (+0000) Subject: compiler: set minimum compiler version to GCC 4.1.0 X-Git-Tag: fio-3.6~24^2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=202b2f5d55a0207bfafd40628d4263829de6c6e6 compiler: set minimum compiler version to GCC 4.1.0 fio hasn't compiled under GCC 3 for a while due to unguarded calls to GCC's __sync intrinsics in critical paths. Since those intrinsics didn't come along until GCC 4.1.0 change fio to explicitly error out on older compilers. Signed-off-by: Sitsofe Wheeler --- diff --git a/compiler/compiler-gcc3.h b/compiler/compiler-gcc3.h deleted file mode 100644 index 566987a2..00000000 --- a/compiler/compiler-gcc3.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef FIO_COMPILER_GCC3_H -#define FIO_COMPILER_GCC3_H - -#if __GNUC_MINOR__ >= 4 -#ifndef __must_check -#define __must_check __attribute__((warn_unused_result)) -#endif -#endif - -#endif diff --git a/compiler/compiler.h b/compiler/compiler.h index 4d92ac49..dacb7379 100644 --- a/compiler/compiler.h +++ b/compiler/compiler.h @@ -2,12 +2,10 @@ #define FIO_COMPILER_H /* IWYU pragma: begin_exports */ -#if __GNUC__ >= 4 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) #include "compiler-gcc4.h" -#elif __GNUC__ == 3 -#include "compiler-gcc3.h" #else -#error Compiler too old, need gcc at least gcc 3.x +#error Compiler too old, need at least gcc 4.1.0 #endif /* IWYU pragma: end_exports */