bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parallel building of Linux Kernel is broken


From: Masahiro Yamada
Subject: Re: Parallel building of Linux Kernel is broken
Date: Tue, 11 Sep 2018 10:39:57 +0900

Hello Mike,


2018-09-11 1:24 GMT+09:00 Mike Shal <address@hidden>:
>
> It looks like the patch in question changed the default state of the
> jobserver tokens to be not inherited. Since this Makefile generates an
> included file (auto.conf), the 'make all' invocation creates that file and
> then re-invokes itself. However, the re-invoking of make happens in main.c
> instead of posixos.c, and is not wrapped in jobserver_pre_child/post_child
> which are responsible for updating the jobserver fd inheritance. I'd guess
> main.c also needs to call fd_inherit on the jobserver tokens (or use
> jobserver_pre_child?) before the re-invocation call. The following hack
> seems to fix the issue:
>
> diff --git a/main.c b/main.c
> index 5dd539b..83f30f8 100644
> --- a/main.c
> +++ b/main.c
> @@ -2446,7 +2446,9 @@ main (int argc, char **argv, char **envp)
>            if (stack_limit.rlim_cur)
>              setrlimit (RLIMIT_STACK, &stack_limit);
>  #endif
> +      jobserver_pre_child(1);
>            exec_command ((char **)nargv, environ);
> +      jobserver_post_child(1);
>  #endif
>            free (aargv);
>            break;
>
> -Mike


Yes, with this change,
I can build Linux kernel in parallel now.

Thank you!



-- 
Best Regards
Masahiro Yamada



reply via email to

[Prev in Thread] Current Thread [Next in Thread]