From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 3FCD73AC9490 for ; Mon, 19 Dec 2022 09:03:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3FCD73AC9490 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de Received: from sslproxy01.your-server.de ([78.46.139.224]) by dedi548.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p7C34-000Jbi-AR for gcc@gcc.gnu.org; Mon, 19 Dec 2022 10:03:02 +0100 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p7C34-0009kF-8G for gcc@gcc.gnu.org; Mon, 19 Dec 2022 10:03:02 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id E42DE48004F for ; Mon, 19 Dec 2022 10:03:01 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id sPoCmBpTSl3t for ; Mon, 19 Dec 2022 10:03:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 9B43F48019E for ; Mon, 19 Dec 2022 10:03:01 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NZPSi3fKEho1 for ; Mon, 19 Dec 2022 10:03:01 +0100 (CET) Received: from [10.10.171.6] (unknown [10.10.171.6]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 7723148004F for ; Mon, 19 Dec 2022 10:03:01 +0100 (CET) Message-ID: <1e90020b-ee25-9841-4def-7d6be6d91cb5@embedded-brains.de> Date: Mon, 19 Dec 2022 10:03:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Content-Language: en-US To: GCC Development From: Sebastian Huber Subject: Why is there no libatomic default implementation using gthr.h? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.103.7/26754/Sun Dec 18 09:24:10 2022) X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, I would like to fix the -fprofile-update=3Datomic implementation so that=20 it works on all targets. Currently, it works only on targets with 64-bit=20 atomic operations in hardware (and some special cases). I tried to fix=20 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=20 provided by libatomic. The libatomic is currently not supported on all=20 targets, for example: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D77466 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D77378 Why is there no libatomic default implementation using gthr.h? The C++ library already depends on gthr.h and installs the headers in=20 "bits/gthr.h" etc. For this the libstdc++-v3 configure/Makefile=20 duplicates some logic from libgcc. Why is the gthr.h stuff not installed=20 by libgcc itself? In libatomic, the POSIX implementation could be easily rewritten to use=20 the gthr interface. Any objections to do the following? 1. Install gthr.h to "bits/gthr.h" by libgcc (including the other gthr=20 headers). 2. Remove the gthr configure/Makefile support from libstdc++-v3. 3. Use gthr as the default implementation of libatomic. --=20 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=C3=BCnchen Registernummer: HRB 157899 Vertretungsberechtigte Gesch=C3=A4ftsf=C3=BChrer: Peter Rasmussen, Thomas= D=C3=B6rfler Unsere Datenschutzerkl=C3=A4rung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/