RFC: Incompatible Driver opts

jbc@hpcllmv.HP.COM (Jeff Caldwell)
13 Oct 89 20:36:49 GMT

          From comp.compilers

Related articles
RFC: Incompatible Driver opts jbc@hpcllmv.HP.COM (1989-10-13)
| List of all articles for this month |

From: jbc@hpcllmv.HP.COM (Jeff Caldwell)
Newsgroups: comp.compilers
Date: 13 Oct 89 20:36:49 GMT
Organization: Hewlett Packard Calif. Language Lab

    In the Unix world of Fortran compiler, almost all f77 drivers have the
following two options:

    -c Suppress loading and produce `.o' files for each source file.
    -o outfile Name the output file from the linker outfile instead of a.out

      I am interested in any opinions concerning people's feelings on what the
result should be when the two options are combined.
f77 -c -o outfile prog.f

      Should this create an unlinked file named outfile or prog.o? If you feel
that the output file should be named outfile, then what do you feel would be
the proper way to handle multiple source files?
f77 -c -o outfile prog1.f prog2.f prog3.f

      I have looked into this and found that Sun Fortran drivers will rename the
unlinked object file outfile instead of prog.o. Most BSD Unix systems such
as those on VAX and Apollo/HP will ignore the -o flag when the two options
are combined and issue an error message like the one below.
      "-c prevents loading, -o outfile ignored"

      This may seem like a small issue but it can have a pretty large impact
on users with huge makefiles and other automation when they try to migrate
between systems. This question applies, of course, to all other Unix compiler
drivers as well.

Jeff Caldwell | HP Data and Languages
[Personally, my preference would be to use -o only to name the linked result,
and use something else to rename *.o files. Perhaps someone can make a
counterargument. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.