Skip to content

Commit f29486c

Browse files
committed
Detect Clang toolchain in RISC-V build script
1 parent 5ed9069 commit f29486c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/riscv/build.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ DEFINES := -DF_CPU=$(F_CLK) \
1717
-DF_TIMER=$(F_TICK) \
1818
-include config.h
1919

20-
# Toolchain override (default to GNU)
2120
CROSS_COMPILE ?= riscv32-unknown-elf-
22-
TOOLCHAIN_TYPE ?= gnu
21+
CC = $(CROSS_COMPILE)gcc
22+
CC_IS_CLANG := $(shell $(CC) --version 2>/dev/null | grep -qi clang && echo 1)
2323

2424
# Architecture flags
2525
ARCH_FLAGS = -march=rv32imzicsr -mabi=ilp32

0 commit comments

Comments
 (0)