Add the ppc64le patch from Fedora llvm 3.4

This commit is contained in:
Dan Horák 2014-08-14 18:02:13 +02:00
parent 68d7d86f65
commit c468908240
2 changed files with 59 additions and 1 deletions

View File

@ -0,0 +1,53 @@
From 04c252cc93fe5905a625773cd174ed6ca7651463 Mon Sep 17 00:00:00 2001
From: Will Schmidt <will_schmidt@vnet.ibm.com>
Date: Mon, 24 Mar 2014 16:04:15 +0000
Subject: [PATCH] [PPC64LE] ELFv2 ABI updates for the .opd section
[PPC64LE] ELFv2 ABI updates for the .opd section
The PPC64 Little Endian (PPC64LE) target supports the ELFv2 ABI, and as
such, does not have a ".opd" section. This is keyed off a _CALL_ELF=2
macro check.
The CALL_ELF check is not clearly documented at this time. The basis
for usage in this patch is from the gcc thread here:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01144.html
> Adding comment from Uli:
Looks good to me. I think the old-style JIT doesn't really work
anyway for 64-bit, but at least with this patch LLVM will compile
and link again on a ppc64le host ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204614 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/Target/PowerPC/PPCJITInfo.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/Target/PowerPC/PPCJITInfo.cpp b/lib/Target/PowerPC/PPCJITInfo.cpp
index 5e3a48d..227919c 100644
--- a/lib/Target/PowerPC/PPCJITInfo.cpp
+++ b/lib/Target/PowerPC/PPCJITInfo.cpp
@@ -214,6 +214,10 @@ asm(
".text\n"
".align 2\n"
".globl PPC64CompilationCallback\n"
+#if _CALL_ELF == 2
+ ".type PPC64CompilationCallback,@function\n"
+"PPC64CompilationCallback:\n"
+#else
".section \".opd\",\"aw\",@progbits\n"
".align 3\n"
"PPC64CompilationCallback:\n"
@@ -223,6 +227,7 @@ asm(
".align 4\n"
".type PPC64CompilationCallback,@function\n"
".L.PPC64CompilationCallback:\n"
+#endif
# else
asm(
".text\n"
--
1.9.3

View File

@ -49,7 +49,7 @@ Obsoletes: pure <= 0.55
Name: llvm
Version: %{version_base}.2
Release: 7%{?dist}
Release: 8%{?dist}
Summary: The Low Level Virtual Machine
Group: Development/Languages
@ -74,6 +74,7 @@ Patch4: 0004-devtoolset.patch
Patch5: 0005-scan-build-dir.patch
Patch6: 0006-fix-python-package-installation.patch
Patch7: 0007-rhel-detection.patch
Patch8: 0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch
BuildRequires: bison
BuildRequires: chrpath
@ -307,6 +308,7 @@ mv lldb-%{version_base} tools/lldb
%patch6 -p1
%endif
%patch7 -p1
%patch8 -p1
# fix library paths
sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure
@ -676,6 +678,9 @@ exit 0
%endif
%changelog
* Mon Dec 07 2015 Dan Horák <dan[at]danny.cz> 3.4.2-8
- Add ppc64le fix from Fedora llvm 3.4
* Sat Mar 21 2015 Dave Johansen <davejohansen@gmail.com> 3.4.2-7
- Rebuild for ocaml 4.01.1