From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 876F2383303A for ; Thu, 18 Apr 2024 06:27:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 876F2383303A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 876F2383303A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::229 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713421649; cv=none; b=l401+IV4Hc0cUNHAXDlBUzWAz+gGngQEmaksdxWnndwYlNcl6ypIf/i5P7MnLK+bAYTbDL+KSusydjUkd3k7uLMnqsewf+fXQqxsErHG4POWlysYmWHr+/T0R0lSeDgxT5JII43XyRWLltomrcEMgQ9wLkLJxsTuMm2cXOF7cS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713421649; c=relaxed/simple; bh=jxXT222omcfSndjD1VoqoeRxqw3UKqIpw/QNXAWWghU=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=Y4eDnjsUeOL5OCw4eluBwediSyjJuThEmXeLDOJ/w17ObusTL7PiL4ovGxU5Rgqqw3BThmr3YdhSc4656VVIh6Y8bIrAYjm19gK3RTtElTl7keiBcSVpyjFAJ3V29f+C9Oik2pr6wSDz3hlythLl5Qu8BwXXuu3/p1gwgHdL+jg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2db13ca0363so9133001fa.3 for ; Wed, 17 Apr 2024 23:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713421646; x=1714026446; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Kd1/ZuwO2EsR/n3Hx3u8d3HJY10Dve4pvCj0kdeC6wI=; b=Yk9uTHO8yv7mXIe8IwNPScRfiGGL8KStQ4ix4xj6fqcXq5hSIZvdKvDAOhxDjNiQoU XUJjk0UYMxuNaLjju6h03vDFpkXYofYSkYEaq5P0wsb5GIY3wqDvXkv3DRZo7bndMIxX LIeznB02rWvOXNs0Xke6PiNVFWrfEGXL7GXXh7V1NY7SPDzAehvzlzACY//YaBUTwqH2 VG//6uL+ecbd47FrbH2IRnKHb7AZohRayDeBrUvZbdEok8XAYxjuMsqO+lIvN/kfTF8v NJzN6ouI1kCzq2sa/bAaxiiwmHSwrTaPQKafcRMwgBN19LW1nXhY7QopqMTgHi7dY5iH 4qCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713421646; x=1714026446; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kd1/ZuwO2EsR/n3Hx3u8d3HJY10Dve4pvCj0kdeC6wI=; b=dH1itCcL55r+D3eLnTX5upmpFVVYz9/gpgZfZlvM2Es/oy6jcXcv7nQT/6hsoipLqy bCITq3M4N4RpOv2Q5xhPAM4gQlp5Zau5x0ytb1v1F2GUsqwAZruz0Fvvd7Spv0nikU1C 79s+ex7Tt5mlJS1pbTwlbeulVidqY0Da+/Zu2UsuN4aiZNPxnc3hZS6xqg2lJfPMTCkB k4ZIlyfRYkLAdEBiZhTWM6Cfi5HZVBN0Zzn6iS94+zfiK6+yO2MJbzvEPycTavGrCqn1 gCajGsCT73QrdtyiFSMu8dMTea030qR6X8d61ilVlsCHRvAKYdBQYO6QM043hfWWsu4q kOLw== X-Gm-Message-State: AOJu0YyXVNv8iCAFifUoC/FvgU3sAZcc4gSOhWgYPe6mEEZSEde2GxmB muf/nSE2HvmYbJNqz4AkChtvJr29zfZeR0SEDdV8s4EMvEtypmm3sL07g1IYnw3qWt5ffXjJQK/ nbrwFj83XvExLq/QBtVBJa2UT4Po= X-Google-Smtp-Source: AGHT+IGjXwALU6qC5A+XYzCGt3Jg3vV7yJIV+UTJGtkrT4qHlzhiltw0ct+2lULXaDj+gJtDkvjBPbKzJaEFzqKlwT8= X-Received: by 2002:a2e:3a19:0:b0:2d8:6fc4:d0b5 with SMTP id h25-20020a2e3a19000000b002d86fc4d0b5mr1073074lja.8.1713421645736; Wed, 17 Apr 2024 23:27:25 -0700 (PDT) MIME-Version: 1.0 References: <20240418040912.6236-1-peter0x44@disroot.org> <20240418040912.6236-2-peter0x44@disroot.org> In-Reply-To: <20240418040912.6236-2-peter0x44@disroot.org> From: Richard Biener Date: Thu, 18 Apr 2024 08:27:14 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] lto-wrapper: Truncate files using -truncate driver option [PR110710] To: Peter Damianov Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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 Thu, Apr 18, 2024 at 6:12=E2=80=AFAM Peter Damianov wrote: > > This commit changes the Makefiles generated by lto-wrapper to no longer u= se > the "mv" and "touch" shell commands. These don't exist on Windows, so whe= n the > Makefile attempts to call them, it results in errors like: > The system cannot find the file specified. > > This problem only manifested when calling gcc from cmd.exe, and having no > sh.exe present on the PATH. The Windows port of GNU Make searches the PAT= H for > an sh.exe, and uses it if present. > > I have tested this in environments with and without sh.exe on the PATH an= d > confirmed it works as expected. OK. Thanks, Richard. > Signed-off-by: Peter Damianov > --- > gcc/lto-wrapper.cc | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc > index 02579951569..a36a59e6fb8 100644 > --- a/gcc/lto-wrapper.cc > +++ b/gcc/lto-wrapper.cc > @@ -2023,14 +2023,12 @@ cont: > fprintf (mstream, "%s:\n\t@%s ", output_name, new_argv[0]); > for (j =3D 1; new_argv[j] !=3D NULL; ++j) > fprintf (mstream, " '%s'", new_argv[j]); > - fprintf (mstream, "\n"); > /* If we are not preserving the ltrans input files then > 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", > - input_name, input_name, input_name, input_name); > + fprintf (mstream, " '-truncate' '%s'", input_name); > + fprintf (mstream, "\n"); > } > else > { > -- > 2.39.2 >