From owner-svn-src-head@FreeBSD.ORG Wed Feb 23 23:50:11 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56306106564A; Wed, 23 Feb 2011 23:50:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id CA0AA8FC0A; Wed, 23 Feb 2011 23:50:10 +0000 (UTC) Received: from c122-107-114-89.carlnfd1.nsw.optusnet.com.au (c122-107-114-89.carlnfd1.nsw.optusnet.com.au [122.107.114.89]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p1NNo7tU019463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Feb 2011 10:50:07 +1100 Date: Thu, 24 Feb 2011 10:50:07 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <4D658AD4.9020602@FreeBSD.org> Message-ID: <20110224103713.I1871@besplex.bde.org> References: <201102232117.p1NLHcuE011679@svn.freebsd.org> <20110224084812.F1571@besplex.bde.org> <20110224090558.E1571@besplex.bde.org> <4D658AD4.9020602@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r218984 - head/lib/librt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2011 23:50:11 -0000 On Wed, 23 Feb 2011, Dimitry Andric wrote: > On 2011-02-23 23:13, Bruce Evans wrote: >> Now found it easly using gcc -v. gcc -c -v foo.c produces "... /usr/bin/as >> -o foo.o /var/tmp/whatever.s", but gcc -c -v foo.s produces "... >> /usr/bin/as >> -gdwarf2 -o foo.o foo.s". gcc's generation of -gdwarf2 is inconsistent >> with itself. Do we use a nonstandard not-gdwarf2 option for the usual case >> but forget to change this for asm files? > > I don't think so, but there is simply no need to pass '-g' in the gcc > invocation that assembles and links the .s file, since the debug info is > already embedded in the .s file itself. Except I want to write "cc ${CFLAGS} -o foo *.s *.c [*.o]" and not have variant ${CFLAGS} for *.s and *.c. It is a nice feature of cc that you can use the same ${CFLAGS} for *.[cos...] in most contexts, and FreeBSD .mk files depend on this. > Apparently, if you use --gdwarf2 with GNU as 2.15, it messes up the > already existing debug info. It looks like 2.17.50 has no such problem, > though. So we won't worry much about this. Does new binutils/as completely ignore --gdwarf2 iff the asm file already has suitable debugging info? I would have expected at least an error message if the debugging info says --gother and you try to add or change to --gdwarf2. Normal debugging info doesn't seem to have any id to distinguish its type. Bruce