Commit 1318b3e4 authored by Jim Harris's avatar Jim Harris
Browse files

build: add -mno-avx512f to x86_64 builds



valgrind doesn't support AVX-512, and latest compilers
will use newfangled instructions to do simple
integer-to-fp conversions which then break valgrind.

The only place where we would really use or need
AVX-512 is in ISA-L, so disabling those instructions
in SPDK is fine.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I48f3dd4f1b5813485a92c81d01e513c950ada205

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13554


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 0098e636
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -70,6 +70,13 @@ else
COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
endif

ifeq ($(TARGET_MACHINE),x86_64)
# Don't use AVX-512 instructions in SPDK code - it breaks Valgrind for
# some cases where compiler decides to hyper-optimize a relatively
# simple operation (like int-to-float converstion) using AVX-512
COMMON_CFLAGS += -mno-avx512f
endif

ifeq ($(CONFIG_WERROR), y)
COMMON_CFLAGS += -Werror
endif