NO

Author Topic: -o option for compiler  (Read 6309 times)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
-o option for compiler
« 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.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: -o option for compiler
« Reply #1 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?
best regards
 Alex ;)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: -o option for compiler
« Reply #2 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.
« Last Edit: August 03, 2007, 06:02:47 PM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: -o option for compiler
« Reply #3 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, ...
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: -o option for compiler
« Reply #4 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.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: -o option for compiler
« Reply #5 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...
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: -o option for compiler
« Reply #6 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  ;)
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: -o option for compiler
« Reply #7 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...
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: -o option for compiler
« Reply #8 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.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: -o option for compiler
« Reply #9 on: August 10, 2007, 11:33:31 PM »
OK. I have to think about this, but should be doable...
/Pelle