From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32546 invoked by alias); 12 Apr 2010 22:35:10 -0000 Received: (qmail 32536 invoked by uid 22791); 12 Apr 2010 22:35:10 -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 c2bthomr04.btconnect.com (HELO c2bthomr04.btconnect.com) (213.123.20.122) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Apr 2010 22:35:04 +0000 Received: from thor.office (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2bthomr04.btconnect.com with ESMTP id MML02915; Mon, 12 Apr 2010 23:34:45 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=0001.0A0B0301.4BC3A005.0115, actions=tag Cc: GCC Development Message-Id: 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 22:41: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/msg00267.txt.bz2 On 12 Apr 2010, at 23:24, Ian Lance Taylor wrote: > IainS writes: > >> what is the expected behavior of ? >> >> %{.c|.cc|.for|.F90: foo } >> >> .. as I read gcc/gcc.c I would expect to get "foo" for command lines >> with files with these suffixes: >> .c >> .cc >> .for >> .F90 >> >> but not otherwise (since it says . binds more strongly than |) ; > > That sounds right to me. Do you see something different 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. Almost as if ".m" was being treated as a regex rather than a suffix... (but I don't think that's the whole story). and I find that if I put .for|.f90 etc it makes no difference to fortran getting debugged... --- ... if I take away the %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: } It all works as expected... ---- I looked at the code (briefly) that parses the %{ } but it needs some time to digest what's going on - so I thought asking would be a good plan ;-) Iain