public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/108743] New: -fconstant-cfstrings not supported
@ 2023-02-09 16:37 ossman at cendio dot se
  2023-02-09 16:39 ` [Bug objc/108743] " pinskia at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: ossman at cendio dot se @ 2023-02-09 16:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108743
           Summary: -fconstant-cfstrings not supported
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: objc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ossman at cendio dot se
  Target Milestone: ---

Some programs designed for clang want this flag. I'm unsure exactly how
important it is. The description sounds like it's just some optimization.

To make things worse, it is mentioned in gcc's documentation even though it
isn't supported.

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

* [Bug objc/108743] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
@ 2023-02-09 16:39 ` pinskia at gcc dot gnu.org
  2023-02-09 16:43 ` ossman at cendio dot se
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-02-09 16:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The option is -mconstant-cfstrings, the documentation is slightly wrong.

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

* [Bug objc/108743] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
  2023-02-09 16:39 ` [Bug objc/108743] " pinskia at gcc dot gnu.org
@ 2023-02-09 16:43 ` ossman at cendio dot se
  2023-02-09 16:45 ` pinskia at gcc dot gnu.org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ossman at cendio dot se @ 2023-02-09 16:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Pierre Ossman <ossman at cendio dot se> ---
Great news. And that is the same thing as clang's -fconstant-cfstrings?

Unfortunately, I couldn't see -mconstant-cfstrings in gcc's documentation, but
I may be looking in the wrong place.

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

* [Bug objc/108743] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
  2023-02-09 16:39 ` [Bug objc/108743] " pinskia at gcc dot gnu.org
  2023-02-09 16:43 ` ossman at cendio dot se
@ 2023-02-09 16:45 ` pinskia at gcc dot gnu.org
  2023-02-10  8:08 ` ossman at cendio dot se
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-02-09 16:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Pierre Ossman from comment #2)
> Great news. And that is the same thing as clang's -fconstant-cfstrings?

yes

> 
> Unfortunately, I couldn't see -mconstant-cfstrings in gcc's documentation,
> but I may be looking in the wrong place.

and it is just missing.

Also are you trying to compile for darwin (Mac OS X) or some other target?
If some other target, then these options are not there.

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

* [Bug objc/108743] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (2 preceding siblings ...)
  2023-02-09 16:45 ` pinskia at gcc dot gnu.org
@ 2023-02-10  8:08 ` ossman at cendio dot se
  2023-02-10  8:09 ` ossman at cendio dot se
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ossman at cendio dot se @ 2023-02-10  8:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Pierre Ossman <ossman at cendio dot se> ---
I am indeed trying to compile for macOS. Specifically Qt5, which is designed
with just Xcode in mind.

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

* [Bug objc/108743] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (3 preceding siblings ...)
  2023-02-10  8:08 ` ossman at cendio dot se
@ 2023-02-10  8:09 ` ossman at cendio dot se
  2023-02-10  9:23 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ossman at cendio dot se @ 2023-02-10  8:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Pierre Ossman <ossman at cendio dot se> ---
Could you consider adding -fconstant-cfstrings as an alias? It would make life
easier for making build systems compiler agnostic.

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

* [Bug objc/108743] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (4 preceding siblings ...)
  2023-02-10  8:09 ` ossman at cendio dot se
@ 2023-02-10  9:23 ` jakub at gcc dot gnu.org
  2023-02-10 15:50 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-10  9:23 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Pierre Ossman from comment #5)
> Could you consider adding -fconstant-cfstrings as an alias? It would make
> life easier for making build systems compiler agnostic.

As it is a machine specific option, -mconstant-cfstrings is right, if it was a
generic option, -f* would make sense, but it is not.
If the option is MacOS specific in clang too, then they just misnamed the
option.

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

* [Bug objc/108743] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (5 preceding siblings ...)
  2023-02-10  9:23 ` jakub at gcc dot gnu.org
@ 2023-02-10 15:50 ` pinskia at gcc dot gnu.org
  2023-02-12 16:48 ` iains at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-02-10 15:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm,
https://inbox.sourceware.org/gcc-patches/B4F496F4-F31D-41D2-8942-1F0AEFBD7BBF@sandoe-acoustics.co.uk/

Seems didn't get installed even though it was approved ...

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

* [Bug objc/108743] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (6 preceding siblings ...)
  2023-02-10 15:50 ` pinskia at gcc dot gnu.org
@ 2023-02-12 16:48 ` iains at gcc dot gnu.org
  2023-07-02 13:28 ` [Bug target/108743] [objective-c, NeXT runtime] " iains at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: iains at gcc dot gnu.org @ 2023-02-12 16:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> Hmm,
> https://inbox.sourceware.org/gcc-patches/B4F496F4-F31D-41D2-8942-
> 1F0AEFBD7BBF@sandoe-acoustics.co.uk/
> 
> Seems didn't get installed even though it was approved ...

these things happen, I guess we can make it a darwin-specific driver option (as
Jakub says, the 'm' version is technically correct, but we have to accommodate
compatibility sometimes).

There is at least one other platform that I think it s using the NeXT library
(it is open sourced), so maybe it is an appropriate option for that platform
too.

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

* [Bug target/108743] [objective-c, NeXT runtime] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (7 preceding siblings ...)
  2023-02-12 16:48 ` iains at gcc dot gnu.org
@ 2023-07-02 13:28 ` iains at gcc dot gnu.org
  2023-07-02 14:21 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: iains at gcc dot gnu.org @ 2023-07-02 13:28 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-07-02
          Component|objc                        |target
             Status|UNCONFIRMED                 |NEW
           Assignee|unassigned at gcc dot gnu.org      |iains at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
this is intended to be a target-specific option for Darwin.

Although other targets can (and do) use the NeXT runtime, if this optimisation
applies to the then they need to add the option (and document for the relevant
target).

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

* [Bug target/108743] [objective-c, NeXT runtime] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (8 preceding siblings ...)
  2023-07-02 13:28 ` [Bug target/108743] [objective-c, NeXT runtime] " iains at gcc dot gnu.org
@ 2023-07-02 14:21 ` cvs-commit at gcc dot gnu.org
  2023-07-03 14:24 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-02 14:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:

https://gcc.gnu.org/g:cdd4b3c0f0f428678c24de74b1f626628450799c

commit r14-2239-gcdd4b3c0f0f428678c24de74b1f626628450799c
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sun Jul 2 14:18:04 2023 +0100

    Darwin, Objective-C: Support -fconstant-cfstrings [PR108743].

    This support the -fconstant-cfstrings option as used by clang (and
    expect by some build scripts) as an alias to the target-specific
    -mconstant-cfstrings.

    The documentation is also updated to reflect that the 'f' option is
    only available on Darwin, and to add the 'm' option to the Darwin
    section of the invocation text.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR target/108743

    gcc/ChangeLog:

            * config/darwin.opt: Add fconstant-cfstrings alias to
            mconstant-cfstrings.
            * doc/invoke.texi: Amend invocation descriptions to reflect
            that the fconstant-cfstrings is a target-option alias and to
            add the missing mconstant-cfstrings option description to the
            Darwin section.

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

* [Bug target/108743] [objective-c, NeXT runtime] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (9 preceding siblings ...)
  2023-07-02 14:21 ` cvs-commit at gcc dot gnu.org
@ 2023-07-03 14:24 ` cvs-commit at gcc dot gnu.org
  2023-08-05  3:54 ` egallager at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-03 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:

https://gcc.gnu.org/g:12897414d309d9cf398259c212923aa7b031a3af

commit r13-7528-g12897414d309d9cf398259c212923aa7b031a3af
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sun Jul 2 14:18:04 2023 +0100

    Darwin, Objective-C: Support -fconstant-cfstrings [PR108743].

    This support the -fconstant-cfstrings option as used by clang (and
    expect by some build scripts) as an alias to the target-specific
    -mconstant-cfstrings.

    The documentation is also updated to reflect that the 'f' option is
    only available on Darwin, and to add the 'm' option to the Darwin
    section of the invocation text.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR target/108743

    gcc/ChangeLog:

            * config/darwin.opt: Add fconstant-cfstrings alias to
            mconstant-cfstrings.
            * doc/invoke.texi: Amend invocation descriptions to reflect
            that the fconstant-cfstrings is a target-option alias and to
            add the missing mconstant-cfstrings option description to the
            Darwin section.

    (cherry picked from commit cdd4b3c0f0f428678c24de74b1f626628450799c)

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

* [Bug target/108743] [objective-c, NeXT runtime] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (10 preceding siblings ...)
  2023-07-03 14:24 ` cvs-commit at gcc dot gnu.org
@ 2023-08-05  3:54 ` egallager at gcc dot gnu.org
  2024-03-17  3:23 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: egallager at gcc dot gnu.org @ 2023-08-05  3:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Eric Gallager <egallager at gcc dot gnu.org> ---
So I'm assuming this is staying open for backports to the 12 and 11 branches?

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

* [Bug target/108743] [objective-c, NeXT runtime] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (11 preceding siblings ...)
  2023-08-05  3:54 ` egallager at gcc dot gnu.org
@ 2024-03-17  3:23 ` cvs-commit at gcc dot gnu.org
  2024-03-17  3:27 ` cvs-commit at gcc dot gnu.org
  2024-03-17  3:29 ` iains at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-17  3:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:

https://gcc.gnu.org/g:215d67485ce8d4f6cef4e9cf7ecfd4d79abc1c48

commit r12-10219-g215d67485ce8d4f6cef4e9cf7ecfd4d79abc1c48
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sun Jul 2 14:18:04 2023 +0100

    Darwin, Objective-C: Support -fconstant-cfstrings [PR108743].

    This support the -fconstant-cfstrings option as used by clang (and
    expect by some build scripts) as an alias to the target-specific
    -mconstant-cfstrings.

    The documentation is also updated to reflect that the 'f' option is
    only available on Darwin, and to add the 'm' option to the Darwin
    section of the invocation text.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR target/108743

    gcc/ChangeLog:

            * config/darwin.opt: Add fconstant-cfstrings alias to
            mconstant-cfstrings.
            * doc/invoke.texi: Amend invocation descriptions to reflect
            that the fconstant-cfstrings is a target-option alias and to
            add the missing mconstant-cfstrings option description to the
            Darwin section.

    (cherry picked from commit cdd4b3c0f0f428678c24de74b1f626628450799c)

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

* [Bug target/108743] [objective-c, NeXT runtime] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (12 preceding siblings ...)
  2024-03-17  3:23 ` cvs-commit at gcc dot gnu.org
@ 2024-03-17  3:27 ` cvs-commit at gcc dot gnu.org
  2024-03-17  3:29 ` iains at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-17  3:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:

https://gcc.gnu.org/g:87152f50a89deb5044145a80fa2ed705f4913f98

commit r11-11283-g87152f50a89deb5044145a80fa2ed705f4913f98
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sun Jul 2 14:18:04 2023 +0100

    Darwin, Objective-C: Support -fconstant-cfstrings [PR108743].

    This support the -fconstant-cfstrings option as used by clang (and
    expect by some build scripts) as an alias to the target-specific
    -mconstant-cfstrings.

    The documentation is also updated to reflect that the 'f' option is
    only available on Darwin, and to add the 'm' option to the Darwin
    section of the invocation text.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR target/108743

    gcc/ChangeLog:

            * config/darwin.opt: Add fconstant-cfstrings alias to
            mconstant-cfstrings.
            * doc/invoke.texi: Amend invocation descriptions to reflect
            that the fconstant-cfstrings is a target-option alias and to
            add the missing mconstant-cfstrings option description to the
            Darwin section.

    (cherry picked from commit cdd4b3c0f0f428678c24de74b1f626628450799c)

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

* [Bug target/108743] [objective-c, NeXT runtime] -fconstant-cfstrings not supported
  2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
                   ` (13 preceding siblings ...)
  2024-03-17  3:27 ` cvs-commit at gcc dot gnu.org
@ 2024-03-17  3:29 ` iains at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: iains at gcc dot gnu.org @ 2024-03-17  3:29 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #12)
> So I'm assuming this is staying open for backports to the 12 and 11 branches?

yup, which is now done, so fixed.

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

end of thread, other threads:[~2024-03-17  3:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 16:37 [Bug objc/108743] New: -fconstant-cfstrings not supported ossman at cendio dot se
2023-02-09 16:39 ` [Bug objc/108743] " pinskia at gcc dot gnu.org
2023-02-09 16:43 ` ossman at cendio dot se
2023-02-09 16:45 ` pinskia at gcc dot gnu.org
2023-02-10  8:08 ` ossman at cendio dot se
2023-02-10  8:09 ` ossman at cendio dot se
2023-02-10  9:23 ` jakub at gcc dot gnu.org
2023-02-10 15:50 ` pinskia at gcc dot gnu.org
2023-02-12 16:48 ` iains at gcc dot gnu.org
2023-07-02 13:28 ` [Bug target/108743] [objective-c, NeXT runtime] " iains at gcc dot gnu.org
2023-07-02 14:21 ` cvs-commit at gcc dot gnu.org
2023-07-03 14:24 ` cvs-commit at gcc dot gnu.org
2023-08-05  3:54 ` egallager at gcc dot gnu.org
2024-03-17  3:23 ` cvs-commit at gcc dot gnu.org
2024-03-17  3:27 ` cvs-commit at gcc dot gnu.org
2024-03-17  3:29 ` iains 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).