From owner-freebsd-current Mon Jun 24 03:03:20 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA00768 for current-outgoing; Mon, 24 Jun 1996 03:03:20 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA00763 for ; Mon, 24 Jun 1996 03:03:18 -0700 (PDT) Received: from diablo.ppp.de (diablo.ppp.de [193.141.101.34]) by who.cdrom.com (8.6.12/8.6.11) with SMTP id CAA08235 for ; Mon, 24 Jun 1996 02:50:29 -0700 Received: from allegro.lemis.de by diablo.ppp.de with smtp (Smail3.1.28.1 #1) id m0uY8Hh-000QarC; Mon, 24 Jun 96 11:50 MET DST From: grog@lemis.de (Greg Lehey) Organisation: LEMIS, Schellnhausen 2, 36325 Feldatal, Germany Phone: +49-6637-919123 Fax: +49-6637-919122 Received: (grog@localhost) by allegro.lemis.de (8.6.9/8.6.9) id KAA29542; Mon, 24 Jun 1996 10:40:56 +0200 Message-Id: <199606240840.KAA29542@allegro.lemis.de> Subject: Re: make fails To: bde@zeta.org.au (Bruce Evans) Date: Mon, 24 Jun 1996 10:40:55 +0200 (MET DST) Cc: FreeBSD-current@FreeBSD.ORG (FreeBSD current users) In-Reply-To: <199606240834.SAA13588@godzilla.zeta.org.au> from "Bruce Evans" at Jun 24, 96 06:34:11 pm X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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