From: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@linaro.org> Use ${host} during configure time to detect if we should enable -msse4.2 flag when building with DPDK.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@linaro.org> --- /** Email created from pull request 462 (lumag:default-abi) ** https://github.com/Linaro/odp/pull/462 ** Patch: https://github.com/Linaro/odp/pull/462.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: 92a3ed64c30441cbca76e6f8ab5c086fe0c83a18 **/ platform/linux-generic/Makefile.am | 6 ------ platform/linux-generic/m4/odp_dpdk.m4 | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index bb5bc8134..7f212fe5e 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -13,12 +13,6 @@ AM_CPPFLAGS += $(OPENSSL_CPPFLAGS) AM_CPPFLAGS += $(DPDK_CPPFLAGS) AM_CPPFLAGS += $(NETMAP_CPPFLAGS) -if PKTIO_DPDK -if ARCH_IS_X86 -AM_CFLAGS += -msse4.2 -endif -endif - if !ODP_ABI_COMPAT odpapiplatincludedir= $(includedir)/odp/api/plat odpapiplatinclude_HEADERS = \ diff --git a/platform/linux-generic/m4/odp_dpdk.m4 b/platform/linux-generic/m4/odp_dpdk.m4 index b2193a168..cb2ed60df 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -34,6 +34,12 @@ then ODP_DPDK([$DPDK_PATH], [], [AC_MSG_FAILURE([can't find DPDK])]) + case "${host}" in + i?86* | x86*) + DPDK_CPPFLAGS="${DPDK_CPPFLAGS} -msse4.2" + ;; + esac + AC_DEFINE([ODP_PKTIO_DPDK], [1], [Define to 1 to enable DPDK packet I/O support]) AC_DEFINE_UNQUOTED([ODP_DPDK_ZERO_COPY], [$zero_copy],