public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114717] New: '-fcf-protection' vs. offloading compilation
@ 2024-04-15  8:07 tschwinge at gcc dot gnu.org
  2024-04-15  8:28 ` [Bug driver/114717] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2024-04-15  8:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

            Bug ID: 114717
           Summary: '-fcf-protection' vs. offloading compilation
           Product: gcc
           Version: 14.0
               URL: https://github.com/gcc-mirror/gcc/commit/1bf18629c54ad
                    f4893c8db5227a36e1952ee69a3#commitcomment-140648051
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: ams at gcc dot gnu.org, vries at gcc dot gnu.org
  Target Milestone: ---
            Target: GCN, nvptx

If '-fcf-protection' is in effect (as, for example, enabled by default in
certain distributions), that option gets forwarded to the offloading compilers,
but for both GCN and nvptx:

    lto1: error: ‘-fcf-protection=full’ is not supported for this target

Originally reported by Oscar Barenys in
<https://github.com/gcc-mirror/gcc/commit/1bf18629c54adf4893c8db5227a36e1952ee69a3#commitcomment-140648051>.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug driver/114717] '-fcf-protection' vs. offloading compilation
  2024-04-15  8:07 [Bug target/114717] New: '-fcf-protection' vs. offloading compilation tschwinge at gcc dot gnu.org
@ 2024-04-15  8:28 ` pinskia at gcc dot gnu.org
  2024-04-15 11:50 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-15  8:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

Andrew Pinski <pinskia at gcc dot gnu.org> 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 <pinskia at gcc dot gnu.org> ---
https://github.com/gcc-mirror/gcc/commit/1bf18629c54adf4893c8db5227a36e1952ee69a3#commitcomment-140648051

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug driver/114717] '-fcf-protection' vs. offloading compilation
  2024-04-15  8:07 [Bug target/114717] New: '-fcf-protection' vs. offloading compilation tschwinge at gcc dot gnu.org
  2024-04-15  8:28 ` [Bug driver/114717] " pinskia at gcc dot gnu.org
@ 2024-04-15 11:50 ` rguenth at gcc dot gnu.org
  2024-04-15 11:55 ` ams at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-04-15 11:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug driver/114717] '-fcf-protection' vs. offloading compilation
  2024-04-15  8:07 [Bug target/114717] New: '-fcf-protection' vs. offloading compilation tschwinge at gcc dot gnu.org
  2024-04-15  8:28 ` [Bug driver/114717] " pinskia at gcc dot gnu.org
  2024-04-15 11:50 ` rguenth at gcc dot gnu.org
@ 2024-04-15 11:55 ` ams at gcc dot gnu.org
  2024-04-15 12:47 ` rguenth at gcc dot gnu.org
  2024-04-15 13:25 ` tschwinge at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ams at gcc dot gnu.org @ 2024-04-15 11:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug driver/114717] '-fcf-protection' vs. offloading compilation
  2024-04-15  8:07 [Bug target/114717] New: '-fcf-protection' vs. offloading compilation tschwinge at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-04-15 11:55 ` ams at gcc dot gnu.org
@ 2024-04-15 12:47 ` rguenth at gcc dot gnu.org
  2024-04-15 13:25 ` tschwinge at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-04-15 12:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug driver/114717] '-fcf-protection' vs. offloading compilation
  2024-04-15  8:07 [Bug target/114717] New: '-fcf-protection' vs. offloading compilation tschwinge at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-04-15 12:47 ` rguenth at gcc dot gnu.org
@ 2024-04-15 13:25 ` tschwinge at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2024-04-15 13:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114717

--- Comment #5 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
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.  ;-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-15 13:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15  8:07 [Bug target/114717] New: '-fcf-protection' vs. offloading compilation tschwinge at gcc dot gnu.org
2024-04-15  8:28 ` [Bug driver/114717] " pinskia at gcc dot gnu.org
2024-04-15 11:50 ` rguenth at gcc dot gnu.org
2024-04-15 11:55 ` ams at gcc dot gnu.org
2024-04-15 12:47 ` rguenth at gcc dot gnu.org
2024-04-15 13:25 ` tschwinge at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).