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.
Fix unix/Makefile to build on OSX
Please comment and review - I am not an expert in the subtleties of Makefiles!
This unix/Makefile change should allow the unix port to build on OSX without breaking stmhal build on OSX or affecting other platforms. Tested build for unix and stmhal on OSX 10.7.5 (Lion):
Force OSX to compile with clang even if gcc is available
Change LDFLAGS syntax to be compatible with clang
Fix questionable syntax on line 90
Remove extraneous tab character on line 102