From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2493 invoked by alias); 12 Apr 2010 23:30:48 -0000 Received: (qmail 2485 invoked by uid 22791); 12 Apr 2010 23:30:48 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from c2bthomr01.btconnect.com (HELO c2bthomr01.btconnect.com) (213.123.20.119) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Apr 2010 23:30:23 +0000 Received: from thor.office (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2bthomr01.btconnect.com with ESMTP id MXW18392; Tue, 13 Apr 2010 00:30:19 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=0001.0A0B0302.4BC3AD0B.00D7, actions=tag Cc: GCC Development Message-Id: <2750FD2B-E8CD-480A-B96E-CE4CF915E62C@sandoe-acoustics.co.uk> From: IainS To: Ian Lance Taylor In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: specs question. Date: Mon, 12 Apr 2010 23:44:00 -0000 References: <6807833B-8AB9-468B-9936-09025C700DF7@sandoe-acoustics.co.uk> Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg00272.txt.bz2 On 13 Apr 2010, at 00:22, Ian Lance Taylor wrote: > IainS writes: > >> yeah .. we use it in Darwin's dsymutil spec. >> >> %{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ >> %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \ >> %{gdwarf-2:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{! >> o:a.out}}}}}}}}}}}}" >> %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}\n" >> >> >> if you put "-lm" on the c/l dsymutil doesn't get called. > > Note that in the specs language the %{.XXX: ...} is matched against > the filename passed to the gcc driver. It doesn't know the source > language of a .o file. So if you are linking, and passing .o files, > then this approach won't work. well, my first question to myself was 'why are there not ".o" and ".a" in the list?' ;)) There are two aspects to this ... 1/ the fact that this is probably not the right thing to do in that spec - easily solved by deleting it.. 2/ The weird effect where putting -lm on the c/l causes the substitution to fail - which hints at a deeper problem. FWIW I couldn't (quickly) find any other spec using that syntax - so perhaps it's not important. cheers, Iain