← index #12097Issue #4182
Related · high · value 3.852
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

Error building unix port on MacOS

closedby rdlaneropened 2018-09-22updated 2018-10-30

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

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