← index #12097Issue #782
Related · high · value 1.113
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 · ISSUE

micropython won't compile on OSX Mavericks

closedby lerouxbopened 2014-08-02updated 2014-09-23

I have libffi installed via homebrew, but it keeps complaining about libffi not being found. I eventually fixed that with export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig.

Now it gets stuck when it tries to compile, probably because it is using clang and not gcc. I got the following error:

error: unknown warning option '-Werror=cpp' [-Werror,-Wunknown-warning-option]

I installed gcc with homebrew, but it is still using clang. I then commented the compiler option out in the makefile so that clang compiles and then I eventually ended up with:

ld: unknown option: -Map=micropython.map

And that's where I got stuck. I don't know how to solve that and I don't know how to force it to use gcc and not clang either. (assuming that that's probably part of the problem)

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