>-----Original Message----- >From: Gcc-patches [mailto:[email protected]] On Behalf >Of Tom de Vries >Sent: Friday, July 3, 2020 6:52 AM >To: Moore, Catherine <[email protected]>; Burnus, Tobias ><[email protected]>; gcc-patches <[email protected]>; >Jakub Jelinek <[email protected]> >Cc: Schwinge, Thomas <[email protected]>; Stubbs, >Andrew <[email protected]> >Subject: Re: [Patch][gcn, nvptx, offloading] mkoffload – handle -fpic/-fPIC > >On 6/26/20 9:35 PM, Moore, Catherine wrote: >> Hi Tom, >> >> It doesn't look like you were explicitly cc'd on this patch and probably >haven't seen it. Would you mind taking a look and approving the nvptx >portions? >> > >[ thanks for the ping, I think was explicitly cc-ed though. I'm usually >not too fast in reviewing, and this time a vacation added to that. ] > >The patch looks good to me.
Thanks for the review. Catherine > >I tried out the patch with one test-case and -pie -fPIC/-fpic already >seems to works, so perhaps we could have at least one test-case >exercising this in libgomp? That sounds easier to do than the >shared-lib test-case. > >I think it's a good idea though to do fPIE/fpie as well, either in this >patch or as follow-up. > >Thanks, >- Tom > >> Thanks, >> Catherine >> >>> -----Original Message----- >>> From: Gcc-patches [mailto:[email protected]] On >Behalf >>> Of Burnus, Tobias >>> Sent: Tuesday, June 23, 2020 11:21 AM >>> To: gcc-patches <[email protected]>; Jakub Jelinek >>> <[email protected]> >>> Cc: Stubbs, Andrew <[email protected]>; Schwinge, >Thomas >>> <[email protected]> >>> Subject: [Patch][gcn, nvptx, offloading] mkoffload – handle -fpic/-fPIC >>> >>> If the offloading code is (only) in a library, one can come up >>> with the idea to build those parts as shared library – and link >>> it to the nonoffloading code.(*) >>> >>> Currently, this fails as the mkoffload calls the nonoffloading >>> compiler without the -fpic/-fPIC flags, even though the compiler >>> was originally invoked with those options. – And at some point, >>> the linker then complains. >>> >>> This patch simply adds -fpic/-fPIC to the calls to the nonoffloading >>> ("host") compiler, invoked from mkoffload, if they were present before. >>> >>> For the testcase at hand, this works with both AMDGCN and nvptx >>> with the attached patch. >>> >>> OK for the trunk? >>> >>> Tobias >>> >>> PS: I think as mid-/longterm project it would be nice to test this >>> in the testsuite, but that's unfortunately a larger task. >>> >>> (*) Thomas mentioned that this is supposed to work also in more >>> complex cases than the one I outlined, although, that is probably >>> currently the most common one. >>> >>> ----------------- >>> Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 >München / >>> Germany >>> Registergericht München HRB 106955, Geschäftsführer: Thomas >Heurung, >>> Alexander Walter
