From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by sourceware.org (Postfix) with ESMTPS id 0E8173850413 for ; Wed, 23 Jun 2021 09:43:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0E8173850413 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15N9fq0p006127 for ; Wed, 23 Jun 2021 11:43:27 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 39c18m0p0d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 23 Jun 2021 11:43:27 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5BB7510002A for ; Wed, 23 Jun 2021 11:43:26 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A311921A206 for ; Wed, 23 Jun 2021 11:43:26 +0200 (CEST) Received: from [10.211.10.86] (10.75.127.50) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Jun 2021 11:43:26 +0200 Subject: Re: [PATCH v3] libstdc++: Improve std::lock algorithm To: References: <14287489.dOz4zN4RiP@minbar> <9108135.T7Z3S40VBb@minbar> From: Christophe LYON Message-ID: <095419ad-9d7e-9110-3a25-90fbeec92d45@foss.st.com> Date: Wed, 23 Jun 2021 11:43:08 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-23_03:2021-06-22, 2021-06-23 signatures=0 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2021 09:43:31 -0000 On 23/06/2021 11:17, Jonathan Wakely via Libstdc++ wrote: > On Wed, 23 Jun 2021 at 08:21, Christophe Lyon wrote: >> This patch causes GCC build failures for bare-metal targets >> (aarch64-elf, arm-eabi). For instance on arm-eabi, I'm seeing: >> >> In file included from >> /tmp/1229695_7.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/future:38, >> from >> /tmp/1229695_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/include/precompiled/stdc++.h:105: >> /tmp/1229695_7.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/mutex: >> In function 'int std::__detail::__try_lock_impl(_Lockable&)': >> /tmp/1229695_7.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/mutex:522:53: >> error: expected primary-expression before ',' token >> 522 | if (unique_lock<_Lockable> __lock{__lockable, try_to_lock}) >> | ^ >> In file included from >> /tmp/1229695_7.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/future:38, >> from >> /tmp/1229695_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/include/precompiled/stdc++.h:105: >> /tmp/1229695_7.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/mutex: >> In function 'int std::__detail::__try_lock_impl(_Lockable&)': >> /tmp/1229695_7.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/mutex:522:53: >> error: expected primary-expression before ',' token >> 522 | if (unique_lock<_Lockable> __lock{__lockable, try_to_lock}) >> | ^ >> make[4]: *** [Makefile:1862: >> arm-none-eabi/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1 > Sigh, __lockable is a macro in newlib: > > newlib/libc/include/sys/cdefs.h:#define __lockable > __lock_annotate(lockable) > > I'll change the name. Thanks (sorry for being back ;-)