Skip to content

Commit 3ec436c

Browse files
committed
Refactor riscv build.mk toolchain selection logic
1 parent 87f9c89 commit 3ec436c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

arch/riscv/build.mk

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

20-
CROSS_COMPILE ?= riscv32-unknown-elf-
21-
CC_DEFAULT := $(CROSS_COMPILE)gcc
22-
CC_IS_CLANG := $(shell $(CC_DEFAULT) --version 2>/dev/null | grep -qi clang && echo 1)
2320
# Architecture flags
2421
ARCH_FLAGS = -march=rv32imzicsr -mabi=ilp32
2522

2623
# Common compiler flags
27-
CFLAGS += -Wall -Wextra -Werror -Wshadow -Wno-unused-parameter
24+
CFLAGS += -Wall -Wextra -Wshadow -Wno-unused-parameter -Werror
2825
CFLAGS += -O2 -std=gnu99
2926
CFLAGS += $(ARCH_FLAGS)
3027
CFLAGS += -mstrict-align -ffreestanding -nostdlib -fomit-frame-pointer

0 commit comments

Comments
 (0)