zcc flags changed

Other misc things
Post Reply
derekfountain
Member
Posts: 121
Joined: Mon Mar 26, 2018 1:49 pm

zcc flags changed

Post by derekfountain »

I've just picked up 2.1 and I notice the options/flags for zcc have changed. -no-cleanup, for example, has gone. Warnings galore from my makefile. :)

Did I miss an announcement on this? Is there a list of changes made to the zcc interface?
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Re: zcc flags changed

Post by dom »

Ah, this one went in away in September as part of the concurrent build work.

I originally added this option back at the start of the project when the /tmp directory wasn't used and files ended up being created in the local directory. At the time I found it useful for comparing the different optimisation levels.

As time went on, we started to use the /tmp directory and the -notemp option went away in 2014, so this option achieved the effect of scattering and leaving randomly named files across /tmp which: a) isn't particularly well behaved (especially on platforms that use /tmp as virtual memory), b) not very intuitive to dig through the debris.

The option parser got changed in this release, it's now the same code as sccz80 so there might be some placement issues (I think the rarely used -gpf option is affected), but there's now a nicely formatted and categorised help page which should make finding the option easier.
derekfountain
Member
Posts: 121
Joined: Mon Mar 26, 2018 1:49 pm

Re: zcc flags changed

Post by derekfountain »

OK, no great shakes here, other than taking the option out of my makefile.
Guesser
Member
Posts: 52
Joined: Mon Nov 21, 2011 2:00 pm

Re: zcc flags changed

Post by Guesser »

dom wrote: Wed Feb 10, 2021 12:36 pm As time went on, we started to use the /tmp directory and the -notemp option went away in 2014, so this option achieved the effect of scattering and leaving randomly named files across /tmp which: a) isn't particularly well behaved (especially on platforms that use /tmp as virtual memory), b) not very intuitive to dig through the debris.
This is obviously slightly off topic, but since you brought it up, I noticed that sccz80 is filling temp with files that don't get cleaned up. (all appear to hold strings)
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Re: zcc flags changed

Post by dom »

Guesser wrote: Thu Feb 11, 2021 1:06 pmThis is obviously slightly off topic, but since you brought it up, I noticed that sccz80 is filling temp with files that don't get cleaned up. (all appear to hold strings)
Well, that shouldn't happen. tmpfile() is used which has this note:
The temporary file created is automatically deleted when the stream is closed (fclose) or when the program terminates normally. If the program terminates abnormally, whether the file is deleted depends on the specific system and library implementation.
Except on Windows. And given that you said "temp". That is where I assume you're working.

That code was changed a couple of years ago to work round a mingw bug that created temporary files in c:\ which needs elevated privileges.

At least it's not a recent regression, looks like I'm collecting all tmp files and unlinking them atexit(). Thanks for the report.
Guesser
Member
Posts: 52
Joined: Mon Nov 21, 2011 2:00 pm

Re: zcc flags changed

Post by Guesser »

Yeah, on windows 👍
Post Reply