[meta-intel] [meta-dpdk][PATCH] dpdk: support build with external & multilib toolchains
Arsalan Awan
Arsalan_Awan at mentor.com
Tue Oct 2 12:05:28 PDT 2018
From: "Arsalan H. Awan" <Arsalan_Awan at mentor.com>
This fixes dpdk build when using an external toolchain by adding
the HOST_CC_ARCH & TOOLCHAIN_OPTIONS to EXTRA_CFLAGS the way
standard Yocto does it to gather all the necessary flags for
compilation.
The TOOLCHAIN_OPTIONS variable also provides the sysroot flag, so
no need to explicitly provide the sysroot.
This commit also fixes the build when using a multilib toolchain
by adding the LDEMULATION flags to the LDFLAGS via TUNE_LDARGS
which are required while linking with a multilib toolchain.
Signed-off-by: Arsalan H. Awan <Arsalan_Awan at mentor.com>
---
recipes-extended/dpdk/dpdk.inc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc
index 9026dfe..1b77d61 100644
--- a/recipes-extended/dpdk/dpdk.inc
+++ b/recipes-extended/dpdk/dpdk.inc
@@ -101,18 +101,18 @@ do_compile () {
cd ${S}/${RTE_TARGET}
oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \
- EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \
+ EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
CROSS="${TARGET_PREFIX}" \
- prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1
+ 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="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \
+ EXTRA_CFLAGS="${HOST_CC_ARCH} ${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="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \
+ EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
CROSS="${TARGET_PREFIX}" O="${S}/test/$@/"
}
--
2.11.1
More information about the meta-intel
mailing list