summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2018-11-03 01:06:32 +0000
committerThomas Monjalon <thomas@monjalon.net>2018-11-04 21:55:17 +0100
commit8d07c82b239f7782be0d3afbb626390e2cb0c8f5 (patch)
tree73e05ae924d629755739721ce09feff85f2423b0 /mk
parentc12ade20c27658d488439a55f4b6d88a6f0637bf (diff)
downloaddpdk-8d07c82b239f7782be0d3afbb626390e2cb0c8f5.zip
dpdk-8d07c82b239f7782be0d3afbb626390e2cb0c8f5.tar.gz
dpdk-8d07c82b239f7782be0d3afbb626390e2cb0c8f5.tar.xz
mk: disable gcc AVX512F support
This is a workaround to prevent a crash, which might be caused by optimization of newer gcc (7.3.0) on Intel Skylake. This disables AVX512F support of gcc by adding -mno-avx512f if it is disabled in DPDK (CONFIG_RTE_ENABLE_AVX512=n). This does not apply to the meson build as that doesn't have such an option but always enable AVX512F whenever supported. Bugzilla ID: 97 Cc: stable@dpdk.org Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/rte.cpuflags.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index 43ed841..c3291b1 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -68,6 +68,11 @@ endif
ifneq ($(filter $(AUTO_CPUFLAGS),__AVX512F__),)
ifeq ($(CONFIG_RTE_ENABLE_AVX512),y)
CPUFLAGS += AVX512F
+else
+# disable AVX512F support of gcc as a workaround for Bug 97
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+MACHINE_CFLAGS += -mno-avx512f
+endif
endif
endif