Message ID | 20221021122414.3375395-1-torbjorn.svensson@foss.st.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp667880wrr; Fri, 21 Oct 2022 05:25:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7qMEXbZB+XvVP+aiSUMbbght6UD3FAw/jnCMosEkQbrPCI4v9lXa5VR8RK4LQEefQq7ILG X-Received: by 2002:a17:906:fe49:b0:73d:70c5:1a52 with SMTP id wz9-20020a170906fe4900b0073d70c51a52mr15378374ejb.469.1666355129623; Fri, 21 Oct 2022 05:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666355129; cv=none; d=google.com; s=arc-20160816; b=Fn2Mh8XDkvvJ0sZjoxuaJnWFKawmOGuJBk15rswKkQ/77ZlgmcQvxwxRU2c/CoAexc jernU4vzN3NXTt0IMjVPJasgxjZ4ZGWz1nTsDc2l65ugFE0zddKR38z9jGKwGIsGoekh RmSAcDfagXycytNK6mBMH0aSxTTRQR0wlNYRpZGZf+M81GcFS1Q57c+v8fwkFkSG+r1k ucItjtfzb3YGngB6q0y5+En6mhtmdmGSVJCi6oLZWklURnrQdhWtoWzfR7EZREC8XpN6 EmupK6rv8zbCiIxiwVBDFKIy3MRUjw9gsJR0NhN+FCTpG3UyJILttU0gO7F34VDfloLM 5pZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=+dztHFv+JLjIwh7iltY8x9WlRapV7F5UaOnngtdOELw=; b=G0xYaVnU+FmAFa6mk1xEeGmpwdKuYxbd3YXsp4DWesKQ2K5IabesSUgjN0GeyC8tYe jQ//rXxLgBq3gjSXuGMoK4yNpNlCIlcFFPhqC48GfDJLb/lN3Xdiw8rEp+ulX0+CrnZj oI7k5Q0Ha8miWF4GBJX1L0/158SIo/rWk5639mGTs2Ooof/xeSqEnx29Sp8hFj47QXs6 bgPV3wgdq9oeci2Tk8ffm6fzpHqEM/Do2F9nBg1tVWjmclqlrLwFeQgERShgj8Y4YVmR 5STRbSaApmIpr+0L5DBzPhvIYsUQ3AfqbeoSn5GoQMlXw59K8cS8Po6A+AIw9Hq1CAd1 /1EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=YcvIvxHX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id n5-20020a170906700500b0077fc66b581esi15615439ejj.688.2022.10.21.05.25.29 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 05:25:29 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=YcvIvxHX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 51F4D3853809 for <ouuuleilei@gmail.com>; Fri, 21 Oct 2022 12:25:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51F4D3853809 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666355128; bh=+dztHFv+JLjIwh7iltY8x9WlRapV7F5UaOnngtdOELw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=YcvIvxHXGOXJR6rB2ImK3W9iv35N8eaTEZDAxaSOlmJwc8LapytKIFbnLhTWeDADp QRM0xshRmKf06vPuWm+LH8wL984+Ag+fhIGvQzZJA972LNlmnof+0+wntb7UHf+2OU gQ9/bpJ6Dz69G68SQ7QxvZeX1l0BL6Cg8Z0z45Cc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by sourceware.org (Postfix) with ESMTPS id 3B3013856DC0 for <gcc-patches@gcc.gnu.org>; Fri, 21 Oct 2022 12:24:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B3013856DC0 Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29LCDlO4014677; Fri, 21 Oct 2022 14:24:39 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3kbu8dg24q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 14:24:38 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4379B10002A; Fri, 21 Oct 2022 14:24:32 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 5464522A6E0; Fri, 21 Oct 2022 14:24:32 +0200 (CEST) Received: from jkgcxl0002.jkg.st.com (10.210.54.218) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 21 Oct 2022 14:24:31 +0200 To: <gcc-patches@gcc.gnu.org> Subject: [PATCH] lto: Always quote path to touch Date: Fri, 21 Oct 2022 14:24:15 +0200 Message-ID: <20221021122414.3375395-1-torbjorn.svensson@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.210.54.218] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-21_04,2022-10-21_01,2022-06-22_01 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: =?utf-8?q?Torbj=C3=B6rn_SVENSSON_via_Gcc-patches?= <gcc-patches@gcc.gnu.org> Reply-To: =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= <torbjorn.svensson@foss.st.com> Cc: rguenther@suse.de Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747299996347945885?= X-GMAIL-MSGID: =?utf-8?q?1747299996347945885?= |
Series |
lto: Always quote path to touch
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Torbjorn SVENSSON
Oct. 21, 2022, 12:24 p.m. UTC
When generating the makefile, make sure that the paths are quoted so
that a native Windows path works within Cygwin.
Without this patch, this error is reported by the DejaGNU test suite:
make: [T:\ccMf0kI3.mk:3: T:\ccGEvdDp.ltrans0.ltrans.o] Error 1 (ignored)
The generated makefile fragment without the patch:
T:\ccGEvdDp.ltrans0.ltrans.o:
@T:\build\bin\arm-none-eabi-g++.exe '-xlto' ... '-o' 'T:\ccGEvdDp.ltrans0.ltrans.o' 'T:\ccGEvdDp.ltrans0.o'
@-touch -r T:\ccGEvdDp.ltrans0.o T:\ccGEvdDp.ltrans0.o.tem > /dev/null 2>&1 && mv T:\ccGEvdDp.ltrans0.o.tem T:\ccGEvdDp.ltrans0.o
.PHONY: all
all: \
T:\ccGEvdDp.ltrans0.ltrans.o
With the patch, the touch line would be replace with:
@-touch -r "T:\ccGEvdDp.ltrans0.o" "T:\ccGEvdDp.ltrans0.o.tem" > /dev/null 2>&1 && mv "T:\ccGEvdDp.ltrans0.o.tem" "T:\ccGEvdDp.ltrans0.o"
gcc/ChangeLog:
* lto-wrapper.cc: Quote paths in makefile.
Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com>
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
gcc/lto-wrapper.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Fri, 21 Oct 2022, Torbj?rn SVENSSON wrote: > When generating the makefile, make sure that the paths are quoted so > that a native Windows path works within Cygwin. > > Without this patch, this error is reported by the DejaGNU test suite: > > make: [T:\ccMf0kI3.mk:3: T:\ccGEvdDp.ltrans0.ltrans.o] Error 1 (ignored) > > The generated makefile fragment without the patch: > > T:\ccGEvdDp.ltrans0.ltrans.o: > @T:\build\bin\arm-none-eabi-g++.exe '-xlto' ... '-o' 'T:\ccGEvdDp.ltrans0.ltrans.o' 'T:\ccGEvdDp.ltrans0.o' > @-touch -r T:\ccGEvdDp.ltrans0.o T:\ccGEvdDp.ltrans0.o.tem > /dev/null 2>&1 && mv T:\ccGEvdDp.ltrans0.o.tem T:\ccGEvdDp.ltrans0.o > .PHONY: all > all: \ > T:\ccGEvdDp.ltrans0.ltrans.o > > With the patch, the touch line would be replace with: > > @-touch -r "T:\ccGEvdDp.ltrans0.o" "T:\ccGEvdDp.ltrans0.o.tem" > /dev/null 2>&1 && mv "T:\ccGEvdDp.ltrans0.o.tem" "T:\ccGEvdDp.ltrans0.o" > > gcc/ChangeLog: OK. Thanks, Richard. > * lto-wrapper.cc: Quote paths in makefile. > > Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com> > Signed-off-by: Torbj?rn SVENSSON <torbjorn.svensson@foss.st.com> > --- > gcc/lto-wrapper.cc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc > index 9a764702ffc..b12bcc1ad27 100644 > --- a/gcc/lto-wrapper.cc > +++ b/gcc/lto-wrapper.cc > @@ -2010,8 +2010,8 @@ cont: > truncate them as soon as we have processed it. This > reduces temporary disk-space usage. */ > if (! save_temps) > - fprintf (mstream, "\t@-touch -r %s %s.tem > /dev/null 2>&1 " > - "&& mv %s.tem %s\n", > + fprintf (mstream, "\t@-touch -r \"%s\" \"%s.tem\" > /dev/null " > + "2>&1 && mv \"%s.tem\" \"%s\"\n", > input_name, input_name, input_name, input_name); > } > else >
On 2022-10-24 10:07, Richard Biener wrote: > On Fri, 21 Oct 2022, Torbj?rn SVENSSON wrote: > >> When generating the makefile, make sure that the paths are quoted so >> that a native Windows path works within Cygwin. >> >> Without this patch, this error is reported by the DejaGNU test suite: >> >> make: [T:\ccMf0kI3.mk:3: T:\ccGEvdDp.ltrans0.ltrans.o] Error 1 (ignored) >> >> The generated makefile fragment without the patch: >> >> T:\ccGEvdDp.ltrans0.ltrans.o: >> @T:\build\bin\arm-none-eabi-g++.exe '-xlto' ... '-o' 'T:\ccGEvdDp.ltrans0.ltrans.o' 'T:\ccGEvdDp.ltrans0.o' >> @-touch -r T:\ccGEvdDp.ltrans0.o T:\ccGEvdDp.ltrans0.o.tem > /dev/null 2>&1 && mv T:\ccGEvdDp.ltrans0.o.tem T:\ccGEvdDp.ltrans0.o >> .PHONY: all >> all: \ >> T:\ccGEvdDp.ltrans0.ltrans.o >> >> With the patch, the touch line would be replace with: >> >> @-touch -r "T:\ccGEvdDp.ltrans0.o" "T:\ccGEvdDp.ltrans0.o.tem" > /dev/null 2>&1 && mv "T:\ccGEvdDp.ltrans0.o.tem" "T:\ccGEvdDp.ltrans0.o" >> >> gcc/ChangeLog: > > OK. > > Thanks, > Richard. > >> * lto-wrapper.cc: Quote paths in makefile. >> >> Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com> >> Signed-off-by: Torbj?rn SVENSSON <torbjorn.svensson@foss.st.com> >> --- >> gcc/lto-wrapper.cc | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc >> index 9a764702ffc..b12bcc1ad27 100644 >> --- a/gcc/lto-wrapper.cc >> +++ b/gcc/lto-wrapper.cc >> @@ -2010,8 +2010,8 @@ cont: >> truncate them as soon as we have processed it. This >> reduces temporary disk-space usage. */ >> if (! save_temps) >> - fprintf (mstream, "\t@-touch -r %s %s.tem > /dev/null 2>&1 " >> - "&& mv %s.tem %s\n", >> + fprintf (mstream, "\t@-touch -r \"%s\" \"%s.tem\" > /dev/null " >> + "2>&1 && mv \"%s.tem\" \"%s\"\n", >> input_name, input_name, input_name, input_name); >> } >> else >> > Pushed.
diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc index 9a764702ffc..b12bcc1ad27 100644 --- a/gcc/lto-wrapper.cc +++ b/gcc/lto-wrapper.cc @@ -2010,8 +2010,8 @@ cont: truncate them as soon as we have processed it. This reduces temporary disk-space usage. */ if (! save_temps) - fprintf (mstream, "\t@-touch -r %s %s.tem > /dev/null 2>&1 " - "&& mv %s.tem %s\n", + fprintf (mstream, "\t@-touch -r \"%s\" \"%s.tem\" > /dev/null " + "2>&1 && mv \"%s.tem\" \"%s\"\n", input_name, input_name, input_name, input_name); } else