Skip to content

Commit fb8e11a

Browse files
committed
Allow prefix to be overridden
1 parent bced4a6 commit fb8e11a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ch32fun/ch32fun.mk

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ else
55
endif
66

77
# Default/fallback prefix
8-
PREFIX:=riscv64-elf
8+
PREFIX_DEFAULT:=riscv64-elf
99

1010
ifneq ($(shell $(WHICH) riscv64-unknown-elf-gcc),)
11-
PREFIX:=riscv64-unknown-elf
11+
PREFIX_DEFAULT:=riscv64-unknown-elf
1212
else ifneq ($(shell $(WHICH) riscv-none-elf-gcc),)
13-
PREFIX:=riscv-none-elf
13+
PREFIX_DEFAULT:=riscv-none-elf
1414
endif
15+
16+
PREFIX?=$(PREFIX_DEFAULT)
1517
# We used to check if riscv64-linux-gnu-gcc exists, because it would still produce valid output with -ffreestanding.
1618
# It was different enough that we decided not to automatically fallback to it.
1719

0 commit comments

Comments
 (0)