Skip to content
Snippets Groups Projects
Unverified Commit 021a19a2 authored by CNLohr's avatar CNLohr Committed by GitHub
Browse files

Merge pull request #291 from imbus64/master

ch32v003fun.mk changes related to compiler prefix and newlib paths
parents dcaf7981 6dfacbdd
No related branches found
No related tags found
No related merge requests found
# Default prefix for Windows
ifeq ($(OS),Windows_NT)
PREFIX?=riscv64-unknown-elf
# Check if riscv64-linux-gnu-gcc exists
else ifneq ($(shell which riscv64-linux-gnu-gcc),)
PREFIX?=riscv64-linux-gnu
# Check if riscv64-unknown-elf-gcc exists
else ifneq ($(shell which riscv64-unknown-elf-gcc),)
PREFIX?=riscv64-unknown-elf
# Default prefix
else
ifeq (, $(shell which riscv64-unknown-elf-gcc))
PREFIX?=riscv64-elf
else
PREFIX?=riscv64-unknown-elf
endif
PREFIX?=riscv64-elf
endif
# Fedora places newlib in a different location
ifneq ($(wildcard /etc/fedora-release),)
NEWLIB?=/usr/arm-none-eabi/include
else
NEWLIB?=/usr/include/newlib
endif
TARGET_MCU?=CH32V003
TARGET_EXT?=c
......@@ -129,7 +141,7 @@ endif
CFLAGS+= \
$(CFLAGS_ARCH) -static-libgcc \
-I/usr/include/newlib \
-I$(NEWLIB) \
-I$(CH32V003FUN)/../extralibs \
-I$(CH32V003FUN) \
-nostdlib \
......
......@@ -15,7 +15,7 @@ CFLAGS:= \
-static-libgcc \
-march=rv32ec \
-mabi=ilp32e \
-I/usr/include/newlib \
-I$(NEWLIB) \
-I$(CH32V003FUN) \
-nostdlib \
-DCH32V003 \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment