Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-24 Thread Jakub Jelinek
On Wed, Feb 24, 2016 at 10:29:47PM +0300, Ilya Verbin wrote: > Done. > Here is a follow up patch. OK for trunk? Bootstrapped and regtested. Ok with appropriate ChangeLog entry. Jakub

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-24 Thread Ilya Verbin
On Mon, Feb 22, 2016 at 16:13:07 +0100, Thomas Schwinge wrote: > (..., and similar for others.) The if-exists spec function only works > for absolute paths (I have not researched, why?), so it won't locate the > files for relative -Bbuild-gcc/[...] prefixes, and linking will fail: > >

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-24 Thread Ilya Verbin
On Wed, Feb 24, 2016 at 17:13:35 +0100, Thomas Schwinge wrote: > On Tue, 23 Feb 2016 08:37:07 +0100, Tom de Vries > wrote: > > On 22/02/16 19:07, Ilya Verbin wrote: > > > 2016-02-22 18:13 GMT+03:00 Thomas Schwinge: > > >> >On Sat, 20 Feb 2016

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-24 Thread Thomas Schwinge
Hi! On Tue, 23 Feb 2016 08:37:07 +0100, Tom de Vries wrote: > On 22/02/16 19:07, Ilya Verbin wrote: > > 2016-02-22 18:13 GMT+03:00 Thomas Schwinge: > >> >On Sat, 20 Feb 2016 13:54:20 +0300, Ilya Verbin wrote: > >>> >>On Fri,

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-22 Thread Tom de Vries
On 22/02/16 19:07, Ilya Verbin wrote: 2016-02-22 18:13 GMT+03:00 Thomas Schwinge: >On Sat, 20 Feb 2016 13:54:20 +0300, Ilya Verbin wrote: >>On Fri, Feb 19, 2016 at 15:53:08 +0100, Jakub Jelinek wrote: >> >On Wed, Feb 10, 2016 at 08:19:34PM +0300,

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-22 Thread Ilya Verbin
2016-02-22 18:13 GMT+03:00 Thomas Schwinge : > On Sat, 20 Feb 2016 13:54:20 +0300, Ilya Verbin wrote: >> On Fri, Feb 19, 2016 at 15:53:08 +0100, Jakub Jelinek wrote: >> > On Wed, Feb 10, 2016 at 08:19:34PM +0300, Ilya Verbin wrote: >> > > This patch

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-22 Thread Thomas Schwinge
Hi! On Sat, 20 Feb 2016 13:54:20 +0300, Ilya Verbin wrote: > On Fri, Feb 19, 2016 at 15:53:08 +0100, Jakub Jelinek wrote: > > On Wed, Feb 10, 2016 at 08:19:34PM +0300, Ilya Verbin wrote: > > > This patch adds crtoffload{begin,end}.o to all -fopenmp programs, if they > > >

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-22 Thread Jakub Jelinek
On Sat, Feb 20, 2016 at 01:54:20PM +0300, Ilya Verbin wrote: > gcc/ > PR driver/68463 > * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add > crtoffloadbegin.o for -fopenacc/-fopenmp if it exists. > (GNU_USER_TARGET_ENDFILE_SPEC): Add crtoffloadend.o for >

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-20 Thread Ilya Verbin
On Fri, Feb 19, 2016 at 15:53:08 +0100, Jakub Jelinek wrote: > On Wed, Feb 10, 2016 at 08:19:34PM +0300, Ilya Verbin wrote: > > This patch adds crtoffload{begin,end}.o to all -fopenmp programs, if they > > exist. > > I couldn't think of a better solution... > > Tested using the testcase from the

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-19 Thread Mike Stump
On Feb 19, 2016, at 6:53 AM, Jakub Jelinek wrote: > Looking at this, I think I have no problem with crtoffloadbegin.o being > included in all -fopenmp/-fopenacc linked programs/shared libraries, :-) I have a problem with just the normal init path in most executables. It adds

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-19 Thread Jakub Jelinek
On Wed, Feb 10, 2016 at 08:19:34PM +0300, Ilya Verbin wrote: > This patch adds crtoffload{begin,end}.o to all -fopenmp programs, if they > exist. > I couldn't think of a better solution... > Tested using the testcase from the previous mail, e.g.: > > $ gcc -DNUM=1 -c -fopenmp test.c -o obj1.o >

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-02-10 Thread Ilya Verbin
Hi! On Tue, Jan 19, 2016 at 16:32:13 +0300, Ilya Verbin wrote: > On Tue, Jan 19, 2016 at 10:36:28 +0100, Jakub Jelinek wrote: > > On Tue, Jan 19, 2016 at 09:57:01AM +0100, Richard Biener wrote: > > > On Mon, 18 Jan 2016, Ilya Verbin wrote: > > > > On Fri, Jan 15, 2016 at 09:15:01 +0100, Richard

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-01-19 Thread Richard Biener
On Mon, 18 Jan 2016, Ilya Verbin wrote: > On Fri, Jan 15, 2016 at 09:15:01 +0100, Richard Biener wrote: > > On Fri, 15 Jan 2016, Ilya Verbin wrote: > > > II) The __offload_func_table, __offload_funcs_end, __offload_var_table, > > > __offload_vars_end are now provided by the linker script, instead

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-01-19 Thread Jakub Jelinek
On Tue, Jan 19, 2016 at 09:57:01AM +0100, Richard Biener wrote: > On Mon, 18 Jan 2016, Ilya Verbin wrote: > > > On Fri, Jan 15, 2016 at 09:15:01 +0100, Richard Biener wrote: > > > On Fri, 15 Jan 2016, Ilya Verbin wrote: > > > > II) The __offload_func_table, __offload_funcs_end,

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-01-19 Thread Ilya Verbin
On Tue, Jan 19, 2016 at 10:36:28 +0100, Jakub Jelinek wrote: > On Tue, Jan 19, 2016 at 09:57:01AM +0100, Richard Biener wrote: > > On Mon, 18 Jan 2016, Ilya Verbin wrote: > > > On Fri, Jan 15, 2016 at 09:15:01 +0100, Richard Biener wrote: > > > > On Fri, 15 Jan 2016, Ilya Verbin wrote: > > > > >

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-01-18 Thread Ilya Verbin
On Fri, Jan 15, 2016 at 09:15:01 +0100, Richard Biener wrote: > On Fri, 15 Jan 2016, Ilya Verbin wrote: > > II) The __offload_func_table, __offload_funcs_end, __offload_var_table, > > __offload_vars_end are now provided by the linker script, instead of > > crtoffload{begin,end}.o, this allows to

Re: [PATCH][RFC][Offloading] Fix PR68463

2016-01-15 Thread Richard Biener
On Fri, 15 Jan 2016, Ilya Verbin wrote: > Hi! > > Here is my attempt to fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68463 > > This patch does 2 things: > > I) lto-plugin doesn't claim files which contain offload sections, but don't > contain LTO sections. Instead, it writes names of

[PATCH][RFC][Offloading] Fix PR68463

2016-01-14 Thread Ilya Verbin
Hi! Here is my attempt to fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68463 This patch does 2 things: I) lto-plugin doesn't claim files which contain offload sections, but don't contain LTO sections. Instead, it writes names of files with offloading to the temporary file and passes it to