From: Jason Merrill <jason@redhat.com>
To: Mike Stump <mikestump@comcast.net>
Cc: gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: RFA: darwin PATCH to fix build, internal visibility
Date: Wed, 03 Oct 2012 19:04:00 -0000 [thread overview]
Message-ID: <506C8C3B.2010705@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
This patch fixes a couple of Darwin issues I noticed with a cross-compiler:
1) Adds a couple of consts to avoid const-correctness errors.
2) Treats visibility "internal" like "hidden" rather than like
"default". The documentation says that internal is hidden +
processor-specific semantics, so treating it as just hidden makes sense
to me.
OK for trunk?
Jason
[-- Attachment #2: darwin.patch --]
[-- Type: text/x-patch, Size: 1825 bytes --]
commit 907f8d9588da2e65cf938985639bfaf0dde53c6f
Author: Jason Merrill <jason@redhat.com>
Date: Wed Oct 3 09:55:25 2012 -0400
* config/darwin.c (darwin_assemble_visibility): Treat
VISIBILITY_INTERNAL as hidden.
* config/darwin-c.c (find_subframework_file): Add missing const.
(framework_construct_pathname): Likewise.
diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c
index a642f66..8e48c30 100644
--- a/gcc/config/darwin-c.c
+++ b/gcc/config/darwin-c.c
@@ -267,7 +267,7 @@ static struct framework_header framework_header_dirs[] = {
static char *
framework_construct_pathname (const char *fname, cpp_dir *dir)
{
- char *buf;
+ const char *buf;
size_t fname_len, frname_len;
cpp_dir *fast_dir;
char *frname;
@@ -344,7 +344,7 @@ find_subframework_file (const char *fname, const char *pname)
{
char *sfrname;
const char *dot_framework = ".framework/";
- char *bufptr;
+ const char *bufptr;
int sfrname_len, i, fname_len;
struct cpp_dir *fast_dir;
static struct cpp_dir subframe_dir;
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 54c92d1..5a9f50a 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -2623,7 +2623,7 @@ darwin_assemble_visibility (tree decl, int vis)
{
if (vis == VISIBILITY_DEFAULT)
;
- else if (vis == VISIBILITY_HIDDEN)
+ else if (vis == VISIBILITY_HIDDEN || vis == VISIBILITY_INTERNAL)
{
fputs ("\t.private_extern ", asm_out_file);
assemble_name (asm_out_file,
@@ -2631,7 +2631,7 @@ darwin_assemble_visibility (tree decl, int vis)
fputs ("\n", asm_out_file);
}
else
- warning (OPT_Wattributes, "internal and protected visibility attributes "
+ warning (OPT_Wattributes, "protected visibility attribute "
"not supported in this configuration; ignored");
}
next reply other threads:[~2012-10-03 19:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 19:04 Jason Merrill [this message]
2012-10-03 22:26 ` Mike Stump
2012-10-04 13:42 ` Jack Howarth
2012-10-04 15:36 ` Jason Merrill
2012-10-08 12:28 Dominique Dhumieres
2012-10-08 17:54 ` Jason Merrill
2012-10-09 13:48 ` Dominique Dhumieres
2012-10-09 20:17 ` Mike Stump
2012-10-11 15:26 ` Jason Merrill
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=506C8C3B.2010705@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=mikestump@comcast.net \
/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).