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

Missing __truncdfsf2 for aarch64-unknown-none-softfloat #327

Closed
rahealy opened this issue Dec 3, 2019 · 7 comments
Closed

Missing __truncdfsf2 for aarch64-unknown-none-softfloat #327

rahealy opened this issue Dec 3, 2019 · 7 comments

Comments

@rahealy
Copy link

rahealy commented Dec 3, 2019

I took a look at the C files referenced in this repo's README.md but don't feel that I'm qualified to make the port to rust.

I'd be very grateful if this function could be prioritized for implementation. Thank you.

@vinc
Copy link

vinc commented Feb 5, 2020

I have the same issue it seems on a project targeting 86_64-unknown-none and -mmx,-sse,+soft-float when using libm::atan2:

  = note: rust-lld: error: undefined symbol: __truncdfsf2
          >>> referenced by atan.rs:88 (/home/v/.cargo/registry/src/github.com-1ecc6299db9ec823/libm-0.2.1/src/math/atan.rs:88)
          >>>               libm-2ef216d6f8fb20a3.libm.6bk0rn0r-cgu.14.rcgu.o:(libm::math::atan::atan::h55c5acf004540e1c) in archive /home/v/src/vinc/moros/target/x86_64-moros/debug/deps/liblibm-2ef216d6f8fb20a3.rlib

@andre-richter
Copy link
Member

andre-richter commented Mar 1, 2020

There are two bare-metal aarch64 targets for rustc:

aarch64-unknown-none
aarch64-unknown-none-softfloat

The latter is intended for Kernels or Hypervisors where floating point code would be concenptionally ill-suited in most cases.

It just happens that the current rust compiler infrastructure does fall back to fixed point implementations of float operations if avail, hence the unusual target name.

Hitting a case where a float intrinsic is missing with the softfloat target is probably either a good hint that you accidentally included float code where you should not, or that the aarch64-unknown-none target is what you want instead (which would run your float code heaps faster because it utilizes the hardware floating point units of the processor).

@dbeckwith
Copy link

Ran into the same linker error on x86_64-unknown-none with the soft-float feature enabled. rust-num/num-traits#167 has the details. I'll look into the implementation that was going to be added in #262 and see if that works for me.

toku-sa-n added a commit to toku-sa-n/ramen that referenced this issue Jan 8, 2021
Still this OS cannot build in the debug mode because of compiler's bugs.
rust-lang/compiler-builtins#327
bors bot added a commit to toku-sa-n/ramen that referenced this issue Jan 8, 2021
622: build: remove lines about the debug build r=toku-sa-n a=toku-sa-n

Still this OS cannot build in the debug mode because of compiler's bugs.
rust-lang/compiler-builtins#327

bors r+


Co-authored-by: toku-sa-n <[email protected]>
bors bot added a commit to toku-sa-n/ramen that referenced this issue Jan 8, 2021
622: build: remove lines about the debug build r=toku-sa-n a=toku-sa-n

Still this OS cannot build in the debug mode because of compiler's bugs.
rust-lang/compiler-builtins#327

bors r+


Co-authored-by: toku-sa-n <[email protected]>
bors bot added a commit to toku-sa-n/ramen that referenced this issue Jan 8, 2021
622: build: remove lines about the debug build r=toku-sa-n a=toku-sa-n

Still this OS cannot build in the debug mode because of compiler's bugs.
rust-lang/compiler-builtins#327

bors r+


Co-authored-by: toku-sa-n <[email protected]>
bors bot added a commit to toku-sa-n/ramen that referenced this issue Jan 8, 2021
622: build: remove lines about the debug build r=toku-sa-n a=toku-sa-n

Still this OS cannot build in the debug mode because of compiler's bugs.
rust-lang/compiler-builtins#327

bors r+


Co-authored-by: toku-sa-n <[email protected]>
@HTGAzureX1212
Copy link

HTGAzureX1212 commented Aug 6, 2021

Just ran into this issue today whilst trying to target x86_64-unknown-uefi, when using embedded-graphics.

@sajattack
Copy link

Same thing on mips2 with +single-float (mipsel-sony-psp tier 3 target).

@sajattack
Copy link

Looks like it will be fixed soon? #448

@ayrtonm
Copy link
Contributor

ayrtonm commented Dec 17, 2021

These should be available on nightly now that rust-lang/rust#91986 is merged.

@Amanieu Amanieu closed this as completed Feb 26, 2022
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

No branches or pull requests

8 participants