From owner-freebsd-stable@FreeBSD.ORG Sat Mar 29 11:28:35 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01C2081C for ; Sat, 29 Mar 2014 11:28:35 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B4C6F657 for ; Sat, 29 Mar 2014 11:28:34 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::8878:6384:3237:cf3b] (unknown [IPv6:2001:7b8:3a7:0:8878:6384:3237:cf3b]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 747775C44; Sat, 29 Mar 2014 12:28:29 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_7F7BD22C-8405-4EFF-A305-C71798167C41"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: HEADS UP: merged llvm/clang 3.4 From: Dimitry Andric In-Reply-To: <20140329044818.84350.qmail@mailgate.gta.com> Date: Sat, 29 Mar 2014 12:28:18 +0100 Message-Id: References: <20140329044818.84350.qmail@mailgate.gta.com> To: Larry Baird X-Mailer: Apple Mail (2.1874) Cc: freebsd-stable@freebsd.org 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: Sat, 29 Mar 2014 11:28:35 -0000 --Apple-Mail=_7F7BD22C-8405-4EFF-A305-C71798167C41 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 29 Mar 2014, at 05:48, Larry Baird wrote: >>>> 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. >>>=20 >>> Yeah, it is really unpleasant. >>>=20 >>> Maybe we should do something like this for stable/9 and stable/10 >>> branches (not tested). >>>=20 >>> --- 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() =3D=3D = llvm::Triple::FreeBSD) >>> CmdArgs.push_back("-gdwarf-2"); >>> else >>> CmdArgs.push_back("-g"); >>=20 >> 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. > Glad to hear. Adding an extra flag, to get applications to a state = where > they could be debugged was unexpected. I am sure I wouldn't have been = the > only one surprised to find out that "cc -g" no longer works. Correction: cc -g works fine, you just need to use a non-ancient = debugger. :-) -Dimitry --Apple-Mail=_7F7BD22C-8405-4EFF-A305-C71798167C41 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlM2rlsACgkQsF6jCi4glqPH9ACfdnx9uN+bj619WHljH/6w+Row h18AoJG6KNJMnZSkaqf3Soc74+7Nshm8 =2tHU -----END PGP SIGNATURE----- --Apple-Mail=_7F7BD22C-8405-4EFF-A305-C71798167C41--