diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-runtime.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-runtime.inc | 42 |
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 = "\ | |||
277 | SUMMARY_libitm-dev = "GNU transactional memory support library - development files" | 277 | SUMMARY_libitm-dev = "GNU transactional memory support library - development files" |
278 | FILES_libitm-staticdev = "${libdir}/libitm.a" | 278 | FILES_libitm-staticdev = "${libdir}/libitm.a" |
279 | SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files" | 279 | SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files" |
280 | |||
281 | require gcc-testsuite.inc | ||
282 | |||
283 | EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} " | ||
284 | |||
285 | MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}" | ||
286 | # prettyprinters and xmethods require gdb tooling | ||
287 | MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp" | ||
288 | MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'" | ||
289 | |||
290 | # specific host and target dependencies required for test suite running | ||
291 | do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot" | ||
292 | do_check[depends] += "virtual/libc:do_populate_sysroot" | ||
293 | # only depend on qemu if targeting linux user execution | ||
294 | do_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) | ||
296 | do_check[prefuncs] += "extend_recipe_sysroot" | ||
297 | do_check[prefuncs] += "check_prepare" | ||
298 | do_check[dirs] = "${WORKDIR}/dejagnu ${B}" | ||
299 | do_check[nostamp] = "1" | ||
300 | do_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 | } | ||
320 | addtask check after do_compile do_populate_sysroot | ||
321 | |||