Re: [PATCH] lto: Don't assume a posix shell is usable on windows [PR110710]

2024-03-27 Thread Richard Biener
> Am 27.03.2024 um 18:37 schrieb Peter0x44 : > >  >> >>> >> > Another way would be to have a portable solution to truncate a file >>> >> > (maybe even removing it would work). I don't think we should override >>> >> > SHELL. > I've been thinking harder about this, these files get unlinked

Re: [PATCH] lto: Don't assume a posix shell is usable on windows [PR110710]

2024-03-27 Thread Peter0x44
>> > Another way would be to have a portable solution to truncate a file >> > (maybe even removing it would work). I don't think we should override >> > SHELL. I've been thinking harder about this, these files get unlinked at the end if they are temporary. Is there no way to get make to

Re: [PATCH] lto: Don't assume a posix shell is usable on windows [PR110710]

2024-03-27 Thread Richard Biener
On Wed, Mar 27, 2024 at 10:13 AM peter0x44 wrote: > > On 2024-03-27 01:58, Richard Biener wrote: > > On Wed, Mar 27, 2024 at 9:13 AM Peter0x44 > > wrote: > >> > >> I accidentally replied off-list. Sorry. > >> > >> 27 Mar 2024 8:09:30 am Peter0x44 : > >> > >> > >> 27 Mar 2024 7:51:26 am Richard

Re: [PATCH] lto: Don't assume a posix shell is usable on windows [PR110710]

2024-03-27 Thread peter0x44
On 2024-03-27 01:58, Richard Biener wrote: On Wed, Mar 27, 2024 at 9:13 AM Peter0x44 wrote: I accidentally replied off-list. Sorry. 27 Mar 2024 8:09:30 am Peter0x44 : 27 Mar 2024 7:51:26 am Richard Biener : > On Tue, Mar 26, 2024 at 11:37 PM Peter Damianov > wrote: >> >> lto-wrapper

Re: [PATCH] lto: Don't assume a posix shell is usable on windows [PR110710]

2024-03-27 Thread Richard Biener
On Wed, Mar 27, 2024 at 9:13 AM Peter0x44 wrote: > > I accidentally replied off-list. Sorry. > > 27 Mar 2024 8:09:30 am Peter0x44 : > > > 27 Mar 2024 7:51:26 am Richard Biener : > > > On Tue, Mar 26, 2024 at 11:37 PM Peter Damianov > > wrote: > >> > >> lto-wrapper generates Makefiles that use

Re: [PATCH] lto: Don't assume a posix shell is usable on windows [PR110710]

2024-03-27 Thread Peter0x44
I accidentally replied off-list. Sorry. 27 Mar 2024 8:09:30 am Peter0x44 : 27 Mar 2024 7:51:26 am Richard Biener : On Tue, Mar 26, 2024 at 11:37 PM Peter Damianov wrote: lto-wrapper generates Makefiles that use the following: touch -r file file.tmp && mv file.tmp file to truncate files.

Re: [PATCH] lto: Don't assume a posix shell is usable on windows [PR110710]

2024-03-27 Thread Richard Biener
On Tue, Mar 26, 2024 at 11:37 PM Peter Damianov wrote: > > lto-wrapper generates Makefiles that use the following: > touch -r file file.tmp && mv file.tmp file > to truncate files. > If there is no suitable "touch" or "mv" available, then this errors with > "The system cannot find the file

Re: [PATCH] lto: Don't assume a posix shell is usable on windows [PR110710]

2024-03-26 Thread Peter0x44
26 Mar 2024 10:36:45 pm Peter Damianov : lto-wrapper generates Makefiles that use the following: touch -r file file.tmp && mv file.tmp file to truncate files. If there is no suitable "touch" or "mv" available, then this errors with "The system cannot find the file specified". The solution

[PATCH] lto: Don't assume a posix shell is usable on windows [PR110710]

2024-03-26 Thread Peter Damianov
lto-wrapper generates Makefiles that use the following: touch -r file file.tmp && mv file.tmp file to truncate files. If there is no suitable "touch" or "mv" available, then this errors with "The system cannot find the file specified". The solution here is to check if sh -c true works, before