-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
64bit mingw build support #1633
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
Conversation
I'm ok with this, but I did not test it. I guess the nlrx64.S stuff can be fixed some other time. |
The BSD stuff is a copy from the unix makefile but at least there it makes some sense, a windows makefile on BSD doesn't. The -lmman flag is probably for mmap functions but there is no other build support for it on windows so just that flag won't cut it anyway.
- add mp_int_t/mp_uint_t typedefs in mpconfigport.h - fix integer suffixes/formatting in mpconfig.h and mpz.h - use MICROPY_NLR_SETJMP=1 in Makefile since the current nlrx64.S implementation causes segfaults in gc_free() - update README
38cef76
to
e200254
Compare
Rebased it against latest changes and all tests still pass, except machine_mem/meminfo/math_fun. First two because they are made for unix port (never got to making them skip) and the last one because mingw prints I dont have the knowledge myself for fixing the x64 assembly. |
Since yesterday, libc no longer prints floats, uPy itself does. |
The Makefile doesn't yet have utils/printf.c |
It's handled by py/formatfloat.c |
Then I guess migw's asinh (and others) returns -0? |
Bottom line is that I'd like to have a look first. |
Ok with revision of ede1f54:
With master:
@stinos , you know how to handle it - pull in known good asinh and others, and skip libc/libm altogether ;-). So, you'd better say of you don't like that (but then you should be ready to move pendulum in the other direction yourself - like, I thought that it would be nice to have either own routine for float printing, or recurse to libc. But as you can see, I just removed printing-via-libc code, because maintaining that "would be nice" is a chore). |
Merged, thanks. |
Note that uPy has some difference with CPy wrt nan: if you do |
I was never planning to very actively support the mingw port: I have no real use for it myself (except that I can build same source tree locally with gcc without needing to ssh to a unix box) so I just try to make sure it keeps on building and running tests with most features working. Which it does apart from apparent corner case asinh and modf behaviour and I don't consider that problematic enough to work on it. On the other hand, on a lazy sunday afternoon I might do it anyway :] |
Thanks for submitting those!
Ah, right, even if own implementations will be added for mingw, they won't affect msvc build. But then it will be just unneeded discrepancy which may lead to confusion. Anyone, I don't plan to make changes for that any time soon, but then suddenly I can start and make them, so wanted to make sure you're in loop. |
This should allow you to use SWD pins unless a debugger is attached. You may have trouble connecting to SWD when CircuitPython has already begun using them. Fixes micropython#1633
Changes to nlr as per comments to #1632
Sidenote: the nlrx64.S implementation (originally enabled just for cygwin ) compiles fine using both cygwin and mingw gcc versions but it might be broken as the produced executables do not function for me on two different machines. The cygwin one just exits with no info whatsoever, the mingw one hits the second
assert(!"bad free");
in gc_free() and segfaults from the moment anything is interpreted/executed.