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) \
18
18
-include config.h
19
19
20
20
CROSS_COMPILE ?= riscv32-unknown-elf-
21
- CC = $(CROSS_COMPILE ) gcc
21
+ C = $(CROSS_COMPILE ) gcc
22
22
CC_IS_CLANG := $(shell $(CC ) --version 2>/dev/null | grep -qi clang && echo 1)
23
23
24
24
# Architecture flags
@@ -31,7 +31,7 @@ CFLAGS += $(ARCH_FLAGS)
31
31
CFLAGS += -mstrict-align -ffreestanding -nostdlib -fomit-frame-pointer
32
32
CFLAGS += $(INC_DIRS ) $(DEFINES ) -fdata-sections -ffunction-sections
33
33
34
- ifeq ($(TOOLCHAIN_TYPE ) ,llvm )
34
+ ifeq ($(CC_IS_CLANG ) ,1 )
35
35
CC = $(CROSS_COMPILE ) clang
36
36
AS = $(CROSS_COMPILE ) clang
37
37
LD = $(CROSS_COMPILE ) ld.lld
@@ -46,7 +46,7 @@ ifeq ($(TOOLCHAIN_TYPE),llvm)
46
46
ASFLAGS = --target=riscv32-unknown-elf $(ARCH_FLAGS )
47
47
LDFLAGS = -m elf32lriscv --gc-sections
48
48
else
49
- CC = $(CROSS_COMPILE ) gcc
49
+ CC = $(CC_DEFAULT )
50
50
AS = $(CROSS_COMPILE ) as
51
51
LD = $(CROSS_COMPILE ) ld
52
52
DUMP = $(CROSS_COMPILE ) objdump -Mno-aliases
You can’t perform that action at this time.
0 commit comments