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 3B3013856DC0 for ; Fri, 21 Oct 2022 12:24:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B3013856DC0 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 29LCDlO4014677; Fri, 21 Oct 2022 14:24:39 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=selector1; bh=+dztHFv+JLjIwh7iltY8x9WlRapV7F5UaOnngtdOELw=; b=l56FEcUXJh88X6G7MC8m71EK6ouy7U1LUT7g67m50mkvHxN6tXSqxvhrTtujdayUONDx gQNjDXZwCiknHZpeiFm5g7QQVaQ3fUPnzmvSm4Fd+sF9L7avEOtdNKFxFn6siqePgsaV BjzPA3Mo7+/q1p7Mg4QLzbz/fPeV+fibRSxFYtZLlHmG8ZJ0sEW18i77zQii1YmQhOkU h7WDUcNEhT/CFcH+u8s7zs6EmL5uynUB5R6jf3a6pVZcDnssD7ohCEUx5JrHEXrX5zCh WfUPcyOQhNCn7L3s3Q5H8Z90Gm3EJD0WJ9/MZZl4OXDRibf3UrIJhcPwM9WyS3g8KBr8 gA== 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 From: =?UTF-8?q?Torbj=C3=B6rn=20SVENSSON?= To: CC: , , =?UTF-8?q?Torbj=C3=B6rn=20SVENSSON?= 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 List-Id: 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 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 -- 2.25.1