Re: [PATCH V7 1/4] rust: Fix a race condition in Makefile
From: Miguel Ojeda
Date: Sun Mar 29 2026 - 13:31:32 EST
On Sun, Mar 29, 2026 at 6:03 PM Mukesh Kumar Chaurasiya (IBM)
<mkchauras@xxxxxxxxx> 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?
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".
>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?
Perhaps we could put the host `.rmeta`s separately, or something like that.
Thanks!
Cheers,
Miguel