Permalink
Browse files

[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
  • Loading branch information...
mgorny committed Dec 19, 2018
1 parent 774a696 commit 0108c9637ee634011c8df83417eb281f44ff692a
Showing with 2 additions and 1 deletion.
  1. +2 −1 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.

0 comments on commit 0108c96

Please sign in to comment.