Issue |
134537
|
Summary |
[RISC-V] Clang behaves differently from gcc when `-mcmodel=large` and triple is riscv-32
|
Labels |
clang
|
Assignees |
|
Reporter |
amitch1999
|
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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs