From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2152) id C354E3858002; Fri, 10 Mar 2023 22:49:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C354E3858002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678488540; bh=Q0lRnfTX4+StgSHhcZi0LFAk8+RpALH+M4NsFff4eMc=; h=From:To:Subject:Date:From; b=x4rB5NrYIjggFt600o1Y9lIm+yeoe9EyOPsIuV64ytb9H41aakEG1OJbDo4eK+/Z2 yr7QzSayMZG44uwd9Lhk2N1ioWV3JAsFyHknTLT33mcYUqqn2kWpVfUGMuwwqlVsHW ieb9seAdmZ46suU9v3wmHcRfhr/0Ugr5lH9mZ2LQ= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Hans-Peter Nilsson To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6602] testsuite: Tweak check_fork_available for CRIS X-Act-Checkin: gcc X-Git-Author: Hans-Peter Nilsson X-Git-Refname: refs/heads/master X-Git-Oldrev: 88bcd4e5678260bfd60c6cbc7ecb63b8aeafd20e X-Git-Newrev: 020255eb52ec215703f4ffc90a3a916c21fb36fc Message-Id: <20230310224900.C354E3858002@sourceware.org> Date: Fri, 10 Mar 2023 22:49:00 +0000 (GMT) List-Id: https://gcc.gnu.org/g:020255eb52ec215703f4ffc90a3a916c21fb36fc commit r13-6602-g020255eb52ec215703f4ffc90a3a916c21fb36fc Author: Hans-Peter Nilsson Date: Fri Mar 10 19:08:53 2023 +0100 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. Diff: --- gcc/testsuite/lib/target-supports.exp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index a4fbc1998c7..84ac7371523 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"] }