Unix port using gcc with clang flags
I'm trying to build the Unix port, but I keep getting gcc: error: unrecognized command-line option ‘-Qunused-arguments’.
Looking at online docs, it looks like clang has that option, but gcc does not.
I have CC set to clang(both globally and when I run make, i.e., CC=clang make), but the Makefile seems to insist on using gcc and so I can't work around this by trying to use the appropriate compiler. https://github.com/micropython/micropython/blob/master/ports/unix/README.md also explicitly calls out gcc as the compiler to use.
Error building unix port on MacOS
I am attempting to build the unix port of on MacOS, but part way through the build I keep running into this error:
CC ../../lib/axtls/ssl/asn1.c
error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option]
make: *** [build/lib/axtls/ssl/asn1.o] Error 1
When I took a look at the MakeFile, it appears that the build system uses Clang instead of GCC when building on a mac. From what I can tell, the "-Wno-unused-but-set-variable' option is not available with Clang.
Anyway of getting around this? I have GCC installed via homebrew if that is a possibility.
MacOS version: 10.13.6
MicroPython Master branch hash #: 4df194394