Re: [Patch] libgomp: Add, if existing, -latomic to libgomp.spec --as-needed (was: Re: [RFC] Offloading and automatic linking of libraries)

2020-10-13 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 12, 2020 at 05:51:17PM +0200, Tobias Burnus wrote: > first: *PING*. > > secondly, I think the change to testsuite/lib/libgomp.exp's libgomp_init > is also needed. > (Hence, I now added it.) I have a too new system-installed libatomic to > be sure that > it fails without. I think for l

Re: [Patch] libgomp: Add, if existing, -latomic to libgomp.spec --as-needed (was: Re: [RFC] Offloading and automatic linking of libraries)

2020-10-12 Thread Tobias Burnus
Hi all, first: *PING*. secondly, I think the change to testsuite/lib/libgomp.exp's libgomp_init is also needed. (Hence, I now added it.) I have a too new system-installed libatomic to be sure that it fails without. OK? Tobias - Mentor Graphics (Deutschland) GmbH, Arnulfstraße

Re: [Patch] libgomp: Add, if existing, -latomic to libgomp.spec --as-needed (was: Re: [RFC] Offloading and automatic linking of libraries)

2020-10-02 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 02, 2020 at 05:33:13PM +, Joseph Myers wrote: > On Fri, 2 Oct 2020, Tobias Burnus wrote: > > > However, this flag can be added into the offload-target's libgomp.spec, > > which avoids all kind of issues. That's what this patch now does. > > > > I tested it with x86_64-gnu-linux w/

Re: [Patch] libgomp: Add, if existing, -latomic to libgomp.spec --as-needed (was: Re: [RFC] Offloading and automatic linking of libraries)

2020-10-02 Thread Joseph Myers
On Fri, 2 Oct 2020, Tobias Burnus wrote: > However, this flag can be added into the offload-target's libgomp.spec, > which avoids all kind of issues. That's what this patch now does. > > I tested it with x86_64-gnu-linux w/o + w/ nvptx-none. Result: > * x86_64-gnu-linux's libgomp.spec: > "*link

[Patch] libgomp: Add, if existing, -latomic to libgomp.spec --as-needed (was: Re: [RFC] Offloading and automatic linking of libraries)

2020-10-02 Thread Tobias Burnus
On 10/2/20 12:55 AM, Joseph Myers wrote: As discussed in bug 81358, I think --as-needed -latomic --no-as-needed should be used by the driver by default (when the compiler is configured with libatomic supported). I make a thinko initially by believing that the '-latomic' has to be specified by

Re: [RFC] Offloading and automatic linking of libraries

2020-10-01 Thread Joseph Myers
On Thu, 24 Sep 2020, Tobias Burnus wrote: > Hi all, > > we got the user comment that it is far from obvious to > use -foffload=-latomic if the following error shows up: > > unresolved symbol __atomic_compare_exchange_16 > collect2: error: ld returned 1 exit status > mkoffload: fatal error:

Re: [RFC] Offloading and automatic linking of libraries

2020-09-24 Thread Tobias Burnus
On 9/24/20 8:40 AM, Tom de Vries wrote: Maybe we could require building libatomic for nvptx. If one does not explicitly disable it, it builds,* which I think is a good default. Additionally, libatomic is only very rarely needed on x86-64 + nvptx and only somewhat regularly on PowerPC + nvptx.

Re: [RFC] Offloading and automatic linking of libraries

2020-09-23 Thread Tom de Vries
On 9/24/20 8:32 AM, Tobias Burnus wrote: > Hi all, > > we got the user comment that it is far from obvious to > use  -foffload=-latomic if the following error shows up: > > unresolved symbol __atomic_compare_exchange_16 > collect2: error: ld returned 1 exit status > mkoffload: fatal error: >

[RFC] Offloading and automatic linking of libraries

2020-09-23 Thread Tobias Burnus
Hi all, we got the user comment that it is far from obvious to use -foffload=-latomic if the following error shows up: unresolved symbol __atomic_compare_exchange_16 collect2: error: ld returned 1 exit status mkoffload: fatal error: /powerpc64le-none-linux-gnu-accel-nvptx-none-gcc returned