Date: Fri, 28 Mar 2014 17:52:54 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: Dimitry Andric <dim@FreeBSD.org> Cc: Craig Rodrigues <rodrigc@FreeBSD.org>, Larry Baird <lab@maxwell.gta.com>, FreeBSD stable <freebsd-stable@freebsd.org>, Ian Lepore <ian@freebsd.org> Subject: Re: HEADS UP: merged llvm/clang 3.4 Message-ID: <5335EF36.80601@FreeBSD.org> In-Reply-To: <AE8439D0-637D-45DA-8DD1-37888266FD44@FreeBSD.org> References: <20140328165121.13797.qmail@mailgate.gta.com> <6F2AEDEC-4173-45B0-9C21-1D80E33660F6@FreeBSD.org> <1396029772.81853.150.camel@revolution.hippie.lan> <B373566C-03DB-4508-9088-4E343A2638F5@FreeBSD.org> <CAG=rPVcM6KOAd2y8zyYP6GJmQ3EkVu%2Bm-r1OcPmS0TUQGKy=AA@mail.gmail.com> <5335E715.3090603@FreeBSD.org> <AE8439D0-637D-45DA-8DD1-37888266FD44@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-03-28 17:35:09 -0400, Dimitry Andric wrote: > On 28 Mar 2014, at 22:18, Jung-uk Kim <jkim@FreeBSD.org> 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 >>> <dim@freebsd.org> 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. Great, thanks! BTW, it looks like Apple went through the mess. ;-) http://llvm.org/viewvc/llvm-project?view=revision&revision=185483 http://llvm.org/viewvc/llvm-project?view=revision&revision=195267 http://llvm.org/viewvc/llvm-project?view=revision&revision=201375 http://llvm.org/viewvc/llvm-project?view=revision&revision=201520 Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAEBAgAGBQJTNe82AAoJEHyflib82/FGejgIAJcZpgLwJ4rlk+YBdN5koIvZ YySevuqbh/xaQAsTBRQPvEPdLOhaxAvlynovR4Me6tdB3Tajs8AG41ZyADADUfXz 544FI0SxCuDW1nvLYKpNtiIbPARQbfU0Q5CKZGWUZbDwxkaAMeoSddnDXxRpfz86 WwMWo0cqsIN80itUop0XCTAFc4Q+LQwlNxxHZryZ+Bzt88Sq69c59InVrNxt34QC LdXIjsRGs/fV8wTjZPDkDATlaTgKT+P4vNl4jLUWWplnXeLNL8HltgL9GMHX6mTe vml9ebyPr1jVT3VAp9iM+xOJXFQ69ikwk9VfT4m0z9WJ5xjBfeRanUv/7pmJ4Yg= =YYKW -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5335EF36.80601>