| 62 - pub(crate) struct IterMut<'a, T: 'a, C: cfg::Config + 'a>(slice::IterMut<'a, Ptr<T, C>>); 62 + pub(crate) struct IterMut<'a, T, C: cfg::Config>(slice::IterMut<'a, Ptr<T, C>>); | error: unknown directive | note: instantiated into assembly here --> <inline asm>:1:2 | 1 | .insn i 0x0F, 0, x0, x0, 0x010 | ^
Created attachment 766743 [details] full build log
It is an issue with llvm MC support of .insn directive that is only included in llvm-14 (https://reviews.llvm.org/D108602?id=369214). Although the llvm version shipped with rust-1.59 has backported the .insn patch, the bootstrap rust compiler also needs to be compiled with llvm supporting .insn because std library in stage0 (specifically stdarch) uses .insn. Upstream accepts fixes that use .word instead of .insn as a temporal workaround, but I asked people who opened the issue linked, it seems to be going to take some time. And once upgraded to llvm 14, upstream will eventually use .insn So I guess a better solution is patch llvm with .insn support () until llvm-14 becomes stable in gentoo. I applied the patch to portage llvm locally and compiles rust-1.58 with USE=system-llvm as a bootstrap compiler. Then with the bootstrap compiler, I compile rust-1.59 with USE=system-llvm,system-bootstrap successfully.
Am I missing why we can't just mask USE=system-llvm on riscv for now?
(In reply to Sam James from comment #3) > Am I missing why we can't just mask USE=system-llvm on riscv for now? Yeah, it should work once the bootstrap compiler is compiled with llvm supporting .insn, but atm, it seems the one they provide doesn't(otherwise, this bug won't exist).
>>otherwise, this bug won't exist sorry, won't be discovered so quickly because by default USE=system-llvm and system-boostrap are disabled.
tested, the problem is fixed in version 1.60.0 I'm closing this as wontfix