Skip to content
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

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

Closed
joerg-krause opened this issue Oct 11, 2016 · 1 comment
Closed

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

joerg-krause opened this issue Oct 11, 2016 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@joerg-krause
Copy link
Contributor

joerg-krause commented Oct 11, 2016

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.

@sfackler sfackler added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Oct 11, 2016
@joerg-krause
Copy link
Contributor Author

Cross-building libstd for my custom ARMv5 target with panic=abort works now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants