-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Description
When compiling something with clang and -march=rv32i -mcmodel=large I get an error: "unsupported argument 'large' to option '-mcmodel=' for target 'riscv32-unknown-elf'"
If I do so with gcc, it seems to just go with medlow code model.
Should this behavior be changed in clang? to match gcc? maybe just a warning is enough
I encountered this when trying to compile newlib with clang, some of my multilibs are 32 bit, and some are 64 bit, but I exported CFLAGS_FOR_TARGET=-mcmodel=large because I want the 64 bit libraries to be compiled with large code model. when building like this with gcc it works fine.
Maybe I can configure newlib somehow to have different flags for 32 bit libs vs 64 bit libs? I did not find something like that.
This behavior might limit clang when building newlib with multilibs.