NO

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

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1702
-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.

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 383
    • 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: 1702
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 »

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 1976
    • 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: 1702
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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 1976
    • 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: 1702
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  ;)

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 1976
    • 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: 1702
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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 1976
    • 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