Closed
Description
I am using rust-cross-libs to build libstd for an ARMv5 musl-based target. This works fine when using the default panic strategy.
However, when adding "panic-strategy": "abort"
to the JSON file, building libstd fails when libunwind is compiled:
/home/joerg/rust-cross-libs/rust/bin/rustc src/libpanic_abort/lib.rs -C opt-level=s --target=armv5te-unknown-linux-musl -L /home/joerg/rust-cross-libs/build --out-dir=/home/joerg/rust-cross-libs/build -C extra-filename=-6eb85298
/home/joerg/rust-cross-libs/rust/bin/rustc src/libpanic_unwind/lib.rs -C opt-level=s --target=armv5te-unknown-linux-musl -L /home/joerg/rust-cross-libs/build --out-dir=/home/joerg/rust-cross-libs/build -C extra-filename=-6eb85298
rustc: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Instructions.cpp:1436: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
make: *** [/home/joerg/rust-cross-libs/build/hack.mk:16: panic_unwind] Aborted (core dumped)
I know, that ARMv5 is an unsupported target and the rust-cross-libs script is a hack, but I would be happy if I can use the panic strategy for my embedded target.