mirror of
https://git.freebsd.org/ports.git
synced 2025-07-02 18:10:38 -04:00
Selectively reverts 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: https://bugs.llvm.org/show_bug.cgi?id=51590 Submitted by: adalava Differential review (for base): https://reviews.freebsd.org/D31698
12 lines
612 B
C++
12 lines
612 B
C++
--- llvm/lib/CodeGen/TargetLoweringBase.cpp.orig 2021-08-27 13:06:05 UTC
|
|
+++ llvm/lib/CodeGen/TargetLoweringBase.cpp
|
|
@@ -1961,7 +1961,8 @@ void TargetLoweringBase::insertSSPDeclarations(Module
|
|
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);
|
|
}
|
|
}
|