Date: Sat, 29 Mar 2014 12:28:18 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Larry Baird <lab@maxwell.gta.com> Cc: freebsd-stable@freebsd.org Subject: Re: HEADS UP: merged llvm/clang 3.4 Message-ID: <BF8EC909-0584-45FC-B540-C1EC0543459B@FreeBSD.org> In-Reply-To: <20140329044818.84350.qmail@mailgate.gta.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On 29 Mar 2014, at 05:48, Larry Baird <lab@maxwell.gta.com> 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.
>>>
>>> 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.
> 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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
iEYEARECAAYFAlM2rlsACgkQsF6jCi4glqPH9ACfdnx9uN+bj619WHljH/6w+Row
h18AoJG6KNJMnZSkaqf3Soc74+7Nshm8
=2tHU
-----END PGP SIGNATURE-----
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BF8EC909-0584-45FC-B540-C1EC0543459B>
