public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/47997] gcc on macosx: "ld: warning: -fwritable-strings not compatible with literal CF/NSString"
Date: Sat, 12 Mar 2011 10:09:00 -0000 [thread overview]
Message-ID: <bug-47997-4-h7PsS0uqS1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47997-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47997
--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> 2011-03-12 10:08:56 UTC ---
(In reply to comment #8)
firstly, I don't think you need to worry overly about the warning (we do place
the strings in the __TEXT segment, just not in the __cfstring section). IMO ld
is being somewhat picky ...
(but perhaps there is good reason for some future plans we're not aware of)
> What are the plans? Are you going to submit the fix to 4.6?
I doubt I'll have a chance before 4.6 forks -- we must be pretty close to that
... but ...
I'm currently testing a less intrusive patch (if people would like to check
this with different variants of XCode - and Mike approves it - perhaps it could
be done in time):
Index: gcc/config/darwin.c
===================================================================
--- gcc/config/darwin.c (revision 170897)
+++ gcc/config/darwin.c (working copy)
@@ -1195,7 +1195,11 @@ static section *
darwin_mergeable_string_section (tree exp,
unsigned HOST_WIDE_INT align)
{
- if (flag_merge_constants
+ /* Darwin's ld expects to see non-writable string literals in the .cstring
+ section. Later versions of ld check and complain when CFStrings are
+ enabled. Therefore we shall force the strings into .cstring since we
+ don't support writable ones anyway. */
+ if ((darwin_constant_cfstrings || flag_merge_constants)
&& TREE_CODE (exp) == STRING_CST
&& TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE
&& align <= 256
next prev parent reply other threads:[~2011-03-12 10:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-05 1:06 [Bug c/47997] New: " anatol.pomozov at gmail dot com
2011-03-05 2:26 ` [Bug c/47997] " howarth at nitro dot med.uc.edu
2011-03-05 9:08 ` iains at gcc dot gnu.org
2011-03-05 10:18 ` [Bug target/47997] " iains at gcc dot gnu.org
2011-03-07 15:38 ` howarth at nitro dot med.uc.edu
2011-03-07 17:45 ` mrs at gcc dot gnu.org
2011-03-07 17:47 ` howarth at nitro dot med.uc.edu
2011-03-07 18:16 ` mikestump at comcast dot net
2011-03-12 4:50 ` anatol.pomozov at gmail dot com
2011-03-12 10:09 ` iains at gcc dot gnu.org [this message]
2011-03-12 13:45 ` iains at gcc dot gnu.org
2011-03-12 16:24 ` mikestump at comcast dot net
2011-06-26 16:26 ` iains at gcc dot gnu.org
2011-06-28 9:17 ` iains at gcc dot gnu.org
2011-06-28 9:18 ` iains at gcc dot gnu.org
2011-07-20 20:52 ` tobias.netzel at googlemail dot com
2011-07-20 20:54 ` tobias.netzel at googlemail dot com
2011-07-20 21:16 ` mrs at gcc dot gnu.org
2011-07-20 21:26 ` mrs at gcc dot gnu.org
2011-07-20 21:54 ` tobias.netzel at googlemail dot com
2011-07-21 7:55 ` iains at gcc dot gnu.org
2011-07-21 9:06 ` iains at gcc dot gnu.org
2011-07-21 10:36 ` iains at gcc dot gnu.org
2011-07-21 14:53 ` iains at gcc dot gnu.org
2011-08-31 19:03 ` mrs at gcc dot gnu.org
2011-09-08 16:30 ` tobias.netzel at googlemail dot com
2011-10-29 13:00 ` iains at gcc dot gnu.org
2011-10-29 13:04 ` iains at gcc dot gnu.org
2011-11-12 14:13 ` iains at gcc dot gnu.org
2011-11-12 14:14 ` iains at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-47997-4-h7PsS0uqS1@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).