DPDK 2.0 contains an updated implementation of rte_memcopy, which
leverages SSE and AVX instrinsics. In versions of GCC <= 4.8.2, it
has been observed that the relevant instrinsics are not defined in
gcc headers, resulting in compile-time errors.
This issue is resolved by enabling the 'mssse3' flag at compile time;
however, it's not possible to pass an additional flag via the command
line without overwriting an existing compiler variable.

Introduce an additonal configuration option to resolve this.

Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com>
---
 acinclude.m4 | 11 +++++++++++
 configure.ac |  1 +
 2 files changed, 12 insertions(+)

diff --git a/acinclude.m4 b/acinclude.m4
index 479da2e..71d3795 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -25,6 +25,17 @@ AC_DEFUN([OVS_ENABLE_WERROR],
         OVS_CFLAGS="$OVS_CFLAGS -Werror"
       fi])])
 
+dnl OVS_ENABLE_SSSE3
+AC_DEFUN([OVS_ENABLE_SSSE3],
+  [AC_ARG_ENABLE(
+     [mssse3],
+     [AC_HELP_STRING([--enable-ssse3], [Add -mssse3 to CFLAGS])],
+     [], [enable_mssse3=no])
+   AC_CONFIG_COMMANDS_PRE(
+     [if test "X$enable_ssse3" = Xyes; then
+        OVS_CFLAGS="$OVS_CFLAGS -mssse3"
+      fi])])
+
 dnl OVS_CHECK_LINUX
 dnl
 dnl Configure linux kernel source tree 
diff --git a/configure.ac b/configure.ac
index 8d47eb9..c5836ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,6 +158,7 @@ OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED])
 OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER])
 OVS_ENABLE_WERROR
 OVS_ENABLE_SPARSE
+OVS_ENABLE_SSSE3
 
 AC_ARG_VAR(KARCH, [Kernel Architecture String])
 AC_SUBST(KARCH)
-- 
1.9.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to