Pelles C forum

Pelles C => Feature requests => Topic started by: frankie on August 02, 2007, 06:28:16 PM

Title: -o option for compiler
Post by: frankie on August 02, 2007, 06:28:16 PM
Pelle could you please add the option '-o <outfilename>' so it's possible to use pocc with unix makefiles?
Thank you very much.
Title: Re: -o option for compiler
Post by: AlexN on August 03, 2007, 07:33:12 AM
Pelle could you please add the option '-o <outfilename>' so it's possible to use pocc with unix makefiles?
Thank you very much.

Pelle has the option '-Fo <outfilename', isn't that enough?
Title: Re: -o option for compiler
Post by: frankie on August 03, 2007, 02:01:30 PM
Yes unless you like to modify tenths of makefiles automatically generated while compiling under unix emulation  ::)
Pelle please also for the polink.
Title: Re: -o option for compiler
Post by: Pelle on August 03, 2007, 07:13:01 PM
No big deal to add, but I'm worried that if I add it to POCC and POLINK soon someone wants it in POASM, PORC, POCB too (for convenience)... and then there may be another "UNIX compatible" option to add, and so on, and so on, ...
Title: Re: -o option for compiler
Post by: frankie on August 06, 2007, 06:54:20 PM
I agree with you, but maybe that to be partially compatible with gcc is not so bad... ;)
Anyway at your choice.
Title: Re: -o option for compiler
Post by: Pelle on August 07, 2007, 02:32:55 PM
I think the most appropriate place for the -o option is in CC (and only CC); it can both compile and link. Somewhere between the existing -Fo and -Fe option - I'm not sure about the details yet...
Title: Re: -o option for compiler
Post by: frankie on August 07, 2007, 10:38:46 PM
This could be the natural place.
But it is also important that cc exhibits the same behaviour as gcc to replace it with makefiles.
I tested pomake with some unix makefiles and it works well enaugh  ;)
Title: Re: -o option for compiler
Post by: Pelle on August 08, 2007, 12:13:32 AM
This is starting to become confusing. I think you have to provide a small example of what you want - otherwise my guesses may be completely wrong...
Title: Re: -o option for compiler
Post by: frankie on August 08, 2007, 04:42:10 PM
I meant just to can use your compiler driver as the gcc command passing source, object and library files to compile or link depending on file extensions.
The -o switch should work only on the final output file, i.e. a command like:
Code: [Select]
cc -c -o foo.o foo.cWill only compile the source "foo.c" in the object "foo.o"
The command line:
Code: [Select]
cc foo.c bar.c -o out.exeWill compile the sources and will output an executable named "out.exe"
Another example:
Code: [Select]
cc foo.obj bar.obj lib.lib -o sample.exeAs above but will only link the two objects and the library, the output file is named "sample.exe"
I hope to have been clear enaugh.
Thanks Pelle.
Title: Re: -o option for compiler
Post by: Pelle on August 10, 2007, 11:33:31 PM
OK. I have to think about this, but should be doable...