From: Ramana Radhakrishnan <ramana.radhakrishnan@foss.arm.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [Patch wwwdocs] Document caveat with guard initializations for C++ on architectures without barrier instructions.
Date: Fri, 26 Jun 2015 09:24:00 -0000 [thread overview]
Message-ID: <558D1830.5020904@foss.arm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 360 bytes --]
As part of the work on PR66192 I promised a doc update at some point -
here's that - hopefully better late than never.
I also wonder if this is worth putting into the documentation in
addition to our release notes though I couldn't convince myself that
standards.texi was the right place for it- any other suggestions are
welcome.
OK ?
regards
Ramana
[-- Attachment #2: wwwdocs.txt --]
[-- Type: text/plain, Size: 1352 bytes --]
Index: htdocs/gcc-6/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v
retrieving revision 1.10
diff -a -u -r1.10 changes.html
--- htdocs/gcc-6/changes.html 26 May 2015 10:12:08 -0000 1.10
+++ htdocs/gcc-6/changes.html 4 Jun 2015 09:21:21 -0000
@@ -14,6 +14,20 @@
<!-- .................................................................. -->
<h2>Caveats</h2>
+ <ul>
+ <li>On bare-metal targets for architectures like ARM
+ that have a relaxed memory model, the compiler will generate
+ code that calls <code>__sync_synchronize</code> for thread-safety
+ of guard accesses for statics in C++ code. In these cases,
+ it is expected that the user will provide either a stub function to
+ implement <code>__sync_synchronize</code> to provide a memory
+ barrier instruction or would compile their application with
+ <code>-fno-threadsafe-statics</code> as may be appropriate.
+ This can be demonstrated with the example in
+ <a href="https://gcc.gnu.org/PR66192">PR66192</a>
+ for the <code>arm-none-eabi</code> target, with the option
+ <code>-mcpu=arm7tdmi</code> on the command line. </li>
+ </ul>
<!-- .................................................................. -->
<h2 id="general">General Optimizer Improvements</h2>
next reply other threads:[~2015-06-26 9:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 9:24 Ramana Radhakrishnan [this message]
2015-06-28 15:18 ` Gerald Pfeifer
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=558D1830.5020904@foss.arm.com \
--to=ramana.radhakrishnan@foss.arm.com \
--cc=gcc-patches@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).