Hello Mike,

2018-09-11 1:24 GMT+09:00 Mike Shal <mar...@gmail.com>:
>
> 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

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to