btashton commented on code in PR #9537: URL: https://github.com/apache/nuttx/pull/9537#discussion_r1229770149
########## 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: Should this be $CC instead of gcc? Also should we move the determining compiler version to be in a common location? I think we already are doing this in at least one other place. -- 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