* [PATCH] libgcov: Call __builtin_fork instead of fork
@ 2023-12-02 12:43 Florian Weimer
2023-12-08 14:07 ` Jakub Jelinek
0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2023-12-02 12:43 UTC (permalink / raw)
To: gcc-patches; +Cc: Jonathan Yong, Jan Hubicka, Richard Biener, Alexander Monakov
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):
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libgcov: Call __builtin_fork instead of fork
2023-12-02 12:43 [PATCH] libgcov: Call __builtin_fork instead of fork Florian Weimer
@ 2023-12-08 14:07 ` Jakub Jelinek
2023-12-08 15:28 ` Florian Weimer
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2023-12-08 14:07 UTC (permalink / raw)
To: Florian Weimer
Cc: gcc-patches, Jonathan Yong, Jan Hubicka, Richard Biener,
Alexander Monakov
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libgcov: Call __builtin_fork instead of fork
2023-12-08 14:07 ` Jakub Jelinek
@ 2023-12-08 15:28 ` Florian Weimer
0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2023-12-08 15:28 UTC (permalink / raw)
To: Jakub Jelinek
Cc: gcc-patches, Jonathan Yong, Jan Hubicka, Richard Biener,
Alexander Monakov
* Jakub Jelinek:
> 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.
Fixed & pushed, thanks.
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-08 15:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-02 12:43 [PATCH] libgcov: Call __builtin_fork instead of fork Florian Weimer
2023-12-08 14:07 ` Jakub Jelinek
2023-12-08 15:28 ` Florian Weimer
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).