At least here newlib is build without HAVE_POSIX / 'posix' subdirectory and, hence, among others without 'usleep'.
For nvptx, the same issue exists – and there 'omp declare variant' is used to call a burn-cycles loop as replacement. Affects target-32.c and thread-limit-2.c. OK? Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
testsuite/libgomp.c/usleep.h: Use sleep-loop also for GCN As typically configured, newlib's libc.a does not build 'posix' and, hence, usleep is not available. Thus, use the same fallback as for nvptx. libgomp/ * testsuite/libgomp.c/usleep.h (nvptx_usleep): Also use for device={arch(gcn)}. diff --git a/libgomp/testsuite/libgomp.c/usleep.h b/libgomp/testsuite/libgomp.c/usleep.h index c01aaa0a88f..1535ad06201 100644 --- a/libgomp/testsuite/libgomp.c/usleep.h +++ b/libgomp/testsuite/libgomp.c/usleep.h @@ -14,6 +14,7 @@ nvptx_usleep (useconds_t d) } #pragma omp declare variant (nvptx_usleep) match(construct={target},device={arch(nvptx)}) +#pragma omp declare variant (nvptx_usleep) match(construct={target},device={arch(gcn)}) #pragma omp declare variant (usleep) match(user={condition(1)}) int tgt_usleep (useconds_t d)