From patchwork Tue Jan 29 10:36:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 1032656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-494894-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="SMyugr7r"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43pjc439Bcz9sNJ for ; Tue, 29 Jan 2019 21:37:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=LkAVojZwExHKy9Zs2vKEaXiIdPbaGWWk4e9e6yg32Hd1WGlmoAtiF /X5mevRwMTBAhwOs8ODXzt+wuoDtyXGU1h3GpSmYg9zD8mO+v1589pg7tyoL8dXM /k4C05GmcIsr24mpBexO45Yb4RQUDDSwmGTEVfS9G5p0EeD+1oE/z0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=NcPMD5C+Z9U5c6L0zGl/vQHrICc=; b=SMyugr7r/D5+o1SAWPET nRoW+fHTd1dg+3PO3W8vUN3gZlmGR0xgtIBozRvlbBr50OeyRx8HGzHS/OJc0/qU LtE5C+jwMn2Hwg/+2YNTulRuGXp+ZrxeHng6HQMsABnLWX7COvTRyeRgYYY6HibW 135U6Wm8zGvRhk3Ym42DBFo= Received: (qmail 90421 invoked by alias); 29 Jan 2019 10:37:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 90410 invoked by uid 89); 29 Jan 2019 10:37:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Jan 2019 10:36:58 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1goQlE-00069S-B3 from Andrew_Stubbs@mentor.com for gcc-patches@gcc.gnu.org; Tue, 29 Jan 2019 02:36:56 -0800 Received: from [127.0.0.1] (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 29 Jan 2019 10:36:52 +0000 From: Andrew Stubbs Subject: [patch][pr88920] Fix noisy check_effective_target_offload_gcn To: "gcc-patches@gcc.gnu.org" Message-ID: <0ca49375-74fc-2459-8839-723821a8447f@codesourcery.com> Date: Tue, 29 Jan 2019 10:36:51 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 My recent patch to permit GCN testing using an LLVM assembler and linker has caused some noise in the log files for libgomp testing. There are lots of messages like this: fatal error: GCC is not configured to support amdgcn-unknown-amdhsa as offload target These messages are harmless; they're caused by check_effective_target_offload_gcn discovering the answer is "no". However, there's more noise than I intended. This patch adds caching so that the message will only occur once per test run. OK to commit? Also, is there a way to redirect the output so that the message does not show up at all, unless the verbosity level is raised? Thanks Andrew Cache effective-target llvm_binutils result. 2019-01-21 Andrew Stubbs gcc/testsuite/ * lib/target-supports.exp: Cache result. diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index c0df467..f233f10 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -9255,6 +9255,7 @@ foreach N {df} { # Return 1 if this target uses an LLVM assembler and/or linker proc check_effective_target_llvm_binutils { } { - return [expr { [istarget amdgcn*-*-*] - || [check_effective_target_offload_gcn] } ] + return [check_cached_effective_target llvm_binutils { + expr { [istarget amdgcn*-*-*] + || [check_effective_target_offload_gcn] }}] }