-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrapping i686->i686 on x86_64 host fails in stage0 #36800
Comments
Interesting! I've never seen this error before:
I wonder if may be we're compiling compiler-rt incorrectly? cc @japaric |
Perhaps gcc-rs doesn't correctly handle assembly when TARGET=i386 and HOST=x86_64. Because this sounds like the assembly may be being turned into a 64-bit ELF or something like that? (I could be talking nonsense here)
You mean #35021? We were already using gcc-rs before that landed. Perhaps I mis-copy-pasted some code from @nagisa This outcome is with rustbuild, right? |
Yes
Yes, as can clearly be seen from the command line invocation. Keep in mind that this bootstraps from i686 beta compiler (i.e. i686 -> i686).
Object files with failing functions were |
Ohhh, I think I know what's happening. Because the compiler still passes -lcompiler-rt in stage0 (more precisely, when building stage1 using stage0 compiler) but building std doesn't generate that artifact, we copy stage0 (the snapshot) libcompiler-rt.a into stage1 build artifacts. The logic for that is probably not correct for this case and we are Instead of tweaking that logic we could simply create an empty libcompiler-rt.a and place that in stage1 build artifacts when we build stage1 compiler (before stage1 std). That should also work. |
Oh that makes sense. This'll also get fixed on master very soon when we update the bootstrap compiler. |
Ok #36811 landed so I think this is closed now |
Some manual bisection shows that it stared happening after rust_builtins PR got merged.
Removing a number of assembly specialisations for i386 makes stuff compile.
The text was updated successfully, but these errors were encountered: