Date: Fri, 22 Oct 2021 12:09:16 GMT From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 531a51cc368c - main - devel/llvm13: fix building software with -fstack-protector-strong Message-ID: <202110221209.19MC9GLC099092@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=531a51cc368cf2f53fd21923532964ba96965474 commit 531a51cc368cf2f53fd21923532964ba96965474 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2021-10-22 11:42:37 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2021-10-22 11:42:37 +0000 devel/llvm13: fix building software with -fstack-protector-strong Apply https://reviews.llvm.org/D109090 Fixes immediate segfault when executing binaries built by the port's compiler with -fstack-protector-strong. Submitted by: adalava --- .../files/patch-llvm_lib_CodeGen_TargetLoweringBase.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/devel/llvm13/files/patch-llvm_lib_CodeGen_TargetLoweringBase.cpp b/devel/llvm13/files/patch-llvm_lib_CodeGen_TargetLoweringBase.cpp new file mode 100644 index 000000000000..0323f6d7a13b --- /dev/null +++ b/devel/llvm13/files/patch-llvm_lib_CodeGen_TargetLoweringBase.cpp @@ -0,0 +1,15 @@ +--- llvm/lib/CodeGen/TargetLoweringBase.cpp.orig 2021-09-24 16:18:10 UTC ++++ llvm/lib/CodeGen/TargetLoweringBase.cpp +@@ -1980,8 +1980,11 @@ void TargetLoweringBase::insertSSPDeclarations(Module + auto *GV = new GlobalVariable(M, Type::getInt8PtrTy(M.getContext()), false, + GlobalVariable::ExternalLinkage, nullptr, + "__stack_chk_guard"); ++ ++ // FreeBSD has "__stack_chk_guard" defined externally on libc.so + if (TM.getRelocationModel() == Reloc::Static && +- !TM.getTargetTriple().isWindowsGNUEnvironment()) ++ !TM.getTargetTriple().isWindowsGNUEnvironment() && ++ !TM.getTargetTriple().isOSFreeBSD()) + GV->setDSOLocal(true); + } + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110221209.19MC9GLC099092>