From 5e34c4c5052cbae16e6da01f42942c1db9de0c38 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 8 Aug 2019 20:09:36 +0000 Subject: [PATCH] Stopgap fix for gcc platforms. Our in-tree gcc doesn't have a no-tree-vectorize optimization knob, so we get a warning that it's unused. This causes the build to fail on all our gcc platforms. Add a quick version check as a stop-gap measure to get CI building again. --- sys/contrib/zstd/lib/common/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/zstd/lib/common/compiler.h b/sys/contrib/zstd/lib/common/compiler.h index 87bf51ae8c89..0405cf692cb8 100644 --- a/sys/contrib/zstd/lib/common/compiler.h +++ b/sys/contrib/zstd/lib/common/compiler.h @@ -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