Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to build optimized binaries by default #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build-coremark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ mv coremark.riscv ../

make PORT_DIR=../riscv64-baremetal compile
mv coremark.bare.riscv ../

cd $BASEDIR
riscv64-unknown-elf-objdump -D coremark.riscv > coremark.riscv.dump
riscv64-unknown-elf-objdump -D coremark.bare.riscv > coremark.bare.riscv.dump
2 changes: 1 addition & 1 deletion riscv64-baremetal/core_portme.mak
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CC = $(RISCVTOOLS)/bin/$(RISCVTYPE)-gcc
# Flag: CFLAGS
# Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags"
#PORT_CFLAGS = -O2 -static -std=gnu99
PORT_CFLAGS = -O2 -mcmodel=medany -static -std=gnu99 -fno-common -nostdlib -nostartfiles -lm -lgcc -T $(PORT_DIR)/link.ld
PORT_CFLAGS = -O2 -floop-unroll-and-jam -falign-loops=16 -falign-functions=16 -falign-jumps=16 -mtune=sifive-7-series -mcmodel=medany -static -std=gnu99 -fno-common -nostdlib -nostartfiles -lm -lgcc -T $(PORT_DIR)/link.ld
FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)"
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\"
#Flag: LFLAGS_END
Expand Down
2 changes: 1 addition & 1 deletion riscv64/core_portme.mak
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CC = $(RISCVTOOLS)/bin/$(RISCVTYPE)-gcc
# Flag: CFLAGS
# Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags"
#PORT_CFLAGS = -O2 -static -std=gnu99
PORT_CFLAGS = -O2
PORT_CFLAGS = -O2 -floop-unroll-and-jam -falign-loops=16 -falign-functions=16 -falign-jumps=16 -mtune=sifive-7-series
FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)"
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\"
#Flag: LFLAGS_END
Expand Down