Skip to content

Commit

Permalink
fix compilation for arch linux
Browse files Browse the repository at this point in the history
on arch linux, the risc compiler name is different.
Add some logic to pick correct risc compiler on arch linux

Signed-off-by: Amitesh Singh <[email protected]>
  • Loading branch information
amitesh-singh committed Dec 21, 2023
1 parent 2fa932a commit 74179f4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ch32v003fun/ch32v003fun.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@

PREFIX?=riscv64-unknown-elf
ifeq ($(OS),Window_NT)
PREFIX?=riscv64-unknown-elf
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
ifeq ($(shell test -e /etc/arch-release && echo "exists"),exists)
PREFIX?=riscv64-elf
else
PREFIX?=riscv64-unknown-elf
endif
endif
endif

CH32V003FUN?=../../ch32v003fun
MINICHLINK?=$(CH32V003FUN)/../minichlink
Expand Down

0 comments on commit 74179f4

Please sign in to comment.