[dpdk-dev,v2] mk: add tuning for default machine type
Checks
Commit Message
Wile keeping backward compatibility for default machine type, tune
binary for latest generation of cores to benefit more from them.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Bruce Richardson <bruce.richardson@intel.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
v2:
* prevent warning via clang:
bin/sh: line 0: test: -ge: unary operator expected
---
mk/machine/default/rte.vars.mk | 6 ++++++
1 file changed, 6 insertions(+)
@@ -56,3 +56,9 @@
# CPU_ASFLAGS =
MACHINE_CFLAGS += -march=corei7
+
+-include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.toolchain-compat.mk
+
+ifeq ($(shell test -n "$(GCC_VERSION)" && test $(GCC_VERSION) -ge 49 && echo 1), 1)
+MACHINE_CFLAGS += -mtune=intel
+endif