浏览代码

zstd: Fix incorrect pragma error on LCC compiler

LCC (Elbrus C Compiler) doesn't understand some of
GCC pragmas, despite of declaring itself GCC-aware.
The pragma of subject is the one that forbids vectorizing.
Actually, LCC don't vectorize anything unless explicitly
said to, so this pragma may be safely omitted and thus
not cause an error. This patch does this.
makise-homura 4 年之前
父节点
当前提交
77c237d219
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Utilities/cmzstd/lib/common/compiler.h

+ 1 - 1
Utilities/cmzstd/lib/common/compiler.h

@@ -139,7 +139,7 @@
 
 
 /* vectorization
 /* vectorization
  * older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax */
  * older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax */
-#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__)
+#if !defined(__INTEL_COMPILER) && !defined(__clang__) && !defined(__LCC__) && defined(__GNUC__)
 #  if (__GNUC__ == 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5)
 #  if (__GNUC__ == 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5)
 #    define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize")))
 #    define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize")))
 #  else
 #  else