Skip to content

Commit 59ea614

Browse files
committed
Configuration.mk: check TOCK_ARCH_FAMILIES before running the riscv compiler.
1 parent 427dd5a commit 59ea614

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Configuration.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,10 @@ CC_rv32imac := $(CC_rv32)
249249

250250
# Determine the version of the RISC-V compiler. This is used to select the
251251
# version of the libgcc library that is compatible.
252-
CC_rv32_version := $(shell $(TOOLCHAIN_rv32)$(CC_rv32) -dumpfullversion)
253-
CC_rv32_version_major := $(shell echo $(CC_rv32_version) | cut -f1 -d.)
252+
ifneq ($(findstring rv32i,$(TOCK_ARCH_FAMILIES)),)
253+
CC_rv32_version := $(shell $(TOOLCHAIN_rv32)$(CC_rv32) -dumpfullversion)
254+
CC_rv32_version_major := $(shell echo $(CC_rv32_version) | cut -f1 -d.)
255+
endif
254256

255257
# Match compiler version to support libtock-newlib versions.
256258
ifeq ($(CC_rv32_version_major),10)
@@ -686,6 +688,7 @@ ifneq ($(V),)
686688
$(info MAKEFLAGS=$(MAKEFLAGS))
687689
$(info PACKAGE_NAME=$(PACKAGE_NAME))
688690
$(info TOCK_ARCHS=$(TOCK_ARCHS))
691+
$(info TOCK_ARCH_FAMILIES=$(TOCK_ARCH_FAMILIES))
689692
$(info TOCK_TARGETS=$(TOCK_TARGETS))
690693
$(info TOCK_USERLAND_BASE_DIR=$(TOCK_USERLAND_BASE_DIR))
691694
$(info TOOLCHAIN=$(TOOLCHAIN))

0 commit comments

Comments
 (0)