From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id D21E53AAA0C1 for ; Wed, 21 Apr 2021 08:56:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D21E53AAA0C1 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-383-xi2hgWPuMOGOXTu5CCG49A-1; Wed, 21 Apr 2021 04:56:32 -0400 X-MC-Unique: xi2hgWPuMOGOXTu5CCG49A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC235C73B8; Wed, 21 Apr 2021 08:56:30 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-115-183.ams2.redhat.com [10.36.115.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 83A0C1045E83; Wed, 21 Apr 2021 08:56:26 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 13L8uNje1243973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 21 Apr 2021 10:56:23 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 13L8uMb41243972; Wed, 21 Apr 2021 10:56:22 +0200 Date: Wed, 21 Apr 2021 10:56:22 +0200 From: Jakub Jelinek To: Jonathan Wakely , Thomas Rodgers Cc: David Edelsohn , gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: GCC 11.1 Release Candidate available from gcc.gnu.org Message-ID: <20210421085622.GY1179226@tucnak> Reply-To: Jakub Jelinek References: <20210420152439.GR1179226@tucnak> <6ac731c557415b46b04613d9b908df2f@appliantology.com> <45de03629a536c0000c9b47bb79d6601@appliantology.com> MIME-Version: 1.0 In-Reply-To: <45de03629a536c0000c9b47bb79d6601@appliantology.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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, 21 Apr 2021 08:56:48 -0000 On Tue, Apr 20, 2021 at 10:12:33PM -0700, Thomas Rodgers wrote: > I think the attached patch (also in BZ) addresses the issue in > bits/semaphore_base.h, but I'm going to defer to Jonathan on why the macro > name is being transformed incorrectly in the first place. Jonathan's call, but for me it looks much better to fix up the macro name on the configure side. The include/Makefile.am sed is: sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \ -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \ -e 's/VERSION/_GLIBCXX_VERSION/g' \ -e 's/WORDS_/_GLIBCXX_WORDS_/g' \ -e 's/_DARWIN_USE_64_BIT_INODE/_GLIBCXX_DARWIN_USE_64_BIT_INODE/g' \ -e 's/_FILE_OFFSET_BITS/_GLIBCXX_FILE_OFFSET_BITS/g' \ -e 's/_LARGE_FILES/_GLIBCXX_LARGE_FILES/g' \ -e 's/ICONV_CONST/_GLIBCXX_ICONV_CONST/g' \ -e '/[ ]_GLIBCXX_LONG_DOUBLE_COMPAT[ ]/d' \ -e '/[ ]_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT[ ]/d' \ < ${CONFIG_HEADER} >> $@ ;\ so for many macros one needs _GLIBCXX_ prefixes already in configure, as can be seen in grep AC_DEFINE.*_GLIBCXX configure.ac acinclude.m4 But _GLIBCXX_HAVE_POSIX_SEMAPHORE is the only one that shouldn't have that prefix because the sed is adding that. E.g. on i686-linux, I see grep _GLIBCXX__GLIBCXX c++config.h #define _GLIBCXX__GLIBCXX_HAVE_POSIX_SEMAPHORE 1 that proves it is the only broken one. So, I think the right fix is: 2021-04-21 Jakub Jelinek PR libstdc++/100164 * acinclude.m4: For POSIX semaphores AC_DEFINE HAVE_POSIX_SEMAPHORE rather than _GLIBCXX_HAVE_POSIX_SEMAPHORE. * configure: Regenerated. * config.h.in: Regenerated. --- libstdc++-v3/acinclude.m4.jj 2020-12-16 14:42:46.501084530 +0100 +++ libstdc++-v3/acinclude.m4 2021-04-21 10:51:52.450419650 +0200 @@ -4097,7 +4097,7 @@ AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [ [ac_have_posix_semaphore=no]) if test $ac_have_posix_semaphore = yes ; then - AC_DEFINE(_GLIBCXX_HAVE_POSIX_SEMAPHORE, + AC_DEFINE(HAVE_POSIX_SEMAPHORE, 1, [Define to 1 if POSIX Semaphores with sem_timedwait are available in .]) fi --- libstdc++-v3/configure.jj 2021-04-09 10:18:15.701265030 +0200 +++ libstdc++-v3/configure 2021-04-21 10:52:06.730259672 +0200 @@ -75836,7 +75836,7 @@ fi if test $ac_have_posix_semaphore = yes ; then -$as_echo "#define _GLIBCXX_HAVE_POSIX_SEMAPHORE 1" >>confdefs.h +$as_echo "#define HAVE_POSIX_SEMAPHORE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have_posix_semaphore" >&5 --- libstdc++-v3/config.h.in.jj 2020-12-17 16:06:39.808526661 +0100 +++ libstdc++-v3/config.h.in 2021-04-21 10:52:09.709226370 +0200 @@ -291,6 +291,10 @@ /* Define to 1 if you have the `posix_memalign' function. */ #undef HAVE_POSIX_MEMALIGN +/* Define to 1 if POSIX Semaphores with sem_timedwait are available in + . */ +#undef HAVE_POSIX_SEMAPHORE + /* Define to 1 if you have the `powf' function. */ #undef HAVE_POWF @@ -818,10 +822,6 @@ /* Define if gthreads library is available. */ #undef _GLIBCXX_HAS_GTHREADS -/* Define to 1 if POSIX Semaphores with sem_timedwait are available in - . */ -#undef _GLIBCXX_HAVE_POSIX_SEMAPHORE - /* Define to 1 if a full hosted library is built, or 0 if freestanding. */ #undef _GLIBCXX_HOSTED Jakub