Skip to content

LLVM Assertion when building libstd for ARMv5 with panic=abort #37097

Closed
@joerg-krause

Description

@joerg-krause

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions