aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>2018-02-09 02:55:49 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-02-19 14:49:52 +0300
commit7b98d4d5018461db83c3feef696b4470674844de (patch)
tree0c18eb13767ba4499ed07b2701bc2886d6c296e1 /platform
parentff6fdd70a2b07bee11b708f5fd13350c5740de0e (diff)
linux-gen: set DPDK's -msse4.2 flag during configure
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.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/Makefile.am6
-rw-r--r--platform/linux-generic/m4/odp_dpdk.m46
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],