public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: gcc-patches@gcc.gnu.org, Jonathan Yong <10walls@gmail.com>,
	Jan Hubicka <hubicka@ucw.cz>,
	Richard Biener <richard.guenther@gmail.com>,
	Alexander Monakov <amonakov@ispras.ru>
Subject: Re: [PATCH] libgcov: Call __builtin_fork instead of fork
Date: Fri, 8 Dec 2023 15:07:08 +0100	[thread overview]
Message-ID: <ZXMjDO8EIEFZBW/5@tucnak> (raw)
In-Reply-To: <87edg4epw5.fsf@oldenburg.str.redhat.com>

On Sat, Dec 02, 2023 at 01:43:22PM +0100, Florian Weimer wrote:
> Some targets do not provide a prototype for fork, and compilation now
> fails with an implicit-function-declaration error.
> 
> libgcc/
> 
> 	* libgcov-interface.c (__gcov_fork):

Description missing (Use __builtin_fork instead of fork.).

Ok with that change.
> 
> Generated code is the same on x86_64-linux-gnu.  Okay for trunk?
> 
> Thanks,
> Florian
> ---
>  libgcc/libgcov-interface.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libgcc/libgcov-interface.c b/libgcc/libgcov-interface.c
> index b2ee9308641..d166e98510d 100644
> --- a/libgcc/libgcov-interface.c
> +++ b/libgcc/libgcov-interface.c
> @@ -182,7 +182,7 @@ pid_t
>  __gcov_fork (void)
>  {
>    pid_t pid;
> -  pid = fork ();
> +  pid = __builtin_fork ();
>    if (pid == 0)
>      {
>        __GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_mx);
> 
> base-commit: 193ef02a7f4f3e5349ad9cf8d3d4df466a99b677

	Jakub


  reply	other threads:[~2023-12-08 14:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02 12:43 Florian Weimer
2023-12-08 14:07 ` Jakub Jelinek [this message]
2023-12-08 15:28   ` Florian Weimer

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=ZXMjDO8EIEFZBW/5@tucnak \
    --to=jakub@redhat.com \
    --cc=10walls@gmail.com \
    --cc=amonakov@ispras.ru \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=richard.guenther@gmail.com \
    /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).