yf13 commented on code in PR #11579:
URL: https://github.com/apache/nuttx/pull/11579#discussion_r1461702600


##########
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:
   @anchao  how to rewrite the rule to support both CLANG and GCC12+ 
explicitly? Which MACRO depicts CLANG toolchain now?



-- 
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

Reply via email to