From: Michal Gorny Date: Wed, 19 Dec 2018 17:25:46 +0000 (+0000) Subject: [Driver] Disable -faddrsig by default on NetBSD X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0108c9637ee634011c8df83417eb281f44ff692a;p=clang [Driver] Disable -faddrsig by default on NetBSD Avoid passing -faddrsig by default on NetBSD. This platform is still using old GNU binutils that crashes on executables containing those sections. Differential Revision: https://reviews.llvm.org/D55828 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349647 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp index 1f267e68f1..18a43a695d 100644 --- a/lib/Driver/ToolChains/Clang.cpp +++ b/lib/Driver/ToolChains/Clang.cpp @@ -5273,7 +5273,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasFlag(options::OPT_faddrsig, options::OPT_fno_addrsig, (TC.getTriple().isOSBinFormatELF() || TC.getTriple().isOSBinFormatCOFF()) && - TC.useIntegratedAs())) + TC.useIntegratedAs() && + RawTriple.getOS() != llvm::Triple::NetBSD)) CmdArgs.push_back("-faddrsig"); // Finally add the compile command to the compilation.