xiaoxiang781216 commented on code in PR #15475:
URL: https://github.com/apache/nuttx/pull/15475#discussion_r1909807275
##########
arch/risc-v/src/cmake/Toolchain.cmake:
##########
@@ -343,21 +343,19 @@ if(CONFIG_RISCV_TOOLCHAIN STREQUAL GNU_RVG)
# These models can't cover all implementation of RISCV, but it's enough for
# most cases.
- set(LLVM_CPUFLAGS)
-
if(CONFIG_ARCH_RV32)
- if(${ARCHCPUEXTFLAGS} STREQUAL imc)
- list(APPEND LLVM_CPUFLAGS -mcpu=sifive-e20)
- elseif(${ARCHCPUEXTFLAGS} STREQUAL imac)
- list(APPEND LLVM_CPUFLAGS -mcpu=sifive-e31)
- elseif(${ARCHCPUEXTFLAGS} STREQUAL imafc)
- list(APPEND LLVM_CPUFLAGS -mcpu=sifive-e76)
+ if(${ARCHCPUEXTFLAGS} MATCHES "^imc")
+ set(LLVM_CPUTYPE "sifive-e20")
Review Comment:
but why not pass the general riscv32imc directly?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]