[dpdk-dev,RFC,v3] mk: add tuning for default machine type

Message ID 20171216015050.54010-1-ferruh.yigit@intel.com (mailing list archive)
State RFC, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ferruh Yigit Dec. 16, 2017, 1:50 a.m. UTC
  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

v3:
* add missing RFC tag to the patch title
---
 mk/machine/default/rte.vars.mk | 6 ++++++
 1 file changed, 6 insertions(+)
  

Patch

diff --git a/mk/machine/default/rte.vars.mk b/mk/machine/default/rte.vars.mk
index 71a25bcae..914964302 100644
--- a/mk/machine/default/rte.vars.mk
+++ b/mk/machine/default/rte.vars.mk
@@ -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