aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2023-03-10 19:08:53 +0100
committerHans-Peter Nilsson <hp@bitrange.com>2023-03-10 23:48:22 +0100
commit020255eb52ec215703f4ffc90a3a916c21fb36fc (patch)
treefde54ef200db2073d76b1b80ca9e85cdf4bf54ee /gcc/testsuite/lib
parent88bcd4e5678260bfd60c6cbc7ecb63b8aeafd20e (diff)
downloadgcc-020255eb52ec215703f4ffc90a3a916c21fb36fc.zip
gcc-020255eb52ec215703f4ffc90a3a916c21fb36fc.tar.gz
gcc-020255eb52ec215703f4ffc90a3a916c21fb36fc.tar.bz2
testsuite: Tweak check_fork_available for CRIS
This takes care of the failing gcc.dg/torture/ftrapv-1.c and -ftrapv-2.c for cris-elf. For simplicity, assume simulators are the GNU simulator (in the gdb repo). But cris-elf is newlib, so a newlib target forking? Yes: the I/O, etc. interface to the simulator uses the Linux/CRIS ABI. * lib/target-supports.exp (check_fork_available): Don't signal true for CRIS running on a simulator.
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r--gcc/testsuite/lib/target-supports.exp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index a4fbc19..84ac737 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2880,6 +2880,12 @@ proc check_fork_available {} {
# tell as we're doing partial links for kernel modules.
return 0
}
+ if { [istarget cris-*-*] } {
+ # Compiling and linking works, and an executable running e.g.
+ # gcc.dg/torture/ftrapv-1.c works on now-historical hardware,
+ # but the GNU simulator emits an error for the fork syscall.
+ return [check_effective_target_hw]
+ }
return [check_function_available "fork"]
}