From 7fff977c8853a9c30f0017f4e47dd838b529997d Mon Sep 17 00:00:00 2001 From: Bunnaroath Sou Date: Wed, 27 Mar 2019 18:05:49 -0700 Subject: Update Makefile to handle special ENV require for coremark, dhrystone --- scripts/standalone.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/standalone.mk b/scripts/standalone.mk index 6f87950..0526bd1 100644 --- a/scripts/standalone.mk +++ b/scripts/standalone.mk @@ -171,6 +171,7 @@ $(PROGRAM_ELF): \ $(BSP_DIR)/metal.$(LINK_TARGET).lds mkdir -p $(dir $@) $(MAKE) -C $(SRC_DIR) $(basename $(notdir $@)) \ + PORT_DIR=$(PORT_DIR) \ AR=$(RISCV_AR) \ CC=$(RISCV_GCC) \ CXX=$(RISCV_GXX) \ -- cgit v1.2.3 From 9ed1c05e3b202ef2ef17cae4bfc0ca6425541d13 Mon Sep 17 00:00:00 2001 From: "Hsiang-Chia.Huang" Date: Wed, 29 May 2019 05:58:13 -0700 Subject: Add compile options for coremark and update freedom-metal repo. Regenerate files in bsps. --- scripts/standalone.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'scripts') diff --git a/scripts/standalone.mk b/scripts/standalone.mk index 0526bd1..d0740cd 100644 --- a/scripts/standalone.mk +++ b/scripts/standalone.mk @@ -49,6 +49,14 @@ ifeq ($(LINK_TARGET),) endif endif +ifeq ($(PROGRAM),coremark) +ifeq ($(CONFIGURATION),release) +ifeq ($(LINK_TARGET),) +LINK_TARGET = ramrodata +endif +endif +endif + ifeq ($(LINK_TARGET),) LINK_TARGET = default endif @@ -127,6 +135,15 @@ endif RISCV_XCFLAGS += -DDHRY_ITERS=$(TARGET_DHRY_ITERS) endif +ifeq ($(PROGRAM),coremark) +ifeq ($(RISCV_SERIES),sifive-7-series) +RISCV_XCFLAGS += -O2 -fno-common -funroll-loops -finline-functions -funroll-all-loops --param max-inline-insns-auto=20 -falign-functions=8 -falign-jumps=8 -falign-loops=8 --param inline-min-speedup=10 -mtune=sifive-7-series -ffast-math +else +RISCV_XCFLAGS += -O2 -fno-common -funroll-loops -finline-functions --param max-inline-insns-auto=20 -falign-functions=4 -falign-jumps=4 -falign-loops=4 --param inline-min-speedup=10 +endif +RISCV_XCFLAGS += -DITERATIONS=$(TARGET_CORE_ITERS) +endif + # Turn on garbage collection for unused sections RISCV_LDFLAGS += -Wl,--gc-sections # Turn on linker map file generation -- cgit v1.2.3