Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
[Driver] Disable -faddrsig by default on NetBSD
Browse files Browse the repository at this point in the history
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 0108c96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Driver/ToolChains/Clang.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit 0108c96

Please sign in to comment.