From 4869107ed69ad863e5d77eec4881016f14b080a4 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Sun, 11 Sep 2022 13:26:27 +0200 Subject: [PATCH] qtrvsim_tester: CLANG and GCC options to match real 32 and 64-bit targets The ABI for 32-bit target should use 32-bit size for int, long and pointer types, that is selected by ilp32 variant. The ABI for 64-bit target should use 64-bit size for long and pointer types and leaved int as 32-bit, that is lp64 variant. Signed-off-by: Pavel Pisa --- tests/riscv-official/isa/toolchain_setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/riscv-official/isa/toolchain_setup b/tests/riscv-official/isa/toolchain_setup index 8a5a6dea..27c45cbb 100644 --- a/tests/riscv-official/isa/toolchain_setup +++ b/tests/riscv-official/isa/toolchain_setup @@ -10,9 +10,9 @@ RISCV_SIM ?= spike USE_CLANG_OPTS ?= false ifeq ($(USE_CLANG_OPTS), true) -MARCH_OPTS_32 = -march=rv64g --target=riscv32 -mno-relax -fuse-ld=lld -MARCH_OPTS_64 = -march=rv64g --target=riscv64 -mno-relax -fuse-ld=lld +MARCH_OPTS_32 = -march=rv32g -mabi=ilp32 --target=riscv32 -mno-relax -fuse-ld=lld +MARCH_OPTS_64 = -march=rv64g -mabi=lp64 --target=riscv64 -mno-relax -fuse-ld=lld else MARCH_OPTS_32 = -march=rv32g -mabi=ilp32 -MARCH_OPTS_64 = -march=rv64g -mabi=ilp64 +MARCH_OPTS_64 = -march=rv64g -mabi=lp64 endif \ No newline at end of file