summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHsiang-Chia.Huang <hsiangchiah@sifive.com>2019-05-29 05:58:13 -0700
committerHsiang-Chia.Huang <hsiangchiah@sifive.com>2019-06-02 19:40:32 -0700
commit9ed1c05e3b202ef2ef17cae4bfc0ca6425541d13 (patch)
tree529b31e1159e56592621439d1bca1db64da03817 /scripts
parent85a442db0dd3f2440019fe8586d28c2dec148cd3 (diff)
Add compile options for coremark and update freedom-metal repo.
Regenerate files in bsps.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/standalone.mk17
1 files changed, 17 insertions, 0 deletions
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