Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 1996 10:40:55 +0200 (MET DST)
From:      grog@lemis.de (Greg Lehey)
To:        bde@zeta.org.au (Bruce Evans)
Cc:        FreeBSD-current@FreeBSD.ORG (FreeBSD current users)
Subject:   Re: make fails
Message-ID:  <199606240840.KAA29542@allegro.lemis.de>
In-Reply-To: <199606240834.SAA13588@godzilla.zeta.org.au> from "Bruce Evans" at Jun 24, 96 06:34:11 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans 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
>
>> I thought this was expected behaviour for a single .c file without a -C?
>
> Without a -c.  But there is a -c.
>
> -O is a not so new option to the linker (read your commit mail).  The
> message from ld has nothing to do with the message from make about cc.
> Make prints `cc -O -c ...' to stdout and then runs cc.  Then it runs `ld
> -O ${.TARGET} -x -r ${.TARGET}` without telling you what it is
doing.

Sneaky.

> Old versions of ld don't support -O so they print an error message to
> stderr.

Aha.  That makes sense after all.

Wouldn't it be more appropriate to print out the ld invocation line
too?

Greg



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