summaryrefslogtreecommitdiffstats
path: root/contrib/llvm
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-03-29 00:48:50 +0000
committerdim <dim@FreeBSD.org>2014-03-29 00:48:50 +0000
commit5da85f3005de94cc90b86f5d61faeb5e64d31564 (patch)
tree8ea31806bc01ed99ab27a498c3289c7f5c813a4c /contrib/llvm
parent3dd17d8d4af870f56d7d367ed54eb8a75325681b (diff)
downloadFreeBSD-src-5da85f3005de94cc90b86f5d61faeb5e64d31564.zip
FreeBSD-src-5da85f3005de94cc90b86f5d61faeb5e64d31564.tar.gz
Add the llvm/clang patch for r263891.
Diffstat (limited to 'contrib/llvm')
-rw-r--r--contrib/llvm/patches/patch-r263891-dwarf2-freebsd10.diff22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/llvm/patches/patch-r263891-dwarf2-freebsd10.diff b/contrib/llvm/patches/patch-r263891-dwarf2-freebsd10.diff
new file mode 100644
index 0000000..2bbf30c
--- /dev/null
+++ b/contrib/llvm/patches/patch-r263891-dwarf2-freebsd10.diff
@@ -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");
OpenPOWER on IntegriCloud