Received: from pch.mit.edu (PCH.MIT.EDU [18.7.21.90]) by krbdev.mit.edu (8.12.9) with ESMTP id l8I4evHW028151; Tue, 18 Sep 2007 00:40:57 -0400 (EDT) Received: from pch.mit.edu (pch.mit.edu [127.0.0.1]) by pch.mit.edu (8.13.6/8.12.8) with ESMTP id l8I4eqZ3015498; Tue, 18 Sep 2007 00:40:52 -0400 Received: from biscayne-one-station.mit.edu (BISCAYNE-ONE-STATION.MIT.EDU [18.7.7.80]) by pch.mit.edu (8.13.6/8.12.8) with ESMTP id l8I4epJV015492 for ; Tue, 18 Sep 2007 00:40:51 -0400 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id l8I4eoL8027546 for ; Tue, 18 Sep 2007 00:40:50 -0400 (EDT) Received: from cathode-dark-space.mit.edu (CATHODE-DARK-SPACE.MIT.EDU [18.18.1.96]) (authenticated bits=56) (User authenticated as tlyu@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id l8I4enwd014558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 18 Sep 2007 00:40:50 -0400 (EDT) Received: (from tlyu@localhost) by cathode-dark-space.mit.edu (8.12.9.20060308) id l8I4enCR017582; Tue, 18 Sep 2007 00:40:49 -0400 (EDT) To: krb5-bugs@MIT.EDU Subject: gcc -fworking-directory breaks make depend From: Tom Yu Date: Tue, 18 Sep 2007 00:40:49 -0400 Message-ID: Lines: 16 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-BY: MIMEDefang 2.42 X-Spam-Flag: NO X-Spam-Score: 0.00 X-Beenthere: krb5-bugs-incoming@mailman.mit.edu X-Mailman-Version: 2.1.6 Precedence: list Sender: krb5-bugs-incoming-bounces@PCH.MIT.EDU Errors-To: krb5-bugs-incoming-bounces@PCH.MIT.EDU X-RT-Original-Encoding: us-ascii Content-Length: 873 I just had "make depend" fail spectacularly. At some point recently (3.4.0?), gcc grew the option to output the working directory in cpp output ("-fworking-directory"). This outputs cpp line markers containing the working directory, and for some reason occurs even while runing "make depend" using "gcc -M", causing broken makefiles. I think it's because passing "-g" to gcc may turn on "-fworking-directory" due to the specfile. Workaround is to set CFLAGS=-P or CFLAGS=-fno-working-directory when running "make depend", but we might want to make the depfix script deal with the spurious line markers if they get output. Alternatively, or additionally, add to ALL_CFLAGS a variable named DEP_CFLAGS or something like that which will get configured to contain gcc-version-specific flags to suppress line markers. Stripping line markers in depfix sounds easier though.