On Wed, 2019-08-28 at 05:06 +0000, Nathan Rossi wrote:
> Create the do_check task to the binutils-cross include. This task can be
> used to execute the binutils test suite for the cross target binutils.
> By default this executes all the check targets of the binutils Makefile,
> this can however be changed by setting MAKE_CHECK_TARGETS to the desired
> test suite target (e.g. check-gas).
>
> The binutils test suites do not require any target execution, as such
> the check target can be run without QEMU or a target device. However
> since the binutils tests do rely on a C compiler there is dependence on
> both gcc and libc in order to run the tests.
>
> Signed-off-by: Nathan Rossi <[email protected]>
> ---
> meta/recipes-devtools/binutils/binutils-cross.inc | 28
> +++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc
> b/meta/recipes-devtools/binutils/binutils-cross.inc
> index 02ec891606..76eb453f0e 100644
> --- a/meta/recipes-devtools/binutils/binutils-cross.inc
> +++ b/meta/recipes-devtools/binutils/binutils-cross.inc
> @@ -36,3 +36,31 @@ do_install () {
> rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || :
> rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || :
> }
> +
> +EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} "
> +MAKE_CHECK_TARGETS ??= "check-binutils check-gas check-gold check-ld
> check-libiberty"
> +
> +python () {
> + # crosssdk deps have different virtual targets
> + if bb.data.inherits_class('crosssdk', d):
> + d.appendVarFlag("do_check", "depends", "
> virtual/${TARGET_PREFIX}gcc-crosssdk:do_populate_sysroot")
> + d.appendVarFlag("do_check", "depends", "
> virtual/nativesdk-${TARGET_PREFIX}compilerlibs:do_populate_sysroot")
> + else:
> + d.appendVarFlag("do_check", "depends", "
> virtual/${TARGET_PREFIX}gcc:do_populate_sysroot")
> + d.appendVarFlag("do_check", "depends", "
> virtual/${TARGET_PREFIX}compilerlibs:do_populate_sysroot")
> +}
I'm torn here on whether we should do:
do_check[depends] += "${BINUTILS_TARGETDEPS}"
BINUTILS_TARGETDEPS = "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot
virtual/${TARGET_PREFIX}compilerlibs:do_populate_sysroot"
BINUTILS_TARGETDEPS_class-crosssdk =
"virtual/${TARGET_PREFIX}gcc-crosssdk:do_populate_sysroot
virtual/nativesdk-${TARGET_PREFIX}compilerlibs:do_populate_sysroot"
instead of the above.
Cheers,
Richard
> +do_check[depends] += "dejagnu-native:do_populate_sysroot
> expect-native:do_populate_sysroot"
> +do_check[depends] += "virtual/libc:do_populate_sysroot"
> +do_check[dirs] = "${B}"
> +do_check[nostamp] = "1"
> +do_check() {
> + # need to inject CC and CXX as the target CC and CXX with sysroot
> + oe_runmake -i ${MAKE_CHECK_TARGETS} \
> + RUNTESTFLAGS=" \
> + CC='${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET}
> ${TUNE_CCARGS}' \
> + CXX='${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET}
> ${TUNE_CCARGS}' \
> + "
> +}
> +addtask check after do_compile
> +
> ---
> 2.23.0.rc1
>
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core