Commit 317250f2 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

fix makefile for risc-v test build

parent cb8c90b7
......@@ -12,6 +12,8 @@ ARCH ?= $(patsubst "%",%,$(CONFIG_ARCH))
CROSS_COMPILE ?= $(patsubst "%",%,$(CONFIG_CROSS_COMPILE))
WRPCSW_ROOT ?= $(patsubst "%",%,$(CONFIG_WRPCSW_ROOT))
CONFIG_ARCH_CFLAGS ?= -march=rv32imc -mabi=ilp32
# For "make config" to work, we need a valid ARCH
ifeq ($(ARCH),)
ARCH = unix
......@@ -45,7 +47,7 @@ VERSION = $(shell git describe --always --dirty)
all: $(TARGET).o
# CFLAGS to use. Both this Makefile (later) and app-makefile may grow CFLAGS
CFLAGS = $(USER_CFLAGS)
CFLAGS = -march=rv32imc -mabi=ilp32 $(USER_CFLAGS)
CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
CFLAGS += -ffunction-sections -fdata-sections
......@@ -106,7 +108,7 @@ export CFLAGS
# libraries: see proto-standard/Makefile as an example.
$(TARGET).o: $(OBJ-y)
$(LD) --gc-sections -Map $(TARGET).map1 -r -o $@ $(PPSI_O_LDFLAGS) \
$(LD) -Map $(TARGET).map1 -r -o $@ $(PPSI_O_LDFLAGS) \
--start-group $(OBJ-y) --end-group
$(OBJ-y): .config $(wildcard include/ppsi/*.h)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment