[meta-intel] [meta-dpdk][PATCH] dpdk: workaround sse mismatch error
Anuj Mittal
anuj.mittal at intel.com
Wed Oct 10 17:21:59 PDT 2018
Hi Hongxu
On 10/10/2018 11:18 PM, Hongxu Jia wrote:
> Since commit `7f6bffb dpdk: support build with external & multilib toolchains' applied,
> it added var-HOST_CC_ARCH in which has option `-march=**' to enable specific SSE for
> specific arch that causing SSE mismatch error while compiling
> [snip]
> | recipe-sysroot-native/usr/lib/i586-wrs-linux/gcc/i586-wrs-linux/8.2.0/include/
> xmmintrin.h:1232:1: error: inlining failed in call to always_inline '_mm_sfence':
> target specific option mismatch
> | _mm_sfence (void)
> | ^~~~~~~~~~
> | In file included from git/lib/librte_eal/linuxapp/eal/eal_thread.c:16:
> | git/i686-native-linuxapp-gcc/include/rte_atomic.h:26:19: note: called from here
> | #define rte_wmb() _mm_sfence()
> | ^~~~~~~~~~~~
> | git/lib/librte_eal/linuxapp/eal/eal_thread.c:155:3: note: in expansion of macro 'rte_wmb'
> | rte_wmb();
> [snip]
>
> Choose `-march=native', which will select what is available on the processor. Although
> it disable previously `-march=**' in var-HOST_CC_ARCH, but others options in var-HOST_CC_ARCH
> (such as security flags `-fstack-protector-strong -D_FORTIFY_SOURCE=2') still works.
>
Is it possible that the value of -march is also being defined from
somewhere within dpdk leading to a mismatch?
> Refers:
> https://stackoverflow.com/questions/10686638/whats-the-differrence-among-cflgs-sse-options-of-msse-msse2-mssse3-msse4
> https://stackoverflow.com/questions/35772562/inlining-failed-in-call-to-always-inline-m128i-mm-cvtepu8-epi32-m128i-t
> https://bugzilla.redhat.com/show_bug.cgi?id=1092991
> https://bugzilla.gnome.org/show_bug.cgi?id=670690
> https://stackoverflow.com/questions/51003218/gcc-target-for-avx2-disabling-sse-instruction-set
>
> Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
> ---
> recipes-extended/dpdk/dpdk.inc | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc
> index 194986b..b893e16 100644
> --- a/recipes-extended/dpdk/dpdk.inc
> +++ b/recipes-extended/dpdk/dpdk.inc
> @@ -102,18 +102,18 @@ do_compile () {
>
> cd ${S}/${RTE_TARGET}
> oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \
> - EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
> + EXTRA_CFLAGS="${HOST_CC_ARCH} -march=native ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
> CROSS="${TARGET_PREFIX}" \
> prefix="" LDFLAGS="${TUNE_LDARGS}" WERROR_FLAGS="-w" V=1
>
> cd ${S}/examples/
> oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
> - EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
> + EXTRA_CFLAGS="${HOST_CC_ARCH} -march=native ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
> CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/"
>
> cd ${S}/test/
> oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
> - EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
> + EXTRA_CFLAGS="${HOST_CC_ARCH} -march=native ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
> CROSS="${TARGET_PREFIX}" O="${S}/test/$@/"
> }
>
>
More information about the meta-intel
mailing list