From owner-freebsd-stable@FreeBSD.ORG Fri Mar 28 21:55:37 2014 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CCED215; Fri, 28 Mar 2014 21:55:37 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDCB2A53; Fri, 28 Mar 2014 21:55:36 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WTekR-000Hgg-Iz; Fri, 28 Mar 2014 21:55:35 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s2SLtX6J080449; Fri, 28 Mar 2014 15:55:33 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18zDrKPYE8kGzBtNkFotepa Subject: Re: HEADS UP: merged llvm/clang 3.4 From: Ian Lepore To: Dimitry Andric In-Reply-To: References: <20140328165121.13797.qmail@mailgate.gta.com> <6F2AEDEC-4173-45B0-9C21-1D80E33660F6@FreeBSD.org> <1396029772.81853.150.camel@revolution.hippie.lan> <5335E715.3090603@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 28 Mar 2014 15:55:33 -0600 Message-ID: <1396043733.81853.164.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Craig Rodrigues , Larry Baird , FreeBSD stable , Jung-uk Kim X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 21:55:37 -0000 On Fri, 2014-03-28 at 22:35 +0100, Dimitry Andric wrote: > On 28 Mar 2014, at 22:18, Jung-uk Kim wrote: > > Signed PGP part > > On 2014-03-28 16:25:42 -0400, Craig Rodrigues wrote: > > > On Fri, Mar 28, 2014 at 11:11 AM, Dimitry Andric > > > wrote: > > >> > > >> You need to rebuild the system anyway, if you want debug > > >> information, so nothing changed? If you insist on wanting to use > > >> the crummy gdb in base, which should have been axed years ago, > > >> then just use DEBUG_FLAGS=-gdwarf-2, otherwise use ports gdb, > > >> which any sensible person should do. > > >> > > >> -Dimitry > > >> > > > > > > This kind of thing is OK for HEAD, but to me seems like something > > > which is not OK for a stable branch. > > > > > > Before your change: "cc -g" from base + gdb in base = can debug > > > After your change: "cc -g" from base + gdb in base = cannot > > > debug > > > > > > Is it possible to modify clang in base, so that on the stable > > > branches, "cc -g" will output dwarf-2 instead of dwarf-4 by > > > default? > > > > > > I understand that installing gdb from ports, changing compiler > > > flags from -g to -gdwarf-2 in Makefiles, or switching to compiling > > > with gcc are all reasonable workarounds, but this seems a bit like > > > POLA for a stable branch. > > > > Yeah, it is really unpleasant. > > > > Maybe we should do something like this for stable/9 and stable/10 > > branches (not tested). > > > > --- contrib/llvm/tools/clang/lib/Driver/Tools.cpp > > +++ contrib/llvm/tools/clang/lib/Driver/Tools.cpp > > @@ -2628,8 +2628,9 @@ void Clang::ConstructJob(Compilation &C, const Job > > CmdArgs.push_back("-gdwarf-4"); > > else if (!A->getOption().matches(options::OPT_g0) && > > !A->getOption().matches(options::OPT_ggdb0)) { > > - // Default is dwarf-2 for darwin. > > - if (getToolChain().getTriple().isOSDarwin()) > > + // Default is dwarf-2 for Darwin and FreeBSD. > > + if (getToolChain().getTriple().isOSDarwin() || > > + getToolChain().getTriple().getOS() == llvm::Triple::FreeBSD) > > CmdArgs.push_back("-gdwarf-2"); > > else > > CmdArgs.push_back("-g"); > > I'm now testing something similar, which also tests the FreeBSD version, > so it can be applied to head and then MFC'd. I will commit it soon. > > -Dimitry > Why test the version? The tools on head can't handle dwarf4 any better than the tools on the stable branches. I don't understand the sudden change in mindset that after 20 years of freebsd providing a completely usable development environment in base, now all of a sudden it's okay to not do that anymore. It seems fine to me to say "If you want better tools, use the latest ports" but not fine to say "If you want any tools at all, use the latest ports (oh and by the way, good luck with cross-building if you're not an amd64 person)." -- Ian