← index #12097PR #871
Related · high · value 3.904
QUERY · ISSUE

Unix port using gcc with clang flags

openby brettcannonopened 2023-07-26updated 2023-07-27
bug

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.

CANDIDATE · PULL REQUEST

Fix unix/Makefile to build on OSX

mergedby blmorrisopened 2014-09-22updated 2014-09-23

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

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied