From d42088e453042f4f8ba9190a7e29efd937ea2181 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 21 Apr 2021 14:54:05 +0200 Subject: [PATCH] Avoid -latomic for amdgcn offloading libatomic isn't built for amdgcn but reduction-16.c adds it via -foffload=-latomic when offloading for nvptx is enabled. The following avoids linker errors when offloading to amdgcn is enabled as well. 2021-04-21 Richard Biener libgomp/ * testsuite/libgomp.c-c++-common/reduction-16.c: Use -latomic only on nvptx-none. --- libgomp/testsuite/libgomp.c-c++-common/reduction-16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgomp/testsuite/libgomp.c-c++-common/reduction-16.c b/libgomp/testsuite/libgomp.c-c++-common/reduction-16.c index e60fe36..0eea73b 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/reduction-16.c +++ b/libgomp/testsuite/libgomp.c-c++-common/reduction-16.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-additional-options "-foffload=-latomic" { target offload_target_nvptx } } */ +/* { dg-additional-options "-foffload=nvptx-none=-latomic" { target offload_target_nvptx } } */ #include -- 2.7.4