Skip to content

Support long double intrinsics in any aarch64 linux#429

Merged
Amanieu merged 1 commit intorust-lang:masterfrom
richkadel:linux-tf3
Jul 14, 2021
Merged

Support long double intrinsics in any aarch64 linux#429
Amanieu merged 1 commit intorust-lang:masterfrom
richkadel:linux-tf3

Conversation

@richkadel
Copy link

Expands the support added in #377 from just musl to any linux.

Fixes #428

@richkadel
Copy link
Author

@alexcrichton - Here's the PR I proposed in zulip.

cc: @tmandry @petrhosek

@richkadel
Copy link
Author

richkadel commented Jul 14, 2021

@Amanieu - Alex referred me to you for reviewing this change. Do you have time to take a look at this?

(There is some urgency for resolving this for Fuchsia, so I appreciate any help you can provide. Thank you!)

@Amanieu
Copy link
Member

Amanieu commented Jul 14, 2021

Arguably this should apply to all targets using aarch64, so we can just go ahead and remove the if. Looking at compiler-rt's CMakeLists.txt shows that the *tf intrinsics are always included.

@richkadel
Copy link
Author

richkadel commented Jul 14, 2021

I just pushed an amended commit to address the CI error:

checking /target/aarch64-unknown-linux-gnu/debug/deps/libcompiler_builtins-9c67e34fdec82140.rlib for duplicate symbols
================================================================
0000000000000000 T __fe_getround
0000000000000000 T __fe_raise_inexact
Error: Process completed with exit code 1.

I wasn't sure if I should include the entire block from the musl condition or not, but apparently those symbols should be in the musl condition only.

@richkadel
Copy link
Author

Arguably this should apply to all targets using aarch64, so we can just go ahead and remove the if. Looking at compiler-rt's CMakeLists.txt shows that the *tf intrinsics are always included.

Got it. Will do. Thanks.

@richkadel
Copy link
Author

@Amanieu - Done. Thanks!

@Amanieu
Copy link
Member

Amanieu commented Jul 14, 2021

The CI error happens because fp_mode.c is compiled and included twice. The fix is to avoid compiling the same file multiple times on line 510 of build.rs.

This wasn't caught before because only aarch64-gnu is tested on CI, not aarch64-musl.

@richkadel
Copy link
Author

Ah, I can add a hashset lookup on line 510 to avoid adding dups, and move those last two symbols with the others under any aarch64.

I think that's what you're suggesting, so I'll start that. Let me know if I misunderstand.

@Amanieu
Copy link
Member

Amanieu commented Jul 14, 2021

Yes, that's what I had in mind.

Expands the support added in rust-lang#377 from just musl to any linux.

Also checks for and avoids adding duplicate sources.

Fixes rust-lang#428
@richkadel
Copy link
Author

Done (I think) but I'm not sure how to launch a test of that code locally on my machine (cargo test from both the root dir and the testcrate dir didn't even attempt to compile it). Apologies if CI finds a typo/syntax error.

If there's a better way to test locally, let me know and I'll check it.

@Amanieu Amanieu merged commit cbbf3a0 into rust-lang:master Jul 14, 2021
@richkadel
Copy link
Author

@Amanieu thank you for your quick response!

Can I help with any steps in https://github.com/rust-lang/compiler-builtins/blob/master/PUBLISHING.md in some way?

@Amanieu
Copy link
Member

Amanieu commented Jul 14, 2021

I just published a new release.

@richkadel
Copy link
Author

Awesome! Thanks so much!

@richkadel
Copy link
Author

@Amanieu - I just wanted to let you know that this change did resolve the problems we had 👍 .

Thanks again!

tgross35 pushed a commit that referenced this pull request Jan 31, 2026
Support `long double` intrinsics in any aarch64 linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing symbols on aarch64-unknown-linux-gnu

2 participants