From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: GCC Development <gcc@gcc.gnu.org>
Subject: Why is there no libatomic default implementation using gthr.h?
Date: Mon, 19 Dec 2022 10:03:00 +0100 [thread overview]
Message-ID: <1e90020b-ee25-9841-4def-7d6be6d91cb5@embedded-brains.de> (raw)
Hello,
I would like to fix the -fprofile-update=atomic implementation so that
it works on all targets. Currently, it works only on targets with 64-bit
atomic operations in hardware (and some special cases). I tried to fix
it like this:
https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608620.html
The problem with this patch is that it falls back to use functions
provided by libatomic. The libatomic is currently not supported on all
targets, for example:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77466
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77378
Why is there no libatomic default implementation using gthr.h?
The C++ library already depends on gthr.h and installs the headers in
"bits/gthr.h" etc. For this the libstdc++-v3 configure/Makefile
duplicates some logic from libgcc. Why is the gthr.h stuff not installed
by libgcc itself?
In libatomic, the POSIX implementation could be easily rewritten to use
the gthr interface.
Any objections to do the following?
1. Install gthr.h to "bits/gthr.h" by libgcc (including the other gthr
headers).
2. Remove the gthr configure/Makefile support from libstdc++-v3.
3. Use gthr as the default implementation of libatomic.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
next reply other threads:[~2022-12-19 9:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 9:03 Sebastian Huber [this message]
2022-12-19 12:41 ` Jonathan Wakely
2022-12-19 12:45 ` Sebastian Huber
2022-12-19 12:56 ` LIU Hao
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=1e90020b-ee25-9841-4def-7d6be6d91cb5@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=gcc@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).