File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ DEFINES := -DF_CPU=$(F_CLK) \
1818 -include config.h
1919
2020CROSS_COMPILE ?= riscv32-unknown-elf-
21- CC = $(CROSS_COMPILE ) gcc
21+ C = $(CROSS_COMPILE ) gcc
2222CC_IS_CLANG := $(shell $(CC ) --version 2>/dev/null | grep -qi clang && echo 1)
2323
2424# Architecture flags
@@ -31,7 +31,7 @@ CFLAGS += $(ARCH_FLAGS)
3131CFLAGS += -mstrict-align -ffreestanding -nostdlib -fomit-frame-pointer
3232CFLAGS += $(INC_DIRS ) $(DEFINES ) -fdata-sections -ffunction-sections
3333
34- ifeq ($(TOOLCHAIN_TYPE ) ,llvm )
34+ ifeq ($(CC_IS_CLANG ) ,1 )
3535 CC = $(CROSS_COMPILE ) clang
3636 AS = $(CROSS_COMPILE ) clang
3737 LD = $(CROSS_COMPILE ) ld.lld
@@ -46,7 +46,7 @@ ifeq ($(TOOLCHAIN_TYPE),llvm)
4646 ASFLAGS = --target=riscv32-unknown-elf $(ARCH_FLAGS )
4747 LDFLAGS = -m elf32lriscv --gc-sections
4848else
49- CC = $(CROSS_COMPILE ) gcc
49+ CC = $(CC_DEFAULT )
5050 AS = $(CROSS_COMPILE ) as
5151 LD = $(CROSS_COMPILE ) ld
5252 DUMP = $(CROSS_COMPILE ) objdump -Mno-aliases
You can’t perform that action at this time.
0 commit comments