From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 50C933858C36 for ; Fri, 10 Mar 2023 22:54:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 50C933858C36 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1678488844; x=1710024844; h=from:to:subject:mime-version:content-transfer-encoding: message-id:date; bh=wVUTExbXETlenKLrrSlo5fmhDiZnNyA5+e/3rqLg7ZY=; b=YgbhIA7FLE6pSS4TLyXblHISLd4SrDxL9O337X4f8ZykoJFlZ58ehgMt yB6JG11Ng9bFgtNjkSqqxzCX2h+0SyqiewbGQX7+mND6WHOBKgREUaQro 5luMlh8xp1hywr3av3ztHEcDmF2mwVIRfhWTi56StK8ZznHtw8A+s1JJY s8eM6wrEPxiNjNkROK2/T+8LHxBuVLZPnydlNaN+9i9Nmg4MgbVVRBRLz cxPrn/kzepJc6dfF3d9xgLHmtK9xVeM1zzOiTFXDfMoHQZkkWkMu9BrWm X+HU1of7FVFUU4rK9MbO3LD0q2ClAkcCNSngbESL5V95dP6AJScUTVDKc g==; From: Hans-Peter Nilsson To: Subject: [committed] testsuite: Tweak check_fork_available for CRIS MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Message-ID: <20230310225403.3827420420@pchp3.se.axis.com> Date: Fri, 10 Mar 2023 23:54:03 +0100 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. --- gcc/testsuite/lib/target-supports.exp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index a4fbc1998c70..335e24b23b12 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"] } -- 2.30.2