Re: [PATCH] Avoid -latomic for amdgcn offloading

2021-05-18 Thread Tobias Burnus
On 18.05.21 15:57, Richard Biener wrote: Doh. So -foffload=default -foffloat=nvptx-none=-latomic maybe? We really need a good documentation for -foffload= and something like -foffload=default would be good as well – I think we currently only have 'disabled' and an explicit list. (Documentation

Re: [PATCH] Avoid -latomic for amdgcn offloading

2021-05-18 Thread Richard Biener
On Tue, 18 May 2021, Thomas Schwinge wrote: > Hi! > > On 2021-04-21T09:10:52-0600, Jeff Law via Gcc-patches > wrote: > > On 4/21/2021 6:56 AM, Richard Biener wrote: > >> libatomic isn't built for amdgcn but reduction-16.c adds it > >> via -foffload=-latomic when offloading for nvptx is enabled.

Re: [PATCH] Avoid -latomic for amdgcn offloading

2021-05-18 Thread Thomas Schwinge
Hi! On 2021-04-21T09:10:52-0600, Jeff Law via Gcc-patches wrote: > On 4/21/2021 6:56 AM, Richard Biener wrote: >> libatomic isn't built for amdgcn but reduction-16.c adds it >> via -foffload=-latomic when offloading for nvptx is enabled. (ACK for that problem.) >> The following avoids linker e

Re: [PATCH] Avoid -latomic for amdgcn offloading

2021-04-21 Thread Jeff Law via Gcc-patches
On 4/21/2021 6:56 AM, Richard Biener wrote: 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. Tested on x86_64-unknown-linux-gnu, OK for trunk