Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 2021 13:14:35 GMT
From:      "Alfredo Dal'Ava Junior" <alfredo@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e8e5d75e6a96 - stable/13 - llvm/powerpc64*: fix broken binaries generated by clang12
Message-ID:  <202108301314.17UDEZNU075671@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by alfredo:

URL: https://cgit.FreeBSD.org/src/commit/?id=e8e5d75e6a9676e76c3bfd6d1d52561ffbb40846

commit e8e5d75e6a9676e76c3bfd6d1d52561ffbb40846
Author:     Alfredo Dal'Ava Junior <alfredo@FreeBSD.org>
AuthorDate: 2021-08-27 14:47:11 +0000
Commit:     Alfredo Dal'Ava Junior <alfredo@FreeBSD.org>
CommitDate: 2021-08-30 16:14:21 +0000

    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)
---
 contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);
   }
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108301314.17UDEZNU075671>