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 [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 74A4E3858284 for ; Tue, 22 Nov 2022 08:41:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 74A4E3858284 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669106492; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=TO5rfwhJqPpsDCvr2GuLSAhGkEYFY40Gp5/ZZjlqKGg=; b=acFgYZmAi+I1nlTpJ2OG/7weMnQSNMtteErDtyvzTfvpenjjPdiTV1aghz2WB2PlPSVjfq 3tiG8WzKwAyqb1Oi+trFyPz4HNR2nTUOzu7UldDpTm1UiE5/2n68iYa5/hlEAOblN32wTr o3DaQXppcS3Ai/asgPYwoDheLSGe9l8= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-163-iVfpaz3bOcCsaxNAJ5mi-A-1; Tue, 22 Nov 2022 03:41:30 -0500 X-MC-Unique: iVfpaz3bOcCsaxNAJ5mi-A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 63A653C01D85 for ; Tue, 22 Nov 2022 08:41:30 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.202]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23A7D140EBF3; Tue, 22 Nov 2022 08:41:30 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2AM8fPaV626045 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 22 Nov 2022 09:41:25 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2AM8fP4N626044; Tue, 22 Nov 2022 09:41:25 +0100 Date: Tue, 22 Nov 2022 09:41:24 +0100 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH RFA(configure)] c++: provide strchrnul on targets without it [PR107781] Message-ID: Reply-To: Jakub Jelinek References: <20221121233147.523576-1-jason@redhat.com> MIME-Version: 1.0 In-Reply-To: <20221121233147.523576-1-jason@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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=-3.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: On Mon, Nov 21, 2022 at 06:31:47PM -0500, Jason Merrill via Gcc-patches wrote: > Tested x86_64-pc-linux-gnu, and also manually changing the HAVE_DECL_STRCHRNUL > flag. OK for trunk? > > -- 8< -- > > The Contracts implementation uses strchrnul, which is a glibc extension, so > bootstrap broke on non-glibc targets. I considered unconditionally using a > local definition, but I guess we might as well use the libc version if it > exists. > > PR c++/107781 > > gcc/cp/ChangeLog: > > * contracts.cc (strchrnul): Define if needed. > > gcc/ChangeLog: > > * configure.ac: Check for strchrnul. > * config.in, configure: Regenerate. Normally we'd add such a local definition to libiberty, shouldn't we do it in this case too? Jakub