Re: [PATCH V7 1/4] rust: Fix a race condition in Makefile

Mukesh Kumar Chaurasiya
2026-03-30T09:19:34Z

On Sun, Mar 29, 2026 at 07:25:19PM +0200, Miguel Ojeda wrote:
> On Sun, Mar 29, 2026 at 6:03 PM Mukesh Kumar Chaurasiya (IBM)
> <mkchauras@gmail.com> wrote:
> >
> > When compiling with -j1 flag in powerpc, the libproc_macro finds the
> > libcore.rmeta both in toolchain and local rust directory. libproc_macro
> > should use the toolchain provided libcore.rmeta.
>
> By toolchain, do you mean the sysroot one or something else?
>
Hey Miguel,

yeah the sysroot one.
> We should make it such that `rustc` does not try to use them to begin
> with, e.g. we added `--sysroot=/dev/null` to prevent that in the past,
> please see:
>
> 71479eee9da8 ("rust: Suppress searching builtin sysroot")
>
> In other words, we should try to avoid adding dependencies (even if
> order-only) to workaround the issue, but instead we should get rid of
> the root issue.
>
> Otherwise, after a build, if we rebuild only one of them, wouldn't it
> find again both? i.e. this is not really a "race condition".
>
Yeah this makes sense.

> From the original message, I see this was happening when building the
> host libraries, because the targets happen to match, i.e. you are
> doing a native build on powerpc, right?
Yes we are doing a native powerpc build.
>
> Perhaps we could put the host `.rmeta`s separately, or something like that.
I didn't understand this part, `.rmeta` for host are kept in sysroot
path, are we trying to change the sysroot directory?

Regards,
Mukesh
>
> Thanks!
>
> Cheers,
> Miguel