On 2018年10月11日 08:21, Anuj Mittal wrote:
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?
Hi Anuj,
I think so, since var-DPDK_TARGET_MACHINE is `default' which mismatch
with `-march=**' in var-HOST_CC_ARCH
For qemux86-64, while var-DPDK_TARGET_MACHINE is `default', its
`-march=corei7',
it mismatch with `-march=core2' in var-HOST_CC_ARCH
[grep corei -rn mk]
mk/machine/native/rte.vars.mk:35:# so, set the compilation target to be
a corei7, minimum target with SSE4.2.
mk/machine/native/rte.vars.mk:38: MACHINE_CFLAGS = -march=corei7
mk/machine/default/rte.vars.mk:30:MACHINE_CFLAGS += -march=corei7
mk/machine/wsm/rte.vars.mk:30:MACHINE_CFLAGS = -march=corei7 -maes -mpclmul
mk/machine/snb/rte.vars.mk:30:MACHINE_CFLAGS = -march=corei7-avx
mk/machine/nhm/rte.vars.mk:30:MACHINE_CFLAGS = -march=corei
[grep corei -rn mk]
For default, its MACHINE_CFLAGS is ` -march=corei7', and set
`DPDK_TARGET_MACHINE = 'corei5''
does not work, no mk/machine/corei5/rte.vars.mk to support it
I think this fix is not appropriate, please drop it. My suggestion is remove
var-HOST_CC_ARCH from do_compile, V2 incoming
//Hongxu
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 <[email protected]>
---
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/$@/"
}
--
_______________________________________________
meta-intel mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-intel