configure: check for C11 atomics support
Since
3932f8be718fc4ca3b863c51c0d567821d75c003 ("arch/arch.h: Introduce
atomic_{load_acquire,store_release}()") fio has needed C11 atomic
support and this is only provided from gcc 4.9 / clang 3.6 onwards
(http://stdatomic.gforge.inria.fr/#sec-2 ). Make this clearer by
doing the following:
- Add configure check for C11 atomics support and bail out with a
(friendly) message pointing at compiler version if it's not there
- Remove the minimum compiler version check from compiler.h as it is now
redundant
I've avoided doing an explicit compiler version check because Apple's
clang can have a wildly different version to upstream
(https://stackoverflow.com/a/
33614612 ).
Tested on:
- CentOS 7 with default gcc 4.8.5 (correctly errors with message)
- CentOS 7 docker container using llvm-toolset-7 to provide clang 5.0.1
(works)
- CentOS 7 docker container using devtool-toolset-7 to provide gcc 7.3.1
(works)
- Ubuntu 16.04 with clang-3.5 (correctly errors with message)
- Ubuntu 16.04 with clang-3.6 installed (works)
- macOS 10.14.6 with clang-1001.0.46.4 (works)
v2:
- Rebase
- Reword failure message and stop mentioning fio version number
Fixes: https://github.com/axboe/fio/issues/1047
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>