summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-runtime.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-runtime.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 22c1d78dd1..2da3c02ef0 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -277,3 +277,45 @@ FILES_libitm-dev = "\
277SUMMARY_libitm-dev = "GNU transactional memory support library - development files" 277SUMMARY_libitm-dev = "GNU transactional memory support library - development files"
278FILES_libitm-staticdev = "${libdir}/libitm.a" 278FILES_libitm-staticdev = "${libdir}/libitm.a"
279SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files" 279SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files"
280
281require gcc-testsuite.inc
282
283EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} "
284
285MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}"
286# prettyprinters and xmethods require gdb tooling
287MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp"
288MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'"
289
290# specific host and target dependencies required for test suite running
291do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot"
292do_check[depends] += "virtual/libc:do_populate_sysroot"
293# only depend on qemu if targeting linux user execution
294do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}"
295# extend the recipe sysroot to include the built libraries (for qemu usermode)
296do_check[prefuncs] += "extend_recipe_sysroot"
297do_check[prefuncs] += "check_prepare"
298do_check[dirs] = "${WORKDIR}/dejagnu ${B}"
299do_check[nostamp] = "1"
300do_check() {
301 export DEJAGNU="${WORKDIR}/dejagnu/site.exp"
302
303 # HACK: this works around the configure setting CXX with -nostd* args
304 sed -i 's/-nostdinc++ -nostdlib++//g' $(find ${B} -name testsuite_flags | head -1)
305 # HACK: this works around the de-stashing changes to configargs.h, as well as recipe-sysroot changing the content
306 sed -i '/static const char configuration_arguments/d' ${B}/gcc/configargs.h
307 ${CC} -v 2>&1 | grep "^Configured with:" | \
308 sed 's/Configured with: \(.*\)/static const char configuration_arguments[] = "\1";/g' >> ${B}/gcc/configargs.h
309
310 if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then
311 # qemu user has issues allocating large amounts of memory
312 export G_SLICE=always-malloc
313 # no test should need more that 10G of memory, this prevents tests like pthread7-rope from leaking memory
314 ulimit -m 4194304
315 ulimit -v 10485760
316 fi
317
318 oe_runmake -i ${MAKE_CHECK_TARGETS} RUNTESTFLAGS="${MAKE_CHECK_RUNTESTFLAGS}"
319}
320addtask check after do_compile do_populate_sysroot
321