feat: make compatible with openperf

This commit is contained in:
xinyangli 2024-11-09 10:56:27 +08:00
parent a7b830fedd
commit 5fee5aad38
Signed by: xin
SSH key fingerprint: SHA256:UU5pRTl7NiLFJbWJZa+snLylZSXIz5rgHmwjzv8v4oE
79 changed files with 3943 additions and 274 deletions

View file

@ -1,8 +1,8 @@
CROSS_COMPILE := riscv64-linux-gnu-
COMMON_CFLAGS := -fno-pic -march=rv64g -mcmodel=medany -mstrict-align
COMMON_CFLAGS := -fno-pic -march=rv64g -mcmodel=medany -mstrict-align
CFLAGS += $(COMMON_CFLAGS) -static
ASFLAGS += $(COMMON_CFLAGS) -O0
LDFLAGS += -melf64lriscv
LDFLAGS += -melf64lriscv -O2
# overwrite ARCH_H defined in $(AM_HOME)/Makefile
ARCH_H := arch/riscv.h

7
scripts/isa/riscv64.mk Normal file
View file

@ -0,0 +1,7 @@
# This file is from nutshell's am
CROSS_COMPILE := riscv64-unknown-linux-gnu-
COMMON_FLAGS := -fno-pic -march=rv64g -mcmodel=medany
CFLAGS += $(COMMON_FLAGS) -static
ASFLAGS += $(COMMON_FLAGS) -O0
LDFLAGS += -melf64lriscv
ARCH_H := arch/riscv.h

View file

@ -1,6 +1,5 @@
export CROSS_COMPILE := x86_64-linux-gnu-
CFLAGS += -m32 -fno-pic -fno-omit-frame-pointer -march=i386
CFLAGS += -fcf-protection=none # remove endbr32 in Ubuntu 20.04 with a CPU newer than Comet Lake
CFLAGS += --param=min-pagesize=0 # fix warning about "array subscript 0 is outside array bounds"
ASFLAGS += -m32 -fno-pic
LDFLAGS += -melf_i386

View file

@ -1,5 +1,4 @@
export CROSS_COMPILE := x86_64-linux-gnu-
CFLAGS += -m64 -fPIC -mno-sse
CFLAGS += --param=min-pagesize=0 # fix warning about "array subscript 0 is outside array bounds"
ASFLAGS += -m64 -fPIC
LDFLAGS += -melf_x86_64