From 34d599e9032f10aadd01c43559d80f6a2d5da9f3 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 4 Jun 2014 11:53:55 -0400 Subject: [PATCH] Backport a ppc64le fix to get things started bootstrapping --- ...Fv2-ABI-updates-for-the-.opd-section.patch | 53 +++++++++++++++++++ llvm.spec | 13 +++-- 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch diff --git a/0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch b/0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch new file mode 100644 index 0000000..27a025a --- /dev/null +++ b/0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch @@ -0,0 +1,53 @@ +From 04c252cc93fe5905a625773cd174ed6ca7651463 Mon Sep 17 00:00:00 2001 +From: Will Schmidt +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 + diff --git a/llvm.spec b/llvm.spec index ec06e78..d544c5c 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ Name: llvm Version: 3.4 -Release: 8%{?dist} +Release: 9%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -60,12 +60,15 @@ Patch3: 0003-Merging-r208501.patch Patch4: 0004-Merging-r208908.patch # patches -Patch11: 0001-data-install-preserve-timestamps.patch -Patch12: 0002-linker-flags-speedup-memory.patch +Patch11: 0001-data-install-preserve-timestamps.patch +Patch12: 0002-linker-flags-speedup-memory.patch # sledgehammer to default to hard-float on arm Patch20: clang-3.4-arm-hard-float.patch +# temporary measure to get ppc64le building, if perhaps not working +Patch21: 0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch + BuildRequires: bison BuildRequires: chrpath BuildRequires: flex @@ -306,6 +309,7 @@ mv lldb-%{version} tools/lldb %if %{with clang} %patch20 -p1 %endif +%patch21 -p1 # fix library paths sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure @@ -671,6 +675,9 @@ exit 0 %endif %changelog +* Wed Jun 04 2014 Adam Jackson 3.4-9 +- Backport a ppc64le fix to get things started bootstrapping + * Mon Jun 02 2014 Adam Jackson 3.4-8 - Attempt to default to hard-float on arm (#803433)