The -ansi flag is used for C dialect selection and it is equivalent to -std=c90.
Because it goes right before -std=gnu99 it is ignored as for conflicting flags
GCC always uses the last one.
This type was used only for the typedef of mp_obj_t, which is now defined
by the object representation. So we can now remove this unused typedef,
to simplify the mpconfigport.h file.
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.
This is a fix for https://github.com/micropython/micropython/issues/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().
.mpy files contain the name of the source file that they were compiled
from. This patch adds a way to change this name to an arbitrary string,
specified on the command line with the -s option. The default is to use
the full name of the input filename.
This new -s option is useful to strip off a leading directory name so
that mpy-tool.py can freeze packages.
Building in 32-bit mode was only to reduce binary size on 64-bit machines
and is otherwise not needed. Having it forced to 32-bit meant an
unnecessary dependency on 32-bit libraries that is now removed.