acl: fix native build on haswell with icc
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Fri, 20 Nov 2015 15:38:50 +0000 (15:38 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 20 Nov 2015 16:16:35 +0000 (17:16 +0100)
commita49886ddacf178215d6a0dcb1f2183c86584fc1f
tree7f50e4031a3bee186a6e46aa0adec0b2ec0f95f2
parente64833f2273ac67becbca10d9f2f1598872dc99e
acl: fix native build on haswell with icc

On HSW box with icc 16.0.0 build for x86_64-native-linuxapp-icc fails with:
icc: command line warning #10120: overriding '-march=native' with '-msse4.1'
...
dpdk.org/x86_64-native-linuxapp-icc/include/rte_memcpy.h(96): error: identifier "__m256i" is undefined

The reason is that icc treats "-march=native ... -msse4.1"
in a different way, then gcc and clang.
For icc it means override all flags enabled with
'-march=native' with '-msse4.1'.
Even when '-march=native' is a superset for '-msse4.1'.
To overcome the problem add a check is SSE4.1 compilation flag already enabled.
If yes, then no need to add '-msse4.1'
Similar change for avx2 compilation option.

Fixes: 074f54ad03ee ("acl: fix build and runtime for default target")

Reported-by: Declan Doherty <declan.doherty@intel.com>
Reported-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
lib/librte_acl/Makefile