configure: error early on too old compier
authorJens Axboe <axboe@kernel.dk>
Sat, 25 Jul 2020 14:01:03 +0000 (08:01 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 25 Jul 2020 14:01:03 +0000 (08:01 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
configure

index b079a2a50e282c44f627e68329da4af3ff5471b6..6a7bdeef31982eb2180bc9afb974c4cee3c68fec 100755 (executable)
--- a/configure
+++ b/configure
@@ -495,6 +495,20 @@ else
   fatal "compile test failed"
 fi
 
+##########################################
+# check compiler version
+
+cat > $TMPC <<EOF
+#include "$(pwd)/compiler/compiler.h"
+int main(void)
+{
+  return 0;
+}
+EOF
+if ! compile_prog "" "" "compiler check"; then
+  fatal "Your compiler is too old, needs GCC 4.9 or higher"
+fi
+
 ##########################################
 # check endianness
 if test "$bigendian" != "yes" ; then