Re: [Patch][gcn, nvptx, offloading] mkoffload – handle -fpic/-fPIC

Andrew Stubbs ams@codesourcery.com
Tue Jun 23 20:02:08 GMT 2020


On 23/06/2020 20:36, Thomas Schwinge wrote:
> Eventually (not now...), instead of special-casing more and more options
> (I somehow doubt that '-fpic', '-fPIC' are the only ones?), shouldn't we
> solve this in some more generic way, like re-invoking the host compiler
> exactly as invoked before (if that makes sense?), or -- freaky ;-) --
> instead of doing the "LTO wrapper thing", pause the host compiler,
> generate offload code, inject that code into the host compiler, and
> directly proceed there?  (That is, do offload code generation as part of
> the host compilation, instead of at link time.)  (Just thinking aloud,
> and without and "depth" -- and any such work will be a bigger, separate
> task, obviously.)

I thought the same, but it's better to fix one problem now than probably 
not getting around to fixing two problems later. In any case, we 
definitely want a white list, and explicit coding is easy to read.

Andrew


More information about the Gcc-patches mailing list