Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 1996 09:48:14 +0200 (MET DST)
From:      grog@lemis.de (Greg Lehey)
To:        terry@lambert.org (Terry Lambert)
Cc:        FreeBSD-current@FreeBSD.ORG (FreeBSD current users)
Subject:   Re: make fails
Message-ID:  <199606240748.JAA29452@allegro.lemis.de>
In-Reply-To: <199606240657.XAA27332@phaeton.artisoft.com> from "Terry Lambert" at Jun 23, 96 11:57:05 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert writes:
>
>>> cc -O -c /usr/src/usr.bin/lex/lib/libmain.c -o libmain.o
>>> ld: invalid command option `-O'
>>> *** Error code 1
>>
>> Fascinating.  For some non-evident reason, cc has decided to invoke
>> the loader instead of the compiler.  I can't see any good reason for
>> that, but why not expiriment: change to directory lib, and issue the
>> command manually.  In particular, I'd like to see the output of:
>>
>> cc -v -O -c /usr/src/usr.bin/lex/lib/libmain.c -o libmain.o
>>
>> and
>>
>> cc -v -O -c /usr/src/usr.bin/lex/lib/libmain.c
>>
>> The -v option prints out exact information about the passes that cc
>> starts, and the -o libmain.o is superfluous (though I suspect it has
>> something to do with this problem).
>
> I thought this was expected behaviour for a single .c file without a -C?

Which example is expected behaviour?  The command *should* compile
libmain.c and create an object file libmain.o, omitting the linker
step, with or without the -o libmain.o.  Some flavours of cc
(specifically System V) reserve the -o for the name of the final
executable, thus giving rise to messages like "would overwrite
libmain.o".  I was suspecting that the cc wasn't quite kosher.  I
since heard from the original correspondent that he "fixed" it by
installing a new version of ld.  Since ld shouldn't be involved, I'm
not convinced that anything's "fixed".

Greg




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606240748.JAA29452>