From patchwork Fri Mar 10 22:54:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 67829 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp9677wrd; Fri, 10 Mar 2023 14:54:47 -0800 (PST) X-Google-Smtp-Source: AK7set9vZml/ATu8fs8sh02gwHG+SN1Da6gOpGkphXFSIDYRXefFadhWatOxu4YeW1c3fkfR9ZUN X-Received: by 2002:adf:dbcb:0:b0:2cb:5b58:766 with SMTP id e11-20020adfdbcb000000b002cb5b580766mr18286984wrj.51.1678488887611; Fri, 10 Mar 2023 14:54:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678488887; cv=none; d=google.com; s=arc-20160816; b=Qoi1hrolZcmXX+I5uOLCLiVJZh3cvpv+aqI30XOI9H6f5ctR9vf2pd0qtC/RZcfyxv hPwgtReJNDCFryNpW2AfxUo1mS97MAY0QthvC2gGHqrYudiWVsFmd32Mp5rjGSipCOHG JzkFzlY0//K3N0Kszqtz9FHPwhKUQItZWeIZzDSiQ1sN1h3kG56pLD+lbAnUXVa2O8+t IguRk0dY5YoY3ljdFwuqqekCkH0yn8Icyrpi1RcJqCWCjO2kFSjqnJen19p8pdnIqvCE rqFOxyTf7x8IZ7fbYmMVSeAfnXuxDl4xymjC5vpZEhNybuUkP7Crv4UJbEgo9R+eFrJt a0qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:date:message-id :content-transfer-encoding:mime-version:subject:to:dmarc-filter :delivered-to:dkim-signature:dkim-filter; bh=wVUTExbXETlenKLrrSlo5fmhDiZnNyA5+e/3rqLg7ZY=; b=LPDAYRUJnF1XbBjGKQHgZl038ctvlbqrTfxjwgByQmP2AtXfYM15/dt1+TbQheELQD wvSxhPQsKiAE4K9Q+mg7ifK06ii+6SHD6OIn8NdKqkyrVBmiYVQHstLb3jYuH2C/e6xK tZ23gc7Al9k1osK6pSELKyZNa8oFUOQO9eJpUeUZrU10UC+3ErzDPrvvQeMb1nyGG2hi FqK1qORr+G13pByO57WvQuLgEzWYZyASBMDbPyHKdifz8qe/y7bV4WM8M5nfYDVRYOzx 24Nur6LU/wxuhgSsX7boCa4ABEeJWypOz++v0jqx86gBxVqBLAtCwu3dFJcXvMyQOZLo 0HcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=AuhDjFup; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id j13-20020a5d604d000000b002c5657dd82fsi1006733wrt.3.2023.03.10.14.54.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 14:54:47 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=AuhDjFup; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9C31E3857C44 for ; Fri, 10 Mar 2023 22:54:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C31E3857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678488886; bh=wVUTExbXETlenKLrrSlo5fmhDiZnNyA5+e/3rqLg7ZY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=AuhDjFup+NNg7C7smcwOuTltKqFyhS/+4Ookzvs38egxSHLcAW5C9774AOQ9CwLcA 8Wk49eCVkuzw/SJf8AR3jf7hY+KKriOYqa0pbjheuGwoqsW4fWdClBCSs0MDqpk6qt LY0c5xaBddilO+CdRn5G+bsUXi+uS2TTnpaqDHI0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 To: Subject: [committed] testsuite: Tweak check_fork_available for CRIS MIME-Version: 1.0 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Hans-Peter Nilsson via Gcc-patches From: Hans-Peter Nilsson Reply-To: Hans-Peter Nilsson Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760023163647741500?= X-GMAIL-MSGID: =?utf-8?q?1760023163647741500?= 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"] }