From: Tobias Burnus Date: Wed, 18 Nov 2020 13:11:27 +0000 (+0100) Subject: testsuite/libgomp.c/usleep.h: Use sleep-loop also for GCN X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb1a4876a0e724ca3962ec14dce9e7819fa72ea5;p=gcc.git 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 (fallback_usleep): Renamed from nvptx_usleep; use also for device={arch(gcn)}. --- diff --git a/libgomp/testsuite/libgomp.c/usleep.h b/libgomp/testsuite/libgomp.c/usleep.h index c01aaa0a88f..669b41cee01 100644 --- a/libgomp/testsuite/libgomp.c/usleep.h +++ b/libgomp/testsuite/libgomp.c/usleep.h @@ -1,7 +1,7 @@ #include int -nvptx_usleep (useconds_t d) +fallback_usleep (useconds_t d) { /* This function serves as a replacement for usleep in this test case. It does not even attempt to be functionally @@ -13,7 +13,8 @@ nvptx_usleep (useconds_t d) return 0; } -#pragma omp declare variant (nvptx_usleep) match(construct={target},device={arch(nvptx)}) +#pragma omp declare variant (fallback_usleep) match(construct={target},device={arch(nvptx)}) +#pragma omp declare variant (fallback_usleep) match(construct={target},device={arch(gcn)}) #pragma omp declare variant (usleep) match(user={condition(1)}) int tgt_usleep (useconds_t d) @@ -21,4 +22,4 @@ tgt_usleep (useconds_t d) return 0; } -#pragma omp declare target to (nvptx_usleep, tgt_usleep) +#pragma omp declare target to (fallback_usleep, tgt_usleep)