-
Notifications
You must be signed in to change notification settings - Fork 124
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
Cross-compilation for arm-none-eabi target #121
Comments
@danngreen Please do submit a PR. It seems entirely reasonable. |
In #122 I fixed the For the header, it's newlib that provides the |
Excellent, yes it did occur to me to do something like what you did in #123 (looking for the required symbols first), so I'm glad to see you did that. I can confirm this compiles with the arm-none-eabi. Thanks! |
Those PRs have been merged, so I hope arm-none-eabi works now and this can be closed, @danngreen |
Please verify. |
Yes, thank you, it builds now. |
Hi, very nice project!
I've found that two changes need to be made in order to cross-compile for a "bare-metal" ARM target using arm-none-eabi-gcc (that is, the gcc arm embedded toolchain).
fast_float/include/fast_float/float_common.h
Lines 47 to 53 in b15abc9
With every version of the toolchain from 10.3.1 going back to at least 5.4, endian.h is located in machine/endian.h, so line 47 needs to match a macro that for the ARM target. I've experimented and found both
|| defined (__arm__)
and|| defined (__ARM_EABI__)
work, but I'm not sure which is proper (nor do I know where this file is located with propriety non-gcc-based ARM compilers).fast_float/include/fast_float/digit_comparison.h
Lines 88 to 89 in b15abc9
The arm-none-eabi-g++ compiler complains
no matching function for call to 'min(int32_t&, int)'
. Explicitly casting the integer constant to the same type as the variable works, and seems to be stylistically similar to other casts in this file:If these changes seem helpful to others, I'm happy to issue a pull request. Or try different solutions if this breaks someone else's build. In any case, thanks for the great project!
The text was updated successfully, but these errors were encountered: