From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id BE0CC39BD038; Thu, 22 Apr 2021 06:29:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE0CC39BD038 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-55] Avoid -latomic for amdgcn offloading X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 3cf04d1afa8a4955a0a9a395dd21ce1b6484aa78 X-Git-Newrev: d42088e453042f4f8ba9190a7e29efd937ea2181 Message-Id: <20210422062930.BE0CC39BD038@sourceware.org> Date: Thu, 22 Apr 2021 06:29:30 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 06:29:30 -0000 https://gcc.gnu.org/g:d42088e453042f4f8ba9190a7e29efd937ea2181 commit r12-55-gd42088e453042f4f8ba9190a7e29efd937ea2181 Author: Richard Biener Date: Wed Apr 21 14:54:05 2021 +0200 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. Diff: --- 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 e60fe3664ed..0eea73b144b 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