1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
5 # CPUID-related options
7 # This was added to support compiler versions which might not support all the
11 # find out ICC version
13 ICC_MAJOR_VERSION = $(shell icc -dumpversion | cut -f1 -d.)
15 ifeq ($(shell test $(ICC_MAJOR_VERSION) -lt 12 && echo 1), 1)
16 MACHINE_CFLAGS = -xSSE4.2
17 $(warning You are not using ICC 12.x or higher. This is neither supported, nor tested.)
20 # proceed to adjust compiler flags
22 ICC_MINOR_VERSION = $(shell icc -dumpversion | cut -f2 -d.)
24 # replace GCC flags with ICC flags
25 # if icc version >= 12
26 ifeq ($(shell test $(ICC_MAJOR_VERSION) -ge 12 && echo 1), 1)
28 MACHINE_CFLAGS := $(patsubst -march=atom,-xSSSE3_ATOM -march=atom,$(MACHINE_CFLAGS))
30 MACHINE_CFLAGS := $(patsubst -march=corei7,-xSSE4.2 -march=corei7,$(MACHINE_CFLAGS))
32 MACHINE_CFLAGS := $(patsubst -march=corei7-avx,-xAVX,$(MACHINE_CFLAGS))
34 MACHINE_CFLAGS := $(patsubst -march=core-avx-i,-xCORE-AVX-I,$(MACHINE_CFLAGS))
36 MACHINE_CFLAGS := $(patsubst -march=core-avx2,-xCORE-AVX2,$(MACHINE_CFLAGS))
37 # remove westmere flags
38 MACHINE_CFLAGS := $(filter-out -mpclmul -maes,$(MACHINE_CFLAGS))
40 # if icc version == 12.0
41 ifeq ($(shell test $(ICC_MAJOR_VERSION) -eq 12 && test $(ICC_MINOR_VERSION) -eq 0 && echo 1), 1)
43 MACHINE_CFLAGS := $(patsubst -xSSSE3_ATOM,-xSSE3_ATOM,$(MACHINE_CFLAGS))
44 # remove march options
45 MACHINE_CFLAGS := $(patsubst -march=%,-xSSE3,$(MACHINE_CFLAGS))
48 # Disable thunderx PMD for icc <= 16.0
49 ifeq ($(shell test $(ICC_MAJOR_VERSION) -le 16 && echo 1), 1)
50 CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d
53 # Disable event/opdl PMD for icc <= 16.0
54 ifeq ($(shell test $(ICC_MAJOR_VERSION) -le 16 && echo 1), 1)
55 CONFIG_RTE_LIBRTE_PMD_OPDL_EVENTDEV=d