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.133.124]) by sourceware.org (Postfix) with ESMTPS id 4BD783858D32 for ; Mon, 11 Dec 2023 06:48:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4BD783858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4BD783858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702277323; cv=none; b=vQq7oTAd6Kj7pEk4Gq/0cLey0PJIKC7n+QrMsBSSTfJtzLJ67ycp1rfymFQ3568EHh6QlArjI7+rjaNaQ65cZSwOLHnrmLKv5+v94UxL2+bjTxZbB+sSw/fBYaVenGSkr75RXfj0fXhCrzHZxc/YIGmmQizdWU3ovLRLJ8eGmig= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702277323; c=relaxed/simple; bh=bo3E8GtAhqt2GN3foyTM1Oo814enMV3Ca0Z1REeX+oI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=q7okeNBrXlT+Di/2ZclZ/OcNQWpAgjHqvrmYLlqtQ0FXpA+Ry9lCZX61rmPNYDAk1mfX8pC0gQZuDcu9HcNP5DQLpcOBa8CtQ5bCiyRVVMhWxzIvCR140YHCerDOdAvuJm8S580strDQNgTI+fkCVZOjxOWfDM0ZMJnALaWYL1s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702277322; h=from:from:reply-to:subject:subject: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=hDZPRATWhiclZm+H7lRMs//3rWMxmHaXhho8YwBZGb0=; b=NC9h4GKua4ruBzsiYMoYai/Av7RTyudv5ygrX9rIDkiIeecEVWMPIsHmKmHlnR9el3UDP/ DuwJPA+8iOTQ023Ec4Y7caluzylTdgWcevuYuL2qY+tBfYnTIxOYQWDje76Er5aWw/wsEg sl+jIv9wcKk3LwOCEx2LctW3Xgovfa8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-txlPXidSPYmZxCrxCbyfaQ-1; Mon, 11 Dec 2023 01:48:38 -0500 X-MC-Unique: txlPXidSPYmZxCrxCbyfaQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3241B835389; Mon, 11 Dec 2023 06:48:38 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5957F1121306; Mon, 11 Dec 2023 06:48:36 +0000 (UTC) From: Florian Weimer To: LIU Hao via Gcc Cc: Mark Wielaard , LIU Hao , Jakub Jelinek , Jan Hubicka , Andreas Schwab , Richard Biener , Jonathan Yong <10walls@gmail.com>, Nathan Sidwell Subject: Re: libgcov, fork, and mingw (and other targets without the full POSIX set) References: <878r6es634.fsf@oldenburg.str.redhat.com> <8734wms3ks.fsf@oldenburg.str.redhat.com> <87il5idwr3.fsf@igel.home> <030d6a60148c8ff0334e97d36313ca53c40126ca.camel@klomp.org> <878r64g5ho.fsf@oldenburg.str.redhat.com> <6fcc2a69-c927-4ede-a601-2f85998ec8cb@126.com> Date: Mon, 11 Dec 2023 07:48:35 +0100 In-Reply-To: <6fcc2a69-c927-4ede-a601-2f85998ec8cb@126.com> (LIU Hao via Gcc's message of "Sun, 10 Dec 2023 17:27:20 +0800") Message-ID: <87lea1utdo.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: * LIU Hao via Gcc: > =E5=9C=A8 2023/12/8 21:59, Florian Weimer via Gcc =E5=86=99=E9=81=93: >> [PATCH] libgcov: Call __builtin_fork instead of fork >> > > May I ask why it's not something like this? > > Even though there may be people who define `fork()` in global scope, it w= ill be semantically=20 > different from the POSIX fork. > > ``` > diff --git a/libgcc/libgcov-interface.c b/libgcc/libgcov-interface.c > index b2ee9308641..10ce8edc4fb 100644 > --- a/libgcc/libgcov-interface.c > +++ b/libgcc/libgcov-interface.c > @@ -174,7 +174,7 @@ __gcov_dump (void) > > #endif /* L_gcov_dump */ > > -#ifdef L_gcov_fork > +#if defined L_gcov_fork && !defined _WIN32 > /* A wrapper for the fork function. We reset counters in the child > so that they are not counted twice. */ > > ``` Other systems probably have the same issue. We just don't have an autobuilder, or we have one and I haven't seen its error. Thanks, Florian