From patchwork Fri Oct 17 21:05:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 38998 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 225E7202DB for ; Fri, 17 Oct 2014 21:05:42 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id b57sf975630eek.8 for ; Fri, 17 Oct 2014 14:05:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:mime-version:date:message-id:subject:from:to :x-original-sender:x-original-authentication-results:content-type; bh=R7R+tCDchJz2N91ZTjfoZ/tmFz1DTzQMoNLoFq2NT/4=; b=b+74C+vrgSaay88Tw2WB2MD65JnYOXCKCmrL/XlhzCTetQpue5/S3hv1Zeoz4P3GSQ tqekmIe+TcRHdcetMRaE3VZiGDFIYZwlgDO/fWS1gnKzw+aCbQzRkSnl3785zn7adZER nNS6qhT4ZeVHY5CIh9HbF8uQQCD5iKkTOPszvDyS4mvkkqkfwbWjwn2PifHC+gPBI3hq qwdU9yvlZRJAo+xnvEE9MSnvHJ9bdVd3mGjIyTwcHW0bck76WEGHXT+BrNYUUMOO85d8 XythYymFFBPbcKwV2wlnkPBg435/nvi7VY6x59qwyJUGHmg9Wp/63FE2dqxHi9fRHxRk ZrFQ== X-Gm-Message-State: ALoCoQmev49J4vqTKuU8F+HPag6KRFBgTgjwBtFhb8EOWyRQTl7uFBzPdeRdo5WdauaNnVG9TCVo X-Received: by 10.194.100.98 with SMTP id ex2mr2000wjb.6.1413579941248; Fri, 17 Oct 2014 14:05:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.134 with SMTP id s6ls300192las.108.gmail; Fri, 17 Oct 2014 14:05:41 -0700 (PDT) X-Received: by 10.112.157.194 with SMTP id wo2mr2241182lbb.55.1413579941097; Fri, 17 Oct 2014 14:05:41 -0700 (PDT) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com. [2a00:1450:4010:c04::22e]) by mx.google.com with ESMTPS id rp2si3755509lbb.100.2014.10.17.14.05.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 14:05:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22e as permitted sender) client-ip=2a00:1450:4010:c04::22e; Received: by mail-lb0-f174.google.com with SMTP id p9so1320517lbv.19 for ; Fri, 17 Oct 2014 14:05:40 -0700 (PDT) X-Received: by 10.152.87.98 with SMTP id w2mr11220534laz.27.1413579940561; Fri, 17 Oct 2014 14:05:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp304051lbz; Fri, 17 Oct 2014 14:05:39 -0700 (PDT) X-Received: by 10.68.92.66 with SMTP id ck2mr11122213pbb.72.1413579938412; Fri, 17 Oct 2014 14:05:38 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id yr5si2013087pbc.161.2014.10.17.14.05.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Oct 2014 14:05:38 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-381018-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 942 invoked by alias); 17 Oct 2014 21:05:26 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 932 invoked by uid 89); 17 Oct 2014 21:05:25 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f178.google.com Received: from mail-qc0-f178.google.com (HELO mail-qc0-f178.google.com) (209.85.216.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 17 Oct 2014 21:05:18 +0000 Received: by mail-qc0-f178.google.com with SMTP id c9so1284990qcz.9 for ; Fri, 17 Oct 2014 14:05:16 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.140.107.11 with SMTP id g11mr14998862qgf.38.1413579916166; Fri, 17 Oct 2014 14:05:16 -0700 (PDT) Received: by 10.140.86.114 with HTTP; Fri, 17 Oct 2014 14:05:16 -0700 (PDT) Date: Fri, 17 Oct 2014 23:05:16 +0200 Message-ID: Subject: [Patch, testsuite] clear wrap_compile_flags before setting it From: Christophe Lyon To: "gcc-patches@gcc.gnu.org" X-IsSubscribed: yes X-Original-Sender: christophe.lyon@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22e as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 Hi, In testsuite/lib/wrapper.exp's ${tool}_maybe_build_wrapper, we call set_currtarget_info wrap_compile_flags to override wrap_compile_flags with additional flags when compiling testglue.c. However, dejagnu's set_currtarget_info {entry value} will write into value only if it's not already defined. This caused me problems since I had defined wrap_compile_flags much earlier in my main .exp file: -w was not added, causing compilation of testglue.c to fail under RHEL5. The attach patch unsets wrap_compile_flags before calling set_currtarget_info. OK for trunk? Thanks, Christophe 2014-10-17 Christophe Lyon * lib/wrapper.exp ({tool}_maybe_build_wrapper): Clear wrap_compile_flags before setting it. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 29ed3e6..faadd79 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-10-17 Christophe Lyon + + * lib/wrapper.exp ({tool}_maybe_build_wrapper): Clear + wrap_compile_flags before setting it. + 2014-10-17 Marek Polacek PR c/63543 diff --git a/gcc/testsuite/lib/wrapper.exp b/gcc/testsuite/lib/wrapper.exp index 1291c11..6880172 100644 --- a/gcc/testsuite/lib/wrapper.exp +++ b/gcc/testsuite/lib/wrapper.exp @@ -34,9 +34,11 @@ proc ${tool}_maybe_build_wrapper { filename args } { # became true for dejagnu-1.4.4. The set of warnings and code # that gcc objects on may change, so just make sure -w is always # passed to turn off all warnings. + unset_currtarget_info wrap_compile_flags set_currtarget_info wrap_compile_flags \ "$saved_wrap_compile_flags -w $flags" set result [build_wrapper $filename] + unset_currtarget_info wrap_compile_flags set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags" if { $result != "" } { set gluefile [lindex $result 0]