[z88dk-dev] zcc: do we still need -notemp ?

Bridge to the z88dk-developers mailing list
Post Reply
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

[z88dk-dev] zcc: do we still need -notemp ?

Post by alvin »

The reason why I want to get rid of it is because zcc must process certain file types from their original directory. Right now it does that with .c files, making sure the c source file it uses is in its original location so that the preprocessor properly resolves include paths.

That's actually not sufficient - .m4 .asm .s .inc .h files also must be in their original locations so that m4, the assembler and the c compilers can properly process include paths and include files generated during the compile process. Some of these other file types can be output by m4 and if so they must be moved to the original source location before further processing. When we add LLVM there's going to be something similar going on with its .ll files.

In short, I'd like to get rid of the notemp option so that it doesn't clutter up the compile process which may involve copying the filetypes listed above into the source directory. I also don't think there is much need for notemp anymore as you can get .lis files for all source input with the --list option.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

I find '-notemp' useful in two situations:


- Code debugging, expecially when it comes to the changes being introduced by the optimizers.

Digging into the "temp" folder is always messy, but as you said we now have the listing option.



- User's system permission limits

Sometimes it was a comfortable workaround on both Linux and Windows systems wildly locked down.
As for the above case I think they both can/should be addressed otherwise.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

I find '-notemp' useful in two situations:
- Code debugging, expecially when it comes to the changes being introduced by the optimizers.
Digging into the "temp" folder is always messy, but as you said we now have the listing option.
Yes I've used it for the same. With notemp you will get files generated from each -O step which is convenient for a diff but for most situations I've since changed to using --list and just stopping at the O level of interest to examine the output. You don't see every O step but you do see the one you're currently interested in. For situations where you need a diff, there is the temp dir as you say.

There are now options to stop at almost every compile step (-m4, -E, -a, -c) so I think the bulk of the reason for notemp to exist is now gone. It used to be that -E and -a only worked on the first source file in the input so the only way to get, eg, an asm listing of all input source was to compile and use notemp.

What I'll do is make the changes and then if it turns out to be unacceptable we can unwind them.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

What I'll do is make the changes and then if it turns out to be unacceptable we can unwind them.
Agreed ;)



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Post Reply