diff options
Diffstat (limited to 'sys-devel/llvm/files')
17 files changed, 680 insertions, 0 deletions
diff --git a/sys-devel/llvm/files/ExceptionTableOverflowFix.patch b/sys-devel/llvm/files/ExceptionTableOverflowFix.patch new file mode 100644 index 0000000..a082dd5 --- /dev/null +++ b/sys-devel/llvm/files/ExceptionTableOverflowFix.patch @@ -0,0 +1,111 @@ +Index: unittests/ExecutionEngine/JIT/JITTest.cpp +=================================================================== +--- unittests/ExecutionEngine/JIT/JITTest.cpp (revision 163535) ++++ unittests/ExecutionEngine/JIT/JITTest.cpp (working copy) +@@ -203,14 +203,21 @@ + + class JITTest : public testing::Test { + protected: ++ virtual RecordingJITMemoryManager* CreateMemoryManager() { ++ return new RecordingJITMemoryManager; ++ } ++ + virtual void SetUp() { + M = new Module("<main>", Context); +- RJMM = new RecordingJITMemoryManager; ++ RJMM = CreateMemoryManager(); + RJMM->setPoisonMemory(true); + std::string Error; ++ TargetOptions Options; ++ Options.JITExceptionHandling = true; + TheJIT.reset(EngineBuilder(M).setEngineKind(EngineKind::JIT) + .setJITMemoryManager(RJMM) +- .setErrorStr(&Error).create()); ++ .setErrorStr(&Error) ++ .setTargetOptions(Options).create()); + ASSERT_TRUE(TheJIT.get() != NULL) << Error; + } + +@@ -292,6 +299,46 @@ + EXPECT_EQ(3, *GPtr); + } + ++// Regression test for a bug. The JITEmitter wasn't checking to verify that ++// it hadn't run out of space while generating the DWARF exception information ++// for an emitted function. ++ ++class ExceptionMemoryManagerMock : public RecordingJITMemoryManager { ++ public: ++ virtual uint8_t* startExceptionTable(const Function* F, ++ uintptr_t &ActualSize) { ++ // force an insufficient size the first time through. ++ bool ChangeActualSize = false; ++ if (ActualSize == 0) ++ ChangeActualSize = true;; ++ uint8_t* result = ++ RecordingJITMemoryManager::startExceptionTable(F, ActualSize); ++ if (ChangeActualSize) ++ ActualSize = 1; ++ return result; ++ } ++}; ++ ++class JITExceptionMemoryTest : public JITTest { ++ protected: ++ virtual RecordingJITMemoryManager* CreateMemoryManager() { ++ return new ExceptionMemoryManagerMock; ++ } ++}; ++ ++TEST_F(JITExceptionMemoryTest, ExceptionTableOverflow) { ++ Function *F = Function::Create(TypeBuilder<void(void), false>::get(Context), ++ Function::ExternalLinkage, ++ "func1", M); ++ BasicBlock *Block = BasicBlock::Create(Context, "block", F); ++ IRBuilder<> Builder(Block); ++ Builder.CreateRetVoid(); ++ TheJIT->getPointerToFunction(F); ++ ASSERT_TRUE(RJMM->startExceptionTableCalls.size() == 2); ++ ASSERT_TRUE(RJMM->deallocateExceptionTableCalls.size() == 1); ++ ASSERT_TRUE(RJMM->endExceptionTableCalls.size() == 1); ++} ++ + int PlusOne(int arg) { + return arg + 1; + } +Index: lib/ExecutionEngine/JIT/JITEmitter.cpp +=================================================================== +--- lib/ExecutionEngine/JIT/JITEmitter.cpp (revision 163478) ++++ lib/ExecutionEngine/JIT/JITEmitter.cpp (working copy) +@@ -974,14 +974,24 @@ + SavedBufferBegin = BufferBegin; + SavedBufferEnd = BufferEnd; + SavedCurBufferPtr = CurBufferPtr; ++ uint8_t *FrameRegister; + +- BufferBegin = CurBufferPtr = MemMgr->startExceptionTable(F.getFunction(), +- ActualSize); +- BufferEnd = BufferBegin+ActualSize; +- EmittedFunctions[F.getFunction()].ExceptionTable = BufferBegin; +- uint8_t *EhStart; +- uint8_t *FrameRegister = DE->EmitDwarfTable(F, *this, FnStart, FnEnd, +- EhStart); ++ while (true) { ++ BufferBegin = CurBufferPtr = MemMgr->startExceptionTable(F.getFunction(), ++ ActualSize); ++ BufferEnd = BufferBegin+ActualSize; ++ EmittedFunctions[F.getFunction()].ExceptionTable = BufferBegin; ++ uint8_t *EhStart; ++ FrameRegister = DE->EmitDwarfTable(F, *this, FnStart, FnEnd, EhStart); ++ ++ // If we've run out of memory, try again with twice as much space. ++ if (CurBufferPtr == BufferEnd) { ++ ActualSize = (CurBufferPtr-BufferBegin)*2; ++ MemMgr->deallocateExceptionTable(BufferBegin); ++ } else { ++ break; ++ } ++ } + MemMgr->endExceptionTable(F.getFunction(), BufferBegin, CurBufferPtr, + FrameRegister); + BufferBegin = SavedBufferBegin; diff --git a/sys-devel/llvm/files/cl-patches/0001-r600-Add-some-intrinsic-definitions.patch b/sys-devel/llvm/files/cl-patches/0001-r600-Add-some-intrinsic-definitions.patch new file mode 100644 index 0000000..9d99c9c --- /dev/null +++ b/sys-devel/llvm/files/cl-patches/0001-r600-Add-some-intrinsic-definitions.patch @@ -0,0 +1,64 @@ +From e25389b66b5ced3a2b5461077dcc9a505d334e3d Mon Sep 17 00:00:00 2001 +From: Tom Stellard <thomas.stellard@amd.com> +Date: Tue, 13 Mar 2012 14:12:21 -0400 +Subject: [PATCH 1/2] r600: Add some intrinsic definitions + +--- + include/llvm/Intrinsics.td | 1 + + include/llvm/IntrinsicsR600.td | 35 +++++++++++++++++++++++++++++++++++ + 2 files changed, 36 insertions(+), 0 deletions(-) + create mode 100644 include/llvm/IntrinsicsR600.td + +diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td +index 069f907..e90dd85 100644 +--- a/include/llvm/Intrinsics.td ++++ b/include/llvm/Intrinsics.td +@@ -441,3 +441,4 @@ include "llvm/IntrinsicsCellSPU.td" + include "llvm/IntrinsicsXCore.td" + include "llvm/IntrinsicsPTX.td" + include "llvm/IntrinsicsHexagon.td" ++include "llvm/IntrinsicsR600.td" +diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td +new file mode 100644 +index 0000000..789fecb +--- /dev/null ++++ b/include/llvm/IntrinsicsR600.td +@@ -0,0 +1,35 @@ ++//===- IntrinsicsR600.td - Defines R600 intrinsics ---------*- tablegen -*-===// ++// ++// The LLVM Compiler Infrastructure ++// ++// This file is distributed under the University of Illinois Open Source ++// License. See LICENSE.TXT for details. ++// ++//===----------------------------------------------------------------------===// ++// ++// This file defines all of the R600-specific intrinsics. ++// ++//===----------------------------------------------------------------------===// ++// ++// Authors: Tom Stellard <thomas.stellard@amd.com> ++// ++ ++let TargetPrefix = "r600" in { ++ ++class R600ReadPreloadRegisterIntrinsic<string name> ++ : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, ++ GCCBuiltin<name>; ++ ++multiclass R600ReadPreloadRegisterIntrinsic_xyz<string prefix> { ++ def _x : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_x")>; ++ def _y : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_y")>; ++ def _z : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_z")>; ++} ++ ++defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz < ++ "__builtin_r600_read_ngroups">; ++defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz < ++ "__builtin_r600_read_tgid">; ++defm int_r600_read_tidig : R600ReadPreloadRegisterIntrinsic_xyz < ++ "__builtin_r600_read_tidig">; ++} // End TargetPrefix = "r600" +-- +1.7.7.6 + diff --git a/sys-devel/llvm/files/cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch b/sys-devel/llvm/files/cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch new file mode 100644 index 0000000..db176dd --- /dev/null +++ b/sys-devel/llvm/files/cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch @@ -0,0 +1,27 @@ +From 17667fa3450470f7c89fc2ba4631d908cf510749 Mon Sep 17 00:00:00 2001 +From: Tom Stellard <thomas.stellard@amd.com> +Date: Wed, 14 Mar 2012 11:19:35 -0400 +Subject: [PATCH 2/2] r600: Add get_global_size and get_local_size intrinsics + +--- + include/llvm/IntrinsicsR600.td | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td +index 789fecb..0473acb 100644 +--- a/include/llvm/IntrinsicsR600.td ++++ b/include/llvm/IntrinsicsR600.td +@@ -26,6 +26,10 @@ multiclass R600ReadPreloadRegisterIntrinsic_xyz<string prefix> { + def _z : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_z")>; + } + ++defm int_r600_read_global_size : R600ReadPreloadRegisterIntrinsic_xyz < ++ "__builtin_r600_read_global_size">; ++defm int_r600_read_local_size : R600ReadPreloadRegisterIntrinsic_xyz < ++ "__builtin_r600_read_local_size">; + defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz < + "__builtin_r600_read_ngroups">; + defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz < +-- +1.7.7.6 + diff --git a/sys-devel/llvm/files/llvm-2.6-commandguide-nops.patch b/sys-devel/llvm/files/llvm-2.6-commandguide-nops.patch new file mode 100644 index 0000000..583fdf9 --- /dev/null +++ b/sys-devel/llvm/files/llvm-2.6-commandguide-nops.patch @@ -0,0 +1,30 @@ +--- docs/CommandGuide/Makefile.orig 2009-10-26 16:54:33.000000000 +0100 ++++ docs/CommandGuide/Makefile 2009-10-26 17:32:03.000000000 +0100 +@@ -19,7 +19,7 @@ + DST_PS_DIR=ps/ + + # If we are in BUILD_FOR_WEBSITE mode, default to the all target. +-all:: html man ps ++all:: html man + + clean: + rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS) +@@ -81,7 +81,7 @@ + MAN_DIR := $(PROJ_mandir)/man1 + PS_DIR := $(PROJ_docsdir)/ps + +-install-local:: $(HTML) $(INSTALL_MANS) $(PS) ++install-local:: $(HTML) $(INSTALL_MANS) + $(Echo) Installing HTML CommandGuide Documentation + $(Verb) $(MKDIR) $(HTML_DIR) + $(Verb) $(DataInstall) $(HTML) $(HTML_DIR) +@@ -90,9 +90,6 @@ + $(Echo) Installing MAN CommandGuide Documentation + $(Verb) $(MKDIR) $(MAN_DIR) + $(Verb) $(DataInstall) $(INSTALL_MANS) $(MAN_DIR) +- $(Echo) Installing PS CommandGuide Documentation +- $(Verb) $(MKDIR) $(PS_DIR) +- $(Verb) $(DataInstall) $(PS) $(PS_DIR) + + uninstall-local:: + $(Echo) Uninstalling CommandGuide Documentation diff --git a/sys-devel/llvm/files/llvm-2.7-nodoctargz.patch b/sys-devel/llvm/files/llvm-2.7-nodoctargz.patch new file mode 100644 index 0000000..cce09eb --- /dev/null +++ b/sys-devel/llvm/files/llvm-2.7-nodoctargz.patch @@ -0,0 +1,47 @@ +--- docs/Makefile.orig 2010-04-26 15:00:58.000000000 +0200 ++++ docs/Makefile 2010-04-26 15:03:12.000000000 +0200 +@@ -46,13 +46,12 @@ + # 'make generated BUILD_FOR_WEBSITE=1' + generated:: doxygen ocamldoc + +-install-html: $(PROJ_OBJ_DIR)/html.tar.gz ++install-html: + $(Echo) Installing HTML documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/img + $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html + $(Verb) $(DataInstall) $(IMAGES) $(DESTDIR)$(PROJ_docsdir)/html/img +- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) + + $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) + $(Echo) Packaging HTML documentation +@@ -64,12 +63,11 @@ + install-doxygen: doxygen + $(Echo) Installing doxygen documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen +- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) + $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \ + $(FIND) . -type f -exec \ + $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \; + +-doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz ++doxygen: regendoc + + regendoc: + $(Echo) Building doxygen documentation +@@ -95,7 +93,6 @@ + install-ocamldoc: ocamldoc + $(Echo) Installing ocamldoc documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html +- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir) + $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \ + $(FIND) . -type f -exec \ + $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \; +@@ -105,7 +102,6 @@ + $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar* + $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc + $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/ocamldoc.tar +- $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/ + + regen-ocamldoc: + $(Echo) Building ocamldoc documentation diff --git a/sys-devel/llvm/files/llvm-2.8-alignof.patch b/sys-devel/llvm/files/llvm-2.8-alignof.patch new file mode 100644 index 0000000..ae7f314 --- /dev/null +++ b/sys-devel/llvm/files/llvm-2.8-alignof.patch @@ -0,0 +1,59 @@ +Index: include/llvm/ADT/StringMap.h +=================================================================== +--- include/llvm/ADT/StringMap.h (révision 117773) ++++ include/llvm/ADT/StringMap.h (révision 117774) +@@ -167,7 +167,7 @@ + + unsigned AllocSize = static_cast<unsigned>(sizeof(StringMapEntry))+ + KeyLength+1; +- unsigned Alignment = alignof<StringMapEntry>(); ++ unsigned Alignment = alignOf<StringMapEntry>(); + + StringMapEntry *NewItem = + static_cast<StringMapEntry*>(Allocator.Allocate(AllocSize,Alignment)); +Index: include/llvm/Support/AlignOf.h +=================================================================== +--- include/llvm/Support/AlignOf.h (révision 117773) ++++ include/llvm/Support/AlignOf.h (révision 117774) +@@ -49,12 +49,12 @@ + + }; + +-/// alignof - A templated function that returns the mininum alignment of ++/// alignOf - A templated function that returns the mininum alignment of + /// of a type. This provides no extra functionality beyond the AlignOf + /// class besides some cosmetic cleanliness. Example usage: +-/// alignof<int>() returns the alignment of an int. ++/// alignOf<int>() returns the alignment of an int. + template <typename T> +-static inline unsigned alignof() { return AlignOf<T>::Alignment; } ++static inline unsigned alignOf() { return AlignOf<T>::Alignment; } + + } // end namespace llvm + #endif +Index: include/llvm/Support/Allocator.h +=================================================================== +--- include/llvm/Support/Allocator.h (révision 117773) ++++ include/llvm/Support/Allocator.h (révision 117774) +@@ -201,7 +201,7 @@ + char *End = Slab == Allocator.CurSlab ? Allocator.CurPtr : + (char *)Slab + Slab->Size; + for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) { +- Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ++ Ptr = Allocator.AlignPtr(Ptr, alignOf<T>()); + if (Ptr + sizeof(T) <= End) + reinterpret_cast<T*>(Ptr)->~T(); + } +Index: include/llvm/CodeGen/SlotIndexes.h +=================================================================== +--- include/llvm/CodeGen/SlotIndexes.h (révision 117773) ++++ include/llvm/CodeGen/SlotIndexes.h (révision 117774) +@@ -393,7 +393,7 @@ + IndexListEntry *entry = + static_cast<IndexListEntry*>( + ileAllocator.Allocate(sizeof(IndexListEntry), +- alignof<IndexListEntry>())); ++ alignOf<IndexListEntry>())); + + new (entry) IndexListEntry(mi, index); + diff --git a/sys-devel/llvm/files/llvm-2.8-darwin8.patch b/sys-devel/llvm/files/llvm-2.8-darwin8.patch new file mode 100644 index 0000000..284ab47 --- /dev/null +++ b/sys-devel/llvm/files/llvm-2.8-darwin8.patch @@ -0,0 +1,15 @@ +Avoid like in Makefile.rules +ld: -rpath can only be used when targeting Mac OS X 10.5 or later + +--- unittests/Makefile.unittest ++++ unittests/Makefile.unittest +@@ -37,7 +37,9 @@ + ifeq ($(ENABLE_SHARED), 1) + # Add the absolute path to the dynamic library. This is ok because + # we'll never install unittests. ++ifneq ($(DARWIN_MAJVERS),4) + LD.Flags += $(RPATH) -Wl,$(SharedLibDir) ++endif + # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most + # of the time. + Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" diff --git a/sys-devel/llvm/files/llvm-2.9-Operator.h-c++0x.patch b/sys-devel/llvm/files/llvm-2.9-Operator.h-c++0x.patch new file mode 100644 index 0000000..b95d7d7 --- /dev/null +++ b/sys-devel/llvm/files/llvm-2.9-Operator.h-c++0x.patch @@ -0,0 +1,57 @@ +--- llvm/trunk/include/llvm/Operator.h 2011/02/07 16:40:21 125006 ++++ llvm/trunk/include/llvm/Operator.h 2011/05/08 01:59:22 131062 +@@ -186,28 +186,46 @@ + }; + + class AddOperator +- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> {}; ++ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> { ++ ~AddOperator(); // DO NOT IMPLEMENT ++}; + class SubOperator +- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {}; ++ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> { ++ ~SubOperator(); // DO NOT IMPLEMENT ++}; + class MulOperator +- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {}; ++ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> { ++ ~MulOperator(); // DO NOT IMPLEMENT ++}; + class ShlOperator +- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {}; ++ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> { ++ ~ShlOperator(); // DO NOT IMPLEMENT ++}; + + + class SDivOperator +- : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> {}; ++ : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> { ++ ~SDivOperator(); // DO NOT IMPLEMENT ++}; + class UDivOperator +- : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> {}; ++ : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> { ++ ~UDivOperator(); // DO NOT IMPLEMENT ++}; + class AShrOperator +- : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> {}; ++ : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> { ++ ~AShrOperator(); // DO NOT IMPLEMENT ++}; + class LShrOperator +- : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> {}; ++ : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> { ++ ~LShrOperator(); // DO NOT IMPLEMENT ++}; + + + + class GEPOperator + : public ConcreteOperator<Operator, Instruction::GetElementPtr> { ++ ~GEPOperator(); // DO NOT IMPLEMENT ++ + enum { + IsInBounds = (1 << 0) + }; diff --git a/sys-devel/llvm/files/llvm-2.9-nodoctargz.patch b/sys-devel/llvm/files/llvm-2.9-nodoctargz.patch new file mode 100644 index 0000000..9507817 --- /dev/null +++ b/sys-devel/llvm/files/llvm-2.9-nodoctargz.patch @@ -0,0 +1,39 @@ +--- docs/Makefile.orig 2011-02-28 21:30:46.000000000 +0100 ++++ docs/Makefile 2011-02-28 21:35:22.000000000 +0100 +@@ -53,13 +53,12 @@ + # 'make generated BUILD_FOR_WEBSITE=1' + generated:: $(generated_targets) + +-install-html: $(PROJ_OBJ_DIR)/html.tar.gz ++install-html: + $(Echo) Installing HTML documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/img + $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html + $(Verb) $(DataInstall) $(IMAGES) $(DESTDIR)$(PROJ_docsdir)/html/img +- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) + + $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) + $(Echo) Packaging HTML documentation +@@ -71,12 +70,11 @@ + install-doxygen: doxygen + $(Echo) Installing doxygen documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen +- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) + $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \ + $(FIND) . -type f -exec \ + $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \; + +-doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz ++doxygen: regendoc + + regendoc: + $(Echo) Building doxygen documentation +@@ -102,7 +100,6 @@ + install-ocamldoc: ocamldoc + $(Echo) Installing ocamldoc documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html +- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir) + $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \ + $(FIND) . -type f -exec \ + $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \; diff --git a/sys-devel/llvm/files/llvm-3.0-PPCCompilationCallbackC_static.patch b/sys-devel/llvm/files/llvm-3.0-PPCCompilationCallbackC_static.patch new file mode 100644 index 0000000..04e4024 --- /dev/null +++ b/sys-devel/llvm/files/llvm-3.0-PPCCompilationCallbackC_static.patch @@ -0,0 +1,27 @@ +https://bugs.gentoo.org/show_bug.cgi?id=403519 +http://llvm.org/viewvc/llvm-project?view=rev&revision=153938 + +--- llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp 2011/06/15 15:29:47 133059 ++++ llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp 2012/04/03 06:59:28 153938 +@@ -291,9 +291,10 @@ + } + #endif + +-extern "C" void *PPCCompilationCallbackC(unsigned *StubCallAddrPlus4, +- unsigned *OrigCallAddrPlus4, +- bool is64Bit) { ++extern "C" { ++static void* LLVM_ATTRIBUTE_USED PPCCompilationCallbackC(unsigned *StubCallAddrPlus4, ++ unsigned *OrigCallAddrPlus4, ++ bool is64Bit) { + // Adjust the pointer to the address of the call instruction in the stub + // emitted by emitFunctionStub, rather than the instruction after it. + unsigned *StubCallAddr = StubCallAddrPlus4 - 1; +@@ -337,6 +338,7 @@ + // stack after we restore all regs. + return Target; + } ++} + + + diff --git a/sys-devel/llvm/files/llvm-3.0-PPC_macro.patch b/sys-devel/llvm/files/llvm-3.0-PPC_macro.patch new file mode 100644 index 0000000..c485e9b --- /dev/null +++ b/sys-devel/llvm/files/llvm-3.0-PPC_macro.patch @@ -0,0 +1,43 @@ +Index: llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h +=================================================================== +--- llvm-3.0-3.0.orig/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h 2011-07-25 23:24:55.000000000 +0000 ++++ llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h 2011-12-02 13:06:48.000000000 +0000 +@@ -34,6 +34,10 @@ + + } // End llvm namespace + ++// Generated files will use "namespace PPC". To avoid symbol clash, ++// undefine PPC here. PPC may be predefined on some hosts. ++#undef PPC ++ + // Defines symbolic names for PowerPC registers. This defines a mapping from + // register name to register number. + // +Index: llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h +=================================================================== +--- llvm-3.0-3.0.orig/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h 2011-07-26 00:24:13.000000000 +0000 ++++ llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h 2011-12-02 13:06:48.000000000 +0000 +@@ -14,6 +14,10 @@ + #ifndef LLVM_TARGET_POWERPC_PPCPREDICATES_H + #define LLVM_TARGET_POWERPC_PPCPREDICATES_H + ++// Generated files will use "namespace PPC". To avoid symbol clash, ++// undefine PPC here. PPC may be predefined on some hosts. ++#undef PPC ++ + namespace llvm { + namespace PPC { + /// Predicate - These are "(BI << 5) | BO" for various predicates. +Index: llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h +=================================================================== +--- llvm-3.0-3.0.orig/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h 2011-07-25 19:53:23.000000000 +0000 ++++ llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h 2011-12-02 16:21:23.000000000 +0000 +@@ -12,6 +12,8 @@ + + #include "llvm/MC/MCFixup.h" + ++#undef PPC ++ + namespace llvm { + namespace PPC { + enum Fixups { diff --git a/sys-devel/llvm/files/llvm-3.0-gold_LTO_link.patch b/sys-devel/llvm/files/llvm-3.0-gold_LTO_link.patch new file mode 100644 index 0000000..031448d --- /dev/null +++ b/sys-devel/llvm/files/llvm-3.0-gold_LTO_link.patch @@ -0,0 +1,10 @@ +--- tools/gold/Makefile 2011/11/23 03:03:21 145094 ++++ tools/gold/Makefile 2011/11/23 03:07:25 145095 +@@ -24,6 +24,6 @@ + # Because off_t is used in the public API, the largefile parts are required for + # ABI compatibility. + CXXFLAGS+=-I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +-CXXFLAGS+=$(SharedLibDir)/$(SharedPrefix)LTO$(SHLIBEXT) ++CXXFLAGS+=-L$(SharedLibDir)/$(SharedPrefix) -lLTO + + include $(LEVEL)/Makefile.common diff --git a/sys-devel/llvm/files/llvm-3.0-ocaml_install.patch b/sys-devel/llvm/files/llvm-3.0-ocaml_install.patch new file mode 100644 index 0000000..18f5cf6 --- /dev/null +++ b/sys-devel/llvm/files/llvm-3.0-ocaml_install.patch @@ -0,0 +1,16 @@ +https://bugs.gentoo.org/show_bug.cgi?id=393023 +http://llvm.org/bugs/show_bug.cgi?id=11177 + +Index: llvm-3.0-3.0/bindings/ocaml/llvm/Makefile +=================================================================== +--- llvm-3.0-3.0.orig/bindings/ocaml/llvm/Makefile 2011-11-15 12:17:02.785987852 +0100 ++++ llvm-3.0-3.0/bindings/ocaml/llvm/Makefile 2011-11-15 12:20:12.661983615 +0100 +@@ -30,7 +30,7 @@ + $(OcamlDir)/META.llvm: META.llvm + $(Verb) $(CP) -f $< $@ + +-install-meta:: $(ObjDir)/META.llvm ++install-meta:: $(ObjDir)/../META.llvm + $(Echo) "Install $(BuildMode) $(DestMETA)" + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Verb) $(DataInstall) META.llvm "$(DestMETA)" diff --git a/sys-devel/llvm/files/llvm-3.0-set_soname.patch b/sys-devel/llvm/files/llvm-3.0-set_soname.patch new file mode 100644 index 0000000..69ba74d --- /dev/null +++ b/sys-devel/llvm/files/llvm-3.0-set_soname.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/show_bug.cgi?id=409267 +http://llvm.org/bugs/show_bug.cgi?id=12334 +--- tools/llvm-shlib/Makefile.orig 2012-03-26 18:14:13.071797115 +0200 ++++ tools/llvm-shlib/Makefile 2012-03-26 17:31:12.491196254 +0200 +@@ -67,6 +67,7 @@ + # Include everything from the .a's into the shared library. + LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ + -Wl,--no-whole-archive ++ LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) + endif + + ifeq ($(HOST_OS),Linux) diff --git a/sys-devel/llvm/files/llvm-3.1-fix_debug_line_info.patch b/sys-devel/llvm/files/llvm-3.1-fix_debug_line_info.patch new file mode 100644 index 0000000..de2d46b --- /dev/null +++ b/sys-devel/llvm/files/llvm-3.1-fix_debug_line_info.patch @@ -0,0 +1,65 @@ +From 737fdba46f2b2b7d39bc728d15ea2334c44779e0 Mon Sep 17 00:00:00 2001 +From: Ben Longbons <b.r.longbons@gmail.com> +Date: Fri, 29 Jun 2012 12:58:34 -0700 +Subject: [PATCH] Revert "Patch to set is_stmt a little better for prologue + lines in a function." + +This meants that the debugger could find meaningful line information. + +This reverts commit 60b35f408bc3194e7ea4e96367c0b42dc5e7f850. +--- + lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 ++----- + test/DebugInfo/X86/ending-run.ll | 6 ++---- + 2 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +index 3e79a6d..24aedfb 100644 +--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp ++++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +@@ -1093,15 +1093,12 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) { + if (!MI->isDebugValue()) { + DebugLoc DL = MI->getDebugLoc(); + if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) { +- unsigned Flags = 0; ++ unsigned Flags = DWARF2_FLAG_IS_STMT; + PrevInstLoc = DL; + if (DL == PrologEndLoc) { + Flags |= DWARF2_FLAG_PROLOGUE_END; + PrologEndLoc = DebugLoc(); + } +- if (PrologEndLoc.isUnknown()) +- Flags |= DWARF2_FLAG_IS_STMT; +- + if (!DL.isUnknown()) { + const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext()); + recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags); +@@ -1382,7 +1379,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { + MF->getFunction()->getContext()); + recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(), + FnStartDL.getScope(MF->getFunction()->getContext()), +- 0); ++ DWARF2_FLAG_IS_STMT); + } + } + +diff --git a/test/DebugInfo/X86/ending-run.ll b/test/DebugInfo/X86/ending-run.ll +index 6935c47..0cd3de1 100644 +--- a/test/DebugInfo/X86/ending-run.ll ++++ b/test/DebugInfo/X86/ending-run.ll +@@ -1,11 +1,9 @@ + ; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj + ; RUN: llvm-dwarfdump %t | FileCheck %s + +-; Check that the line table starts at 7, not 4, but that the first +-; statement isn't until line 8. ++; Check that the line table starts at 7, not 4. + +-; CHECK-NOT: 0x0000000000000000 7 0 1 0 is_stmt +-; CHECK: 0x0000000000000000 7 0 1 0 ++; CHECK: 0x0000000000000000 7 0 1 0 is_stmt + ; CHECK: 0x0000000000000004 8 18 1 0 is_stmt prologue_end + + define i32 @callee(i32 %x) nounwind uwtable ssp { +-- +1.7.10 + diff --git a/sys-devel/llvm/files/llvm-3.1-ivybridge_support.patch b/sys-devel/llvm/files/llvm-3.1-ivybridge_support.patch new file mode 100644 index 0000000..a03ec42 --- /dev/null +++ b/sys-devel/llvm/files/llvm-3.1-ivybridge_support.patch @@ -0,0 +1,13 @@ +--- llvm/trunk/lib/Support/Host.cpp 2012/04/23 22:22:46 155401 ++++ llvm/trunk/lib/Support/Host.cpp 2012/04/23 22:41:39 155402 +@@ -230,6 +230,10 @@ + case 45: + return "corei7-avx"; + ++ // Ivy Bridge: ++ case 58: ++ return "core-avx-i"; ++ + case 28: // Intel Atom processor. All processors are manufactured using + // the 45 nm process + return "atom"; diff --git a/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch b/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch new file mode 100644 index 0000000..3a622b5 --- /dev/null +++ b/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch @@ -0,0 +1,45 @@ +--- docs/Makefile.orig 2012-04-30 17:00:01.000000000 +0200 ++++ docs/Makefile 2012-04-30 17:15:52.000000000 +0200 +@@ -52,11 +52,10 @@ + # 'make generated BUILD_FOR_WEBSITE=1' + generated:: $(generated_targets) + +-install-html: $(PROJ_OBJ_DIR)/html.tar.gz ++install-html: + $(Echo) Installing HTML documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html + $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html +- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) + + $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) + $(Echo) Packaging HTML documentation +@@ -68,12 +67,11 @@ + install-doxygen: doxygen + $(Echo) Installing doxygen documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen +- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) + $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \ + $(FIND) . -type f -exec \ + $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \; + +-doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz ++doxygen: regendoc + + regendoc: + $(Echo) Building doxygen documentation +@@ -99,7 +97,6 @@ + install-ocamldoc: ocamldoc + $(Echo) Installing ocamldoc documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html +- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir) + $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \ + $(FIND) . -type f -exec \ + $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \; +@@ -109,7 +106,6 @@ + $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar* + $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc + $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/ocamldoc.tar +- $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/ + + regen-ocamldoc: + $(Echo) Building ocamldoc documentation |