From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by sourceware.org (Postfix) with ESMTPS id 7E0BC3858412 for ; Mon, 24 Oct 2022 08:47:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7E0BC3858412 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=foss.st.com 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 29O6waNI008931; Mon, 24 Oct 2022 10:47:26 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=P6elSwaoPm75D7zak4FBfVk9EDRsTJZ7izlX3k4lHwY=; b=2MyfI6BiXYhmDyDgOmbl7+Bd5GO9ztJK8Ti8T9wi1BjISMRq3tpFploC+zKbmQSXee4B cgotaxLrpQO3enYMIxJsuLjTFgLvuW+X6S6y3kCbIFZJYd/9wWwN+ftvES9GTMlqlub7 nZPAGvL/MqdOi5inWAyelEvulYyCUFXI140m+EK3T8vcy0hkKPsB2XAVLn6OsZs7xA6Y sDg3pQWdU61gwTn1N+YdBuHZDRue6otNpABTLn6Q1pYvwrbzZKDC7VtMg3WqXfzQRXsU 8TMdHnEwUJFttlUOSP3ilA+D34cf+oWndgaHtGcnsl0AfF+m86INfrTJaxmu2tfwDjD6 tw== 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 3kc5xkt026-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Oct 2022 10:47:26 +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 3DEEE100034; Mon, 24 Oct 2022 10:47:20 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4FB33216EF4; Mon, 24 Oct 2022 10:47:20 +0200 (CEST) Received: from [10.210.55.83] (10.210.55.83) 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; Mon, 24 Oct 2022 10:47:17 +0200 Message-ID: <33020758-e602-50c2-e0d7-da3806ffa0db@foss.st.com> Date: Mon, 24 Oct 2022 10:47:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH] lto: Always quote path to touch Content-Language: en-US To: Richard Biener CC: , References: <20221021122414.3375395-1-torbjorn.svensson@foss.st.com> From: Torbjorn SVENSSON In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.210.55.83] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) 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-24_02,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,NICE_REPLY_A,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 List-Id: 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 >> Signed-off-by: Torbj?rn SVENSSON >> --- >> 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.