Skip to content

mpy-cross: Fix mingw and msys2 compilation #2262

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

Closed
wants to merge 1 commit into from

Conversation

stinos
Copy link
Contributor

@stinos stinos commented Jul 25, 2016

When compiling with msys2's gcc there's no need to apply the binary fmode
so adjust the Makefile to reflect that.
When compiling with mingw we need to include malloc.h since there is no
alloca.h, and the 64bit detection in mpconfigport.h needs some adjustment.

Note I don't know if the detection in the Makefile is ok when using cross-compilation for windows from a linux machine or when running wine. A better way might be to test the output of $(CC) -dumpmachine, but that would likely fail when using clang instead of gcc?

When compiling with msys2's gcc there's no need to apply the binary fmode
so adjust the Makefile to reflect that.
When compiling with mingw we need to include malloc.h since there is no
alloca.h, and the 64bit detection in mpconfigport.h needs some adjustment.
stinos referenced this pull request Jul 25, 2016
… windows

This is a fix for #2209:
by default a file created using open() uses text translation mode so writing
\n to it will result in the file having \r\n. This is obviously problematic
for binary .mpy files, so provide functions for setting the open mode
and use binary mode in mpy-cross' main().
@pfalcon
Copy link
Contributor

pfalcon commented Jul 30, 2016

Merged, thanks!

@stinos stinos deleted the mpy-cross-windows branch November 3, 2016 12:55
tannewt pushed a commit to tannewt/circuitpython that referenced this pull request Nov 16, 2019
cpb: Disable the onboard speaker until request
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

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy