[Bug driver/114717] '-fcf-protection' vs. offloading compilation

2024-04-15 Thread tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

--- Comment #5 from Thomas Schwinge  ---
Distributions injecting some '-fcf-protection' by default could also inject
'-foffload-options=amdgcn-amdhsa=-fno-cf-protection' (or similar) to keep the
default case of offloading compilation working, but then with explicit
user-specified '-fcf-protection', the user would still get an error for
offloading compilation -- which may actually be desirable (for some)?

Alternatively: yes, the 'mkoffload's could filter that out -- but there is a
policy question, whether 'mkoffload's are permitted to silently drop
user-requested '-f[...]' flags?  Probably that's OK if the '-fcf-protection'
documentation is updated accordingly?

I guess I don't have any strong preference.  ;-)

[Bug driver/114717] '-fcf-protection' vs. offloading compilation

2024-04-15 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

--- Comment #4 from Richard Biener  ---
(In reply to Andrew Stubbs from comment #3)
> Can this be filtered (safely) in mkoffload? That tool is
> offload-target-specific, so no problem with "if offload target were to
> support it".

Yes, I think so.

[Bug driver/114717] '-fcf-protection' vs. offloading compilation

2024-04-15 Thread ams at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

--- Comment #3 from Andrew Stubbs  ---
Can this be filtered (safely) in mkoffload? That tool is
offload-target-specific, so no problem with "if offload target were to support
it".

[Bug driver/114717] '-fcf-protection' vs. offloading compilation

2024-04-15 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

Richard Biener  changed:

   What|Removed |Added

   Keywords||lto
   Last reconfirmed||2024-04-15
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #2 from Richard Biener  ---
Hmm, but if offload targets were to support it, not forwarding it would be
wrong.  That said, the way we communicate this is a bit odd.

[Bug driver/114717] '-fcf-protection' vs. offloading compilation

2024-04-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

Andrew Pinski  changed:

   What|Removed |Added

URL|https://github.com/gcc-mirr |
   |or/gcc/commit/1bf18629c54ad |
   |f4893c8db5227a36e1952ee69a3 |
   |#commitcomment-140648051|
  Component|target  |driver

--- Comment #1 from Andrew Pinski  ---
https://github.com/gcc-mirror/gcc/commit/1bf18629c54adf4893c8db5227a36e1952ee69a3#commitcomment-140648051

This option should be masked off when calling the offload-lto ...