[v2,2/2] travis: build dpdk for general cpu

Message ID 1507309206-28423-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • travis: build dpdk for general cpu
Related show

Commit Message

Github ODP bot Oct. 6, 2017, 5 p.m.
From: Maxim Uvarov <maxim.uvarov@linaro.org>


disable cpu optimisations for code run in Travis env.
By default dpdk uses -march=corei7-avx with generates
specific instructions and execution fails with:
Please check that RTE_MACHINE is set correctly.
That is caused by buggy dpdk makefile:

MACHINE_CFLAGS = -march=native

SSE42_SUPPORT=$(shell $(CC) -march=native -dM -E - </dev/null | grep SSE4_2)
ifeq ($(SSE42_SUPPORT),)
  CPU_SSE42_SUPPORT = $(shell grep SSE4\.2 /var/run/dmesg.boot 2>/dev/null)
  ifneq ($(CPU_SSE42_SUPPORT),)
    MACHINE_CFLAGS = -march=corei7
  endif
endif

More info here:
https://github.com/Linaro/odp/pull/218

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 225 (muvarov:master_dpdkgeneric)
 ** https://github.com/Linaro/odp/pull/225
 ** Patch: https://github.com/Linaro/odp/pull/225.patch
 ** Base sha: a63f25ff2994b2df78c24f1f8b63d0e06628eb68
 ** Merge commit sha: 797e6fc884121eb81a98c494145466706013b66f
 **/
 .travis.yml              | 2 +-
 scripts/build-pktio-dpdk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/.travis.yml b/.travis.yml
index 7aff2e623..4bb7537df 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -160,7 +160,7 @@  install:
             pushd ${TARGET}
             sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
             popd
-            make install T=${TARGET} EXTRA_CFLAGS="-fPIC"
+            make install T=${TARGET} EXTRA_CFLAGS="-fPIC" MACHINE_CFLAGS=""
             rm -r ./doc ./${TARGET}/app ./${TARGET}/build
             popd
           fi
diff --git a/scripts/build-pktio-dpdk b/scripts/build-pktio-dpdk
index 6c6830ac0..e12bf576d 100755
--- a/scripts/build-pktio-dpdk
+++ b/scripts/build-pktio-dpdk
@@ -22,7 +22,7 @@  sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
 popd
 
 #Build DPDK
-make install T=${TARGET} EXTRA_CFLAGS="-fPIC"
+make install T=${TARGET} EXTRA_CFLAGS="-fPIC" MACHINE_CFLAGS=""
 popd
 
 #Build ODP