no1wudi commented on code in PR #9537:
URL: https://github.com/apache/nuttx/pull/9537#discussion_r1230481764


##########
arch/risc-v/src/common/Toolchain.defs:
##########
@@ -118,14 +118,28 @@ endif
 
 # Generic GNU RVG toolchain
 
-ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG)
+ifeq ($(CONFIG_RISCV_TOOLCHAIN_GNU_RV32),y)
+  CROSSDEV ?= riscv32-unknown-elf-
+else
+  CROSSDEV ?= riscv64-unknown-elf-
+endif
 
-  # Generic GNU RVG toolchain
+# Default toolchain
 
-  ifeq ($(CONFIG_RISCV_TOOLCHAIN_GNU_RV32),y)
-    CROSSDEV ?= riscv32-unknown-elf-
-  else
-    CROSSDEV ?= riscv64-unknown-elf-
+CC      = $(CROSSDEV)gcc
+CXX     = $(CROSSDEV)g++
+CPP     = $(CROSSDEV)gcc -E -P -x c
+STRIP   = $(CROSSDEV)strip --strip-unneeded
+OBJCOPY = $(CROSSDEV)objcopy
+OBJDUMP = $(CROSSDEV)objdump
+LD      = $(CROSSDEV)ld
+AR      = $(CROSSDEV)ar rcs
+NM      = $(CROSSDEV)nm
+
+ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG)
+
+  ifeq ($(GCCVER),)
+    export GCCVER := $(shell $(CC) --version | grep gcc | sed -r "s/.* 
([0-9]+\.[0-9]+).*/\1/")

Review Comment:
   Maybe we can try to do it in Config.mk
   



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