RISC-V: testsuite: Do not set default arch for RVV.

Message ID 04bf027f-cfc5-4f5a-91de-268ce67f07d3@gmail.com
State Committed
Commit 4efa929a0254b093cc31386cf7fb7c91091ca3cd
Delegated to: Juzhe Zhong
Headers
Series RISC-V: testsuite: Do not set default arch for RVV. |

Checks

Context Check Description
rivoscibot/toolchain-ci-rivos-lint success Lint passed
rivoscibot/toolchain-ci-rivos-apply-patch success Patch applied
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gcv-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--linux-rv64gcv-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gc-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--linux-rv32gc_zba_zbb_zbc_zbs-ilp32d-non-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--linux-rv64gc_zba_zbb_zbc_zbs-lp64d-non-multilib success Build passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed

Commit Message

Robin Dapp Nov. 20, 2023, 4:26 p.m. UTC
  Hi,

as per recent discussion and in order to fix inconsistencies
between spike and qemu this patch removes gcc_march and gcc_mabi
arguments from the default CFLAGS in the testsuite invocation for
some sub directories.

Juzhe reported that this helps for him.

Regards
 Robin

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/rvv.exp:  Remove -march and -mabi from
	default CFLAGS.
---
 gcc/testsuite/gcc.target/riscv/rvv/rvv.exp | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
  

Comments

钟居哲 Nov. 20, 2023, 10:44 p.m. UTC | #1
LGTM.



juzhe.zhong@rivai.ai
 
From: Robin Dapp
Date: 2023-11-21 00:26
To: gcc-patches; palmer; Kito Cheng; jeffreyalaw; juzhe.zhong@rivai.ai
CC: rdapp.gcc
Subject: [PATCH] RISC-V: testsuite: Do not set default arch for RVV.
Hi,
 
as per recent discussion and in order to fix inconsistencies
between spike and qemu this patch removes gcc_march and gcc_mabi
arguments from the default CFLAGS in the testsuite invocation for
some sub directories.
 
Juzhe reported that this helps for him.
 
Regards
Robin
 
gcc/testsuite/ChangeLog:
 
* gcc.target/riscv/rvv/rvv.exp:  Remove -march and -mabi from
default CFLAGS.
---
gcc/testsuite/gcc.target/riscv/rvv/rvv.exp | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
 
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp b/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
index 237a20e11aa..1d5041b0c8c 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
+++ b/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
@@ -30,18 +30,11 @@ if ![info exists DEFAULT_CFLAGS] then {
     set DEFAULT_CFLAGS " -ansi -pedantic-errors"
}
-set gcc_march "rv64gcv_zfh"
-set gcc_mabi  "lp64d"
-if [istarget riscv32-*-*] then {
-  set gcc_march "rv32gcv_zfh"
-  set gcc_mabi  "ilp32d"
-}
-
# Initialize `dg'.
dg-init
# Main loop.
-set CFLAGS "$DEFAULT_CFLAGS -march=$gcc_march -mabi=$gcc_mabi -O3"
+set CFLAGS "$DEFAULT_CFLAGS -O3"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/base/*.\[cS\]]] \
"" $CFLAGS
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vsetvl/*.\[cS\]]] \
-- 
2.42.0
  

Patch

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp b/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
index 237a20e11aa..1d5041b0c8c 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
+++ b/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
@@ -30,18 +30,11 @@  if ![info exists DEFAULT_CFLAGS] then {
     set DEFAULT_CFLAGS " -ansi -pedantic-errors"
 }
 
-set gcc_march "rv64gcv_zfh"
-set gcc_mabi  "lp64d"
-if [istarget riscv32-*-*] then {
-  set gcc_march "rv32gcv_zfh"
-  set gcc_mabi  "ilp32d"
-}
-
 # Initialize `dg'.
 dg-init
 
 # Main loop.
-set CFLAGS "$DEFAULT_CFLAGS -march=$gcc_march -mabi=$gcc_mabi -O3"
+set CFLAGS "$DEFAULT_CFLAGS -O3"
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/base/*.\[cS\]]] \
 	"" $CFLAGS
 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vsetvl/*.\[cS\]]] \