aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Dal'Ava Junior <alfredo@FreeBSD.org>2021-08-27 14:47:11 +0000
committerAlfredo Dal'Ava Junior <alfredo@FreeBSD.org>2021-08-30 16:14:21 +0000
commite8e5d75e6a9676e76c3bfd6d1d52561ffbb40846 (patch)
tree8b0ebf7ee11e89a01545a4147b92fe5b0053d010
parent7e583075a411cecbad1ca88b13b82c8a357d5b4e (diff)
downloadsrc-e8e5d75e6a9676e76c3bfd6d1d52561ffbb40846.tar.gz
src-e8e5d75e6a9676e76c3bfd6d1d52561ffbb40846.zip
llvm/powerpc64*: fix broken binaries generated by clang12
Amends LLVM commit 2518433f861fcb877d0a7bdd9aec1aec1f77505a that was pointed as the source of regression on LLVM12. This affects powerpc64*, making binaries crash with segmentation fault due to bad code generation around "__stack_chk_guard" Root cause and/or proper fix is under investigation by: https://bugs.llvm.org/show_bug.cgi?id=51590 Reviewed by: dim MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D31698 (cherry picked from commit 9a4d48a645a7a3ebee05fae25afd154a132b638a)
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 28c8bd0a7ded..74fea674f962 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -1961,7 +1961,8 @@ void TargetLoweringBase::insertSSPDeclarations(Module &M) const {
GlobalVariable::ExternalLinkage, nullptr,
"__stack_chk_guard");
if (TM.getRelocationModel() == Reloc::Static &&
- !TM.getTargetTriple().isWindowsGNUEnvironment())
+ !TM.getTargetTriple().isWindowsGNUEnvironment() &&
+ !(TM.getTargetTriple().isPPC64() && TM.getTargetTriple().isOSFreeBSD()))
GV->setDSOLocal(true);
}
}