Fix the build on GCC 4.x after 812e8f2a1

The ancient GCC 4.x doesn't understand the "optimize" attribute until 4.4.
Fix the build on platforms with GCC 4.x < 4.4 by limiting the DONT_VECTORIZE
definition to GCC 5 and greater.

Noticed and patch proposed by Warner Losh <imp@FreeBSD.org>.
dev
Conrad Meyer 2019-08-08 14:16:36 -07:00
parent ff304e9e65
commit ff6c81d90c
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@
}
/* vectorization */
#if !defined(__clang__) && defined(__GNUC__)
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 5
# define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize")))
#else
# define DONT_VECTORIZE