From 6614ff3213ceaf3ac425e2d34cea5891b3d13c1b Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Wed, 7 Feb 2018 12:57:16 -0800 Subject: [PATCH] Add workaround to get clang to accept avx-512 instructions --- sysdeps/x86_64/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index 8148e12874..54e2ac7151 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -1,6 +1,13 @@ # The i387 `long double' is a distinct type we support. long-double-fcts = yes +ifeq ($(with-clang),yes) +# Clang integrated assembler objects to AVX-512 instructions if not specifically +# allowed. (-mavx512 is the preferred option but does not work in 5.0) +ASFLAGS-.o += -march=knl +ASFLAGS-.os += -march=knl +endif + ifeq ($(subdir),csu) gen-as-const-headers += link-defines.sym endif