From 9b3c7c66fc0617bab314eeadf50673960c1515db Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Wed, 24 Jan 2018 23:08:49 +0000 Subject: [PATCH] FreeBSD needs also execinfo (in sanitizers) Summary: As NetBSD, FreeBSD needs execinfo for backtrace's matters. Patch by: David CARLIER. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: emaste, krytarowski, cfe-commits Differential Revision: https://reviews.llvm.org/D42467 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323387 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains/CommonArgs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp index 1ba17ab857..f5c0b7f8cc 100644 --- a/lib/Driver/ToolChains/CommonArgs.cpp +++ b/lib/Driver/ToolChains/CommonArgs.cpp @@ -549,11 +549,12 @@ void tools::linkSanitizerRuntimeDeps(const ToolChain &TC, TC.getTriple().getOS() != llvm::Triple::NetBSD && TC.getTriple().getOS() != llvm::Triple::RTEMS) CmdArgs.push_back("-ldl"); - // Required for forkpty on some OSes + // Required for functions like forkpty on some OSes if (TC.getTriple().getOS() == llvm::Triple::NetBSD) CmdArgs.push_back("-lutil"); // Required for backtrace on some OSes - if (TC.getTriple().getOS() == llvm::Triple::NetBSD) + if (TC.getTriple().getOS() == llvm::Triple::NetBSD || + TC.getTriple().getOS() == llvm::Triple::FreeBSD) CmdArgs.push_back("-lexecinfo"); // Required for kvm (kernel memory interface) on some OSes if (TC.getTriple().getOS() == llvm::Triple::NetBSD) -- 2.40.0