From: Florian Weimer <fweimer@redhat.com>
To: LIU Hao via Gcc <gcc@gcc.gnu.org>
Cc: Mark Wielaard <mark@klomp.org>, LIU Hao <lh_mouse@126.com>,
Jakub Jelinek <jakub@redhat.com>, Jan Hubicka <hubicka@ucw.cz>,
Andreas Schwab <schwab@linux-m68k.org>,
Richard Biener <richard.guenther@gmail.com>,
Jonathan Yong <10walls@gmail.com>,
Nathan Sidwell <nathan@acm.org>
Subject: Re: libgcov, fork, and mingw (and other targets without the full POSIX set)
Date: Mon, 11 Dec 2023 07:48:35 +0100 [thread overview]
Message-ID: <87lea1utdo.fsf@oldenburg.str.redhat.com> (raw)
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")
* LIU Hao via Gcc:
> 在 2023/12/8 21:59, Florian Weimer via Gcc 写道:
>> [PATCH] libgcov: Call __builtin_fork instead of fork
>> <https://inbox.sourceware.org/gcc-patches/87edg4epw5.fsf@oldenburg.str.redhat.com/>
>
> May I ask why it's not something like this?
>
> Even though there may be people who define `fork()` in global scope, it will be semantically
> 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
next prev parent reply other threads:[~2023-12-11 6:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 8:02 Florian Weimer
2023-12-01 8:19 ` Eli Zaretskii
2023-12-01 9:00 ` LIU Hao
2023-12-01 9:16 ` Alexander Monakov
2023-12-01 8:42 ` Richard Biener
2023-12-01 8:57 ` Florian Weimer
2023-12-01 9:09 ` Richard Biener
2023-12-01 9:23 ` LIU Hao
2023-12-01 9:23 ` Alexander Monakov
2023-12-01 10:48 ` Andreas Schwab
2023-12-01 12:03 ` Jan Hubicka
2023-12-01 12:09 ` Jakub Jelinek
2023-12-07 12:50 ` Mark Wielaard
2023-12-08 13:59 ` Florian Weimer
2023-12-10 9:27 ` LIU Hao
2023-12-11 6:48 ` Florian Weimer [this message]
2023-12-08 8:53 Julian Waters
2023-12-11 12:38 Julian Waters
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lea1utdo.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=10walls@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=jakub@redhat.com \
--cc=lh_mouse@126.com \
--cc=mark@klomp.org \
--cc=nathan@acm.org \
--cc=richard.guenther@gmail.com \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).