Date: Sat, 29 Mar 2014 00:48:50 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263892 - head/contrib/llvm/patches Message-ID: <201403290048.s2T0moSh068719@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sat Mar 29 00:48:50 2014 New Revision: 263892 URL: http://svnweb.freebsd.org/changeset/base/263892 Log: Add the llvm/clang patch for r263891. Added: head/contrib/llvm/patches/patch-r263891-dwarf2-freebsd10.diff Added: head/contrib/llvm/patches/patch-r263891-dwarf2-freebsd10.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-r263891-dwarf2-freebsd10.diff Sat Mar 29 00:48:50 2014 (r263892) @@ -0,0 +1,22 @@ +This patch makes clang default to DWARF2 debug info format for FreeBSD +10.x and earlier. + +Introduced here: http://svnweb.freebsd.org/changeset/base/263891 + +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp ++++ tools/clang/lib/Driver/Tools.cpp +@@ -2628,8 +2628,10 @@ 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 <= 10. ++ const llvm::Triple &Triple = getToolChain().getTriple(); ++ if (Triple.isOSDarwin() || (Triple.getOS() == llvm::Triple::FreeBSD && ++ Triple.getOSMajorVersion() <= 10)) + CmdArgs.push_back("-gdwarf-2"); + else + CmdArgs.push_back("-g");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403290048.s2T0moSh068719>