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

Fix libunwind build: Define __LITTLE_ENDIAN__ for LE targets #65972

Merged
merged 1 commit into from
Nov 1, 2019

Conversation

vojtechkral
Copy link
Contributor

@vojtechkral vojtechkral commented Oct 30, 2019

If __LITTLE_ENDIAN__ is missing, libunwind assumes big endian
and reads unwinding instructions wrong on ARM EHABI.

Fix #65765

Technical background in referenced bug.

I didn't run any automated tests, just built a simple panicking program using the fixed toolchain and panicking started to work. Tried with catch_unwind() and that seems to work now too. libunwind's log seems ok now, I can paste it if needed.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 30, 2019
If __LITTLE_ENDIAN__ is missing, libunwind assumes big endian
and reads unwinding instructions wrong on ARM EHABI.

Fix rust-lang#65765
@alexcrichton
Copy link
Member

@bors: r

Nice find!

@bors
Copy link
Contributor

bors commented Oct 30, 2019

📌 Commit e9e4836 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 30, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Oct 31, 2019
…ichton

Fix libunwind build: Define __LITTLE_ENDIAN__ for LE targets

If `__LITTLE_ENDIAN__` is missing, libunwind assumes big endian
and reads unwinding instructions wrong on ARM EHABI.

Fix rust-lang#65765

Technical background in referenced bug.

I didn't run any automated tests, just built a simple panicking program using the fixed toolchain and panicking started to work. Tried with `catch_unwind()` and that seems to work now too. libunwind's log seems ok now, I can paste it if needed.
bors added a commit that referenced this pull request Oct 31, 2019
Rollup of 14 pull requests

Successful merges:

 - #65112 (Add lint and tests for unnecessary parens around types)
 - #65459 (Fix `-Zunpretty=mir-cfg` to render multiple items)
 - #65471 (Add long error explanation for E0578)
 - #65857 (rustdoc: Resolve module-level doc references more locally)
 - #65914 (Use structured suggestion for unnecessary bounds in type aliases)
 - #68635 (Optimize long-linker-command-line test)
 - #68636 (Make `promote_consts` emit the errors when required promotion fails)
 - #65960 (doc: reword iter module example and mention other methods)
 - #65963 (update submodules to rust-lang)
 - #65972 (Fix libunwind build: Define __LITTLE_ENDIAN__ for LE targets)
 - #65977 (Fix incorrect diagnostics for expected type in E0271 with an associated type)
 - #65995 (Add error code E0743 for "C-variadic has been used on a non-foreign function")
 - #65997 (Fix outdated rustdoc of Once::init_locking function)
 - #66005 (vxWorks: remove code related unix socket)

Failed merges:

r? @ghost
tmandry added a commit to tmandry/rust that referenced this pull request Nov 1, 2019
…ichton

Fix libunwind build: Define __LITTLE_ENDIAN__ for LE targets

If `__LITTLE_ENDIAN__` is missing, libunwind assumes big endian
and reads unwinding instructions wrong on ARM EHABI.

Fix rust-lang#65765

Technical background in referenced bug.

I didn't run any automated tests, just built a simple panicking program using the fixed toolchain and panicking started to work. Tried with `catch_unwind()` and that seems to work now too. libunwind's log seems ok now, I can paste it if needed.
bors added a commit that referenced this pull request Nov 1, 2019
Rollup of 16 pull requests

Successful merges:

 - #65112 (Add lint and tests for unnecessary parens around types)
 - #65470 (Don't hide ICEs from previous incremental compiles)
 - #65471 (Add long error explanation for E0578)
 - #65857 (rustdoc: Resolve module-level doc references more locally)
 - #65902 (Make ItemContext available for better diagnositcs)
 - #65914 (Use structured suggestion for unnecessary bounds in type aliases)
 - #68636 (Make `promote_consts` emit the errors when required promotion fails)
 - #65960 (doc: reword iter module example and mention other methods)
 - #65963 (update submodules to rust-lang)
 - #65972 (Fix libunwind build: Define __LITTLE_ENDIAN__ for LE targets)
 - #65977 (Fix incorrect diagnostics for expected type in E0271 with an associated type)
 - #65995 (Add error code E0743 for "C-variadic has been used on a non-foreign function")
 - #65997 (Fix outdated rustdoc of Once::init_locking function)
 - #66002 (Stabilize float_to_from_bytes feature)
 - #66005 (vxWorks: remove code related unix socket)
 - #66018 (Revert PR 64324: dylibs export generics again (for now))

Failed merges:

r? @ghost
@bors bors merged commit e9e4836 into rust-lang:master Nov 1, 2019
bors added a commit to rust-lang-ci/rust that referenced this pull request May 27, 2021
libunwind fix and cleanup

Fix:

1. "system-llvm-libunwind" now only skip build-script for linux target
2. workaround from rust-lang#65972 is not needed, upstream fix it in llvm/llvm-project@68c5070 ( LLVM 11 )
3. remove code for MSCV and Apple in `compile()`, as they are not used
4. fix rust-lang#69222 , compile c files and cpp files in different config
5. fix conditional compilation for musl target.
6. fix that x86_64-fortanix-unknown-sgx don't link libunwind built in build-script into rlib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panicking doesn't work on arm-unknown-linux-musleabi
4 participants