anchao commented on code in PR #11579: URL: https://github.com/apache/nuttx/pull/11579#discussion_r1461722873
########## arch/risc-v/src/cmake/Toolchain.cmake: ########## @@ -273,19 +273,24 @@ if(${CONFIG_RISCV_TOOLCHAIN} STREQUAL GNU_RVG) set(PLATFORM_FLAGS) - if(CONFIG_ARCH_RV32) - if(${ARCHCPUEXTFLAGS} STREQUAL imc) - list(APPEND PLATFORM_FLAGS -mcpu=sifive-e20) - elseif(${ARCHCPUEXTFLAGS} STREQUAL imac) - list(APPEND PLATFORM_FLAGS -mcpu=sifive-e31) - elseif(${ARCHCPUEXTFLAGS} STREQUAL imafc) - list(APPEND PLATFORM_FLAGS -mcpu=sifive-e76) - endif() - else() - if(${ARCHCPUEXTFLAGS} STREQUAL imac) - list(APPEND PLATFORM_FLAGS -mcpu=sifive-s51) - elseif(${ARCHCPUEXTFLAGS} STREQUAL imafdc) - list(APPEND PLATFORM_FLAGS -mcpu=sifive-u54) + # Ubuntu gcc-riscv64-unknown-elf complains about options below so only use + # them for higher version toolchain + + if(GCC_VERSION GREATER_EQUAL 12) Review Comment: emm... It seems that risc-v does not add clang-related build rules. This part is only supported in arm. https://github.com/apache/nuttx/blob/2ec36fa7bd945f4cb3613bdb558f297874db3217/arch/arm/src/cmake/Toolchain.cmake#L46-L57 already, forget it, let us merge this PR. -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org