On 09/11/2015 04:23 PM, Joseph Myers wrote:
On Thu, 10 Sep 2015, Bernd Schmidt wrote:

On 09/10/2015 03:41 PM, Joseph Myers wrote:
Ping^2.  This patch
<https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01748.html> is still
pending review.

No fundamental objections, but I have some questions. Cuold you describe
what the handling of flags/lang_mask accomplishes in this patch? Would
option handling be simpler if the creation/compilation of the extra file
happened in lto_wrapper (where we already do similar things through
mkoffload)?

The point of the lang_mask handling is that if, say, we're compiling C++
or Fortran code, with options that aren't valid for C, we mustn't pass
those options to cc1 when building the constructor as C code, but we do
still need to pass options valid for C (which might e.g. affect the ABI).
[...]
I don't see lto-wrapper as being any easier as a place to do this; no
doubt lto-wrapper or collect2 could create the file and call back into the
driver to compile it, but I don't see the advantage in doing that over
having the driver (which already has all the relevant information, since
it's coming from the command line rather than inspection of object files
being linked) do it.

The point would be that lto_wrapper already produces such an appropriate set of options. But I guess if you're thinking ahead to using this filtering in gcc.c for other purposes then that's also a good argument. So, patch is ok, but please update the comment for give_switch (document the new behaviour and that it depends on a global variable).

I expect you know best what to do in the OpenACC testsuite driver, but you might want to run the libgomp.exp parts by Jakub. If the testsuite parts are independent of the rest of the patch, please repost them separately.


Bernd

Reply via email to