cuiziwei1 commented on code in PR #14130:
URL: https://github.com/apache/nuttx/pull/14130#discussion_r1797525057


##########
arch/risc-v/src/cmake/Toolchain.cmake:
##########
@@ -259,7 +259,16 @@ if(CONFIG_RISCV_TOOLCHAIN STREQUAL GNU_RVG)
   endif()
 
   if(CONFIG_ARCH_RV_ISA_ZICSR_ZIFENCEI)
-    set(ARCHCPUEXTFLAGS ${ARCHCPUEXTFLAGS}_zicsr_zifencei)
+    if(NOT DEFINED GCCVER)
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+                      OUTPUT_VARIABLE GCC_VERSION_OUTPUT)
+      string(REGEX MATCH "\\+\\+.* ([0-9]+)\\.[0-9]+" GCC_VERSION_REGEX
+                   "${GCC_VERSION_OUTPUT}")
+      set(GCCVER ${CMAKE_MATCH_1})
+    endif()

Review Comment:
   ok



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

Reply via email to