From f4bd583c147468855869143f862352b9870a99b5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 24 Jul 2014 11:23:21 -0400 Subject: [PATCH] llvm and clang 3.4.2 --- 0001-Merging-r207990.patch | 40 ------ ...Fv2-ABI-updates-for-the-.opd-section.patch | 53 -------- 0002-Merging-r208721.patch | 85 ------------ 0003-Merging-r208501.patch | 126 ------------------ 0004-Merging-r208908.patch | 38 ------ llvm.spec | 28 ++-- sources | 4 +- 7 files changed, 15 insertions(+), 359 deletions(-) delete mode 100644 0001-Merging-r207990.patch delete mode 100644 0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch delete mode 100644 0002-Merging-r208721.patch delete mode 100644 0003-Merging-r208501.patch delete mode 100644 0004-Merging-r208908.patch diff --git a/0001-Merging-r207990.patch b/0001-Merging-r207990.patch deleted file mode 100644 index 2eb6d2d..0000000 --- a/0001-Merging-r207990.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 84f40fa9c1fea93311fa1211569ba5a2bf33a620 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 15 May 2014 00:15:24 +0000 -Subject: [PATCH 1/5] Merging r207990: -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ------------------------------------------------------------------------- -r207990 | marek.olsak | 2014-05-05 15:30:54 -0400 (Mon, 05 May 2014) | 6 lines - -R600/SI: allow 5 more input SGPRs to a shader - -Our OpenGL driver needs 22 SGPRs (16 user SGPRs + 6 streamout non-user SGPRs). - -Signed-off-by: Marek Olšák - ------------------------------------------------------------------------- - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@208828 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - lib/Target/R600/AMDGPUCallingConv.td | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/Target/R600/AMDGPUCallingConv.td b/lib/Target/R600/AMDGPUCallingConv.td -index 65cdb24..5f8ad8c 100644 ---- a/lib/Target/R600/AMDGPUCallingConv.td -+++ b/lib/Target/R600/AMDGPUCallingConv.td -@@ -20,7 +20,7 @@ def CC_SI : CallingConv<[ - CCIfInReg>>, - - CCIfInReg -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/0002-Merging-r208721.patch b/0002-Merging-r208721.patch deleted file mode 100644 index cddb2d5..0000000 --- a/0002-Merging-r208721.patch +++ /dev/null @@ -1,85 +0,0 @@ -From e47eb279d50f38374a3f5b95a8c4bcc2112ed408 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 15 May 2014 00:15:27 +0000 -Subject: [PATCH 2/5] Merging r208721: - ------------------------------------------------------------------------- -r208721 | thomas.stellard | 2014-05-13 15:37:03 -0400 (Tue, 13 May 2014) | 11 lines - -autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try) - -We were using libLLVM-Major.Minor.Patch.so for the soname, but we -need the soname to stay consistent for all Major.Minor.* releases -otherwise operating system distributors will need to rebuild all -packages that link with LLVM every time there is a new point release. - -This patch also reverses the compatibility symlink, so -libLLVM-Major.Minor.Patch.so is now a symlink that points -to libLLVM-Major-Minor.so. - ------------------------------------------------------------------------- - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@208829 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - Makefile.rules | 15 ++++++++++++--- - tools/llvm-shlib/Makefile | 4 ++-- - 2 files changed, 14 insertions(+), 5 deletions(-) - -diff --git a/Makefile.rules b/Makefile.rules -index 210abda..18882fa 100644 ---- a/Makefile.rules -+++ b/Makefile.rules -@@ -1027,8 +1027,9 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) - LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \ - -L $(SharedLibDir) - endif --LLVMLibsOptions += -lLLVM-$(LLVMVersion) --LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT) -+LLVM_SO_NAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX) -+LLVMLibsOptions += -l$(LLVM_SO_NAME) -+LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)$(LLVM_SO_NAME)$(SHLIBEXT) - else - - ifndef NO_LLVM_CONFIG -@@ -1144,7 +1145,12 @@ LibName.O := $(LibDir)/$(LIBRARYNAME).o - #--------------------------------------------------------- - ifdef SHARED_LIBRARY - --all-local:: $(LibName.SO) -+all-local:: $(AliasName.SO) -+ -+$(AliasName.SO): $(LibName.SO) -+ifdef SHARED_ALIAS -+ $(Verb) $(AliasTool) $(BaseLibName.SO) $(AliasName.SO) -+endif - - ifdef EXPORTED_SYMBOL_FILE - $(LibName.SO): $(NativeExportsFile) -@@ -1202,6 +1208,9 @@ endif - uninstall-local:: - $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib) - -$(Verb) $(RM) -f $(DestSharedLib) -+ifdef SHARED_ALIAS -+ -$(Verb) $(RM) -f $(DestSharedAlias) -+endif - endif - endif - -diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile -index 4a0c2ea..b912ea6 100644 ---- a/tools/llvm-shlib/Makefile -+++ b/tools/llvm-shlib/Makefile -@@ -9,8 +9,8 @@ - - LEVEL := ../.. - --LIBRARYNAME = LLVM-$(LLVMVersion) --LIBRARYALIASNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX) -+LIBRARYNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX) -+LIBRARYALIASNAME = LLVM-$(LLVMVersion) - - NO_BUILD_ARCHIVE := 1 - LINK_LIBS_IN_SHARED := 1 --- -1.9.3 - diff --git a/0003-Merging-r208501.patch b/0003-Merging-r208501.patch deleted file mode 100644 index ca7da97..0000000 --- a/0003-Merging-r208501.patch +++ /dev/null @@ -1,126 +0,0 @@ -From ffecacb1a1eeca8ca8567057c3c886161837d2a6 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 15 May 2014 20:55:58 +0000 -Subject: [PATCH 3/5] Merging r208501: - ------------------------------------------------------------------------- -r208501 | hfinkel | 2014-05-11 12:23:29 -0400 (Sun, 11 May 2014) | 9 lines - -[PowerPC] On PPC32, 128-bit shifts might be runtime calls - -The counter-loops formation pass needs to know what operations might be -function calls (because they can't appear in counter-based loops). On PPC32, -128-bit shifts might be runtime calls (even though you can't use __int128 on -PPC32, it seems that SROA might form them). - -Fixes PR19709. - ------------------------------------------------------------------------- - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@208916 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - lib/Target/PowerPC/PPCCTRLoops.cpp | 8 +++++ - test/CodeGen/PowerPC/ctrloop-sh.ll | 72 ++++++++++++++++++++++++++++++++++++++ - 2 files changed, 80 insertions(+) - create mode 100644 test/CodeGen/PowerPC/ctrloop-sh.ll - -diff --git a/lib/Target/PowerPC/PPCCTRLoops.cpp b/lib/Target/PowerPC/PPCCTRLoops.cpp -index e419b9b..819635c 100644 ---- a/lib/Target/PowerPC/PPCCTRLoops.cpp -+++ b/lib/Target/PowerPC/PPCCTRLoops.cpp -@@ -369,6 +369,14 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - J->getOpcode() == Instruction::URem || - J->getOpcode() == Instruction::SRem)) { - return true; -+ } else if (TT.isArch32Bit() && -+ isLargeIntegerTy(false, J->getType()->getScalarType()) && -+ (J->getOpcode() == Instruction::Shl || -+ J->getOpcode() == Instruction::AShr || -+ J->getOpcode() == Instruction::LShr)) { -+ // Only on PPC32, for 128-bit integers (specifically not 64-bit -+ // integers), these might be runtime calls. -+ return true; - } else if (isa(J) || isa(J)) { - // On PowerPC, indirect jumps use the counter register. - return true; -diff --git a/test/CodeGen/PowerPC/ctrloop-sh.ll b/test/CodeGen/PowerPC/ctrloop-sh.ll -new file mode 100644 -index 0000000..d8e6fc7 ---- /dev/null -+++ b/test/CodeGen/PowerPC/ctrloop-sh.ll -@@ -0,0 +1,72 @@ -+; RUN: llc < %s | FileCheck %s -+target datalayout = "E-m:e-p:32:32-i128:64-n32" -+target triple = "powerpc-ellcc-linux" -+ -+; Function Attrs: nounwind -+define void @foo1(i128* %a, i128* readonly %b, i128* readonly %c) #0 { -+entry: -+ br label %for.body -+ -+for.body: ; preds = %for.body, %entry -+ %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ] -+ %0 = load i128* %b, align 16 -+ %1 = load i128* %c, align 16 -+ %shl = shl i128 %0, %1 -+ store i128 %shl, i128* %a, align 16 -+ %inc = add nsw i32 %i.02, 1 -+ %exitcond = icmp eq i32 %inc, 2048 -+ br i1 %exitcond, label %for.end, label %for.body -+ -+for.end: ; preds = %for.body -+ ret void -+ -+; CHECK-LABEL: @foo1 -+; CHECK-NOT: mtctr -+} -+ -+; Function Attrs: nounwind -+define void @foo2(i128* %a, i128* readonly %b, i128* readonly %c) #0 { -+entry: -+ br label %for.body -+ -+for.body: ; preds = %for.body, %entry -+ %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ] -+ %0 = load i128* %b, align 16 -+ %1 = load i128* %c, align 16 -+ %shl = ashr i128 %0, %1 -+ store i128 %shl, i128* %a, align 16 -+ %inc = add nsw i32 %i.02, 1 -+ %exitcond = icmp eq i32 %inc, 2048 -+ br i1 %exitcond, label %for.end, label %for.body -+ -+for.end: ; preds = %for.body -+ ret void -+ -+; CHECK-LABEL: @foo2 -+; CHECK-NOT: mtctr -+} -+ -+; Function Attrs: nounwind -+define void @foo3(i128* %a, i128* readonly %b, i128* readonly %c) #0 { -+entry: -+ br label %for.body -+ -+for.body: ; preds = %for.body, %entry -+ %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ] -+ %0 = load i128* %b, align 16 -+ %1 = load i128* %c, align 16 -+ %shl = lshr i128 %0, %1 -+ store i128 %shl, i128* %a, align 16 -+ %inc = add nsw i32 %i.02, 1 -+ %exitcond = icmp eq i32 %inc, 2048 -+ br i1 %exitcond, label %for.end, label %for.body -+ -+for.end: ; preds = %for.body -+ ret void -+ -+; CHECK-LABEL: @foo3 -+; CHECK-NOT: mtctr -+} -+ -+attributes #0 = { nounwind } -+ --- -1.9.3 - diff --git a/0004-Merging-r208908.patch b/0004-Merging-r208908.patch deleted file mode 100644 index 6ed9c21..0000000 --- a/0004-Merging-r208908.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b04b00516fea37dddfa4d499e5672c203ff66cb1 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 15 May 2014 20:56:00 +0000 -Subject: [PATCH 4/5] Merging r208908: - ------------------------------------------------------------------------- -r208908 | thomas.stellard | 2014-05-15 15:50:25 -0400 (Thu, 15 May 2014) | 7 lines - -autoconf: Fix libLLVM-Major-Minor-Patch.so symlink - -The symlink needs to point to a relative path, so we don't break -building in a chroot. - -Tested-by: Laurent Carlier - ------------------------------------------------------------------------- - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@208917 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - Makefile.rules | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.rules b/Makefile.rules -index 18882fa..fde77f9 100644 ---- a/Makefile.rules -+++ b/Makefile.rules -@@ -1202,7 +1202,7 @@ $(DestSharedLib): $(LibName.SO) $(DestSharedLibDir) - $(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib) - ifdef SHARED_ALIAS - $(Echo) Creating alias from $(DestSharedLib) to $(DestSharedAlias) -- $(Verb) $(AliasTool) $(DestSharedLib) $(DestSharedAlias) -+ $(Verb) $(AliasTool) $(BaseLibName.SO) $(DestSharedAlias) - endif - - uninstall-local:: --- -1.9.3 - diff --git a/llvm.spec b/llvm.spec index 4c1b5fd..b39934c 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ Name: llvm Version: 3.4 -Release: 12%{?dist} +Release: 13%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -44,8 +44,8 @@ License: NCSA URL: http://llvm.org/ # source archives -Source0: %{downloadurl}/llvm-%{version}.1%{?prerel}.src.tar.gz -Source1: %{downloadurl}/clang-%{version}%{?prerel}.src.tar.gz +Source0: http://llvm.org/releases/3.4.2/llvm-3.4.2.src.tar.gz +Source1: http://llvm.org/releases/3.4.2/cfe-3.4.2.src.tar.gz Source2: %{downloadurl}/compiler-rt-%{version}%{?prerel}.src.tar.gz Source3: %{downloadurl}/lldb-%{version}%{?prerel}.src.tar.gz @@ -54,10 +54,10 @@ Source10: llvm-Config-config.h Source11: llvm-Config-llvm-config.h # sync with release_34@209031 -Patch1: 0001-Merging-r207990.patch -Patch2: 0002-Merging-r208721.patch -Patch3: 0003-Merging-r208501.patch -Patch4: 0004-Merging-r208908.patch +#Patch1: 0001-Merging-r207990.patch +#Patch2: 0002-Merging-r208721.patch +#Patch3: 0003-Merging-r208501.patch +#Patch4: 0004-Merging-r208908.patch # patches Patch11: 0001-data-install-preserve-timestamps.patch @@ -67,7 +67,7 @@ Patch12: 0002-linker-flags-speedup-memory.patch 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 +#Patch21: 0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch # http://llvm.org/bugs/attachment.cgi?id=12586 Patch22: pr12586.patch @@ -291,10 +291,10 @@ HTML documentation for LLVM's OCaml binding. %prep -%setup -q %{?with_clang:-a1} %{?with_crt:-a2} %{?with_lldb:-a3} -n llvm-3.4.1.src +%setup -q %{?with_clang:-a1} %{?with_crt:-a2} %{?with_lldb:-a3} -n llvm-3.4.2.src rm -rf tools/clang tools/lldb projects/compiler-rt %if %{with clang} -mv clang-%{version} tools/clang +mv cfe-*/ tools/clang %endif %if %{with crt} mv compiler-rt-%{version} projects/compiler-rt @@ -303,16 +303,11 @@ mv compiler-rt-%{version} projects/compiler-rt mv lldb-%{version} tools/lldb %endif -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 %patch11 -p1 %patch12 -p1 %if %{with clang} %patch20 -p1 %endif -%patch21 -p1 %patch22 -p1 # fix library paths @@ -679,6 +674,9 @@ exit 0 %endif %changelog +* Thu Jul 24 2014 Adam Jackson 3.4-13 +- llvm and clang 3.4.2 + * Tue Jul 22 2014 Richard W.M. Jones - 3.4-12 - OCaml 4.02.0 beta rebuild. diff --git a/sources b/sources index 63b25c4..cc6a532 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -b378f1e2c424e03289effc75268d3d2c clang-3.4.src.tar.gz 7ed60a0463f9fdfa20db7109d4624cee lldb-3.4.src.tar.gz 7938353e3a3bda85733a165e7ac4bb84 compiler-rt-3.4.src.tar.gz -b90697f4de35563ad6c35924defa8dd1 llvm-3.4.1.src.tar.gz +87945973b7c73038871c5f849a818588 cfe-3.4.2.src.tar.gz +a20669f75967440de949ac3b1bad439c llvm-3.4.2.src.tar.gz