From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21376 invoked by alias); 14 Oct 2002 19:44:38 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 21369 invoked from network); 14 Oct 2002 19:44:37 -0000 Received: from unknown (HELO monkey.daikokuya.co.uk) (213.152.55.49) by sources.redhat.com with SMTP; 14 Oct 2002 19:44:37 -0000 Received: from neil by monkey.daikokuya.co.uk with local (Exim 3.36 #1 (Debian)) id 181B8f-0008SC-00; Mon, 14 Oct 2002 20:44:29 +0100 Date: Mon, 14 Oct 2002 13:09:00 -0000 From: Neil Booth To: Martin Pool Cc: gcc@gcc.gnu.org, Zack Weinberg Subject: Re: gcc-3.2 -MD -o misbehaviour Message-ID: <20021014194429.GC32293@daikokuya.co.uk> References: <2683.198.102.182.67.1033413284.squirrel@mercury.axian.com> <20020930220940.GA1213@toey.sourcefrog.net> <4710.198.102.182.67.1033427430.squirrel@mercury.axian.com> <20020930234356.GA14232@samba.org> <62621.216.99.197.112.1033440272.squirrel@mercury.axian.com> <20021001060338.GE14232@samba.org> <2960.198.102.182.102.1033495681.squirrel@mercury.axian.com> <20021002053641.GC22443@samba.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021002053641.GC22443@samba.org> User-Agent: Mutt/1.4i X-SW-Source: 2002-10/txt/msg00741.txt.bz2 Martin Pool wrote:- > The manual from Debian Sid's gcc-3.2 (3.2.1-0pre3) says > > If `-MD' is used in conjunction with `-E', any `-o' switch is > understood to specify the dependency output file (but *note > -MF::), but if used without `-E', each `-o' is understood to > specify a target object file. > > But this doesn't happen: > > !1169 15:18 /tmp/test% ls -l > total 4 > -rw-r--r-- 1 mbp mbp 76 2002-10-02 14:44 hello.c > !1171 15:18 /tmp/test% gcc-3.2 -MD -E -o hello.out hello.c > !1172 15:18 /tmp/test% ls -la > total 80 > drwxr-xr-x 2 mbp mbp 4096 2002-10-02 15:18 . > drwxrwxrwt 15 root root 49152 2002-10-02 15:17 .. > -rw-r--r-- 1 mbp mbp 76 2002-10-02 14:44 hello.c > -rw-r--r-- 1 mbp mbp 536 2002-10-02 15:18 hello.d > -rw-r--r-- 1 mbp mbp 18019 2002-10-02 15:18 hello.out > > Actually I'm glad, this doesn't work. Overriding -o to specify the > destination of dependency output seems needlessly complex since there > is already -MF. Personally I'd prefer you pull this out of the > documentation rather than making -o actually specify the output file. Yeah, it's a doc bug. The behaviour of -M and -MD with or without -o and/or -E is kinda complicated and is different for almost each case; but I believe that gcc != 3.0.x all agree behaviour, and there is some kind of coherent underlying logic though it may not be obvious. I spent ages with Chris Demetriou sorting this mess out. Zack, could you have a go at fixing this? I'm frozen out until I get paperwork through the system. Thanks, Neil.