From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 5BF543858D1E; Wed, 17 May 2023 09:32:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5BF543858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 854CC20261; Wed, 17 May 2023 09:32:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1684315931; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8qhGuzgX73pAMDfw10vL1g3praQyq2dUXD03yDiXLGQ=; b=R5jpEal6wqedyyTrrQXE5tEPVY+7cAB7NETrEDsG4t1p23OFLIM63qfAScontvteyZHvS3 0dyOYrD7Q792qijNwG0fSAREqLVeErH9WyXSq/gakILaapO3oLS9ciN0JkBPPnRQH0sn+n HMqIXMMzcWxBiAtT4TW2rwORhDK+SUg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1684315931; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8qhGuzgX73pAMDfw10vL1g3praQyq2dUXD03yDiXLGQ=; b=XMfdHR5rsZar+an+rI0ACZjZTJ1fH3qkOBBufAYeYZ8NV5d62c6IWGmgLNwqlN3OXn9kTC bX8nkju/7cKB7rAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7650913478; Wed, 17 May 2023 09:32:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id NYfzGxufZGQzTQAAMHmgww (envelope-from ); Wed, 17 May 2023 09:32:11 +0000 From: Martin Jambor To: Jonathan Wakely Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [committed] libstdc++: Disable cacheline alignment for DJGPP [PR109741] In-Reply-To: <20230516173156.1826089-1-jwakely@redhat.com> References: <20230516173156.1826089-1-jwakely@redhat.com> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.2 (x86_64-suse-linux-gnu) Date: Wed, 17 May 2023 11:32:10 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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, On Tue, May 16 2023, Jonathan Wakely via Gcc-patches wrote: > Tested powerpc64le-linux. Builds OK on djgpp too. > > Pushed to trunk. > > -- >8 -- > > DJGPP (and maybe other targets) uses MAX_OFILE_ALIGNMENT=3D16 which means > that globals (and static objects) can't have alignment greater than 16. > This causes an error for the locks defined in src/c++11/shared_ptr.cc > because we try to align them to the cacheline size, to avoid false > sharing. > > Add a configure check for the increased alignment, and live with false > sharing where we can't increase the alignment. > > libstdc++-v3/ChangeLog: > > PR libstdc++/109741 > * acinclude.m4 (GLIBCXX_CHECK_ALIGNAS_CACHELINE): Define. > * config.h.in: Regenerate. > * configure: Regenerate. > * configure.ac: Use GLIBCXX_CHECK_ALIGNAS_CACHELINE. > * src/c++11/shared_ptr.cc (__gnu_internal::get_mutex): Do not > align lock table if not supported. use __GCC_DESTRUCTIVE_SIZE > instead of hardcoded 64. The periodic tests that Martin Li=C5=A1ka left behind for me (for now) to look at are now complaining that the configure and configure.ac in libstdc++ are not in sync, the difference being (drum roll): diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 188be08d716..412c4bf0e85 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -71957,6 +71957,7 @@ _ACEOF fi =20 =20 +# For src/c++11/shared_ptr.cc alignment. =20 =20 ac_ext=3Dcpp Can I commit this change or do I need to attempt to adjust the script to ignore comments in configure or what would be the correct way to deal with this? (Option requiring work on my side may take some time during which the otherwise useful tests would not work, I am afraid). Thanks, Martin