-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
newlib is missing hardware floating support #51184
Comments
Use |
I think in this case we should support multilib here since that is what ARM does. It shouldn't be too expensive as they're pretty small runtimes. Plus this will probably fix qmk_firmware, which use https://hydra.nixos.org/job/nixpkgs/trunk/qmk_firmware.x86_64-linux |
On qmk_firmware it is especially difficult, because we will not know ahead of time whether it will need hard float. Some use it and some don't. But it's the same gcc target for both: Otherwise I suppose we could get the gcc wrapper to just ignore |
There's a gazillion things one would want to very for embedded besides hard/soft float. I'm sort of morally opposed to multi-lib with embedded especially (in addition to my general disdain for building libraries with compilers), because 1,2, even 10 sizes do not fit all. |
About
where
|
|
See http://llvm.org/doxygen/classllvm_1_1Triple.html, http://llvm.org/doxygen/Triple_8h_source.html, http://llvm.org/doxygen/Triple_8cpp.html, http://llvm.org/doxygen/Triple_8cpp_source.html . GNU config thinks "kernel-os" rather than "os-environment", which causes your |
--- a/config.sub
+++ b/config.sub
@@ -1507,6 +1507,8 @@ case $os in
;;
none)
;;
+ none-eabi | none-eabihf | none-gnueabi | none-gnueabihf)
+ ;;
*-eabi)
;;
*) makes GNU Config a bit more flexible. But the long term politics of reconciling the LLVM and GNU approach is still needed. |
eabihf is an abi that can be used with ARM architectures that support the “hard float”. It should probably only be used with ARM32 when you are absolutely sure your binaries will run on ARM systems with a FPU. Also, add an example "armhf-embedded" to match the preexisting arm-embedded system. qmk_firmware needs hard float in a few places, so add them here to get that to work. Fixes NixOS#51184
eabihf is an abi that can be used with ARM architectures that support the “hard float”. It should probably only be used with ARM32 when you are absolutely sure your binaries will run on ARM systems with a FPU. Also, add an example "armhf-embedded" to match the preexisting arm-embedded system. qmk_firmware needs hard float in a few places, so add them here to get that to work. Fixes NixOS#51184
How can I use this newly packaged
newlib
with hardware floating point support?I have the following code example:
Please not the
-mfloat-abi=hard
flag. Apparently, by default,newlib
is built without hardware floating point support. See https://sourceware.org/newlib/faq.html#q4 which discuss the build flag--newlib-hw-fp
:I'v tried to override
newlib
ornewlibCross
without success with an overlay:And I've tried to import my cross system using
import <nixpkgs> { crossSystem = { ...; float = "hard" }; }
without success either.Originally posted by @guibou in #47533 (comment)
The text was updated successfully, but these errors were encountered: