Nasty 4.3 change to cc(1)
das at LOCUS.UCLA.EDU
das at LOCUS.UCLA.EDU
Tue Aug 5 11:17:26 AEST 1986
Under SysV, 4.1, and 4.2,
cc -c -o blah blah1.c blah2.c
produces two object files, named blah1.o and blah2.o
cc -c -o blah blah.c
produces one object file, named blah.o
Under 4.3,
cc -c -o blah blah1.c blah2.c
produces two object files, named blah1.o and blah2.o
cc -c -o blah blah.c
produces one object file, named blah, not blah.o!!!!
While normal people don't usually specify both the -c flag and -o filename,
some shell scripts do (e.g. the C++ script "CC"). Obviously, someone decided
that -o should mean "If there's a single obvious output file, -o should
rename it," rather than "-o should rename the a.out file", since
cc -S -o blah blah.c
puts the assembly language output in blah, not blah.s (again, only when exactly
one source file is named).
I think the change is a mistake, since it breaks existing software and there's
no compelling reason I can see to prefer the new meaning of -o over the old.
Justifications?
-- David Smallberg, das at locus.ucla.edu, {sdcrdcf,ucbvax}!ucla-cs!das
-- David Smallberg, das at locus.ucla.edu, {sdcrdcf,ucbvax}!ucla-cs!das
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list