-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for ARM Windows #41
Conversation
Also changes "Windows.h" to "windows.h" in getRealTime.c to fix MinGW cross-compilation under *nix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! This looks good to me, but I will give the other reviewers a chance to look at it before merging.
I suppose I can now go ahead and remove that Cygwin.
@@ -896,7 +896,7 @@ states that the compiler defines __64BIT__ if compiling in 64-bit mode. | |||
|
|||
The symbol __ARM_EABI__ is not defined if compiles under the old EABI. | |||
*/ | |||
#if !(defined(__ARMEL__) && defined(__ARM_EABI__)) | |||
#if !defined (__MINGW32__) && !(defined(__ARMEL__) && defined(__ARM_EABI__)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, are either of those __ARMEL__
or __ARM_EABI__
symbols defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__ARMEL__
is defined by armv7-w64-mingw32-clang but not aarch64-w64-mingw32-clang.
__ARM_EABI__
isn't defined by either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the information. @ldesnogu - Do you know if either of these are important on ARM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ARMEL and ARM_EABI are only applicable to 32-bit ARMv7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm specifically targeting both 32-bit ARMv7 and the modern "ARM64" (aarch64) Windows. Windows' ARM ABI is based on the EABI, so there is no point to a check for OABI vs EABI, which is why there's no mechanism to do so i.e. the __ARM_EABI__
predefine.
I know that I'm probably the only person who will ever run Mlucas on 32-bit ARM Windows (Windows RT or Windows 10 build 15035), but it works fine on my Surface RT. It's incredibly slow though, so not something I would recommend to anyone without ridiculous amounts of patience.
Some simple fixes to allow Mlucas to be compiled with MinGW for armv7 and aarch64.
I've run
-s m
for both architectures with LTO enabled, both work fine.My 2012 Surface RT may take a few years to run a PRP-DC, but modern ARM Windows laptops are genuinely useful.
You may remember my earlier foibles from April, which resulted in the "Cygwin" branch, which I can only describe as an artifact of the follies of my youth. This is the same thing, but done properly.