public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-6602] testsuite: Tweak check_fork_available for CRIS
Date: Fri, 10 Mar 2023 22:49:00 +0000 (GMT)	[thread overview]
Message-ID: <20230310224900.C354E3858002@sourceware.org> (raw)

https://gcc.gnu.org/g:020255eb52ec215703f4ffc90a3a916c21fb36fc

commit r13-6602-g020255eb52ec215703f4ffc90a3a916c21fb36fc
Author: Hans-Peter Nilsson <hp@axis.com>
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"]
 }

                 reply	other threads:[~2023-03-10 22:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230310224900.C354E3858002@sourceware.org \
    --to=hp@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).