Date: Thu, 24 Feb 2011 10:50:07 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Dimitry Andric <dim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans <brde@optusnet.com.au> Subject: Re: svn commit: r218984 - head/lib/librt Message-ID: <20110224103713.I1871@besplex.bde.org> In-Reply-To: <4D658AD4.9020602@FreeBSD.org> References: <201102232117.p1NLHcuE011679@svn.freebsd.org> <20110224084812.F1571@besplex.bde.org> <20110224090558.E1571@besplex.bde.org> <4D658AD4.9020602@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110224103713.I1871>