Commit 5aede5ff authored by Dimitris Lampridis's avatar Dimitris Lampridis

sw/fw: update CFLAGS and ASFLAGS for GCC 11.2

parent d27a3c6f
......@@ -38,10 +38,8 @@ RT_GIT_VERSION = 0x$(shell git rev-parse --short=8 HEAD || echo "0") # empty if
AUTOCONF = $(src)/$(BUILDDIR)/include/generated/autoconf.h
CROSS_COMPILE_TARGET ?= riscv32-elf-
# FIXME the mult/div is broken, for the time being remove it completely
# -march=rv32im should be the future option
CFLAGS += -D__TRTL_FIRMWARE__
CFLAGS += -mabi=ilp32 -march=rv32im -ffunction-sections -fdata-sections
CFLAGS ?= -mabi=ilp32 -march=rv32im
ASFLAGS ?= -mabi=ilp32 -march=rv32im_zicsr
CXXFLAGS += -fno-rtti -fno-exceptions
LDFLAGS += -lgcc -lc -Wl,--gc-sections
TRTL_LD_DIR ?= $(src)
......@@ -74,7 +72,7 @@ STRIP = $(CROSS_COMPILE_TARGET)strip
MEM_INIT_GEN = $(GEN_CORES)/tools/mem_init_gen.py
CFLAGS += -Wall -D__TRTL_FIRMWARE__ -DARCH=urv
CFLAGS += -Wall -D__TRTL_FIRMWARE__ -DARCH=urv -ffunction-sections -fdata-sections
CFLAGS += -I.
CFLAGS += -I$(BUILDDIR)/include
CFLAGS += -I$(TRTL_FW)
......@@ -178,7 +176,7 @@ $(BUILDDIR)/%.o: %.cpp
$(POSTCOMPILE)
$(BUILDDIR)/%.o: %.S
${CC} $(DEPFLAGS) $(CFLAGS) $(LDFLAGS) -c $< -o $@
${CC} $(DEPFLAGS) $(ASFLAGS) $(LDFLAGS) -c $< -o $@
$(POSTCOMPILE)
clean:
......
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