From 383ea0fe0bb1845c5354fe5bd61ed8aaae566209 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 10 Mar 2011 22:25:04 +0100 Subject: [PATCH 01/94] Update to 2.9rc1 --- .gitignore | 4 +- clang-2.8-alignOf.patch | 199 ---------------------------------------- llvm-2.8-alignOf.patch | 59 ------------ llvm.spec | 28 +++--- sources | 4 +- 5 files changed, 18 insertions(+), 276 deletions(-) delete mode 100644 clang-2.8-alignOf.patch delete mode 100644 llvm-2.8-alignOf.patch diff --git a/.gitignore b/.gitignore index 00ec31b..2564ef2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/llvm-2.8.tgz -/clang-2.8.tgz +/llvm-2.9rc1.src.tar.gz +/clang-2.9rc1.src.tar.gz diff --git a/clang-2.8-alignOf.patch b/clang-2.8-alignOf.patch deleted file mode 100644 index 77aa521..0000000 --- a/clang-2.8-alignOf.patch +++ /dev/null @@ -1,199 +0,0 @@ -Index: lib/Basic/IdentifierTable.cpp -=================================================================== ---- lib/Basic/IdentifierTable.cpp (revision 117774) -+++ lib/Basic/IdentifierTable.cpp (revision 117775) -@@ -390,7 +390,7 @@ - unsigned Size = sizeof(MultiKeywordSelector) + nKeys*sizeof(IdentifierInfo *); - MultiKeywordSelector *SI = - (MultiKeywordSelector*)SelTabImpl.Allocator.Allocate(Size, -- llvm::alignof()); -+ llvm::alignOf()); - new (SI) MultiKeywordSelector(nKeys, IIV); - SelTabImpl.Table.InsertNode(SI, InsertPos); - return Selector(SI); -Index: lib/AST/ExprCXX.cpp -=================================================================== ---- lib/AST/ExprCXX.cpp (revision 117774) -+++ lib/AST/ExprCXX.cpp (revision 117775) -@@ -233,7 +233,7 @@ - if (NumTemplateArgs != 0) - size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs); - -- void *Mem = C.Allocate(size, llvm::alignof()); -+ void *Mem = C.Allocate(size, llvm::alignOf()); - UnresolvedLookupExpr *E = new (Mem) UnresolvedLookupExpr(EmptyShell()); - E->HasExplicitTemplateArgs = NumTemplateArgs != 0; - return E; -@@ -261,7 +261,7 @@ - if (NumResults) { - Results = static_cast( - C.Allocate(sizeof(DeclAccessPair) * NumResults, -- llvm::alignof())); -+ llvm::alignOf())); - memcpy(Results, &*Begin.getIterator(), - NumResults * sizeof(DeclAccessPair)); - } -@@ -737,7 +737,7 @@ - if (TemplateArgs) - size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs); - -- void *Mem = C.Allocate(size, llvm::alignof()); -+ void *Mem = C.Allocate(size, llvm::alignOf()); - return new (Mem) CXXDependentScopeMemberExpr(C, Base, BaseType, - IsArrow, OperatorLoc, - Qualifier, QualifierRange, -@@ -756,7 +756,7 @@ - - std::size_t size = sizeof(CXXDependentScopeMemberExpr) + - ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs); -- void *Mem = C.Allocate(size, llvm::alignof()); -+ void *Mem = C.Allocate(size, llvm::alignOf()); - CXXDependentScopeMemberExpr *E - = new (Mem) CXXDependentScopeMemberExpr(C, 0, QualType(), - 0, SourceLocation(), 0, -@@ -812,7 +812,7 @@ - if (TemplateArgs) - size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs); - -- void *Mem = C.Allocate(size, llvm::alignof()); -+ void *Mem = C.Allocate(size, llvm::alignOf()); - return new (Mem) UnresolvedMemberExpr(C, - Dependent ? C.DependentTy : C.OverloadTy, - Dependent, HasUnresolvedUsing, Base, BaseType, -@@ -826,7 +826,7 @@ - if (NumTemplateArgs != 0) - size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs); - -- void *Mem = C.Allocate(size, llvm::alignof()); -+ void *Mem = C.Allocate(size, llvm::alignOf()); - UnresolvedMemberExpr *E = new (Mem) UnresolvedMemberExpr(EmptyShell()); - E->HasExplicitTemplateArgs = NumTemplateArgs != 0; - return E; -Index: lib/AST/DeclObjC.cpp -=================================================================== ---- lib/AST/DeclObjC.cpp (revision 117774) -+++ lib/AST/DeclObjC.cpp (revision 117775) -@@ -711,7 +711,7 @@ - void ObjCClassDecl::setClassList(ASTContext &C, ObjCInterfaceDecl*const*List, - const SourceLocation *Locs, unsigned Num) { - ForwardDecls = (ObjCClassRef*) C.Allocate(sizeof(ObjCClassRef)*Num, -- llvm::alignof()); -+ llvm::alignOf()); - for (unsigned i = 0; i < Num; ++i) - new (&ForwardDecls[i]) ObjCClassRef(List[i], Locs[i]); - -Index: lib/AST/Stmt.cpp -=================================================================== ---- lib/AST/Stmt.cpp (revision 117774) -+++ lib/AST/Stmt.cpp (revision 117775) -@@ -416,7 +416,7 @@ - Stmt *atFinallyStmt) { - unsigned Size = sizeof(ObjCAtTryStmt) + - (1 + NumCatchStmts + (atFinallyStmt != 0)) * sizeof(Stmt *); -- void *Mem = Context.Allocate(Size, llvm::alignof()); -+ void *Mem = Context.Allocate(Size, llvm::alignOf()); - return new (Mem) ObjCAtTryStmt(atTryLoc, atTryStmt, CatchStmts, NumCatchStmts, - atFinallyStmt); - } -@@ -426,7 +426,7 @@ - bool HasFinally) { - unsigned Size = sizeof(ObjCAtTryStmt) + - (1 + NumCatchStmts + HasFinally) * sizeof(Stmt *); -- void *Mem = Context.Allocate(Size, llvm::alignof()); -+ void *Mem = Context.Allocate(Size, llvm::alignOf()); - return new (Mem) ObjCAtTryStmt(EmptyShell(), NumCatchStmts, HasFinally); - } - -@@ -448,7 +448,7 @@ - std::size_t Size = sizeof(CXXTryStmt); - Size += ((numHandlers + 1) * sizeof(Stmt)); - -- void *Mem = C.Allocate(Size, llvm::alignof()); -+ void *Mem = C.Allocate(Size, llvm::alignOf()); - return new (Mem) CXXTryStmt(tryLoc, tryBlock, handlers, numHandlers); - } - -@@ -457,7 +457,7 @@ - std::size_t Size = sizeof(CXXTryStmt); - Size += ((numHandlers + 1) * sizeof(Stmt)); - -- void *Mem = C.Allocate(Size, llvm::alignof()); -+ void *Mem = C.Allocate(Size, llvm::alignOf()); - return new (Mem) CXXTryStmt(Empty, numHandlers); - } - -Index: lib/AST/Expr.cpp -=================================================================== ---- lib/AST/Expr.cpp (revision 117774) -+++ lib/AST/Expr.cpp (revision 117775) -@@ -257,7 +257,7 @@ - if (TemplateArgs) - Size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs); - -- void *Mem = Context.Allocate(Size, llvm::alignof()); -+ void *Mem = Context.Allocate(Size, llvm::alignOf()); - return new (Mem) DeclRefExpr(Qualifier, QualifierRange, D, NameInfo, - TemplateArgs, T); - } -@@ -271,7 +271,7 @@ - if (NumTemplateArgs) - Size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs); - -- void *Mem = Context.Allocate(Size, llvm::alignof()); -+ void *Mem = Context.Allocate(Size, llvm::alignOf()); - return new (Mem) DeclRefExpr(EmptyShell()); - } - -@@ -432,7 +432,7 @@ - // any concatenated string tokens. - void *Mem = C.Allocate(sizeof(StringLiteral)+ - sizeof(SourceLocation)*(NumStrs-1), -- llvm::alignof()); -+ llvm::alignOf()); - StringLiteral *SL = new (Mem) StringLiteral(Ty); - - // OPTIMIZE: could allocate this appended to the StringLiteral. -@@ -452,7 +452,7 @@ - StringLiteral *StringLiteral::CreateEmpty(ASTContext &C, unsigned NumStrs) { - void *Mem = C.Allocate(sizeof(StringLiteral)+ - sizeof(SourceLocation)*(NumStrs-1), -- llvm::alignof()); -+ llvm::alignOf()); - StringLiteral *SL = new (Mem) StringLiteral(QualType()); - SL->StrData = 0; - SL->ByteLength = 0; -@@ -714,7 +714,7 @@ - if (targs) - Size += ExplicitTemplateArgumentList::sizeFor(*targs); - -- void *Mem = C.Allocate(Size, llvm::alignof()); -+ void *Mem = C.Allocate(Size, llvm::alignOf()); - MemberExpr *E = new (Mem) MemberExpr(base, isarrow, memberdecl, nameinfo, ty); - - if (hasQualOrFound) { -Index: lib/AST/DeclCXX.cpp -=================================================================== ---- lib/AST/DeclCXX.cpp (revision 117774) -+++ lib/AST/DeclCXX.cpp (revision 117775) -@@ -1057,7 +1057,7 @@ - unsigned NumIndices) { - void *Mem = Context.Allocate(sizeof(CXXBaseOrMemberInitializer) + - sizeof(VarDecl *) * NumIndices, -- llvm::alignof()); -+ llvm::alignOf()); - return new (Mem) CXXBaseOrMemberInitializer(Context, Member, MemberLoc, - L, Init, R, Indices, NumIndices); - } -Index: lib/Lex/TokenLexer.cpp -=================================================================== ---- lib/Lex/TokenLexer.cpp (revision 117774) -+++ lib/Lex/TokenLexer.cpp (revision 117775) -@@ -287,7 +287,7 @@ - llvm::BumpPtrAllocator &Alloc = PP.getPreprocessorAllocator(); - Token *Res = - static_cast(Alloc.Allocate(sizeof(Token)*ResultToks.size(), -- llvm::alignof())); -+ llvm::alignOf())); - if (NumTokens) - memcpy(Res, &ResultToks[0], NumTokens*sizeof(Token)); - Tokens = Res; diff --git a/llvm-2.8-alignOf.patch b/llvm-2.8-alignOf.patch deleted file mode 100644 index d48c10c..0000000 --- a/llvm-2.8-alignOf.patch +++ /dev/null @@ -1,59 +0,0 @@ -Index: include/llvm/ADT/StringMap.h -=================================================================== ---- include/llvm/ADT/StringMap.h (revision 117773) -+++ include/llvm/ADT/StringMap.h (revision 117774) -@@ -167,7 +167,7 @@ - - unsigned AllocSize = static_cast(sizeof(StringMapEntry))+ - KeyLength+1; -- unsigned Alignment = alignof(); -+ unsigned Alignment = alignOf(); - - StringMapEntry *NewItem = - static_cast(Allocator.Allocate(AllocSize,Alignment)); -Index: include/llvm/Support/AlignOf.h -=================================================================== ---- include/llvm/Support/AlignOf.h (revision 117773) -+++ include/llvm/Support/AlignOf.h (revision 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() returns the alignment of an int. -+/// alignOf() returns the alignment of an int. - template --static inline unsigned alignof() { return AlignOf::Alignment; } -+static inline unsigned alignOf() { return AlignOf::Alignment; } - - } // end namespace llvm - #endif -Index: include/llvm/Support/Allocator.h -=================================================================== ---- include/llvm/Support/Allocator.h (revision 117773) -+++ include/llvm/Support/Allocator.h (revision 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()); -+ Ptr = Allocator.AlignPtr(Ptr, alignOf()); - if (Ptr + sizeof(T) <= End) - reinterpret_cast(Ptr)->~T(); - } -Index: include/llvm/CodeGen/SlotIndexes.h -=================================================================== ---- include/llvm/CodeGen/SlotIndexes.h (revision 117773) -+++ include/llvm/CodeGen/SlotIndexes.h (revision 117774) -@@ -393,7 +393,7 @@ - IndexListEntry *entry = - static_cast( - ileAllocator.Allocate(sizeof(IndexListEntry), -- alignof())); -+ alignOf())); - - new (entry) IndexListEntry(mi, index); - diff --git a/llvm.spec b/llvm.spec index 3535c9c..1607ce3 100644 --- a/llvm.spec +++ b/llvm.spec @@ -10,22 +10,21 @@ %bcond_without ocaml %endif +%global prerel rc1 +%global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version} + Name: llvm -Version: 2.8 -Release: 7%{?dist} +Version: 2.9 +Release: 0.1.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages License: NCSA URL: http://llvm.org/ -Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tgz -Source1: http://llvm.org/releases/%{version}/clang-%{version}.tgz +Source0: %{downloadurl}/llvm-%{version}%{?prerel}.src.tar.gz +Source1: %{downloadurl}/clang-%{version}%{?prerel}.src.tar.gz # Data files should be installed with timestamps preserved Patch0: llvm-2.6-timestamp.patch -# rename alignof -> alignOf for C++0x support -# http://llvm.org/bugs/show_bug.cgi?id=8423 -Patch1: llvm-2.8-alignOf.patch -Patch2: clang-2.8-alignOf.patch BuildRequires: bison BuildRequires: chrpath @@ -86,7 +85,7 @@ Summary: A C language family front-end for LLVM License: NCSA Group: Development/Languages # clang requires gcc; clang++ gcc-c++ -Requires: gcc-c++ +Requires: gcc-c++ %description -n clang clang: noun @@ -193,13 +192,11 @@ HTML documentation for LLVM's OCaml binding. %prep -%setup -q -n llvm-%{version} -a1 %{?_with_gcc:-a2} -mv clang-%{version} tools/clang +%setup -q -n llvm-%{version}%{?prerel} -a1 %{?_with_gcc:-a2} +mv clang-%{version}%{?prerel} tools/clang %patch0 -p1 -b .timestamp -%patch1 -p0 -b .alignOf pushd tools/clang -%patch2 -p0 -b .alignOf popd # Encoding fix @@ -341,7 +338,7 @@ find examples -name 'Makefile' | xargs -0r rm -f %defattr(-,root,root,-) %doc clang-docs/* clang-testlog.txt %{_bindir}/clang* -%{_bindir}/c-index-test +#%{_bindir}/c-index-test %{_bindir}/tblgen %{_prefix}/lib/clang %doc %{_mandir}/man1/clang.1.* @@ -394,6 +391,9 @@ find examples -name 'Makefile' | xargs -0r rm -f %changelog +* Thu Mar 10 2011 Michel Salim - 2.9-0.1.rc1 +- Update to 2.9rc1 + * Tue Feb 08 2011 Fedora Release Engineering - 2.8-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index 93dbdb8..60b2250 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -220d361b4d17051ff4bb21c64abe05ba llvm-2.8.tgz -10e14c901fc3728eecbd5b829e011b59 clang-2.8.tgz +1469571f018d1adbf5da624b465ed1eb llvm-2.9rc1.src.tar.gz +37240bd17838bcca627eb3fc48aca305 clang-2.9rc1.src.tar.gz From a91412671683574d1dabd2160246c4eb18e6304d Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 10 Mar 2011 22:40:20 +0100 Subject: [PATCH 02/94] also package macho-dump --- llvm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm.spec b/llvm.spec index 1607ce3..4354499 100644 --- a/llvm.spec +++ b/llvm.spec @@ -319,6 +319,7 @@ find examples -name 'Makefile' | xargs -0r rm -f %{_bindir}/lli %exclude %{_bindir}/llvm-config %{_bindir}/llvm* +%{_bindir}/macho-dump %{_bindir}/opt %config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf %dir %{_libdir}/llvm From 68d1c11c8970534ec204b1dc782896884a62eff7 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 17 Mar 2011 12:47:48 +0100 Subject: [PATCH 03/94] clang++: also search for platform-specific include files (# 680644) --- llvm.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 4354499..fb47383 100644 --- a/llvm.spec +++ b/llvm.spec @@ -15,7 +15,7 @@ Name: llvm Version: 2.9 -Release: 0.1.%{prerel}%{?dist} +Release: 0.2.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -222,7 +222,9 @@ popd --with-c-include-dirs=%{_includedir}:$(find %{_prefix}/lib/gcc/*/* \ -maxdepth 0 -type d)/include \ --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \ - --with-cxx-include-arch=%{_arch}-%{_vendor}-%{_os} + --with-cxx-include-arch=%{_arch}-%{_vendor}-%{_os} \ + --with-cxx-include-32bit-dir=$(find %{_includedir}/c++/* -maxdepth 0 -type d)/%{_arch}-%{_vendor}-%{_os}/32/bits \ + --with-cxx-include-64bit-dir=$(find %{_includedir}/c++/* -maxdepth 0 -type d)/%{_arch}-%{_vendor}-%{_os}/bits # FIXME file this # configure does not properly specify libdir @@ -392,6 +394,9 @@ find examples -name 'Makefile' | xargs -0r rm -f %changelog +* Thu Mar 18 2011 Michel Salim - 2.9-0.2.rc1 +- clang++: also search for platform-specific include files (# 680644) + * Thu Mar 10 2011 Michel Salim - 2.9-0.1.rc1 - Update to 2.9rc1 From b1c21fa55e0691f312298ab27eaf48561de23035 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 17 Mar 2011 13:19:24 +0100 Subject: [PATCH 04/94] Fix 32bit-dir and 64-dir parameters: should be relative, not absolute (cherry picked from commit b32ca652bd0332a0c0bc69d25d53e017c28b91ad) --- llvm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index fb47383..02c4dc1 100644 --- a/llvm.spec +++ b/llvm.spec @@ -223,8 +223,8 @@ popd -maxdepth 0 -type d)/include \ --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \ --with-cxx-include-arch=%{_arch}-%{_vendor}-%{_os} \ - --with-cxx-include-32bit-dir=$(find %{_includedir}/c++/* -maxdepth 0 -type d)/%{_arch}-%{_vendor}-%{_os}/32/bits \ - --with-cxx-include-64bit-dir=$(find %{_includedir}/c++/* -maxdepth 0 -type d)/%{_arch}-%{_vendor}-%{_os}/bits + --with-cxx-include-32bit-dir=32/bits \ + --with-cxx-include-64bit-dir=bits # FIXME file this # configure does not properly specify libdir From 0b4dbd52ce144ca34ab11ded1ab04815d6b2b9fd Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 17 Mar 2011 13:57:46 +0100 Subject: [PATCH 05/94] Don't include 'bits' in the include path override (cherry picked from commit 88425e38fa4f0a91e009f2abf5c1f8a0ef018666) --- llvm.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 02c4dc1..edd5917 100644 --- a/llvm.spec +++ b/llvm.spec @@ -223,8 +223,7 @@ popd -maxdepth 0 -type d)/include \ --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \ --with-cxx-include-arch=%{_arch}-%{_vendor}-%{_os} \ - --with-cxx-include-32bit-dir=32/bits \ - --with-cxx-include-64bit-dir=bits + --with-cxx-include-32bit-dir=32 # FIXME file this # configure does not properly specify libdir From 8686d9a4884846cafd7415f35e7637b1c0537cc4 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 17 Mar 2011 17:36:08 +0100 Subject: [PATCH 06/94] Don't include test logs; breaks multilib (# 666195) --- llvm.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index edd5917..9507da1 100644 --- a/llvm.spec +++ b/llvm.spec @@ -314,7 +314,7 @@ find examples -name 'Makefile' | xargs -0r rm -f %files %defattr(-,root,root,-) -%doc CREDITS.TXT LICENSE.TXT README.txt llvm-testlog.txt +%doc CREDITS.TXT LICENSE.TXT README.txt %{_bindir}/bugpoint %{_bindir}/llc %{_bindir}/lli @@ -338,7 +338,7 @@ find examples -name 'Makefile' | xargs -0r rm -f %files -n clang %defattr(-,root,root,-) -%doc clang-docs/* clang-testlog.txt +%doc clang-docs/* %{_bindir}/clang* #%{_bindir}/c-index-test %{_bindir}/tblgen @@ -394,6 +394,7 @@ find examples -name 'Makefile' | xargs -0r rm -f %changelog * Thu Mar 18 2011 Michel Salim - 2.9-0.2.rc1 +- Don't include test logs; breaks multilib (# 666195) - clang++: also search for platform-specific include files (# 680644) * Thu Mar 10 2011 Michel Salim - 2.9-0.1.rc1 From a8c599f15fe01328b8aad373391dee36cd174614 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 17 Mar 2011 18:24:51 +0100 Subject: [PATCH 07/94] Don't include test logs; breaks multilib (# 666195) Split shared libraries into separate subpackage --- llvm.spec | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/llvm.spec b/llvm.spec index 9507da1..fbbc802 100644 --- a/llvm.spec +++ b/llvm.spec @@ -41,6 +41,7 @@ BuildRequires: dejagnu tcl-devel python %if 0%{?_with_doxygen} BuildRequires: doxygen graphviz %endif +Requires: llvm-libs = %{version}-%{release} # LLVM is not supported on PPC64 # http://llvm.org/bugs/show_bug.cgi?id=3729 @@ -80,10 +81,19 @@ Obsoletes: %{name}-doc < %{version}-%{release} Documentation for the LLVM compiler infrastructure. +%package libs +Summary: LLVM shared libraries +Group: System Environment/Libraries + +%description libs +Shared libraries for the LLVM compiler infrastructure. + + %package -n clang Summary: A C language family front-end for LLVM License: NCSA Group: Development/Languages +Requires: llvm = %{version}-%{release} # clang requires gcc; clang++ gcc-c++ Requires: gcc-c++ @@ -322,9 +332,6 @@ find examples -name 'Makefile' | xargs -0r rm -f %{_bindir}/llvm* %{_bindir}/macho-dump %{_bindir}/opt -%config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf -%dir %{_libdir}/llvm -%{_libdir}/llvm/*.so %exclude %{_mandir}/man1/clang.1.* %exclude %{_mandir}/man1/llvmg??.1.* %doc %{_mandir}/man1/*.1.* @@ -336,12 +343,20 @@ find examples -name 'Makefile' | xargs -0r rm -f %{_includedir}/%{name}-c %{_libdir}/%{name}/*.a +%files libs +%defattr(-,root,root,-) +%config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf +%dir %{_libdir}/%{name} +%exclude %{_libdir}/%{name}/libclang.so +%{_libdir}/%{name}/*.so + %files -n clang %defattr(-,root,root,-) %doc clang-docs/* %{_bindir}/clang* #%{_bindir}/c-index-test %{_bindir}/tblgen +%{_libdir}/%{name}/libclang.so %{_prefix}/lib/clang %doc %{_mandir}/man1/clang.1.* @@ -394,6 +409,7 @@ find examples -name 'Makefile' | xargs -0r rm -f %changelog * Thu Mar 18 2011 Michel Salim - 2.9-0.2.rc1 +- Split shared libraries into separate subpackage - Don't include test logs; breaks multilib (# 666195) - clang++: also search for platform-specific include files (# 680644) From 999f90581f2dc4275fa3ee3313019ce87721fa4d Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 17 Mar 2011 19:03:50 +0100 Subject: [PATCH 08/94] Move ldconfig triggers to the subpackages containing .so files (cherry picked from commit 2fc8420d0f49fdd4234968aba41c1c0d3817e295) --- llvm.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index fbbc802..75ecea3 100644 --- a/llvm.spec +++ b/llvm.spec @@ -316,10 +316,12 @@ chmod -x %{buildroot}%{_libdir}/%{name}/*.a find examples -name 'Makefile' | xargs -0r rm -f -%post -p /sbin/ldconfig +%post libs -p /sbin/ldconfig +%post -n clang -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig +%postun -n clang -p /sbin/ldconfig %files From 9bdfe6c66a3e4dc89a7c2b41bc0094ba9cf64396 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Fri, 25 Mar 2011 15:47:42 +0100 Subject: [PATCH 09/94] Update to 2.9rc2 --- .gitignore | 4 ++-- llvm.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 2564ef2..c1f4a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/llvm-2.9rc1.src.tar.gz -/clang-2.9rc1.src.tar.gz +/llvm-2.9rc2.src.tar.gz +/clang-2.9rc2.src.tar.gz diff --git a/llvm.spec b/llvm.spec index 75ecea3..92b93dc 100644 --- a/llvm.spec +++ b/llvm.spec @@ -10,12 +10,12 @@ %bcond_without ocaml %endif -%global prerel rc1 +%global prerel rc2 %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version} Name: llvm Version: 2.9 -Release: 0.2.%{prerel}%{?dist} +Release: 0.1.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -410,6 +410,9 @@ find examples -name 'Makefile' | xargs -0r rm -f %changelog +* Fri Mar 25 2011 Michel Salim - 2.9-0.1.rc2 +- Update to 2.9rc2 + * Thu Mar 18 2011 Michel Salim - 2.9-0.2.rc1 - Split shared libraries into separate subpackage - Don't include test logs; breaks multilib (# 666195) diff --git a/sources b/sources index 60b2250..0d63527 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -1469571f018d1adbf5da624b465ed1eb llvm-2.9rc1.src.tar.gz -37240bd17838bcca627eb3fc48aca305 clang-2.9rc1.src.tar.gz +006a993829e8f289d0660615a5d6118c llvm-2.9rc2.src.tar.gz +3a48c9dca4bf407d9e9c90d19600fc67 clang-2.9rc2.src.tar.gz From a09d313c9eadd2e5bf9075b3da09961324b11166 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Tue, 5 Apr 2011 01:30:57 +0200 Subject: [PATCH 10/94] Make sure N-V-R is increasing --- llvm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 92b93dc..f88461b 100644 --- a/llvm.spec +++ b/llvm.spec @@ -15,7 +15,7 @@ Name: llvm Version: 2.9 -Release: 0.1.%{prerel}%{?dist} +Release: 0.3.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -410,7 +410,7 @@ find examples -name 'Makefile' | xargs -0r rm -f %changelog -* Fri Mar 25 2011 Michel Salim - 2.9-0.1.rc2 +* Fri Mar 25 2011 Michel Salim - 2.9-0.3.rc2 - Update to 2.9rc2 * Thu Mar 18 2011 Michel Salim - 2.9-0.2.rc1 From 8b95ec6e4c00d630ae1aa1e74da819ee813102ea Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 31 May 2011 01:30:56 +0200 Subject: [PATCH 11/94] enable ppc64 build --- llvm.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/llvm.spec b/llvm.spec index f88461b..377fbf0 100644 --- a/llvm.spec +++ b/llvm.spec @@ -15,7 +15,7 @@ Name: llvm Version: 2.9 -Release: 0.3.%{prerel}%{?dist} +Release: 0.4.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -43,10 +43,6 @@ BuildRequires: doxygen graphviz %endif Requires: llvm-libs = %{version}-%{release} -# LLVM is not supported on PPC64 -# http://llvm.org/bugs/show_bug.cgi?id=3729 -ExcludeArch: ppc64 - %description LLVM is a compiler infrastructure designed for compile-time, link-time, runtime, and idle-time optimization of programs from @@ -410,6 +406,9 @@ find examples -name 'Makefile' | xargs -0r rm -f %changelog +* Tue May 31 2011 Karsten Hopp 2.9-0.4.rc2 +- enable ppc64 build + * Fri Mar 25 2011 Michel Salim - 2.9-0.3.rc2 - Update to 2.9rc2 From a5a420ce6d21563126693057d60ca01e630b4599 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Mon, 1 Aug 2011 18:50:42 +0200 Subject: [PATCH 12/94] Update to 2.9 Depend on libffi to allow the LLVM interpreter to call external functions Build with RTTI enabled, needed by e.g. Rubinius (# 722714) Fix multilib installation --- .gitignore | 4 +- clang-2.9-add_gcc_vers.patch | 12 ++++++ llvm-Config-config.h | 9 +++++ llvm-Config-llvm-config.h | 9 +++++ llvm.spec | 77 +++++++++++++++++++++++++++++------- sources | 4 +- 6 files changed, 97 insertions(+), 18 deletions(-) create mode 100644 clang-2.9-add_gcc_vers.patch create mode 100644 llvm-Config-config.h create mode 100644 llvm-Config-llvm-config.h diff --git a/.gitignore b/.gitignore index c1f4a3f..b586424 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/llvm-2.9rc2.src.tar.gz -/clang-2.9rc2.src.tar.gz +/llvm-2.9.tgz +/clang-2.9.tgz diff --git a/clang-2.9-add_gcc_vers.patch b/clang-2.9-add_gcc_vers.patch new file mode 100644 index 0000000..03afe49 --- /dev/null +++ b/clang-2.9-add_gcc_vers.patch @@ -0,0 +1,12 @@ +--- clang-2.9/lib/Driver/ToolChains.cpp.add_gcc_vers 2011-03-21 22:29:27.000000000 +0100 ++++ clang-2.9/lib/Driver/ToolChains.cpp 2011-08-01 18:20:29.504194241 +0200 +@@ -1449,7 +1449,8 @@ + GccTriple = "i586-suse-linux"; + } + +- const char* GccVersions[] = {"4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4", ++ const char* GccVersions[] = {"4.6.1", "4.6.0", ++ "4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4", + "4.4.3", "4.4", "4.3.4", "4.3.3", "4.3.2", + "4.3", "4.2.4", "4.2.3", "4.2.2", "4.2.1", + "4.2"}; diff --git a/llvm-Config-config.h b/llvm-Config-config.h new file mode 100644 index 0000000..c369b45 --- /dev/null +++ b/llvm-Config-config.h @@ -0,0 +1,9 @@ +#include + +#if __WORDSIZE == 32 +#include "config-32.h" +#elif __WORDSIZE == 64 +#include "config-64.h" +#else +#error "Unknown word size" +#endif diff --git a/llvm-Config-llvm-config.h b/llvm-Config-llvm-config.h new file mode 100644 index 0000000..2fa08c9 --- /dev/null +++ b/llvm-Config-llvm-config.h @@ -0,0 +1,9 @@ +#include + +#if __WORDSIZE == 32 +#include "llvm-config-32.h" +#elif __WORDSIZE == 64 +#include "llvm-config-64.h" +#else +#error "Unknown word size" +#endif diff --git a/llvm.spec b/llvm.spec index 377fbf0..35c9473 100644 --- a/llvm.spec +++ b/llvm.spec @@ -10,27 +10,35 @@ %bcond_without ocaml %endif -%global prerel rc2 +#global prerel %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version} Name: llvm Version: 2.9 -Release: 0.4.%{prerel}%{?dist} +Release: 1%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages License: NCSA URL: http://llvm.org/ -Source0: %{downloadurl}/llvm-%{version}%{?prerel}.src.tar.gz -Source1: %{downloadurl}/clang-%{version}%{?prerel}.src.tar.gz +Source0: %{downloadurl}/llvm-%{version}%{?prerel}.tgz +Source1: %{downloadurl}/clang-%{version}%{?prerel}.tgz +# multilib fixes +Source2: llvm-Config-config.h +Source3: llvm-Config-llvm-config.h + # Data files should be installed with timestamps preserved Patch0: llvm-2.6-timestamp.patch +# clang link failure if system GCC version is unknown +# http://llvm.org/bugs/show_bug.cgi?id=8897 +Patch1: clang-2.9-add_gcc_vers.patch BuildRequires: bison BuildRequires: chrpath BuildRequires: flex BuildRequires: gcc-c++ >= 3.4 BuildRequires: groff +BuildRequires: libffi-devel BuildRequires: libtool-ltdl-devel %if %{with ocaml} BuildRequires: ocaml-ocamldoc @@ -58,6 +66,8 @@ Requires: %{name} = %{version}-%{release} Requires: libstdc++-devel >= 3.4 Provides: llvm-static = %{version}-%{release} +Requires(posttrans): /usr/sbin/alternatives +Requires(postun): /usr/sbin/alternatives %description devel This package contains library and header files needed to develop new @@ -201,8 +211,12 @@ HTML documentation for LLVM's OCaml binding. %setup -q -n llvm-%{version}%{?prerel} -a1 %{?_with_gcc:-a2} mv clang-%{version}%{?prerel} tools/clang +# llvm patches %patch0 -p1 -b .timestamp + +# clang patches pushd tools/clang +%patch1 -p1 -b .add_gcc_ver popd # Encoding fix @@ -224,6 +238,7 @@ popd --disable-assertions \ --enable-debug-runtime \ --enable-jit \ + --enable-libffi \ --enable-shared \ --with-c-include-dirs=%{_includedir}:$(find %{_prefix}/lib/gcc/*/* \ -maxdepth 0 -type d)/include \ @@ -235,7 +250,7 @@ popd # configure does not properly specify libdir sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config -make %{_smp_mflags} \ +make %{_smp_mflags} REQUIRES_RTTI=1 \ %ifarch ppc OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments" %else @@ -243,17 +258,21 @@ make %{_smp_mflags} \ %endif -%check -# no current unexpected failures. Use || true if they recur to force ignore -make check 2>&1 | tee llvm-testlog.txt -(cd tools/clang && make test 2>&1) | tee clang-testlog.txt - - %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} \ PROJ_docsdir=/moredocs +# multilib fixes +mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}} + +pushd %{buildroot}%{_includedir}/llvm/Config +mv config.h config-%{__isa_bits}.h +cp -p %{SOURCE2} config.h +mv llvm-config.h llvm-config-%{__isa_bits}.h +cp -p %{SOURCE3} llvm-config.h +popd + # Create ld.so.conf.d entry mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF @@ -303,7 +322,7 @@ rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.* # FIXME file this bug sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \ - %{buildroot}%{_bindir}/llvm-config + %{buildroot}%{_bindir}/llvm-config-%{__isa_bits} chmod -x %{buildroot}%{_libdir}/%{name}/*.a @@ -312,6 +331,11 @@ chmod -x %{buildroot}%{_libdir}/%{name}/*.a find examples -name 'Makefile' | xargs -0r rm -f +%check +make check +(cd tools/clang && make test) + + %post libs -p /sbin/ldconfig %post -n clang -p /sbin/ldconfig @@ -320,13 +344,32 @@ find examples -name 'Makefile' | xargs -0r rm -f %postun -n clang -p /sbin/ldconfig +%posttrans devel +# link llvm-config to the platform-specific file; +# use ISA bits as priority so that 64-bit is preferred +# over 32-bit if both are installed +alternatives \ + --install \ + %{_bindir}/llvm-config \ + llvm-config \ + %{_bindir}/llvm-config-%{__isa_bits} \ + %{__isa_bits} + +%postun devel +if [ $1 -eq 0 ]; then + alternatives --remove llvm-config \ + %{_bindir}/llvm-config-%{__isa_bits} +fi +exit 0 + + %files %defattr(-,root,root,-) %doc CREDITS.TXT LICENSE.TXT README.txt %{_bindir}/bugpoint %{_bindir}/llc %{_bindir}/lli -%exclude %{_bindir}/llvm-config +%exclude %{_bindir}/llvm-config-%{__isa_bits} %{_bindir}/llvm* %{_bindir}/macho-dump %{_bindir}/opt @@ -336,7 +379,7 @@ find examples -name 'Makefile' | xargs -0r rm -f %files devel %defattr(-,root,root,-) -%{_bindir}/llvm-config +%{_bindir}/llvm-config-%{__isa_bits} %{_includedir}/%{name} %{_includedir}/%{name}-c %{_libdir}/%{name}/*.a @@ -406,6 +449,12 @@ find examples -name 'Makefile' | xargs -0r rm -f %changelog +* Mon Aug 1 2011 Michel Salim - 2.9-1 +- Update to 2.9 +- Depend on libffi to allow the LLVM interpreter to call external functions +- Build with RTTI enabled, needed by e.g. Rubinius (# 722714) +- Fix multilib installation + * Tue May 31 2011 Karsten Hopp 2.9-0.4.rc2 - enable ppc64 build diff --git a/sources b/sources index 0d63527..4dd481e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -006a993829e8f289d0660615a5d6118c llvm-2.9rc2.src.tar.gz -3a48c9dca4bf407d9e9c90d19600fc67 clang-2.9rc2.src.tar.gz +793138412d2af2c7c7f54615f8943771 llvm-2.9.tgz +634de18d04b7a4ded19ec4c17d23cfca clang-2.9.tgz From b3232c702851777270c3ac68ac5b485b7d380ac5 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Tue, 2 Aug 2011 00:03:34 +0200 Subject: [PATCH 13/94] Fix incorrect platform-specific include path on i686 --- llvm.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/llvm.spec b/llvm.spec index 35c9473..1e0e725 100644 --- a/llvm.spec +++ b/llvm.spec @@ -242,9 +242,11 @@ popd --enable-shared \ --with-c-include-dirs=%{_includedir}:$(find %{_prefix}/lib/gcc/*/* \ -maxdepth 0 -type d)/include \ +%if %{__isa_bits} == 64 + --with-cxx-include-32bit-dir=32 \ +%endif --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \ - --with-cxx-include-arch=%{_arch}-%{_vendor}-%{_os} \ - --with-cxx-include-32bit-dir=32 + --with-cxx-include-arch=%{_target_cpu}-%{_vendor}-%{_os} \ # FIXME file this # configure does not properly specify libdir @@ -332,8 +334,10 @@ find examples -name 'Makefile' | xargs -0r rm -f %check -make check -(cd tools/clang && make test) +# the Koji build server does not seem to have enough RAM +# for the default 16 threads +make check LIT_ARGS="-s -v -j8" +make -C tools/clang/test %post libs -p /sbin/ldconfig @@ -453,7 +457,8 @@ exit 0 - Update to 2.9 - Depend on libffi to allow the LLVM interpreter to call external functions - Build with RTTI enabled, needed by e.g. Rubinius (# 722714) -- Fix multilib installation +- Fix multilib installation (# 699416) +- Fix incorrect platform-specific include path on i686 * Tue May 31 2011 Karsten Hopp 2.9-0.4.rc2 - enable ppc64 build From d9bb825c227a2482fa15855cea19b7220ace8a7c Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Wed, 3 Aug 2011 11:34:38 +0200 Subject: [PATCH 14/94] Add runtime dependency of -devel on libffi-devel --- llvm.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 1e0e725..788d23d 100644 --- a/llvm.spec +++ b/llvm.spec @@ -15,7 +15,7 @@ Name: llvm Version: 2.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -63,6 +63,7 @@ functionality. Summary: Libraries and header files for LLVM Group: Development/Languages Requires: %{name} = %{version}-%{release} +Requires: libffi-devel Requires: libstdc++-devel >= 3.4 Provides: llvm-static = %{version}-%{release} @@ -453,6 +454,9 @@ exit 0 %changelog +* Wed Aug 3 2011 Michel Salim - 2.9-2 +- Add runtime dependency of -devel on libffi-devel + * Mon Aug 1 2011 Michel Salim - 2.9-1 - Update to 2.9 - Depend on libffi to allow the LLVM interpreter to call external functions From 30d75c98d61b134a89e76412d5c9f18b1e4890c2 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Wed, 3 Aug 2011 15:41:51 +0200 Subject: [PATCH 15/94] Further restrict the amount of resources used by test suites; hopefully this leads to builds stalling less often --- llvm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 788d23d..db5861c 100644 --- a/llvm.spec +++ b/llvm.spec @@ -337,8 +337,8 @@ find examples -name 'Makefile' | xargs -0r rm -f %check # the Koji build server does not seem to have enough RAM # for the default 16 threads -make check LIT_ARGS="-s -v -j8" -make -C tools/clang/test +make check LIT_ARGS="-v -j4" +make -C tools/clang/test TESTARGS="-v -j4" %post libs -p /sbin/ldconfig From 03709243e80828cbd217914d73473844ca6cfff3 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Sat, 6 Aug 2011 17:06:07 +0200 Subject: [PATCH 16/94] Disable LLVM test suite on ppc64 architecture (# 728604) Disable clang test suite on ppc* architectures (-) --- llvm.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index db5861c..94c2647 100644 --- a/llvm.spec +++ b/llvm.spec @@ -15,7 +15,7 @@ Name: llvm Version: 2.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -337,8 +337,16 @@ find examples -name 'Makefile' | xargs -0r rm -f %check # the Koji build server does not seem to have enough RAM # for the default 16 threads + +# LLVM test suite failing on PPC64 +%ifnarch ppc64 make check LIT_ARGS="-v -j4" +%endif + +# clang test suite failing on PPC +%ifnarch ppc ppc64 make -C tools/clang/test TESTARGS="-v -j4" +%endif %post libs -p /sbin/ldconfig @@ -454,6 +462,10 @@ exit 0 %changelog +* Sat Aug 6 2011 Michel Salim - 2.9-3 +- Disable LLVM test suite on ppc64 architecture (# 728604) +- Disable clang test suite on ppc* architectures (-) + * Wed Aug 3 2011 Michel Salim - 2.9-2 - Add runtime dependency of -devel on libffi-devel From 3946039b0988b4ae0b3f88e5ac7506873ba905db Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Fri, 30 Sep 2011 16:33:35 +0200 Subject: [PATCH 17/94] Apply upstream patch for Operator.h C++0x incompatibility (# 737365) --- llvm-2.9-PR9869_operator_destructor.patch | 74 +++++++++++++++++++++++ llvm.spec | 9 ++- 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 llvm-2.9-PR9869_operator_destructor.patch diff --git a/llvm-2.9-PR9869_operator_destructor.patch b/llvm-2.9-PR9869_operator_destructor.patch new file mode 100644 index 0000000..982d0ea --- /dev/null +++ b/llvm-2.9-PR9869_operator_destructor.patch @@ -0,0 +1,74 @@ +From 6a61834d1c41971f80669a0484f1a0d2d8a1c286 Mon Sep 17 00:00:00 2001 +From: Eli Friedman +Date: Sun, 8 May 2011 01:59:22 +0000 +Subject: [PATCH] PR9869: Add explicit destructor declarations to Operator + subclasses, to allow compiling Operator.h with gcc 4.6 in + C++0x mode. + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131062 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + include/llvm/Operator.h | 34 ++++++++++++++++++++++++++-------- + 1 files changed, 26 insertions(+), 8 deletions(-) + +diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h +index ff2a0ad..e9aa499 100644 +--- a/include/llvm/Operator.h ++++ b/include/llvm/Operator.h +@@ -186,28 +186,46 @@ public: + }; + + class AddOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~AddOperator(); // DO NOT IMPLEMENT ++}; + class SubOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~SubOperator(); // DO NOT IMPLEMENT ++}; + class MulOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~MulOperator(); // DO NOT IMPLEMENT ++}; + class ShlOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~ShlOperator(); // DO NOT IMPLEMENT ++}; + + + class SDivOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~SDivOperator(); // DO NOT IMPLEMENT ++}; + class UDivOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~UDivOperator(); // DO NOT IMPLEMENT ++}; + class AShrOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~AShrOperator(); // DO NOT IMPLEMENT ++}; + class LShrOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~LShrOperator(); // DO NOT IMPLEMENT ++}; + + + + class GEPOperator + : public ConcreteOperator { ++ ~GEPOperator(); // DO NOT IMPLEMENT ++ + enum { + IsInBounds = (1 << 0) + }; +-- +1.7.6.4 + diff --git a/llvm.spec b/llvm.spec index 94c2647..b2ada29 100644 --- a/llvm.spec +++ b/llvm.spec @@ -15,7 +15,7 @@ Name: llvm Version: 2.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -32,6 +32,9 @@ Patch0: llvm-2.6-timestamp.patch # clang link failure if system GCC version is unknown # http://llvm.org/bugs/show_bug.cgi?id=8897 Patch1: clang-2.9-add_gcc_vers.patch +# Operator.h incompatibility with GCC 4.6 in C++0x mode +# http://llvm.org/bugs/show_bug.cgi?id=9869 +Patch2: llvm-2.9-PR9869_operator_destructor.patch BuildRequires: bison BuildRequires: chrpath @@ -214,6 +217,7 @@ mv clang-%{version}%{?prerel} tools/clang # llvm patches %patch0 -p1 -b .timestamp +%patch2 -p2 -b .pr9869_operator_destructor # clang patches pushd tools/clang @@ -462,6 +466,9 @@ exit 0 %changelog +* Fri Sep 30 2011 Michel Salim - 2.9-4 +- Apply upstream patch for Operator.h C++0x incompatibility (# 737365) + * Sat Aug 6 2011 Michel Salim - 2.9-3 - Disable LLVM test suite on ppc64 architecture (# 728604) - Disable clang test suite on ppc* architectures (-) From 82f66d2993e8f6a7984dfc10ba43258c7c63495f Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Fri, 30 Sep 2011 16:42:01 +0200 Subject: [PATCH 18/94] fix typo in patch level --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index b2ada29..e10de08 100644 --- a/llvm.spec +++ b/llvm.spec @@ -217,7 +217,7 @@ mv clang-%{version}%{?prerel} tools/clang # llvm patches %patch0 -p1 -b .timestamp -%patch2 -p2 -b .pr9869_operator_destructor +%patch2 -p1 -b .pr9869_operator_destructor # clang patches pushd tools/clang From 18499e0ccfced4b12711b83cafd669dd8b4b4c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 11 Oct 2011 13:35:38 +0200 Subject: [PATCH 19/94] don't fail the build on failing tests on ppc(64) and s390(x) --- llvm.spec | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/llvm.spec b/llvm.spec index e10de08..8ee1160 100644 --- a/llvm.spec +++ b/llvm.spec @@ -15,7 +15,7 @@ Name: llvm Version: 2.9 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -342,14 +342,20 @@ find examples -name 'Makefile' | xargs -0r rm -f # the Koji build server does not seem to have enough RAM # for the default 16 threads -# LLVM test suite failing on PPC64 -%ifnarch ppc64 -make check LIT_ARGS="-v -j4" +# LLVM test suite failing on PPC64 and s390(x) +make check LIT_ARGS="-v -j4" \ +%ifarch ppc64 s390 s390x + || : +%else + %{nil} %endif -# clang test suite failing on PPC -%ifnarch ppc ppc64 -make -C tools/clang/test TESTARGS="-v -j4" +# clang test suite failing on PPC and s390(x) +make -C tools/clang/test TESTARGS="-v -j4" \ +%ifarch ppc ppc64 s390 s390x + || : +%else + %{nil} %endif @@ -466,6 +472,9 @@ exit 0 %changelog +* Tue Oct 11 2011 Dan Horák - 2.9-5 +- don't fail the build on failing tests on ppc(64) and s390(x) + * Fri Sep 30 2011 Michel Salim - 2.9-4 - Apply upstream patch for Operator.h C++0x incompatibility (# 737365) From 9ff19058fe57f17611b53d028b5251080acc7ec7 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Fri, 11 Nov 2011 18:59:32 +0100 Subject: [PATCH 20/94] Update to 3.0rc3 --- .gitignore | 4 ++-- llvm.spec | 58 +++++++++++++++++++++++++++++++----------------------- sources | 4 ++-- 3 files changed, 37 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index b586424..abd1462 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/llvm-2.9.tgz -/clang-2.9.tgz +/llvm-3.0rc3.src.tar.gz +/clang-3.0rc3.src.tar.gz diff --git a/llvm.spec b/llvm.spec index 8ee1160..714d9f8 100644 --- a/llvm.spec +++ b/llvm.spec @@ -10,19 +10,19 @@ %bcond_without ocaml %endif -#global prerel -%global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version} +%global prerel rc3 +%global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} Name: llvm -Version: 2.9 -Release: 5%{?dist} +Version: 3.0 +Release: 0.1.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages License: NCSA URL: http://llvm.org/ -Source0: %{downloadurl}/llvm-%{version}%{?prerel}.tgz -Source1: %{downloadurl}/clang-%{version}%{?prerel}.tgz +Source0: %{downloadurl}/llvm-%{version}%{?prerel}.src.tar.gz +Source1: %{downloadurl}/clang-%{version}%{?prerel}.src.tar.gz # multilib fixes Source2: llvm-Config-config.h Source3: llvm-Config-llvm-config.h @@ -34,7 +34,7 @@ Patch0: llvm-2.6-timestamp.patch Patch1: clang-2.9-add_gcc_vers.patch # Operator.h incompatibility with GCC 4.6 in C++0x mode # http://llvm.org/bugs/show_bug.cgi?id=9869 -Patch2: llvm-2.9-PR9869_operator_destructor.patch +#Patch2: llvm-2.9-PR9869_operator_destructor.patch BuildRequires: bison BuildRequires: chrpath @@ -212,17 +212,18 @@ HTML documentation for LLVM's OCaml binding. %prep -%setup -q -n llvm-%{version}%{?prerel} -a1 %{?_with_gcc:-a2} -mv clang-%{version}%{?prerel} tools/clang +%setup -q -n llvm-%{version}%{?prerel:%{prerel}.src} -a1 %{?_with_gcc:-a2} +rm tools/clang +mv clang-%{version}%{?prerel:%{prerel}.src} tools/clang # llvm patches %patch0 -p1 -b .timestamp -%patch2 -p1 -b .pr9869_operator_destructor +#patch2 -p1 -b .pr9869_operator_destructor # clang patches -pushd tools/clang -%patch1 -p1 -b .add_gcc_ver -popd +#pushd tools/clang +#patch1 -p1 -b .add_gcc_ver +#popd # Encoding fix #(cd tools/clang/docs && \ @@ -244,14 +245,14 @@ popd --enable-debug-runtime \ --enable-jit \ --enable-libffi \ - --enable-shared \ - --with-c-include-dirs=%{_includedir}:$(find %{_prefix}/lib/gcc/*/* \ - -maxdepth 0 -type d)/include \ -%if %{__isa_bits} == 64 - --with-cxx-include-32bit-dir=32 \ -%endif - --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \ - --with-cxx-include-arch=%{_target_cpu}-%{_vendor}-%{_os} \ + --enable-shared +# --with-c-include-dirs=%{_includedir}:$(find %{_prefix}/lib/gcc/*/* \ +# -maxdepth 0 -type d)/include \ +#%if %{__isa_bits} == 64 +# --with-cxx-include-32bit-dir=32 \ +#%endif +# --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \ +# --with-cxx-include-arch=%{_target_cpu}-%{_vendor}-%{_os} \ # FIXME file this # configure does not properly specify libdir @@ -267,6 +268,11 @@ make %{_smp_mflags} REQUIRES_RTTI=1 \ %install rm -rf %{buildroot} +# workaround for http://llvm.org/bugs/show_bug.cgi?id=11177 +%if %{with ocaml} +cp -p bindings/ocaml/llvm/META.llvm bindings/ocaml/llvm/Release/ +%endif + make install DESTDIR=%{buildroot} \ PROJ_docsdir=/moredocs @@ -313,7 +319,7 @@ mv tools/clang/docs/doxygen/html clang-apidoc # And prepare Clang documentation # mkdir clang-docs -for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do +for f in LICENSE.TXT NOTES.txt README.txt; do # TODO.txt; do ln tools/clang/$f clang-docs/ done rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools} @@ -397,7 +403,6 @@ exit 0 %{_bindir}/macho-dump %{_bindir}/opt %exclude %{_mandir}/man1/clang.1.* -%exclude %{_mandir}/man1/llvmg??.1.* %doc %{_mandir}/man1/*.1.* %files devel @@ -418,8 +423,7 @@ exit 0 %defattr(-,root,root,-) %doc clang-docs/* %{_bindir}/clang* -#%{_bindir}/c-index-test -%{_bindir}/tblgen +%{_bindir}/c-index-test %{_libdir}/%{name}/libclang.so %{_prefix}/lib/clang %doc %{_mandir}/man1/clang.1.* @@ -448,6 +452,7 @@ exit 0 %defattr(-,root,root,-) %{_libdir}/ocaml/*.cma %{_libdir}/ocaml/*.cmi +%{_libdir}/ocaml/META.llvm %files ocaml-devel %defattr(-,root,root,-) @@ -472,6 +477,9 @@ exit 0 %changelog +* Fri Nov 11 2011 Michel Salim - 3.0-0.1.rc3 +- Update to 3.0rc3 + * Tue Oct 11 2011 Dan Horák - 2.9-5 - don't fail the build on failing tests on ppc(64) and s390(x) diff --git a/sources b/sources index 4dd481e..30cb80a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -793138412d2af2c7c7f54615f8943771 llvm-2.9.tgz -634de18d04b7a4ded19ec4c17d23cfca clang-2.9.tgz +848c521eb79e9d5653abc74649b3ae46 llvm-3.0rc3.src.tar.gz +89d9eb575c7f50a7041a7ef40e565d8b clang-3.0rc3.src.tar.gz From 194b08ba83a9f105e5fe32a3ca5e0a47006c7416 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 5 Dec 2011 17:44:54 -0500 Subject: [PATCH 21/94] RHEL customization: disable clang, --enable-targets=host --- llvm.spec | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/llvm.spec b/llvm.spec index 714d9f8..76c6e8e 100644 --- a/llvm.spec +++ b/llvm.spec @@ -10,12 +10,18 @@ %bcond_without ocaml %endif +%if 0%{?rhel} >= 7 +%global with_clang 0 +%else +%global with_clang 1 +%endif + %global prerel rc3 %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} Name: llvm Version: 3.0 -Release: 0.1.%{prerel}%{?dist} +Release: 0.2.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -99,6 +105,7 @@ Group: System Environment/Libraries Shared libraries for the LLVM compiler infrastructure. +%if %{with_clang} %package -n clang Summary: A C language family front-end for LLVM License: NCSA @@ -151,6 +158,7 @@ Requires: %{name} = %{version}-%{release} %description -n clang-doc Documentation for the Clang compiler front-end. +%endif %if 0%{?_with_doxygen} @@ -165,6 +173,7 @@ Requires: %{name}-doc = %{version}-%{release} API documentation for the LLVM compiler infrastructure. +%if %{with_clang} %package -n clang-apidoc Summary: API documentation for Clang Group: Development/Languages @@ -175,6 +184,7 @@ Requires: clang-doc = %{version}-%{release} %description -n clang-apidoc API documentation for the Clang compiler. %endif +%endif %if %{with ocaml} @@ -212,9 +222,11 @@ HTML documentation for LLVM's OCaml binding. %prep -%setup -q -n llvm-%{version}%{?prerel:%{prerel}.src} -a1 %{?_with_gcc:-a2} -rm tools/clang +%setup -q -n llvm-%{version}%{?prerel:%{prerel}.src} %{?with_clang:-a1} %{?_with_gcc:-a2} +rm -r -f tools/clang +%if %{with_clang} mv clang-%{version}%{?prerel:%{prerel}.src} tools/clang +%endif # llvm patches %patch0 -p1 -b .timestamp @@ -240,6 +252,9 @@ mv clang-%{version}%{?prerel:%{prerel}.src} tools/clang --datadir=%{_libdir}/%{name} \ %if 0%{?_with_doxygen} --enable-doxygen \ +%endif +%if 0%{?rhel} >= 7 + --enable-targets=host \ %endif --disable-assertions \ --enable-debug-runtime \ @@ -292,6 +307,7 @@ cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF %{_libdir}/llvm EOF +%if %{with_clang} # Static analyzer not installed by default: # http://clang-analyzer.llvm.org/installation#OtherPlatforms mkdir -p %{buildroot}%{_libdir}/clang-analyzer @@ -302,7 +318,7 @@ done (cd tools/clang/tools && cp -pr scan-{build,view} \ %{buildroot}%{_libdir}/clang-analyzer/) - +%endif # Move documentation back to build directory # @@ -318,11 +334,13 @@ mv tools/clang/docs/doxygen/html clang-apidoc # And prepare Clang documentation # +%if %{with_clang} mkdir clang-docs for f in LICENSE.TXT NOTES.txt README.txt; do # TODO.txt; do ln tools/clang/$f clang-docs/ done rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools} +%endif #find %%{buildroot} -name .dir -print0 | xargs -0r rm -f @@ -356,6 +374,7 @@ make check LIT_ARGS="-v -j4" \ %{nil} %endif +%if %{with_clang} # clang test suite failing on PPC and s390(x) make -C tools/clang/test TESTARGS="-v -j4" \ %ifarch ppc ppc64 s390 s390x @@ -363,14 +382,16 @@ make -C tools/clang/test TESTARGS="-v -j4" \ %else %{nil} %endif +%endif %post libs -p /sbin/ldconfig -%post -n clang -p /sbin/ldconfig - - %postun libs -p /sbin/ldconfig + +%if %{with_clang} +%post -n clang -p /sbin/ldconfig %postun -n clang -p /sbin/ldconfig +%endif %posttrans devel @@ -402,7 +423,9 @@ exit 0 %{_bindir}/llvm* %{_bindir}/macho-dump %{_bindir}/opt +%if %{with_clang} %exclude %{_mandir}/man1/clang.1.* +%endif %doc %{_mandir}/man1/*.1.* %files devel @@ -416,9 +439,12 @@ exit 0 %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf %dir %{_libdir}/%{name} +%if %{with_clang} %exclude %{_libdir}/%{name}/libclang.so +%endif %{_libdir}/%{name}/*.so +%if %{with_clang} %files -n clang %defattr(-,root,root,-) %doc clang-docs/* @@ -442,6 +468,7 @@ exit 0 %files -n clang-doc %defattr(-,root,root,-) %doc tools/clang/docs/* +%endif %files doc %defattr(-,root,root,-) @@ -470,13 +497,17 @@ exit 0 %defattr(-,root,root,-) %doc apidoc/* +%if %{with_clang} %files -n clang-apidoc %defattr(-,root,root,-) %doc clang-apidoc/* %endif - +%endif %changelog +* Mon Dec 05 2011 Adam Jackson 3.0-0.2.rc3 +- RHEL customization: disable clang, --enable-targets=host + * Fri Nov 11 2011 Michel Salim - 3.0-0.1.rc3 - Update to 3.0rc3 From e69facf843ff6fcdd511d216b4f08657fbe19cb1 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Sun, 11 Dec 2011 11:44:19 +0100 Subject: [PATCH 22/94] Update to final 3.0 release --- .gitignore | 4 ++-- llvm.spec | 15 +++++++++------ sources | 4 ++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index abd1462..7b41d05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/llvm-3.0rc3.src.tar.gz -/clang-3.0rc3.src.tar.gz +/llvm-3.0.tar.gz +/clang-3.0.tar.gz diff --git a/llvm.spec b/llvm.spec index 76c6e8e..e780ca1 100644 --- a/llvm.spec +++ b/llvm.spec @@ -16,19 +16,19 @@ %global with_clang 1 %endif -%global prerel rc3 +#global prerel rcX %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} Name: llvm Version: 3.0 -Release: 0.2.%{prerel}%{?dist} +Release: 1%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages License: NCSA URL: http://llvm.org/ -Source0: %{downloadurl}/llvm-%{version}%{?prerel}.src.tar.gz -Source1: %{downloadurl}/clang-%{version}%{?prerel}.src.tar.gz +Source0: %{downloadurl}/llvm-%{version}%{?prerel:%{prerel}.src}.tar.gz +Source1: %{downloadurl}/clang-%{version}%{?prerel:%{prerel}.src}.tar.gz # multilib fixes Source2: llvm-Config-config.h Source3: llvm-Config-llvm-config.h @@ -222,10 +222,10 @@ HTML documentation for LLVM's OCaml binding. %prep -%setup -q -n llvm-%{version}%{?prerel:%{prerel}.src} %{?with_clang:-a1} %{?_with_gcc:-a2} +%setup -q -n llvm-%{version}%{?prerel}.src %{?with_clang:-a1} %{?_with_gcc:-a2} rm -r -f tools/clang %if %{with_clang} -mv clang-%{version}%{?prerel:%{prerel}.src} tools/clang +mv clang-%{version}%{?prerel}.src tools/clang %endif # llvm patches @@ -505,6 +505,9 @@ exit 0 %endif %changelog +* Sun Dec 11 2011 Michel Salim - 3.0-1 +- Update to final 3.0 release + * Mon Dec 05 2011 Adam Jackson 3.0-0.2.rc3 - RHEL customization: disable clang, --enable-targets=host diff --git a/sources b/sources index 30cb80a..9e1349c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -848c521eb79e9d5653abc74649b3ae46 llvm-3.0rc3.src.tar.gz -89d9eb575c7f50a7041a7ef40e565d8b clang-3.0rc3.src.tar.gz +a8e5f5f1c1adebae7b4a654c376a6005 llvm-3.0.tar.gz +43350706ae6cf05d0068885792ea0591 clang-3.0.tar.gz From 2fb04f7706ad7bdb90976b376077931a56a30698 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 13 Dec 2011 14:34:14 -0500 Subject: [PATCH 23/94] ExcludeArch: s390* in RHEL since the native backend has disappeared in 3.0 --- llvm.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index e780ca1..f7ad936 100644 --- a/llvm.spec +++ b/llvm.spec @@ -12,6 +12,7 @@ %if 0%{?rhel} >= 7 %global with_clang 0 +ExcludeArch: s390 s390x %else %global with_clang 1 %endif @@ -21,7 +22,7 @@ Name: llvm Version: 3.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -505,6 +506,9 @@ exit 0 %endif %changelog +* Tue Dec 13 2011 Adam Jackson 3.0-2 +- ExcludeArch: s390* in RHEL since the native backend has disappeared in 3.0 + * Sun Dec 11 2011 Michel Salim - 3.0-1 - Update to final 3.0 release From 3bc08724120e7b4dcd07957f3f94927777b9f957 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 14 Dec 2011 12:52:23 -0500 Subject: [PATCH 24/94] Also ExcludeArch: ppc* in RHEL --- llvm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index f7ad936..b7e105f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -12,7 +12,7 @@ %if 0%{?rhel} >= 7 %global with_clang 0 -ExcludeArch: s390 s390x +ExcludeArch: s390 s390x ppc ppc64 %else %global with_clang 1 %endif @@ -22,7 +22,7 @@ ExcludeArch: s390 s390x Name: llvm Version: 3.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -506,6 +506,9 @@ exit 0 %endif %changelog +* Wed Dec 14 2011 Adam Jackson 3.0-3 +- Also ExcludeArch: ppc* in RHEL + * Tue Dec 13 2011 Adam Jackson 3.0-2 - ExcludeArch: s390* in RHEL since the native backend has disappeared in 3.0 From 1c3272606c6c329896c8c45204564b97838caafb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 7 Jan 2012 18:05:03 +0000 Subject: [PATCH 25/94] Rebuild for OCaml 3.12.1. --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index b7e105f..cbf524d 100644 --- a/llvm.spec +++ b/llvm.spec @@ -22,7 +22,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -506,6 +506,9 @@ exit 0 %endif %changelog +* Sat Jan 07 2012 Richard W.M. Jones - 3.0-4 +- Rebuild for OCaml 3.12.1. + * Wed Dec 14 2011 Adam Jackson 3.0-3 - Also ExcludeArch: ppc* in RHEL From cfc53b6ee2794bfacfc41670d49af046427544a1 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Sun, 5 Feb 2012 18:30:43 +0100 Subject: [PATCH 26/94] Clang test suite yields unexpected failures with GCC 4.7.0. Make this non-fatal and save the results - Multilib fix for harcoded ld search path in ./configure script --- llvm.spec | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/llvm.spec b/llvm.spec index cbf524d..79a22b4 100644 --- a/llvm.spec +++ b/llvm.spec @@ -22,7 +22,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -53,6 +53,7 @@ BuildRequires: libtool-ltdl-devel %if %{with ocaml} BuildRequires: ocaml-ocamldoc %endif +BuildRequires: zip # for DejaGNU test suite BuildRequires: dejagnu tcl-devel python # for doxygen documentation @@ -238,10 +239,10 @@ mv clang-%{version}%{?prerel}.src tools/clang #patch1 -p1 -b .add_gcc_ver #popd -# Encoding fix -#(cd tools/clang/docs && \ -# iconv -f ISO88591 -t UTF8 BlockImplementation.txt \ -# -o BlockImplementation.txt) +# fix ld search path +# TODO: remove /%{_lib} after usrmove migration is final +sed -i 's|/lib /usr/lib $lt_ld_extra|/%{_lib} %{_libdir} $lt_ld_extra|' \ + ./configure %build @@ -250,7 +251,6 @@ mv clang-%{version}%{?prerel}.src tools/clang %configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/%{name} \ - --datadir=%{_libdir}/%{name} \ %if 0%{?_with_doxygen} --enable-doxygen \ %endif @@ -262,19 +262,12 @@ mv clang-%{version}%{?prerel}.src tools/clang --enable-jit \ --enable-libffi \ --enable-shared -# --with-c-include-dirs=%{_includedir}:$(find %{_prefix}/lib/gcc/*/* \ -# -maxdepth 0 -type d)/include \ -#%if %{__isa_bits} == 64 -# --with-cxx-include-32bit-dir=32 \ -#%endif -# --with-cxx-include-root=$(find %{_includedir}/c++/* -maxdepth 0 -type d) \ -# --with-cxx-include-arch=%{_target_cpu}-%{_vendor}-%{_os} \ # FIXME file this # configure does not properly specify libdir sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config -make %{_smp_mflags} REQUIRES_RTTI=1 \ +make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %ifarch ppc OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments" %else @@ -377,12 +370,16 @@ make check LIT_ARGS="-v -j4" \ %if %{with_clang} # clang test suite failing on PPC and s390(x) +# FIXME: +# unexpected failures on all platforms with GCC 4.7.0. +# capture logs make -C tools/clang/test TESTARGS="-v -j4" \ -%ifarch ppc ppc64 s390 s390x - || : -%else - %{nil} -%endif + | tee clang-testlog.txt +#ifarch ppc ppc64 s390 s390x +# || : +#else +# %{nil} +#endif %endif @@ -448,7 +445,7 @@ exit 0 %if %{with_clang} %files -n clang %defattr(-,root,root,-) -%doc clang-docs/* +%doc clang-docs/* clang-testlog.txt %{_bindir}/clang* %{_bindir}/c-index-test %{_libdir}/%{name}/libclang.so @@ -506,6 +503,11 @@ exit 0 %endif %changelog +* Sun Feb 5 2012 Michel Salim - 3.0-5 +- Clang test suite yields unexpected failures with GCC 4.7.0. Make + this non-fatal and save the results +- Multilib fix for harcoded ld search path in ./configure script + * Sat Jan 07 2012 Richard W.M. Jones - 3.0-4 - Rebuild for OCaml 3.12.1. From fc6bd59279ea3fd45582087bd0ecef2c793b0a9a Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Sun, 5 Feb 2012 20:21:07 +0100 Subject: [PATCH 27/94] Remove Ocaml workaround; fixed before 3.0 final --- llvm.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/llvm.spec b/llvm.spec index 79a22b4..d638038 100644 --- a/llvm.spec +++ b/llvm.spec @@ -277,10 +277,6 @@ make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %install rm -rf %{buildroot} -# workaround for http://llvm.org/bugs/show_bug.cgi?id=11177 -%if %{with ocaml} -cp -p bindings/ocaml/llvm/META.llvm bindings/ocaml/llvm/Release/ -%endif make install DESTDIR=%{buildroot} \ PROJ_docsdir=/moredocs From 420ce4302c094febeb6324413a052c1defad9fe1 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Tue, 7 Feb 2012 03:00:49 +0100 Subject: [PATCH 28/94] Make subpackage dependencies arch-specific - Make LLVM test failures non-fatal on ARM architectures as well (# 770208) - Save LLVM test log on platforms where it fails --- llvm.spec | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/llvm.spec b/llvm.spec index d638038..bebd9c9 100644 --- a/llvm.spec +++ b/llvm.spec @@ -22,7 +22,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -60,7 +60,7 @@ BuildRequires: dejagnu tcl-devel python %if 0%{?_with_doxygen} BuildRequires: doxygen graphviz %endif -Requires: llvm-libs = %{version}-%{release} +Requires: llvm-libs%{?_isa} = %{version}-%{release} %description LLVM is a compiler infrastructure designed for compile-time, @@ -73,7 +73,7 @@ functionality. %package devel Summary: Libraries and header files for LLVM Group: Development/Languages -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libffi-devel Requires: libstdc++-devel >= 3.4 Provides: llvm-static = %{version}-%{release} @@ -112,7 +112,7 @@ Shared libraries for the LLVM compiler infrastructure. Summary: A C language family front-end for LLVM License: NCSA Group: Development/Languages -Requires: llvm = %{version}-%{release} +Requires: llvm%{?_isa} = %{version}-%{release} # clang requires gcc; clang++ gcc-c++ Requires: gcc-c++ @@ -130,7 +130,7 @@ as libraries and designed to be loosely-coupled and extensible. %package -n clang-devel Summary: Header files for clang Group: Development/Languages -Requires: clang = %{version}-%{release} +Requires: clang%{?_isa} = %{version}-%{release} %description -n clang-devel This package contains header files for the Clang compiler. @@ -140,7 +140,7 @@ This package contains header files for the Clang compiler. Summary: A source code analysis framework License: NCSA Group: Development/Languages -Requires: clang = %{version}-%{release} +Requires: clang%{?_isa} = %{version}-%{release} # not picked up automatically since files are currently not instaled # in standard Python hierarchies yet Requires: python @@ -193,7 +193,7 @@ API documentation for the Clang compiler. %package ocaml Summary: OCaml binding for LLVM Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: ocaml-runtime %description ocaml @@ -203,8 +203,8 @@ OCaml binding for LLVM. %package ocaml-devel Summary: Development files for %{name}-ocaml Group: Development/Libraries -Requires: %{name}-devel = %{version}-%{release} -Requires: %{name}-ocaml = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Requires: %{name}-ocaml%{?_isa} = %{version}-%{release} Requires: ocaml %description ocaml-devel @@ -356,10 +356,10 @@ find examples -name 'Makefile' | xargs -0r rm -f # the Koji build server does not seem to have enough RAM # for the default 16 threads -# LLVM test suite failing on PPC64 and s390(x) +# LLVM test suite failing on ARM, PPC64 and s390(x) make check LIT_ARGS="-v -j4" \ -%ifarch ppc64 s390 s390x - || : +%ifarch %{arm} ppc64 s390 s390x + | tee llvm-testlog-%{_arch}.txt %else %{nil} %endif @@ -370,7 +370,7 @@ make check LIT_ARGS="-v -j4" \ # unexpected failures on all platforms with GCC 4.7.0. # capture logs make -C tools/clang/test TESTARGS="-v -j4" \ - | tee clang-testlog.txt + | tee clang-testlog-%{_arch}.txt #ifarch ppc ppc64 s390 s390x # || : #else @@ -410,6 +410,9 @@ exit 0 %files %defattr(-,root,root,-) %doc CREDITS.TXT LICENSE.TXT README.txt +%ifarch %{arm} ppc64 s390 s390x +%doc llvm-testlog-%{_arch}.txt +%endif %{_bindir}/bugpoint %{_bindir}/llc %{_bindir}/lli @@ -441,7 +444,7 @@ exit 0 %if %{with_clang} %files -n clang %defattr(-,root,root,-) -%doc clang-docs/* clang-testlog.txt +%doc clang-docs/* clang-testlog-%{_arch}.txt %{_bindir}/clang* %{_bindir}/c-index-test %{_libdir}/%{name}/libclang.so @@ -499,6 +502,11 @@ exit 0 %endif %changelog +* Tue Feb 7 2012 Michel Salim - 3.0-6 +- Make subpackage dependencies arch-specific +- Make LLVM test failures non-fatal on ARM architectures as well (# 770208) +- Save LLVM test log on platforms where it fails + * Sun Feb 5 2012 Michel Salim - 3.0-5 - Clang test suite yields unexpected failures with GCC 4.7.0. Make this non-fatal and save the results From 5f9e49a54620616d13651d32d8a94b9152d33f51 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Tue, 7 Feb 2012 09:40:34 +0100 Subject: [PATCH 29/94] Restore Ocaml workaround; fix was not actually in 3.0 (must have gone in to trunk instead of the 3.0 branch) --- llvm.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm.spec b/llvm.spec index bebd9c9..2a56225 100644 --- a/llvm.spec +++ b/llvm.spec @@ -277,6 +277,10 @@ make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %install rm -rf %{buildroot} +# workaround for http://llvm.org/bugs/show_bug.cgi?id=11177 +%if %{with ocaml} +cp -p bindings/ocaml/llvm/META.llvm bindings/ocaml/llvm/Release/ +%endif make install DESTDIR=%{buildroot} \ PROJ_docsdir=/moredocs From 0b697ba2ef7a32ef26fc8f682a8d0104ffc63a1f Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Fri, 24 Feb 2012 10:59:11 +0100 Subject: [PATCH 30/94] Build LLVMgold plugin on supported architectures --- llvm.spec | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 2a56225..ddaef91 100644 --- a/llvm.spec +++ b/llvm.spec @@ -20,9 +20,18 @@ ExcludeArch: s390 s390x ppc ppc64 #global prerel rcX %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} +# gold linker support +# arch list from binutils spec +%global gold_arches %ix86 x86_64 +%ifarch %gold_arches +%bcond_with gold +%else +%bcond_without gold +%endif + Name: llvm Version: 3.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -50,6 +59,9 @@ BuildRequires: gcc-c++ >= 3.4 BuildRequires: groff BuildRequires: libffi-devel BuildRequires: libtool-ltdl-devel +%if %{with gold} +BuildRequires: binutils-devel +%endif %if %{with ocaml} BuildRequires: ocaml-ocamldoc %endif @@ -247,13 +259,15 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|/%{_lib} %{_libdir} $lt_ld_extra|' \ %build # Disabling assertions now, rec. by pure and needed for OpenGTL -# TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801 %configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/%{name} \ %if 0%{?_with_doxygen} --enable-doxygen \ %endif +%if %{with gold} + --with-binutils-include=%{_includedir} \ +%endif %if 0%{?rhel} >= 7 --enable-targets=host \ %endif @@ -506,6 +520,9 @@ exit 0 %endif %changelog +* Fri Feb 24 2012 Michel Salim - 3.0-7 +- Build LLVMgold plugin on supported architectures + * Tue Feb 7 2012 Michel Salim - 3.0-6 - Make subpackage dependencies arch-specific - Make LLVM test failures non-fatal on ARM architectures as well (# 770208) From 0e3ec48b46a6dab0eb790ac144b002bfaa0d4096 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Fri, 24 Feb 2012 12:37:47 +0100 Subject: [PATCH 31/94] actually enable by default, not disable, Gold linker support on supported arch --- llvm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index ddaef91..3c2fac4 100644 --- a/llvm.spec +++ b/llvm.spec @@ -24,9 +24,9 @@ ExcludeArch: s390 s390x ppc ppc64 # arch list from binutils spec %global gold_arches %ix86 x86_64 %ifarch %gold_arches -%bcond_with gold -%else %bcond_without gold +%else +%bcond_with gold %endif Name: llvm From db8da8feee894d58dbf49a0d4dc1974f39e8e501 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Sat, 25 Feb 2012 09:41:59 +0100 Subject: [PATCH 32/94] Apply upstream patch to properly link LLVMgold against LTO --- llvm-3.0-link_llvmgold_to_lto.patch | 10 ++++++++++ llvm.spec | 16 +++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 llvm-3.0-link_llvmgold_to_lto.patch diff --git a/llvm-3.0-link_llvmgold_to_lto.patch b/llvm-3.0-link_llvmgold_to_lto.patch new file mode 100644 index 0000000..030f356 --- /dev/null +++ b/llvm-3.0-link_llvmgold_to_lto.patch @@ -0,0 +1,10 @@ +--- llvm-3.0.src/tools/gold/Makefile.link_llvmgold_to_lto 2011-05-31 22:00:45.000000000 +0200 ++++ llvm-3.0.src/tools/gold/Makefile 2012-02-25 09:40:01.889923932 +0100 +@@ -26,6 +26,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/llvm.spec b/llvm.spec index 3c2fac4..415f77c 100644 --- a/llvm.spec +++ b/llvm.spec @@ -31,7 +31,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -43,14 +43,17 @@ Source1: %{downloadurl}/clang-%{version}%{?prerel:%{prerel}.src}.tar.gz Source2: llvm-Config-config.h Source3: llvm-Config-llvm-config.h + # Data files should be installed with timestamps preserved Patch0: llvm-2.6-timestamp.patch # clang link failure if system GCC version is unknown # http://llvm.org/bugs/show_bug.cgi?id=8897 Patch1: clang-2.9-add_gcc_vers.patch -# Operator.h incompatibility with GCC 4.6 in C++0x mode -# http://llvm.org/bugs/show_bug.cgi?id=9869 -#Patch2: llvm-2.9-PR9869_operator_destructor.patch +# LLVMgold should link against LTO as a normal library +# http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-November/045433.html +# patch is applied upstream, but has to be rewritten due to post-3.0 +# Makefile clean-ups +Patch2: llvm-3.0-link_llvmgold_to_lto.patch BuildRequires: bison BuildRequires: chrpath @@ -244,7 +247,7 @@ mv clang-%{version}%{?prerel}.src tools/clang # llvm patches %patch0 -p1 -b .timestamp -#patch2 -p1 -b .pr9869_operator_destructor +%patch2 -p1 -b .link_llvmgold_to_lto # clang patches #pushd tools/clang @@ -520,6 +523,9 @@ exit 0 %endif %changelog +* Sat Feb 25 2012 Michel Salim - 3.0-8 +- Apply upstream patch to properly link LLVMgold against LTO + * Fri Feb 24 2012 Michel Salim - 3.0-7 - Build LLVMgold plugin on supported architectures From 8fe0322526d50eb11787782a1949b84e377f0891 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Sat, 17 Mar 2012 22:36:00 +0100 Subject: [PATCH 33/94] undefine PPC on ppc as a temporary workaround for RHBZ#769803 and http://llvm.org/bugs/show_bug.cgi?id=10969 --- llvm.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 415f77c..a02c218 100644 --- a/llvm.spec +++ b/llvm.spec @@ -31,7 +31,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -286,7 +286,7 @@ sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %ifarch ppc - OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments" + OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments -UPPC" %else OPTIMIZE_OPTION="%{optflags}" %endif @@ -523,6 +523,11 @@ exit 0 %endif %changelog +* Sat Mar 17 2012 Karsten Hopp 3.0-9 +- undefine PPC on ppc as a temporary workaround for + http://llvm.org/bugs/show_bug.cgi?id=10969 and + RHBZ#769803 + * Sat Feb 25 2012 Michel Salim - 3.0-8 - Apply upstream patch to properly link LLVMgold against LTO From 9dca0ca4bc2eaa3a7044c6eb374cca59fba80092 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 26 Mar 2012 20:00:45 +0300 Subject: [PATCH 34/94] Build without -ftree-pre as a workaround for clang segfaulting on x86_64 https://bugzilla.redhat.com/show_bug.cgi?id=791365 --- llvm.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index a02c218..e858e01 100644 --- a/llvm.spec +++ b/llvm.spec @@ -31,7 +31,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -261,6 +261,10 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|/%{_lib} %{_libdir} $lt_ld_extra|' \ %build +# Build without -ftree-pre as a workaround for clang segfaulting on x86_64. +# https://bugzilla.redhat.com/show_bug.cgi?id=791365 +%global optflags %(echo %{optflags} | sed 's/-O2 /-O2 -fno-tree-pre /') + # Disabling assertions now, rec. by pure and needed for OpenGTL %configure \ --prefix=%{_prefix} \ @@ -523,6 +527,10 @@ exit 0 %endif %changelog +* Mon Mar 26 2012 Kalev Lember - 3.0-10 +- Build without -ftree-pre as a workaround for clang segfaulting + on x86_64 (#791365) + * Sat Mar 17 2012 Karsten Hopp 3.0-9 - undefine PPC on ppc as a temporary workaround for http://llvm.org/bugs/show_bug.cgi?id=10969 and From de5c3ae498545299f4428f9881a9f62bcbed8972 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Fri, 30 Mar 2012 16:58:41 +0700 Subject: [PATCH 35/94] Replace overly-broad dependency on gcc-c++ with gcc and libstdc++-devel - Pin clang's dependency on libstdc++-devel to the version used for building - Standardize on bcond for conditional build options - Remove /lib from search path, everything is now in /usr/lib* - Remove obsoleted patches --- clang-2.9-add_gcc_vers.patch | 12 ---- llvm-2.9-PR9869_operator_destructor.patch | 74 ----------------------- llvm.spec | 67 +++++++++++--------- 3 files changed, 37 insertions(+), 116 deletions(-) delete mode 100644 clang-2.9-add_gcc_vers.patch delete mode 100644 llvm-2.9-PR9869_operator_destructor.patch diff --git a/clang-2.9-add_gcc_vers.patch b/clang-2.9-add_gcc_vers.patch deleted file mode 100644 index 03afe49..0000000 --- a/clang-2.9-add_gcc_vers.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- clang-2.9/lib/Driver/ToolChains.cpp.add_gcc_vers 2011-03-21 22:29:27.000000000 +0100 -+++ clang-2.9/lib/Driver/ToolChains.cpp 2011-08-01 18:20:29.504194241 +0200 -@@ -1449,7 +1449,8 @@ - GccTriple = "i586-suse-linux"; - } - -- const char* GccVersions[] = {"4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4", -+ const char* GccVersions[] = {"4.6.1", "4.6.0", -+ "4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4", - "4.4.3", "4.4", "4.3.4", "4.3.3", "4.3.2", - "4.3", "4.2.4", "4.2.3", "4.2.2", "4.2.1", - "4.2"}; diff --git a/llvm-2.9-PR9869_operator_destructor.patch b/llvm-2.9-PR9869_operator_destructor.patch deleted file mode 100644 index 982d0ea..0000000 --- a/llvm-2.9-PR9869_operator_destructor.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 6a61834d1c41971f80669a0484f1a0d2d8a1c286 Mon Sep 17 00:00:00 2001 -From: Eli Friedman -Date: Sun, 8 May 2011 01:59:22 +0000 -Subject: [PATCH] PR9869: Add explicit destructor declarations to Operator - subclasses, to allow compiling Operator.h with gcc 4.6 in - C++0x mode. - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131062 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - include/llvm/Operator.h | 34 ++++++++++++++++++++++++++-------- - 1 files changed, 26 insertions(+), 8 deletions(-) - -diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h -index ff2a0ad..e9aa499 100644 ---- a/include/llvm/Operator.h -+++ b/include/llvm/Operator.h -@@ -186,28 +186,46 @@ public: - }; - - class AddOperator -- : public ConcreteOperator {}; -+ : public ConcreteOperator { -+ ~AddOperator(); // DO NOT IMPLEMENT -+}; - class SubOperator -- : public ConcreteOperator {}; -+ : public ConcreteOperator { -+ ~SubOperator(); // DO NOT IMPLEMENT -+}; - class MulOperator -- : public ConcreteOperator {}; -+ : public ConcreteOperator { -+ ~MulOperator(); // DO NOT IMPLEMENT -+}; - class ShlOperator -- : public ConcreteOperator {}; -+ : public ConcreteOperator { -+ ~ShlOperator(); // DO NOT IMPLEMENT -+}; - - - class SDivOperator -- : public ConcreteOperator {}; -+ : public ConcreteOperator { -+ ~SDivOperator(); // DO NOT IMPLEMENT -+}; - class UDivOperator -- : public ConcreteOperator {}; -+ : public ConcreteOperator { -+ ~UDivOperator(); // DO NOT IMPLEMENT -+}; - class AShrOperator -- : public ConcreteOperator {}; -+ : public ConcreteOperator { -+ ~AShrOperator(); // DO NOT IMPLEMENT -+}; - class LShrOperator -- : public ConcreteOperator {}; -+ : public ConcreteOperator { -+ ~LShrOperator(); // DO NOT IMPLEMENT -+}; - - - - class GEPOperator - : public ConcreteOperator { -+ ~GEPOperator(); // DO NOT IMPLEMENT -+ - enum { - IsInBounds = (1 << 0) - }; --- -1.7.6.4 - diff --git a/llvm.spec b/llvm.spec index e858e01..90a4de6 100644 --- a/llvm.spec +++ b/llvm.spec @@ -2,6 +2,11 @@ # # --with doxygen # The doxygen docs are HUGE, so they are not built by default. +%bcond_with doxygen + +# clang header paths are hard-coded at compile time +# and need adjustment whenever there's a new GCC version +%global gcc_version %(gcc -dumpversion) %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -11,10 +16,10 @@ %endif %if 0%{?rhel} >= 7 -%global with_clang 0 +%bcond_with clang ExcludeArch: s390 s390x ppc ppc64 %else -%global with_clang 1 +%bcond_without clang %endif #global prerel rcX @@ -31,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -46,14 +51,11 @@ Source3: llvm-Config-llvm-config.h # Data files should be installed with timestamps preserved Patch0: llvm-2.6-timestamp.patch -# clang link failure if system GCC version is unknown -# http://llvm.org/bugs/show_bug.cgi?id=8897 -Patch1: clang-2.9-add_gcc_vers.patch # LLVMgold should link against LTO as a normal library # http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-November/045433.html # patch is applied upstream, but has to be rewritten due to post-3.0 # Makefile clean-ups -Patch2: llvm-3.0-link_llvmgold_to_lto.patch +Patch1: llvm-3.0-link_llvmgold_to_lto.patch BuildRequires: bison BuildRequires: chrpath @@ -72,7 +74,7 @@ BuildRequires: zip # for DejaGNU test suite BuildRequires: dejagnu tcl-devel python # for doxygen documentation -%if 0%{?_with_doxygen} +%if %{with doxygen} BuildRequires: doxygen graphviz %endif Requires: llvm-libs%{?_isa} = %{version}-%{release} @@ -122,14 +124,15 @@ Group: System Environment/Libraries Shared libraries for the LLVM compiler infrastructure. -%if %{with_clang} +%if %{with clang} %package -n clang Summary: A C language family front-end for LLVM License: NCSA Group: Development/Languages Requires: llvm%{?_isa} = %{version}-%{release} -# clang requires gcc; clang++ gcc-c++ -Requires: gcc-c++ +# clang requires gcc, clang++ requires libstdc++-devel +Requires: gcc +Requires: libstdc++-devel = %{gcc_version} %description -n clang clang: noun @@ -178,7 +181,7 @@ Documentation for the Clang compiler front-end. %endif -%if 0%{?_with_doxygen} +%if %{with doxygen} %package apidoc Summary: API documentation for LLVM Group: Development/Languages @@ -190,7 +193,7 @@ Requires: %{name}-doc = %{version}-%{release} API documentation for the LLVM compiler infrastructure. -%if %{with_clang} +%if %{with clang} %package -n clang-apidoc Summary: API documentation for Clang Group: Development/Languages @@ -239,24 +242,22 @@ HTML documentation for LLVM's OCaml binding. %prep -%setup -q -n llvm-%{version}%{?prerel}.src %{?with_clang:-a1} %{?_with_gcc:-a2} +%setup -q -n llvm-%{version}%{?prerel}.src %{?with_clang:-a1} rm -r -f tools/clang -%if %{with_clang} +%if %{with clang} mv clang-%{version}%{?prerel}.src tools/clang %endif # llvm patches %patch0 -p1 -b .timestamp -%patch2 -p1 -b .link_llvmgold_to_lto +%patch1 -p1 -b .link_llvmgold_to_lto # clang patches #pushd tools/clang -#patch1 -p1 -b .add_gcc_ver #popd # fix ld search path -# TODO: remove /%{_lib} after usrmove migration is final -sed -i 's|/lib /usr/lib $lt_ld_extra|/%{_lib} %{_libdir} $lt_ld_extra|' \ +sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ ./configure @@ -269,7 +270,7 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|/%{_lib} %{_libdir} $lt_ld_extra|' \ %configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/%{name} \ -%if 0%{?_with_doxygen} +%if %{with doxygen} --enable-doxygen \ %endif %if %{with gold} @@ -322,7 +323,7 @@ cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF %{_libdir}/llvm EOF -%if %{with_clang} +%if %{with clang} # Static analyzer not installed by default: # http://clang-analyzer.llvm.org/installation#OtherPlatforms mkdir -p %{buildroot}%{_libdir}/clang-analyzer @@ -342,14 +343,14 @@ rm -f moredocs/*.tar.gz rm -f moredocs/ocamldoc/html/*.tar.gz # and separate the apidoc -%if 0%{?_with_doxygen} +%if %{with doxygen} mv moredocs/html/doxygen apidoc mv tools/clang/docs/doxygen/html clang-apidoc %endif # And prepare Clang documentation # -%if %{with_clang} +%if %{with clang} mkdir clang-docs for f in LICENSE.TXT NOTES.txt README.txt; do # TODO.txt; do ln tools/clang/$f clang-docs/ @@ -389,7 +390,7 @@ make check LIT_ARGS="-v -j4" \ %{nil} %endif -%if %{with_clang} +%if %{with clang} # clang test suite failing on PPC and s390(x) # FIXME: # unexpected failures on all platforms with GCC 4.7.0. @@ -407,7 +408,7 @@ make -C tools/clang/test TESTARGS="-v -j4" \ %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig -%if %{with_clang} +%if %{with clang} %post -n clang -p /sbin/ldconfig %postun -n clang -p /sbin/ldconfig %endif @@ -445,7 +446,7 @@ exit 0 %{_bindir}/llvm* %{_bindir}/macho-dump %{_bindir}/opt -%if %{with_clang} +%if %{with clang} %exclude %{_mandir}/man1/clang.1.* %endif %doc %{_mandir}/man1/*.1.* @@ -461,12 +462,12 @@ exit 0 %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf %dir %{_libdir}/%{name} -%if %{with_clang} +%if %{with clang} %exclude %{_libdir}/%{name}/libclang.so %endif %{_libdir}/%{name}/*.so -%if %{with_clang} +%if %{with clang} %files -n clang %defattr(-,root,root,-) %doc clang-docs/* clang-testlog-%{_arch}.txt @@ -514,12 +515,12 @@ exit 0 %doc moredocs/ocamldoc/html/* %endif -%if 0%{?_with_doxygen} +%if %{with doxygen} %files apidoc %defattr(-,root,root,-) %doc apidoc/* -%if %{with_clang} +%if %{with clang} %files -n clang-apidoc %defattr(-,root,root,-) %doc clang-apidoc/* @@ -527,6 +528,12 @@ exit 0 %endif %changelog +* Fri Mar 30 2012 Michel Alexandre Salim - 3.0-11 +- Replace overly-broad dependency on gcc-c++ with gcc and libstdc++-devel +- Pin clang's dependency on libstdc++-devel to the version used for building +- Standardize on bcond for conditional build options +- Remove /lib from search path, everything is now in /usr/lib* + * Mon Mar 26 2012 Kalev Lember - 3.0-10 - Build without -ftree-pre as a workaround for clang segfaulting on x86_64 (#791365) From 460419b9339fc0ce97d045225e253d48a89984ff Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Fri, 30 Mar 2012 18:24:20 +0700 Subject: [PATCH 36/94] Hardcode GCC version to avoid macro expansion problems --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 90a4de6..ced586f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,7 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version -%global gcc_version %(gcc -dumpversion) +%global gcc_version 4.7.0 %ifarch s390 s390x sparc64 # No ocaml on these arches From 5362a9b5527fb437d0f71fef05ac93f8408316d2 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 6 May 2012 10:04:00 +0100 Subject: [PATCH 37/94] bump build --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index ced586f..5db5177 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.0 -Release: 11%{?dist} +Release: 12%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -528,6 +528,9 @@ exit 0 %endif %changelog +* Sun May 6 2012 Peter Robinson - 3.0-12 +- Bump build + * Fri Mar 30 2012 Michel Alexandre Salim - 3.0-11 - Replace overly-broad dependency on gcc-c++ with gcc and libstdc++-devel - Pin clang's dependency on libstdc++-devel to the version used for building From 98be43ec037837f905c9ab7df099661cae935477 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 25 May 2012 14:47:38 +0100 Subject: [PATCH 38/94] Add compiler build options for ARM hardfp --- llvm.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 5db5177..6bf48c4 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.0 -Release: 12%{?dist} +Release: 13%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -278,6 +278,14 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ %endif %if 0%{?rhel} >= 7 --enable-targets=host \ +%endif +%ifarch armv7hl armv7l + --with-cpu=cortex-a8 \ + --with-tune=cortex-a8 \ + --with-arch=armv7-a \ + --with-float=hard \ + --with-fpu=vfpv3-d16 \ + --with-abi=aapcs-linux \ %endif --disable-assertions \ --enable-debug-runtime \ @@ -298,7 +306,6 @@ make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %install -rm -rf %{buildroot} # workaround for http://llvm.org/bugs/show_bug.cgi?id=11177 %if %{with ocaml} cp -p bindings/ocaml/llvm/META.llvm bindings/ocaml/llvm/Release/ @@ -528,6 +535,9 @@ exit 0 %endif %changelog +* Fri May 25 2012 Peter Robinson - 3.0-13 +- Add compiler build options for ARM hardfp + * Sun May 6 2012 Peter Robinson - 3.0-12 - Bump build From dcd073e711543da4849f1db114d5f61514b3eb83 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 3 Jun 2012 09:33:39 +0100 Subject: [PATCH 39/94] rebase to 3.1 + add r600 patches from Tom Stellar --- .gitignore | 2 + 0001-Add-r600-TargetInfo.patch | 100 ++++++++++++++++ ...-r600-Add-some-intrinsic-definitions.patch | 64 ++++++++++ ...bal_size-and-get_local_size-intrinsi.patch | 27 +++++ 0002-r600-Add-some-target-builtins.patch | 111 ++++++++++++++++++ ...obal_size-and-read_local_size-builti.patch | 31 +++++ llvm-3.0-link_llvmgold_to_lto.patch | 10 -- llvm.spec | 37 ++++-- sources | 4 +- 9 files changed, 362 insertions(+), 24 deletions(-) create mode 100644 0001-Add-r600-TargetInfo.patch create mode 100644 0001-r600-Add-some-intrinsic-definitions.patch create mode 100644 0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch create mode 100644 0002-r600-Add-some-target-builtins.patch create mode 100644 0003-r600-Add-read_global_size-and-read_local_size-builti.patch delete mode 100644 llvm-3.0-link_llvmgold_to_lto.patch diff --git a/.gitignore b/.gitignore index 7b41d05..04b6431 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /llvm-3.0.tar.gz /clang-3.0.tar.gz +/clang-3.1.src.tar.gz +/llvm-3.1.src.tar.gz diff --git a/0001-Add-r600-TargetInfo.patch b/0001-Add-r600-TargetInfo.patch new file mode 100644 index 0000000..929b5d3 --- /dev/null +++ b/0001-Add-r600-TargetInfo.patch @@ -0,0 +1,100 @@ +From 70cae83ffd093f183dec07c464db3c0bb6b92c10 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Fri, 2 Mar 2012 10:54:52 -0500 +Subject: [PATCH 1/3] Add r600 TargetInfo + +--- + lib/Basic/Targets.cpp | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 70 insertions(+), 0 deletions(-) + +diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp +index 85dfd78..64dc01c 100644 +--- a/lib/Basic/Targets.cpp ++++ b/lib/Basic/Targets.cpp +@@ -1068,6 +1068,73 @@ namespace { + } + + namespace { ++ ++class AMDGPUTargetInfo : public TargetInfo { ++public: ++ ++ AMDGPUTargetInfo(const std::string& triple) : TargetInfo(triple) { } ++ ++ virtual const char * getClobbers() const { ++ return ""; ++ } ++ ++ virtual void getGCCRegNames(const char * const *&Names, ++ unsigned &numNames) const { ++ Names = NULL; ++ numNames = 0; ++ } ++ ++ virtual void getGCCRegAliases(const GCCRegAlias *&Aliases, ++ unsigned &NumAliases) const { ++ Aliases = NULL; ++ NumAliases = 0; ++ } ++ ++ virtual bool validateAsmConstraint(const char *&Name, ++ TargetInfo::ConstraintInfo &info) const { ++ return true; ++ } ++ ++ virtual void getTargetBuiltins(const Builtin::Info *&Records, ++ unsigned &NumRecords) const { ++ Records = NULL; ++ NumRecords = 0; ++ } ++}; ++ ++ ++static const unsigned R600AddrSpaceMap[] = { ++ 1, // opencl_global ++ 3, // opencl_local ++ 2 // opencl_constant ++}; ++ ++class R600TargetInfo : public AMDGPUTargetInfo { ++public: ++ R600TargetInfo(const std::string& triple) : AMDGPUTargetInfo(triple) { ++ DescriptionString = ++ "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16" ++ "-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:32:32" ++ "-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64" ++ "-v96:128:128-v128:128:128-v192:256:256-v256:256:256" ++ "-v512:512:512-v1024:1024:1024-v2048:2048:2048" ++ "-n8:16:32:64"; ++ AddrSpaceMap = &R600AddrSpaceMap; ++ } ++ ++ virtual void getTargetDefines(const LangOptions &Opts, ++ MacroBuilder &Builder) const { ++ Builder.defineMacro("__R600__"); ++ } ++ ++ virtual const char * getVAListDeclaration() const { ++ return ""; ++ } ++}; ++ ++} // end anonymous namespace ++ ++namespace { + // MBlaze abstract base class + class MBlazeTargetInfo : public TargetInfo { + static const char * const GCCRegNames[]; +@@ -3963,6 +4030,9 @@ static TargetInfo *AllocateTarget(const std::string &T) { + case llvm::Triple::mblaze: + return new MBlazeTargetInfo(T); + ++ case llvm::Triple::r600: ++ return new R600TargetInfo(T); ++ + case llvm::Triple::sparc: + switch (os) { + case llvm::Triple::Linux: +-- +1.7.7.6 + diff --git a/0001-r600-Add-some-intrinsic-definitions.patch b/0001-r600-Add-some-intrinsic-definitions.patch new file mode 100644 index 0000000..9d99c9c --- /dev/null +++ b/0001-r600-Add-some-intrinsic-definitions.patch @@ -0,0 +1,64 @@ +From e25389b66b5ced3a2b5461077dcc9a505d334e3d Mon Sep 17 00:00:00 2001 +From: Tom Stellard +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 ++// ++ ++let TargetPrefix = "r600" in { ++ ++class R600ReadPreloadRegisterIntrinsic ++ : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, ++ GCCBuiltin; ++ ++multiclass R600ReadPreloadRegisterIntrinsic_xyz { ++ def _x : R600ReadPreloadRegisterIntrinsic; ++ def _y : R600ReadPreloadRegisterIntrinsic; ++ def _z : R600ReadPreloadRegisterIntrinsic; ++} ++ ++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/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch b/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch new file mode 100644 index 0000000..db176dd --- /dev/null +++ b/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 +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 { + def _z : R600ReadPreloadRegisterIntrinsic; + } + ++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/0002-r600-Add-some-target-builtins.patch b/0002-r600-Add-some-target-builtins.patch new file mode 100644 index 0000000..0003a8d --- /dev/null +++ b/0002-r600-Add-some-target-builtins.patch @@ -0,0 +1,111 @@ +From a014573ad193775b2301e39275a1ca0ac3bb5847 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 13 Mar 2012 13:54:51 -0400 +Subject: [PATCH 2/3] r600: Add some target builtins + +--- + include/clang/Basic/BuiltinsR600.def | 32 ++++++++++++++++++++++++++++++++ + include/clang/Basic/TargetBuiltins.h | 10 ++++++++++ + lib/Basic/Targets.cpp | 12 ++++++++++-- + 3 files changed, 52 insertions(+), 2 deletions(-) + create mode 100644 include/clang/Basic/BuiltinsR600.def + +diff --git a/include/clang/Basic/BuiltinsR600.def b/include/clang/Basic/BuiltinsR600.def +new file mode 100644 +index 0000000..ce1f30e +--- /dev/null ++++ b/include/clang/Basic/BuiltinsR600.def +@@ -0,0 +1,32 @@ ++//===--- BuiltinsR600.def - R600 Builtin function database -- --*- C++ -*-===// ++// ++// The LLVM Compiler Infrastructure ++// ++// This file is distributed under the University of Illinois Open Source ++// License. See LICENSE.TXT for details. ++// ++//===----------------------------------------------------------------------===// ++// ++// This file defines the R600-specific builtin function database. Users of ++// this file must define the BUILTIN macro to make use of this information. ++// ++//===----------------------------------------------------------------------===// ++// ++// Authors: Tom Stellard ++// ++ ++// The format of this database matches clang/Basic/Builtins.def. ++ ++BUILTIN(__builtin_r600_read_ngroups_x, "z", "nc") ++BUILTIN(__builtin_r600_read_ngroups_y, "z", "nc") ++BUILTIN(__builtin_r600_read_ngroups_z, "z", "nc") ++ ++BUILTIN(__builtin_r600_read_tidig_x, "z", "nc") ++BUILTIN(__builtin_r600_read_tidig_y, "z", "nc") ++BUILTIN(__builtin_r600_read_tidig_z, "z", "nc") ++ ++BUILTIN(__builtin_r600_read_tgid_x, "z", "nc") ++BUILTIN(__builtin_r600_read_tgid_y, "z", "nc") ++BUILTIN(__builtin_r600_read_tgid_z, "z", "nc") ++ ++#undef BUILTIN +diff --git a/include/clang/Basic/TargetBuiltins.h b/include/clang/Basic/TargetBuiltins.h +index 7c04bf7..3460cd5 100644 +--- a/include/clang/Basic/TargetBuiltins.h ++++ b/include/clang/Basic/TargetBuiltins.h +@@ -45,6 +45,16 @@ namespace clang { + }; + } + ++ /// R600 builtins ++ namespace R600 { ++ enum { ++ LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1, ++#define BUILTIN(ID, TYPE, ATTRS) BI##ID, ++#include "clang/Basic/BuiltinsR600.def" ++ LastTSBuiltin ++ }; ++ } ++ + + /// X86 builtins + namespace X86 { +diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp +index 64dc01c..03f1a18 100644 +--- a/lib/Basic/Targets.cpp ++++ b/lib/Basic/Targets.cpp +@@ -1070,6 +1070,7 @@ namespace { + namespace { + + class AMDGPUTargetInfo : public TargetInfo { ++ static const Builtin::Info BuiltinInfo[]; + public: + + AMDGPUTargetInfo(const std::string& triple) : TargetInfo(triple) { } +@@ -1097,8 +1098,8 @@ public: + + virtual void getTargetBuiltins(const Builtin::Info *&Records, + unsigned &NumRecords) const { +- Records = NULL; +- NumRecords = 0; ++ Records = BuiltinInfo; ++ NumRecords = clang::R600::LastTSBuiltin-Builtin::FirstTSBuiltin; + } + }; + +@@ -1132,6 +1133,13 @@ public: + } + }; + ++const Builtin::Info AMDGPUTargetInfo::BuiltinInfo[] = { ++#define BUILTIN(ID, TYPE, ATTRS) { #ID, TYPE, ATTRS, 0, ALL_LANGUAGES }, ++#define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) { #ID, TYPE, ATTRS, HEADER,\ ++ ALL_LANGUAGES }, ++#include "clang/Basic/BuiltinsR600.def" ++}; ++ + } // end anonymous namespace + + namespace { +-- +1.7.7.6 + diff --git a/0003-r600-Add-read_global_size-and-read_local_size-builti.patch b/0003-r600-Add-read_global_size-and-read_local_size-builti.patch new file mode 100644 index 0000000..e0c2d3b --- /dev/null +++ b/0003-r600-Add-read_global_size-and-read_local_size-builti.patch @@ -0,0 +1,31 @@ +From 2881b8189dcacc8ab6a336f0e107d72752c8c47e Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Wed, 14 Mar 2012 11:20:08 -0400 +Subject: [PATCH 3/3] r600: Add read_global_size and read_local_size builtins + +--- + include/clang/Basic/BuiltinsR600.def | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/include/clang/Basic/BuiltinsR600.def b/include/clang/Basic/BuiltinsR600.def +index ce1f30e..c81758e 100644 +--- a/include/clang/Basic/BuiltinsR600.def ++++ b/include/clang/Basic/BuiltinsR600.def +@@ -17,6 +17,14 @@ + + // The format of this database matches clang/Basic/Builtins.def. + ++BUILTIN(__builtin_r600_read_global_size_x, "z", "nc") ++BUILTIN(__builtin_r600_read_global_size_y, "z", "nc") ++BUILTIN(__builtin_r600_read_global_size_z, "z", "nc") ++ ++BUILTIN(__builtin_r600_read_local_size_x, "z", "nc") ++BUILTIN(__builtin_r600_read_local_size_y, "z", "nc") ++BUILTIN(__builtin_r600_read_local_size_z, "z", "nc") ++ + BUILTIN(__builtin_r600_read_ngroups_x, "z", "nc") + BUILTIN(__builtin_r600_read_ngroups_y, "z", "nc") + BUILTIN(__builtin_r600_read_ngroups_z, "z", "nc") +-- +1.7.7.6 + diff --git a/llvm-3.0-link_llvmgold_to_lto.patch b/llvm-3.0-link_llvmgold_to_lto.patch deleted file mode 100644 index 030f356..0000000 --- a/llvm-3.0-link_llvmgold_to_lto.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- llvm-3.0.src/tools/gold/Makefile.link_llvmgold_to_lto 2011-05-31 22:00:45.000000000 +0200 -+++ llvm-3.0.src/tools/gold/Makefile 2012-02-25 09:40:01.889923932 +0100 -@@ -26,6 +26,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/llvm.spec b/llvm.spec index 6bf48c4..94377d9 100644 --- a/llvm.spec +++ b/llvm.spec @@ -35,15 +35,15 @@ ExcludeArch: s390 s390x ppc ppc64 %endif Name: llvm -Version: 3.0 -Release: 13%{?dist} +Version: 3.1 +Release: 1%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages License: NCSA URL: http://llvm.org/ -Source0: %{downloadurl}/llvm-%{version}%{?prerel:%{prerel}.src}.tar.gz -Source1: %{downloadurl}/clang-%{version}%{?prerel:%{prerel}.src}.tar.gz +Source0: %{downloadurl}/llvm-%{version}%{?prerel:%{prerel}}.src.tar.gz +Source1: %{downloadurl}/clang-%{version}%{?prerel:%{prerel}}.src.tar.gz # multilib fixes Source2: llvm-Config-config.h Source3: llvm-Config-llvm-config.h @@ -51,11 +51,14 @@ Source3: llvm-Config-llvm-config.h # Data files should be installed with timestamps preserved Patch0: llvm-2.6-timestamp.patch -# LLVMgold should link against LTO as a normal library -# http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-November/045433.html -# patch is applied upstream, but has to be rewritten due to post-3.0 -# Makefile clean-ups -Patch1: llvm-3.0-link_llvmgold_to_lto.patch + +# r600 llvm and clang patches +Patch600: 0001-r600-Add-some-intrinsic-definitions.patch +Patch601: 0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch + +Patch610: 0001-Add-r600-TargetInfo.patch +Patch611: 0002-r600-Add-some-target-builtins.patch +Patch612: 0003-r600-Add-read_global_size-and-read_local_size-builti.patch BuildRequires: bison BuildRequires: chrpath @@ -250,11 +253,18 @@ mv clang-%{version}%{?prerel}.src tools/clang # llvm patches %patch0 -p1 -b .timestamp -%patch1 -p1 -b .link_llvmgold_to_lto +#patch1 -p1 -b .link_llvmgold_to_lto + +# r600 llvm patch +%patch600 -p1 -b .r600 +%patch601 -p1 -b .r601 # clang patches -#pushd tools/clang -#popd +pushd tools/clang +%patch610 -p1 -b .r610 +%patch611 -p1 -b .r611 +%patch612 -p1 -b .r612 +popd # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ @@ -535,6 +545,9 @@ exit 0 %endif %changelog +* Sun Jun 03 2012 Dave Airlie 3.1-1 +- rebase to 3.1 + add r600 patches from Tom Stellar + * Fri May 25 2012 Peter Robinson - 3.0-13 - Add compiler build options for ARM hardfp diff --git a/sources b/sources index 9e1349c..7c21d05 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -a8e5f5f1c1adebae7b4a654c376a6005 llvm-3.0.tar.gz -43350706ae6cf05d0068885792ea0591 clang-3.0.tar.gz +59bf2d3120a3805f27cafda3823caaf8 clang-3.1.src.tar.gz +16eaa7679f84113f65b12760fdfe4ee1 llvm-3.1.src.tar.gz From 9e49469714e764987b872f374f4f85b5a056eb4a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 3 Jun 2012 15:42:52 +0100 Subject: [PATCH 40/94] llvm-config: fix to report correct libdir I noticed that llvm-config is now a c++ app, and it does the wrong thing completely on Fedora, so hard code the Fedora packaging libdir in it. --- llvm.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm.spec b/llvm.spec index 94377d9..c056d9d 100644 --- a/llvm.spec +++ b/llvm.spec @@ -307,6 +307,10 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ # configure does not properly specify libdir sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config +# FIXME upstream need to fix this +# llvm-config.cpp hardcodes lib in it +sed -i 's|ActiveLibDir = ActivePrefix + "/lib"|ActiveLibDir = ActivePrefix + "/%{_lib}/%{name}"|g' tools/llvm-config/llvm-config.cpp + make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %ifarch ppc OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments -UPPC" From 8dfeb9f9257f7b3d56cffd18925f22cd432f1976 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Fri, 8 Jun 2012 23:48:35 +0700 Subject: [PATCH 41/94] Rebuild for ocaml 4.00.0 beta --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index c056d9d..59998f6 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -549,6 +549,9 @@ exit 0 %endif %changelog +* Fri Jun 8 2012 Michel Salim - 3.1-2 +- Rebuild for ocaml 4.00.0 beta + * Sun Jun 03 2012 Dave Airlie 3.1-1 - rebase to 3.1 + add r600 patches from Tom Stellar From 588e7c5ccd67f4439bf8542a85cdd0a1b2e7c439 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 10 Jun 2012 21:43:17 +0100 Subject: [PATCH 42/94] Rebuild for OCaml 4.00.0. --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 59998f6..42e904f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -549,6 +549,9 @@ exit 0 %endif %changelog +* Sun Jun 10 2012 Richard W.M. Jones - 3.1-3 +- Rebuild for OCaml 4.00.0. + * Fri Jun 8 2012 Michel Salim - 3.1-2 - Rebuild for ocaml 4.00.0 beta From 1fd52d51451df58833e3f0179ec4337f3ef27032 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 3 Jul 2012 09:36:16 +0100 Subject: [PATCH 43/94] Rebuild for new libstdc++ bump --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 42e904f..c5e03ba 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -549,6 +549,9 @@ exit 0 %endif %changelog +* Mon Jul 2 2012 Peter Robinson - 3.1-4 +- Rebuild for new libstdc++ bump + * Sun Jun 10 2012 Richard W.M. Jones - 3.1-3 - Rebuild for OCaml 4.00.0. From a8758deeb8201e63e5e0168412cb6c61ba86cf98 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Wed, 4 Jul 2012 21:21:24 +0700 Subject: [PATCH 44/94] Actually set runtime dependency on libstdc++ 4.7.1 --- llvm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index c5e03ba..ee36aa7 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,7 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version -%global gcc_version 4.7.0 +%global gcc_version 4.7.1 %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -549,6 +549,9 @@ exit 0 %endif %changelog +* Wed Jul 4 2012 Michel Salim - 3.1-5 +- Actually set runtime dependency on libstdc++ 4.7.1 + * Mon Jul 2 2012 Peter Robinson - 3.1-4 - Rebuild for new libstdc++ bump From 23fedafb32d10739a6fd23a759c08c2da5e75d3f Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 13 Jul 2012 08:33:20 +0100 Subject: [PATCH 45/94] Add patch to fix building OCAML on ARM --- llvm-fix-ocaml.patch | 128 +++++++++++++++++++++++++++++++++++++++++++ llvm.spec | 10 +++- 2 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 llvm-fix-ocaml.patch diff --git a/llvm-fix-ocaml.patch b/llvm-fix-ocaml.patch new file mode 100644 index 0000000..b737df0 --- /dev/null +++ b/llvm-fix-ocaml.patch @@ -0,0 +1,128 @@ +Index: lib/Target/ARM/ARMFrameLowering.cpp +=================================================================== +--- lib/Target/ARM/ARMFrameLowering.cpp (revision 159085) ++++ lib/Target/ARM/ARMFrameLowering.cpp (working copy) +@@ -15,6 +15,8 @@ + #include "ARMBaseInstrInfo.h" + #include "ARMBaseRegisterInfo.h" + #include "ARMMachineFunctionInfo.h" ++#include "llvm/CallingConv.h" ++#include "llvm/Function.h" + #include "MCTargetDesc/ARMAddressingModes.h" + #include "llvm/Function.h" + #include "llvm/CodeGen/MachineFrameInfo.h" +@@ -151,6 +153,10 @@ + int FramePtrSpillFI = 0; + int D8SpillFI = 0; + ++ // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue. ++ if (MF.getFunction()->getCallingConv() == CallingConv::GHC) ++ return; ++ + // Allocate the vararg register save area. This is not counted in NumBytes. + if (VARegSaveSize) + emitSPUpdate(isARM, MBB, MBBI, dl, TII, -VARegSaveSize, +@@ -354,6 +360,10 @@ + int NumBytes = (int)MFI->getStackSize(); + unsigned FramePtr = RegInfo->getFrameRegister(MF); + ++ // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue. ++ if (MF.getFunction()->getCallingConv() == CallingConv::GHC) ++ return; ++ + if (!AFI->hasStackFrame()) { + if (NumBytes != 0) + emitSPUpdate(isARM, MBB, MBBI, dl, TII, NumBytes); +Index: lib/Target/ARM/ARMISelLowering.cpp +=================================================================== +--- lib/Target/ARM/ARMISelLowering.cpp (revision 159085) ++++ lib/Target/ARM/ARMISelLowering.cpp (working copy) +@@ -1171,6 +1171,8 @@ + return (Return ? RetCC_ARM_AAPCS : CC_ARM_AAPCS); + case CallingConv::ARM_APCS: + return (Return ? RetCC_ARM_APCS : CC_ARM_APCS); ++ case CallingConv::GHC: ++ return (Return ? RetCC_ARM_APCS : CC_ARM_APCS_GHC); + } + } + +Index: lib/Target/ARM/ARMCallingConv.td +=================================================================== +--- lib/Target/ARM/ARMCallingConv.td (revision 159085) ++++ lib/Target/ARM/ARMCallingConv.td (working copy) +@@ -79,7 +79,26 @@ + CCDelegateTo + ]>; + ++//===----------------------------------------------------------------------===// ++// ARM APCS Calling Convention for GHC ++//===----------------------------------------------------------------------===// + ++def CC_ARM_APCS_GHC : CallingConv<[ ++ // Handle all vector types as either f64 or v2f64. ++ CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType>, ++ CCIfType<[v2i64, v4i32, v8i16, v16i8, v4f32], CCBitConvertToType>, ++ ++ CCIfType<[v2f64], CCAssignToReg<[Q4, Q5]>>, ++ CCIfType<[f64], CCAssignToReg<[D8, D9, D10, D11]>>, ++ CCIfType<[f32], CCAssignToReg<[S16, S17, S18, S19, S20, S21, S22, S23]>>, ++ ++ // Promote i8/i16 arguments to i32. ++ CCIfType<[i8, i16], CCPromoteToType>, ++ ++ // Pass in STG registers: Base, Sp, Hp, R1, R2, R3, R4, SpLim ++ CCIfType<[i32], CCAssignToReg<[R4, R5, R6, R7, R8, R9, R10, R11]>> ++]>; ++ + //===----------------------------------------------------------------------===// + // ARM AAPCS (EABI) Calling Convention, common parts + //===----------------------------------------------------------------------===// +@@ -171,3 +190,9 @@ + // iOS ABI deviates from ARM standard ABI. R9 is not a callee-saved register. + // Also save R7-R4 first to match the stack frame fixed spill areas. + def CSR_iOS : CalleeSavedRegs<(add LR, R7, R6, R5, R4, (sub CSR_AAPCS, R9))>; ++ ++// GHC set of callee saved regs is empty as all those regs are ++// used for passing STG regs around ++// sub/add LR is a workaround for not being able to compile empty list: ++// def CSR_GHC : CalleeSavedRegs<()>; ++def CSR_GHC : CalleeSavedRegs<(sub (add LR), LR)>; +Index: lib/Target/ARM/ARMFastISel.cpp +=================================================================== +--- lib/Target/ARM/ARMFastISel.cpp (revision 159085) ++++ lib/Target/ARM/ARMFastISel.cpp (working copy) +@@ -1835,6 +1835,11 @@ + return (Return ? RetCC_ARM_AAPCS: CC_ARM_AAPCS); + case CallingConv::ARM_APCS: + return (Return ? RetCC_ARM_APCS: CC_ARM_APCS); ++ case CallingConv::GHC: ++ if (Return) ++ llvm_unreachable("Can't return in GHC call convention"); ++ else ++ return CC_ARM_APCS_GHC; + } + } + +--- lib/Target/ARM/ARMBaseRegisterInfo.cpp.orig 2012-07-12 09:59:58.181723592 +0100 ++++ lib/Target/ARM/ARMBaseRegisterInfo.cpp 2012-07-12 10:01:15.301344412 +0100 +@@ -62,7 +62,19 @@ + + const uint16_t* + ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { +- return (STI.isTargetIOS()) ? CSR_iOS_SaveList : CSR_AAPCS_SaveList; ++ bool ghcCall = false; ++ ++ if (MF) { ++ const Function *F = MF->getFunction(); ++ ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false); ++ } ++ ++ if (ghcCall) { ++ return CSR_GHC_SaveList; ++ } ++ else { ++ return (STI.isTargetIOS()) ? CSR_iOS_SaveList : CSR_AAPCS_SaveList; ++ } + } + + const uint32_t* diff --git a/llvm.spec b/llvm.spec index ee36aa7..258c121 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -60,6 +60,9 @@ Patch610: 0001-Add-r600-TargetInfo.patch Patch611: 0002-r600-Add-some-target-builtins.patch Patch612: 0003-r600-Add-read_global_size-and-read_local_size-builti.patch +# ocaml +Patch700: llvm-fix-ocaml.patch + BuildRequires: bison BuildRequires: chrpath BuildRequires: flex @@ -266,6 +269,8 @@ pushd tools/clang %patch612 -p1 -b .r612 popd +%patch700 -p0 -b .ocaml + # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ ./configure @@ -549,6 +554,9 @@ exit 0 %endif %changelog +* Thu Jul 12 2012 Peter Robinson - 3.1-6 +- Add patch to fix building OCAML on ARM + * Wed Jul 4 2012 Michel Salim - 3.1-5 - Actually set runtime dependency on libstdc++ 4.7.1 From e4d99d1bd8466dadd8bb3a404d6cf751511c0766 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 13 Jul 2012 10:28:31 +0100 Subject: [PATCH 46/94] Rename patch as it actually fixes Haskell --- llvm-fix-ocaml.patch => llvm-fix-ghc.patch | 0 llvm.spec | 9 ++++++--- 2 files changed, 6 insertions(+), 3 deletions(-) rename llvm-fix-ocaml.patch => llvm-fix-ghc.patch (100%) diff --git a/llvm-fix-ocaml.patch b/llvm-fix-ghc.patch similarity index 100% rename from llvm-fix-ocaml.patch rename to llvm-fix-ghc.patch diff --git a/llvm.spec b/llvm.spec index 258c121..7c2b7eb 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -61,7 +61,7 @@ Patch611: 0002-r600-Add-some-target-builtins.patch Patch612: 0003-r600-Add-read_global_size-and-read_local_size-builti.patch # ocaml -Patch700: llvm-fix-ocaml.patch +Patch700: llvm-fix-ghc.patch BuildRequires: bison BuildRequires: chrpath @@ -269,7 +269,7 @@ pushd tools/clang %patch612 -p1 -b .r612 popd -%patch700 -p0 -b .ocaml +%patch700 -p0 -b .ghc # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ @@ -554,6 +554,9 @@ exit 0 %endif %changelog +* Fri Jul 13 2012 Peter Robinson - 3.1-7 +- Rename patch as it actually fixes Haskell + * Thu Jul 12 2012 Peter Robinson - 3.1-6 - Add patch to fix building OCAML on ARM From 3a31d79945e8cf48ded29c576e28186dc9a6599f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 17:02:02 -0500 Subject: [PATCH 47/94] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 7c2b7eb..a07cc8e 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -554,6 +554,9 @@ exit 0 %endif %changelog +* Thu Jul 19 2012 Fedora Release Engineering - 3.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Fri Jul 13 2012 Peter Robinson - 3.1-7 - Rename patch as it actually fixes Haskell From 3ce0b9ccd817b5d1f1071e055d7c7c6a20853767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 14 Aug 2012 09:50:03 +0200 Subject: [PATCH 48/94] Apply clang patches only when clang is being built --- llvm.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index a07cc8e..97a9508 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -263,11 +263,13 @@ mv clang-%{version}%{?prerel}.src tools/clang %patch601 -p1 -b .r601 # clang patches +%if %{with clang} pushd tools/clang %patch610 -p1 -b .r610 %patch611 -p1 -b .r611 %patch612 -p1 -b .r612 popd +%endif %patch700 -p0 -b .ghc @@ -554,6 +556,9 @@ exit 0 %endif %changelog +* Tue Aug 14 2012 Dan Horák - 3.1-9 +- Apply clang patches only when clang is being built + * Thu Jul 19 2012 Fedora Release Engineering - 3.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 5e1a5c217575521e2d8d621240b91a660851abc2 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Mon, 24 Sep 2012 14:16:58 +0700 Subject: [PATCH 49/94] Rebuild for GCC 4.7.2 --- llvm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 97a9508..8acdbe6 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,7 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version -%global gcc_version 4.7.1 +%global gcc_version 4.7.2 %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -556,6 +556,9 @@ exit 0 %endif %changelog +* Mon Sep 24 2012 Michel Salim - 3.1-10 +- Rebuild for GCC 4.7.2 + * Tue Aug 14 2012 Dan Horák - 3.1-9 - Apply clang patches only when clang is being built From 9d73f9bb7a44a3ac802a04f4d6ce69368eadc7e4 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Mon, 24 Sep 2012 15:49:03 +0700 Subject: [PATCH 50/94] Actually build against GCC 4.7.2 --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 8acdbe6..b0a6f78 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -556,6 +556,9 @@ exit 0 %endif %changelog +* Mon Sep 24 2012 Michel Salim - 3.1-11 +- Actually build against GCC 4.7.2 + * Mon Sep 24 2012 Michel Salim - 3.1-10 - Rebuild for GCC 4.7.2 From 39fcb67ae0e57915ea07953992b4828e3e0fbb70 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Oct 2012 14:25:55 +0000 Subject: [PATCH 51/94] Rebuild for OCaml 4.00.1. --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index b0a6f78..7fe3bfa 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -556,6 +556,9 @@ exit 0 %endif %changelog +* Mon Oct 29 2012 Richard W.M. Jones - 3.1-12 +- Rebuild for OCaml 4.00.1. + * Mon Sep 24 2012 Michel Salim - 3.1-11 - Actually build against GCC 4.7.2 From 4bbca008d90879a3a4e37087725c989aa75610cc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 23 Jan 2013 11:01:49 +0900 Subject: [PATCH 52/94] rebuild for F19 ARM ldconfig issue (#893294) --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 7fe3bfa..70823e5 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -556,6 +556,9 @@ exit 0 %endif %changelog +* Wed Jan 23 2013 Jens Petersen - 3.1-13 +- rebuild for F19 ARM ldconfig issue (#893294) + * Mon Oct 29 2012 Richard W.M. Jones - 3.1-12 - Rebuild for OCaml 4.00.1. From b27d0335ada668a9a97ba72b2d943e60d513914a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 23 Jan 2013 13:00:54 +0900 Subject: [PATCH 53/94] fix pod parsing error in lit.pod "lit.pod around line 389: =back without =over" --- llvm-3.1-docs-lit.pod-back-without-over.patch | 11 +++++++++++ llvm.spec | 9 +++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 llvm-3.1-docs-lit.pod-back-without-over.patch diff --git a/llvm-3.1-docs-lit.pod-back-without-over.patch b/llvm-3.1-docs-lit.pod-back-without-over.patch new file mode 100644 index 0000000..351f553 --- /dev/null +++ b/llvm-3.1-docs-lit.pod-back-without-over.patch @@ -0,0 +1,11 @@ +--- llvm-3.1.src/docs/CommandGuide/lit.pod~ 2012-03-27 03:01:14.000000000 +0900 ++++ llvm-3.1.src/docs/CommandGuide/lit.pod 2013-01-23 12:47:30.297510832 +0900 +@@ -386,8 +386,6 @@ + ******************** + PASS: D (4 of 4) + +-=back +- + =head2 LIT EXAMPLE TESTS + + The B distribution contains several example implementations of test suites diff --git a/llvm.spec b/llvm.spec index 70823e5..381b664 100644 --- a/llvm.spec +++ b/llvm.spec @@ -60,9 +60,12 @@ Patch610: 0001-Add-r600-TargetInfo.patch Patch611: 0002-r600-Add-some-target-builtins.patch Patch612: 0003-r600-Add-read_global_size-and-read_local_size-builti.patch -# ocaml +# ghc Patch700: llvm-fix-ghc.patch +# doc +Patch800: llvm-3.1-docs-lit.pod-back-without-over.patch + BuildRequires: bison BuildRequires: chrpath BuildRequires: flex @@ -273,6 +276,8 @@ popd %patch700 -p0 -b .ghc +%patch800 -p1 -b .r800 + # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ ./configure @@ -557,7 +562,7 @@ exit 0 %changelog * Wed Jan 23 2013 Jens Petersen - 3.1-13 -- rebuild for F19 ARM ldconfig issue (#893294) +- fix pod parsing error in lit.pod: "=back without =over" * Mon Oct 29 2012 Richard W.M. Jones - 3.1-12 - Rebuild for OCaml 4.00.1. From cbfd76e5c0eb401303f0f86408b32d0efd827aeb Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 23 Jan 2013 13:59:28 +0900 Subject: [PATCH 54/94] fix another pod2man markup error in llvm-cov.pod - make the patch file more general name llvm-cov.pod around line 21: Unterminated B<...> sequence llvm-cov.pod around line 26: Unterminated B<...> sequence should be no further errors hopefully --- llvm-3.1-docs-lit.pod-back-without-over.patch | 11 -------- llvm-3.1-docs-pod-markup-fixes.patch | 28 +++++++++++++++++++ llvm.spec | 4 +-- 3 files changed, 30 insertions(+), 13 deletions(-) delete mode 100644 llvm-3.1-docs-lit.pod-back-without-over.patch create mode 100644 llvm-3.1-docs-pod-markup-fixes.patch diff --git a/llvm-3.1-docs-lit.pod-back-without-over.patch b/llvm-3.1-docs-lit.pod-back-without-over.patch deleted file mode 100644 index 351f553..0000000 --- a/llvm-3.1-docs-lit.pod-back-without-over.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- llvm-3.1.src/docs/CommandGuide/lit.pod~ 2012-03-27 03:01:14.000000000 +0900 -+++ llvm-3.1.src/docs/CommandGuide/lit.pod 2013-01-23 12:47:30.297510832 +0900 -@@ -386,8 +386,6 @@ - ******************** - PASS: D (4 of 4) - --=back -- - =head2 LIT EXAMPLE TESTS - - The B distribution contains several example implementations of test suites diff --git a/llvm-3.1-docs-pod-markup-fixes.patch b/llvm-3.1-docs-pod-markup-fixes.patch new file mode 100644 index 0000000..cd8a62a --- /dev/null +++ b/llvm-3.1-docs-pod-markup-fixes.patch @@ -0,0 +1,28 @@ +--- llvm-3.1.src/docs/CommandGuide/lit.pod~ 2012-03-27 03:01:14.000000000 +0900 ++++ llvm-3.1.src/docs/CommandGuide/lit.pod 2013-01-23 12:47:30.297510832 +0900 +@@ -386,8 +386,6 @@ + ******************** + PASS: D (4 of 4) + +-=back +- + =head2 LIT EXAMPLE TESTS + + The B distribution contains several example implementations of test suites +--- llvm-3.1.src/docs/CommandGuide/llvm-cov.pod~ 2011-11-29 08:39:25.000000000 +0900 ++++ llvm-3.1.src/docs/CommandGuide/llvm-cov.pod 2013-01-23 13:44:32.184212441 +0900 +@@ -18,12 +18,12 @@ + + =over + +-=item B<-gcno=filename] ++=item B<-gcno=filename> + + This option selects input description file generated by compiler while instrumenting + program. + +-=item B<-gcda=filename] ++=item B<-gcda=filename> + + This option selects coverage data file generated by instrumented compiler. + diff --git a/llvm.spec b/llvm.spec index 381b664..4f7693f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -64,7 +64,7 @@ Patch612: 0003-r600-Add-read_global_size-and-read_local_size-builti.patch Patch700: llvm-fix-ghc.patch # doc -Patch800: llvm-3.1-docs-lit.pod-back-without-over.patch +Patch800: llvm-3.1-docs-pod-markup-fixes.patch BuildRequires: bison BuildRequires: chrpath @@ -562,7 +562,7 @@ exit 0 %changelog * Wed Jan 23 2013 Jens Petersen - 3.1-13 -- fix pod parsing error in lit.pod: "=back without =over" +- fix some docs pod markup errors to build with new perl-Pod-Parser * Mon Oct 29 2012 Richard W.M. Jones - 3.1-12 - Rebuild for OCaml 4.00.1. From 4040d82d1b07b94c671f843d361be57f675f612a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 25 Jan 2013 18:30:43 +0100 Subject: [PATCH 55/94] Rebuilt for GCC 4.8.0 --- llvm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 4f7693f..d199345 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,7 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version -%global gcc_version 4.7.2 +%global gcc_version 4.8.0 %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -561,6 +561,9 @@ exit 0 %endif %changelog +* Fri Jan 25 2013 Kalev Lember - 3.1-14 +- Rebuilt for GCC 4.8.0 + * Wed Jan 23 2013 Jens Petersen - 3.1-13 - fix some docs pod markup errors to build with new perl-Pod-Parser From 74f5b79ee79f9744802f5cb5191e77710dfde80e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 31 Jan 2013 16:56:20 +0900 Subject: [PATCH 56/94] move lvm-config manpage to devel subpackage (#855882) --- llvm.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index d199345..31dfb9f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -483,6 +483,7 @@ exit 0 %exclude %{_mandir}/man1/clang.1.* %endif %doc %{_mandir}/man1/*.1.* +%exclude %{_mandir}/man1/llvm-config.1.* %files devel %defattr(-,root,root,-) @@ -490,6 +491,7 @@ exit 0 %{_includedir}/%{name} %{_includedir}/%{name}-c %{_libdir}/%{name}/*.a +%doc %{_mandir}/man1/llvm-config.1.* %files libs %defattr(-,root,root,-) @@ -561,6 +563,9 @@ exit 0 %endif %changelog +* Thu Jan 31 2013 Jens Petersen - 3.1-15 +- move lvm-config manpage to devel subpackage (#855882) + * Fri Jan 25 2013 Kalev Lember - 3.1-14 - Rebuilt for GCC 4.8.0 From 30312b57973947f8cce0fb48194f7e60bbba9d74 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 31 Jan 2013 18:02:29 +0900 Subject: [PATCH 57/94] pod2man moved to perl-podlators in F19 --- llvm.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm.spec b/llvm.spec index 31dfb9f..365db29 100644 --- a/llvm.spec +++ b/llvm.spec @@ -86,6 +86,8 @@ BuildRequires: dejagnu tcl-devel python %if %{with doxygen} BuildRequires: doxygen graphviz %endif +# pod2man moved to perl-podlators in F19 +BuildRequires: %{_bindir}/pod2man Requires: llvm-libs%{?_isa} = %{version}-%{release} %description @@ -565,6 +567,7 @@ exit 0 %changelog * Thu Jan 31 2013 Jens Petersen - 3.1-15 - move lvm-config manpage to devel subpackage (#855882) +- pod2man moved to perl-podlators in F19 * Fri Jan 25 2013 Kalev Lember - 3.1-14 - Rebuilt for GCC 4.8.0 From a185901e955b539aaf2f08a48a563fad06dc79cc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 6 Feb 2013 10:12:22 +0900 Subject: [PATCH 58/94] configure gcc arch include dir again with --with-c-include-dirs (#893817) (was in F16 but dropped during F17 development in 3.0-0.1.rc3) - BR gcc and gcc-c++ with gcc_version --- llvm.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/llvm.spec b/llvm.spec index 365db29..f403772 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 15%{?dist} +Release: 16%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -69,7 +69,8 @@ Patch800: llvm-3.1-docs-pod-markup-fixes.patch BuildRequires: bison BuildRequires: chrpath BuildRequires: flex -BuildRequires: gcc-c++ >= 3.4 +BuildRequires: gcc = %{gcc_version} +BuildRequires: gcc-c++ = %{gcc_version} BuildRequires: groff BuildRequires: libffi-devel BuildRequires: libtool-ltdl-devel @@ -315,7 +316,8 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ --enable-debug-runtime \ --enable-jit \ --enable-libffi \ - --enable-shared + --enable-shared \ + --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) # FIXME file this # configure does not properly specify libdir @@ -565,6 +567,11 @@ exit 0 %endif %changelog +* Mon Feb 4 2013 Jens Petersen - 3.1-16 +- bring back configuration for gcc arch include dir (#893817) + which was dropped in 3.0-0.1.rc3 +- BR gcc and gcc-c++ with gcc_version + * Thu Jan 31 2013 Jens Petersen - 3.1-15 - move lvm-config manpage to devel subpackage (#855882) - pod2man moved to perl-podlators in F19 From b8204c16e049b4844a05f91206f42e5c40db07c9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 8 Feb 2013 18:41:26 +0900 Subject: [PATCH 59/94] acknowledge Yury Zaytsev for his help with #893817 --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index f403772..49d7a9f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -568,7 +568,7 @@ exit 0 %changelog * Mon Feb 4 2013 Jens Petersen - 3.1-16 -- bring back configuration for gcc arch include dir (#893817) +- bring back configuration for gcc arch include dir (Yury Zaytsev, #893817) which was dropped in 3.0-0.1.rc3 - BR gcc and gcc-c++ with gcc_version From 2f5517cd536b010c7640e7af791e45093714c2cc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 13 Feb 2013 20:52:19 +0900 Subject: [PATCH 60/94] update to 3.2 with R600 patchset from tstellar's git repo - llvm-fix-ghc.patch is upstream - llvm-3.1-docs-pod-markup-fixes.patch no longer needed - add llvm-3.2-clang-driver-secondary-arch-triplets.patch (#803433) - build with gcc/g++ even if clang is installed - use gcc -dumpversion again to set gcc_version - llvm-config.1 manpage is no longer --- .gitignore | 3 + 0001-Add-r600-TargetInfo.patch | 100 ---------------- ...-r600-Add-some-intrinsic-definitions.patch | 64 ---------- ...bal_size-and-get_local_size-intrinsi.patch | 27 ----- 0002-r600-Add-some-target-builtins.patch | 111 ------------------ ...obal_size-and-read_local_size-builti.patch | 31 ----- ...clang-driver-secondary-arch-triplets.patch | 26 ++++ llvm.spec | 60 ++++------ sources | 5 +- 9 files changed, 57 insertions(+), 370 deletions(-) delete mode 100644 0001-Add-r600-TargetInfo.patch delete mode 100644 0001-r600-Add-some-intrinsic-definitions.patch delete mode 100644 0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch delete mode 100644 0002-r600-Add-some-target-builtins.patch delete mode 100644 0003-r600-Add-read_global_size-and-read_local_size-builti.patch create mode 100644 llvm-3.2-clang-driver-secondary-arch-triplets.patch diff --git a/.gitignore b/.gitignore index 04b6431..2c6da01 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ /clang-3.0.tar.gz /clang-3.1.src.tar.gz /llvm-3.1.src.tar.gz +/llvm-3.2-R600-tstellar-git-b53ed46.patch.gz +/llvm-3.2.src.tar.gz +/clang-3.2.src.tar.gz diff --git a/0001-Add-r600-TargetInfo.patch b/0001-Add-r600-TargetInfo.patch deleted file mode 100644 index 929b5d3..0000000 --- a/0001-Add-r600-TargetInfo.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 70cae83ffd093f183dec07c464db3c0bb6b92c10 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Fri, 2 Mar 2012 10:54:52 -0500 -Subject: [PATCH 1/3] Add r600 TargetInfo - ---- - lib/Basic/Targets.cpp | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 70 insertions(+), 0 deletions(-) - -diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp -index 85dfd78..64dc01c 100644 ---- a/lib/Basic/Targets.cpp -+++ b/lib/Basic/Targets.cpp -@@ -1068,6 +1068,73 @@ namespace { - } - - namespace { -+ -+class AMDGPUTargetInfo : public TargetInfo { -+public: -+ -+ AMDGPUTargetInfo(const std::string& triple) : TargetInfo(triple) { } -+ -+ virtual const char * getClobbers() const { -+ return ""; -+ } -+ -+ virtual void getGCCRegNames(const char * const *&Names, -+ unsigned &numNames) const { -+ Names = NULL; -+ numNames = 0; -+ } -+ -+ virtual void getGCCRegAliases(const GCCRegAlias *&Aliases, -+ unsigned &NumAliases) const { -+ Aliases = NULL; -+ NumAliases = 0; -+ } -+ -+ virtual bool validateAsmConstraint(const char *&Name, -+ TargetInfo::ConstraintInfo &info) const { -+ return true; -+ } -+ -+ virtual void getTargetBuiltins(const Builtin::Info *&Records, -+ unsigned &NumRecords) const { -+ Records = NULL; -+ NumRecords = 0; -+ } -+}; -+ -+ -+static const unsigned R600AddrSpaceMap[] = { -+ 1, // opencl_global -+ 3, // opencl_local -+ 2 // opencl_constant -+}; -+ -+class R600TargetInfo : public AMDGPUTargetInfo { -+public: -+ R600TargetInfo(const std::string& triple) : AMDGPUTargetInfo(triple) { -+ DescriptionString = -+ "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16" -+ "-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:32:32" -+ "-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64" -+ "-v96:128:128-v128:128:128-v192:256:256-v256:256:256" -+ "-v512:512:512-v1024:1024:1024-v2048:2048:2048" -+ "-n8:16:32:64"; -+ AddrSpaceMap = &R600AddrSpaceMap; -+ } -+ -+ virtual void getTargetDefines(const LangOptions &Opts, -+ MacroBuilder &Builder) const { -+ Builder.defineMacro("__R600__"); -+ } -+ -+ virtual const char * getVAListDeclaration() const { -+ return ""; -+ } -+}; -+ -+} // end anonymous namespace -+ -+namespace { - // MBlaze abstract base class - class MBlazeTargetInfo : public TargetInfo { - static const char * const GCCRegNames[]; -@@ -3963,6 +4030,9 @@ static TargetInfo *AllocateTarget(const std::string &T) { - case llvm::Triple::mblaze: - return new MBlazeTargetInfo(T); - -+ case llvm::Triple::r600: -+ return new R600TargetInfo(T); -+ - case llvm::Triple::sparc: - switch (os) { - case llvm::Triple::Linux: --- -1.7.7.6 - diff --git a/0001-r600-Add-some-intrinsic-definitions.patch b/0001-r600-Add-some-intrinsic-definitions.patch deleted file mode 100644 index 9d99c9c..0000000 --- a/0001-r600-Add-some-intrinsic-definitions.patch +++ /dev/null @@ -1,64 +0,0 @@ -From e25389b66b5ced3a2b5461077dcc9a505d334e3d Mon Sep 17 00:00:00 2001 -From: Tom Stellard -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 -+// -+ -+let TargetPrefix = "r600" in { -+ -+class R600ReadPreloadRegisterIntrinsic -+ : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, -+ GCCBuiltin; -+ -+multiclass R600ReadPreloadRegisterIntrinsic_xyz { -+ def _x : R600ReadPreloadRegisterIntrinsic; -+ def _y : R600ReadPreloadRegisterIntrinsic; -+ def _z : R600ReadPreloadRegisterIntrinsic; -+} -+ -+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/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch b/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch deleted file mode 100644 index db176dd..0000000 --- a/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 17667fa3450470f7c89fc2ba4631d908cf510749 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -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 { - def _z : R600ReadPreloadRegisterIntrinsic; - } - -+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/0002-r600-Add-some-target-builtins.patch b/0002-r600-Add-some-target-builtins.patch deleted file mode 100644 index 0003a8d..0000000 --- a/0002-r600-Add-some-target-builtins.patch +++ /dev/null @@ -1,111 +0,0 @@ -From a014573ad193775b2301e39275a1ca0ac3bb5847 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Tue, 13 Mar 2012 13:54:51 -0400 -Subject: [PATCH 2/3] r600: Add some target builtins - ---- - include/clang/Basic/BuiltinsR600.def | 32 ++++++++++++++++++++++++++++++++ - include/clang/Basic/TargetBuiltins.h | 10 ++++++++++ - lib/Basic/Targets.cpp | 12 ++++++++++-- - 3 files changed, 52 insertions(+), 2 deletions(-) - create mode 100644 include/clang/Basic/BuiltinsR600.def - -diff --git a/include/clang/Basic/BuiltinsR600.def b/include/clang/Basic/BuiltinsR600.def -new file mode 100644 -index 0000000..ce1f30e ---- /dev/null -+++ b/include/clang/Basic/BuiltinsR600.def -@@ -0,0 +1,32 @@ -+//===--- BuiltinsR600.def - R600 Builtin function database -- --*- C++ -*-===// -+// -+// The LLVM Compiler Infrastructure -+// -+// This file is distributed under the University of Illinois Open Source -+// License. See LICENSE.TXT for details. -+// -+//===----------------------------------------------------------------------===// -+// -+// This file defines the R600-specific builtin function database. Users of -+// this file must define the BUILTIN macro to make use of this information. -+// -+//===----------------------------------------------------------------------===// -+// -+// Authors: Tom Stellard -+// -+ -+// The format of this database matches clang/Basic/Builtins.def. -+ -+BUILTIN(__builtin_r600_read_ngroups_x, "z", "nc") -+BUILTIN(__builtin_r600_read_ngroups_y, "z", "nc") -+BUILTIN(__builtin_r600_read_ngroups_z, "z", "nc") -+ -+BUILTIN(__builtin_r600_read_tidig_x, "z", "nc") -+BUILTIN(__builtin_r600_read_tidig_y, "z", "nc") -+BUILTIN(__builtin_r600_read_tidig_z, "z", "nc") -+ -+BUILTIN(__builtin_r600_read_tgid_x, "z", "nc") -+BUILTIN(__builtin_r600_read_tgid_y, "z", "nc") -+BUILTIN(__builtin_r600_read_tgid_z, "z", "nc") -+ -+#undef BUILTIN -diff --git a/include/clang/Basic/TargetBuiltins.h b/include/clang/Basic/TargetBuiltins.h -index 7c04bf7..3460cd5 100644 ---- a/include/clang/Basic/TargetBuiltins.h -+++ b/include/clang/Basic/TargetBuiltins.h -@@ -45,6 +45,16 @@ namespace clang { - }; - } - -+ /// R600 builtins -+ namespace R600 { -+ enum { -+ LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1, -+#define BUILTIN(ID, TYPE, ATTRS) BI##ID, -+#include "clang/Basic/BuiltinsR600.def" -+ LastTSBuiltin -+ }; -+ } -+ - - /// X86 builtins - namespace X86 { -diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp -index 64dc01c..03f1a18 100644 ---- a/lib/Basic/Targets.cpp -+++ b/lib/Basic/Targets.cpp -@@ -1070,6 +1070,7 @@ namespace { - namespace { - - class AMDGPUTargetInfo : public TargetInfo { -+ static const Builtin::Info BuiltinInfo[]; - public: - - AMDGPUTargetInfo(const std::string& triple) : TargetInfo(triple) { } -@@ -1097,8 +1098,8 @@ public: - - virtual void getTargetBuiltins(const Builtin::Info *&Records, - unsigned &NumRecords) const { -- Records = NULL; -- NumRecords = 0; -+ Records = BuiltinInfo; -+ NumRecords = clang::R600::LastTSBuiltin-Builtin::FirstTSBuiltin; - } - }; - -@@ -1132,6 +1133,13 @@ public: - } - }; - -+const Builtin::Info AMDGPUTargetInfo::BuiltinInfo[] = { -+#define BUILTIN(ID, TYPE, ATTRS) { #ID, TYPE, ATTRS, 0, ALL_LANGUAGES }, -+#define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) { #ID, TYPE, ATTRS, HEADER,\ -+ ALL_LANGUAGES }, -+#include "clang/Basic/BuiltinsR600.def" -+}; -+ - } // end anonymous namespace - - namespace { --- -1.7.7.6 - diff --git a/0003-r600-Add-read_global_size-and-read_local_size-builti.patch b/0003-r600-Add-read_global_size-and-read_local_size-builti.patch deleted file mode 100644 index e0c2d3b..0000000 --- a/0003-r600-Add-read_global_size-and-read_local_size-builti.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2881b8189dcacc8ab6a336f0e107d72752c8c47e Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Wed, 14 Mar 2012 11:20:08 -0400 -Subject: [PATCH 3/3] r600: Add read_global_size and read_local_size builtins - ---- - include/clang/Basic/BuiltinsR600.def | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) - -diff --git a/include/clang/Basic/BuiltinsR600.def b/include/clang/Basic/BuiltinsR600.def -index ce1f30e..c81758e 100644 ---- a/include/clang/Basic/BuiltinsR600.def -+++ b/include/clang/Basic/BuiltinsR600.def -@@ -17,6 +17,14 @@ - - // The format of this database matches clang/Basic/Builtins.def. - -+BUILTIN(__builtin_r600_read_global_size_x, "z", "nc") -+BUILTIN(__builtin_r600_read_global_size_y, "z", "nc") -+BUILTIN(__builtin_r600_read_global_size_z, "z", "nc") -+ -+BUILTIN(__builtin_r600_read_local_size_x, "z", "nc") -+BUILTIN(__builtin_r600_read_local_size_y, "z", "nc") -+BUILTIN(__builtin_r600_read_local_size_z, "z", "nc") -+ - BUILTIN(__builtin_r600_read_ngroups_x, "z", "nc") - BUILTIN(__builtin_r600_read_ngroups_y, "z", "nc") - BUILTIN(__builtin_r600_read_ngroups_z, "z", "nc") --- -1.7.7.6 - diff --git a/llvm-3.2-clang-driver-secondary-arch-triplets.patch b/llvm-3.2-clang-driver-secondary-arch-triplets.patch new file mode 100644 index 0000000..cfbbd36 --- /dev/null +++ b/llvm-3.2-clang-driver-secondary-arch-triplets.patch @@ -0,0 +1,26 @@ +--- llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp~ 2012-12-17 00:59:27.000000000 +0900 ++++ llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp 2013-02-12 19:18:00.755164292 +0900 +@@ -1054,10 +1054,12 @@ + static const char *const ARMLibDirs[] = { "/lib" }; + static const char *const ARMTriples[] = { + "arm-linux-gnueabi", +- "arm-linux-androideabi" ++ "arm-linux-androideabi", ++ "armv5tel-redhat-linux-gnueabi", + }; + static const char *const ARMHFTriples[] = { + "arm-linux-gnueabihf", ++ "armv7hl-redhat-linux-gnueabi", + }; + + static const char *const X86_64LibDirs[] = { "/lib64", "/lib" }; +@@ -1104,7 +1106,8 @@ + "powerpc-linux-gnu", + "powerpc-unknown-linux-gnu", + "powerpc-suse-linux", +- "powerpc-montavista-linuxspe" ++ "powerpc-montavista-linuxspe", ++ "ppc64-redhat-linux", + }; + static const char *const PPC64LibDirs[] = { "/lib64", "/lib" }; + static const char *const PPC64Triples[] = { diff --git a/llvm.spec b/llvm.spec index 49d7a9f..bd994ee 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,7 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version -%global gcc_version 4.8.0 +%global gcc_version %(gcc -dumpversion) %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -35,8 +35,8 @@ ExcludeArch: s390 s390x ppc ppc64 %endif Name: llvm -Version: 3.1 -Release: 16%{?dist} +Version: 3.2 +Release: 1%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -48,23 +48,14 @@ Source1: %{downloadurl}/clang-%{version}%{?prerel:%{prerel}}.src.tar.gz Source2: llvm-Config-config.h Source3: llvm-Config-llvm-config.h - # Data files should be installed with timestamps preserved Patch0: llvm-2.6-timestamp.patch -# r600 llvm and clang patches -Patch600: 0001-r600-Add-some-intrinsic-definitions.patch -Patch601: 0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch +Patch10: llvm-3.2-clang-driver-secondary-arch-triplets.patch -Patch610: 0001-Add-r600-TargetInfo.patch -Patch611: 0002-r600-Add-some-target-builtins.patch -Patch612: 0003-r600-Add-read_global_size-and-read_local_size-builti.patch - -# ghc -Patch700: llvm-fix-ghc.patch - -# doc -Patch800: llvm-3.1-docs-pod-markup-fixes.patch +# diff generated against http://cgit.freedesktop.org/~tstellar/llvm/ +# (includes committed http://people.freedesktop.org/~tstellar/llvm/3.2/bug-fixes/) +Patch600: llvm-3.2-R600-tstellar-git-b53ed46.patch.gz BuildRequires: bison BuildRequires: chrpath @@ -262,24 +253,11 @@ mv clang-%{version}%{?prerel}.src tools/clang # llvm patches %patch0 -p1 -b .timestamp -#patch1 -p1 -b .link_llvmgold_to_lto -# r600 llvm patch -%patch600 -p1 -b .r600 -%patch601 -p1 -b .r601 +# clang triplets +%patch10 -p1 -b .orig -# clang patches -%if %{with clang} -pushd tools/clang -%patch610 -p1 -b .r610 -%patch611 -p1 -b .r611 -%patch612 -p1 -b .r612 -popd -%endif - -%patch700 -p0 -b .ghc - -%patch800 -p1 -b .r800 +%patch600 -p1 -b .orig # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ @@ -291,6 +269,9 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ # https://bugzilla.redhat.com/show_bug.cgi?id=791365 %global optflags %(echo %{optflags} | sed 's/-O2 /-O2 -fno-tree-pre /') +# building with clang failing +export CC=gcc +export CXX=c++ # Disabling assertions now, rec. by pure and needed for OpenGTL %configure \ --prefix=%{_prefix} \ @@ -317,7 +298,8 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ --enable-jit \ --enable-libffi \ --enable-shared \ - --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) + --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) \ + --enable-experimental-targets=R600 # FIXME file this # configure does not properly specify libdir @@ -487,7 +469,6 @@ exit 0 %exclude %{_mandir}/man1/clang.1.* %endif %doc %{_mandir}/man1/*.1.* -%exclude %{_mandir}/man1/llvm-config.1.* %files devel %defattr(-,root,root,-) @@ -495,7 +476,6 @@ exit 0 %{_includedir}/%{name} %{_includedir}/%{name}-c %{_libdir}/%{name}/*.a -%doc %{_mandir}/man1/llvm-config.1.* %files libs %defattr(-,root,root,-) @@ -567,6 +547,16 @@ exit 0 %endif %changelog +* Wed Feb 13 2013 Jens Petersen - 3.2-1 +- update to 3.2 +- update R600 patches to Tom Stellard's git tree +- llvm-fix-ghc.patch is upstream +- llvm-3.1-docs-pod-markup-fixes.patch no longer needed +- add llvm-3.2-clang-driver-secondary-arch-triplets.patch (#803433) +- build with gcc/g++ even if clang is installed +- use gcc -dumpversion again to set gcc_version +- llvm-config.1 manpage is no longer + * Mon Feb 4 2013 Jens Petersen - 3.1-16 - bring back configuration for gcc arch include dir (Yury Zaytsev, #893817) which was dropped in 3.0-0.1.rc3 diff --git a/sources b/sources index 7c21d05..15c790f 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ -59bf2d3120a3805f27cafda3823caaf8 clang-3.1.src.tar.gz -16eaa7679f84113f65b12760fdfe4ee1 llvm-3.1.src.tar.gz +3896ef4334df08563b05d0848ba80582 clang-3.2.src.tar.gz +71610289bbc819e3e15fdd562809a2d7 llvm-3.2.src.tar.gz +0c32fc1b5ccabe5470c0d1083f6d800c llvm-3.2-R600-tstellar-git-b53ed46.patch.gz From e00c2256e8205af8aced0b9a5b8708880999de26 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 19 Feb 2013 16:19:03 +0900 Subject: [PATCH 61/94] do not version the gcc BRs to keep koji srpm creation happy koji does not have gcc in the srpm buildroot --- llvm.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm.spec b/llvm.spec index bd994ee..73b0809 100644 --- a/llvm.spec +++ b/llvm.spec @@ -60,8 +60,8 @@ Patch600: llvm-3.2-R600-tstellar-git-b53ed46.patch.gz BuildRequires: bison BuildRequires: chrpath BuildRequires: flex -BuildRequires: gcc = %{gcc_version} -BuildRequires: gcc-c++ = %{gcc_version} +BuildRequires: gcc +BuildRequires: gcc-c++ BuildRequires: groff BuildRequires: libffi-devel BuildRequires: libtool-ltdl-devel @@ -134,7 +134,7 @@ License: NCSA Group: Development/Languages Requires: llvm%{?_isa} = %{version}-%{release} # clang requires gcc, clang++ requires libstdc++-devel -Requires: gcc +Requires: gcc = %{gcc_version} Requires: libstdc++-devel = %{gcc_version} %description -n clang From 4e85cfa1b52bfc72d9361a5505ce66f1bd98b68d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 19 Feb 2013 16:29:30 +0900 Subject: [PATCH 62/94] ok hardcode gcc_version again for koji building --- llvm.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llvm.spec b/llvm.spec index 73b0809..75f1606 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,7 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version -%global gcc_version %(gcc -dumpversion) +%global gcc_version 4.8.0 %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -60,8 +60,8 @@ Patch600: llvm-3.2-R600-tstellar-git-b53ed46.patch.gz BuildRequires: bison BuildRequires: chrpath BuildRequires: flex -BuildRequires: gcc -BuildRequires: gcc-c++ +BuildRequires: gcc = %{gcc_version} +BuildRequires: gcc-c++ = %{gcc_version} BuildRequires: groff BuildRequires: libffi-devel BuildRequires: libtool-ltdl-devel @@ -554,7 +554,6 @@ exit 0 - llvm-3.1-docs-pod-markup-fixes.patch no longer needed - add llvm-3.2-clang-driver-secondary-arch-triplets.patch (#803433) - build with gcc/g++ even if clang is installed -- use gcc -dumpversion again to set gcc_version - llvm-config.1 manpage is no longer * Mon Feb 4 2013 Jens Petersen - 3.1-16 From 97e156aa421670bd286ac2eb006f0cb70fa1bc57 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 8 Mar 2013 05:41:56 -0500 Subject: [PATCH 63/94] Update R600 patches - Move static libs to -static subpackage - Prep for F18 backport --- .gitignore | 1 + ...low-type-promotion-for-scalar-stores.patch | 30 ++++++++++ ...eDAG-Allow-promotion-of-scalar-loads.patch | 29 +++++++++ ...d-generating-illegal-vector-INT_TO_F.patch | 53 ++++++++++++++++ llvm.spec | 60 ++++++++++++++----- sources | 2 +- 6 files changed, 160 insertions(+), 15 deletions(-) create mode 100644 0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch create mode 100644 0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch create mode 100644 0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch diff --git a/.gitignore b/.gitignore index 2c6da01..f398901 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /llvm-3.2-R600-tstellar-git-b53ed46.patch.gz /llvm-3.2.src.tar.gz /clang-3.2.src.tar.gz +/R600-Mesa-9.1.patch.gz diff --git a/0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch b/0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch new file mode 100644 index 0000000..72c81cf --- /dev/null +++ b/0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch @@ -0,0 +1,30 @@ +From af4d115e2c9c4cfd8b099aaef9a13c2972c36272 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Thu, 6 Dec 2012 18:05:30 +0000 +Subject: [PATCH] LegalizeDAG: Allow type promotion for scalar stores + +--- + lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +index abf40b7..9946694 100644 +--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ++++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +@@ -731,9 +731,10 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) { + return; + } + case TargetLowering::Promote: { +- assert(VT.isVector() && "Unknown legal promote case!"); +- Value = DAG.getNode(ISD::BITCAST, dl, +- TLI.getTypeToPromoteTo(ISD::STORE, VT), Value); ++ EVT NVT = TLI.getTypeToPromoteTo(ISD::STORE, VT); ++ assert(NVT.getSizeInBits() == VT.getSizeInBits() && ++ "Can only promote stores to same size type"); ++ Value = DAG.getNode(ISD::BITCAST, dl, NVT, Value); + SDValue Result = + DAG.getStore(Chain, dl, Value, Ptr, + ST->getPointerInfo(), isVolatile, +-- +1.7.11.4 + diff --git a/0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch b/0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch new file mode 100644 index 0000000..f136bda --- /dev/null +++ b/0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch @@ -0,0 +1,29 @@ +From 831cdb83e03319eeb36b6249e20e2908672397c2 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Thu, 6 Dec 2012 22:43:13 +0000 +Subject: [PATCH] LegalizeDAG: Allow promotion of scalar loads + +--- + lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +index 9946694..2596f00 100644 +--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ++++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +@@ -890,10 +890,9 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) { + break; + } + case TargetLowering::Promote: { +- // Only promote a load of vector type to another. +- assert(VT.isVector() && "Cannot promote this load!"); +- // Change base type to a different vector type. + EVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT); ++ assert(NVT.getSizeInBits() == VT.getSizeInBits() && ++ "Can only promote loads to same size type"); + + SDValue Res = DAG.getLoad(NVT, dl, Chain, Ptr, LD->getPointerInfo(), + LD->isVolatile(), LD->isNonTemporal(), +-- +1.7.11.4 + diff --git a/0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch b/0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch new file mode 100644 index 0000000..f4c4e1e --- /dev/null +++ b/0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch @@ -0,0 +1,53 @@ +From 85259e7305201764ae9d85a7cbf2809da779bf5c Mon Sep 17 00:00:00 2001 +From: tstellar +Date: Wed, 2 Jan 2013 22:13:01 +0000 +Subject: [PATCH] DAGCombiner: Avoid generating illegal vector INT_TO_FP nodes + +DAGCombiner::reduceBuildVecConvertToConvertBuildVec() was making two +mistakes: + +1. It was checking the legality of scalar INT_TO_FP nodes and then generating +vector nodes. + +2. It was passing the result value type to +TargetLoweringInfo::getOperationAction() when it should have been +passing the value type of the first operand. + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171420 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 9 +++--- + .../R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll | 33 ++++++++++++++++++++++ + test/CodeGen/R600/vec4-expand.ll | 3 -- + test/CodeGen/X86/cvtv2f32.ll | 4 +++ + 4 files changed, 42 insertions(+), 7 deletions(-) + create mode 100644 test/CodeGen/R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll + +diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +index 37d7731..d0ca5c0 100644 +--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ++++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +@@ -8514,11 +8514,8 @@ SDValue DAGCombiner::reduceBuildVecConvertToConvertBuildVec(SDNode *N) { + if (Opcode == ISD::DELETED_NODE && + (Opc == ISD::UINT_TO_FP || Opc == ISD::SINT_TO_FP)) { + Opcode = Opc; +- // If not supported by target, bail out. +- if (TLI.getOperationAction(Opcode, VT) != TargetLowering::Legal && +- TLI.getOperationAction(Opcode, VT) != TargetLowering::Custom) +- return SDValue(); + } ++ + if (Opc != Opcode) + return SDValue(); + +@@ -8543,6 +8540,10 @@ SDValue DAGCombiner::reduceBuildVecConvertToConvertBuildVec(SDNode *N) { + assert(SrcVT != MVT::Other && "Cannot determine source type!"); + + EVT NVT = EVT::getVectorVT(*DAG.getContext(), SrcVT, NumInScalars); ++ ++ if (!TLI.isOperationLegalOrCustom(Opcode, NVT)) ++ return SDValue(); ++ + SmallVector Opnds; + for (unsigned i = 0; i != NumInScalars; ++i) { + SDValue In = N->getOperand(i); + diff --git a/llvm.spec b/llvm.spec index 75f1606..4aa3802 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,11 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version +%if 0%{?fedora} == 18 +%global gcc_version 4.7.2 +%else %global gcc_version 4.8.0 +%endif %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -15,12 +19,7 @@ %bcond_without ocaml %endif -%if 0%{?rhel} >= 7 -%bcond_with clang -ExcludeArch: s390 s390x ppc ppc64 -%else %bcond_without clang -%endif #global prerel rcX %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} @@ -36,7 +35,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -53,9 +52,22 @@ Patch0: llvm-2.6-timestamp.patch Patch10: llvm-3.2-clang-driver-secondary-arch-triplets.patch -# diff generated against http://cgit.freedesktop.org/~tstellar/llvm/ -# (includes committed http://people.freedesktop.org/~tstellar/llvm/3.2/bug-fixes/) -Patch600: llvm-3.2-R600-tstellar-git-b53ed46.patch.gz +# hack llvm-config to print -lLLVM-3.2svn instead of ALL THE THINGS +# +# you really, really, really want not to use the static libs, otherwise +# if you ever end up with two (static) copies of llvm in the same process +# things will go boom quite nicely +# +# this isn't enabled yet because it makes the ocaml bindings fail the +# test suite. i don't even. +Patch20: llvm-3.2-llvm-config-dso-hack.patch + +# from http://people.freedesktop.org/~tstellar/llvm/3.2/ as of 7 March 2013 +# ref: http://lists.freedesktop.org/archives/mesa-dev/2013-March/035561.html +Patch600: R600-Mesa-9.1.patch.gz +Patch601: 0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch +Patch602: 0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch +Patch603: 0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch BuildRequires: bison BuildRequires: chrpath @@ -96,7 +108,6 @@ Group: Development/Languages Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libffi-devel Requires: libstdc++-devel >= 3.4 -Provides: llvm-static = %{version}-%{release} Requires(posttrans): /usr/sbin/alternatives Requires(postun): /usr/sbin/alternatives @@ -127,6 +138,16 @@ Group: System Environment/Libraries Shared libraries for the LLVM compiler infrastructure. +%package static +Summary: LLVM static libraries +Group: Development/Languages +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description static +Static libraries for the LLVM compiler infrastructure. Not recommended +for general consumption. + + %if %{with clang} %package -n clang Summary: A C language family front-end for LLVM @@ -257,7 +278,13 @@ mv clang-%{version}%{?prerel}.src tools/clang # clang triplets %patch10 -p1 -b .orig +# fix llvm-config --libs +#patch20 -p1 -b .orig + %patch600 -p1 -b .orig +%patch601 -p1 -b .orig +%patch602 -p1 -b .orig +%patch603 -p1 -b .orig # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ @@ -282,9 +309,6 @@ export CXX=c++ %if %{with gold} --with-binutils-include=%{_includedir} \ %endif -%if 0%{?rhel} >= 7 - --enable-targets=host \ -%endif %ifarch armv7hl armv7l --with-cpu=cortex-a8 \ --with-tune=cortex-a8 \ @@ -475,7 +499,6 @@ exit 0 %{_bindir}/llvm-config-%{__isa_bits} %{_includedir}/%{name} %{_includedir}/%{name}-c -%{_libdir}/%{name}/*.a %files libs %defattr(-,root,root,-) @@ -486,6 +509,10 @@ exit 0 %endif %{_libdir}/%{name}/*.so +%files static +%defattr(-,root,root,-) +%{_libdir}/%{name}/*.a + %if %{with clang} %files -n clang %defattr(-,root,root,-) @@ -547,6 +574,11 @@ exit 0 %endif %changelog +* Fri Mar 08 2013 Adam Jackson 3.2-2 +- Update R600 patches +- Move static libs to -static subpackage +- Prep for F18 backport + * Wed Feb 13 2013 Jens Petersen - 3.2-1 - update to 3.2 - update R600 patches to Tom Stellard's git tree diff --git a/sources b/sources index 15c790f..ee6fb33 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ 3896ef4334df08563b05d0848ba80582 clang-3.2.src.tar.gz 71610289bbc819e3e15fdd562809a2d7 llvm-3.2.src.tar.gz -0c32fc1b5ccabe5470c0d1083f6d800c llvm-3.2-R600-tstellar-git-b53ed46.patch.gz +610deacbd5928bbc62f630512f7d0292 R600-Mesa-9.1.patch.gz From bd03f325e13e6f4c9ef6f516fb0ffee5cd7bb2e5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 8 Mar 2013 06:04:03 -0500 Subject: [PATCH 64/94] a pre-push hook to check if you +PatchN'd and didn't git-add might be cool --- llvm-3.2-llvm-config-dso-hack.patch | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 llvm-3.2-llvm-config-dso-hack.patch diff --git a/llvm-3.2-llvm-config-dso-hack.patch b/llvm-3.2-llvm-config-dso-hack.patch new file mode 100644 index 0000000..00dc39f --- /dev/null +++ b/llvm-3.2-llvm-config-dso-hack.patch @@ -0,0 +1,30 @@ +diff -up llvm-3.2.src/tools/llvm-config/llvm-config.cpp.jx llvm-3.2.src/tools/llvm-config/llvm-config.cpp +--- llvm-3.2.src/tools/llvm-config/llvm-config.cpp.jx 2013-03-07 07:13:24.000000000 -0500 ++++ llvm-3.2.src/tools/llvm-config/llvm-config.cpp 2013-03-07 07:39:26.485677609 -0500 +@@ -316,7 +316,9 @@ int main(int argc, char **argv) { + if (!HasAnyOption) + usage(); + +- if (PrintLibs || PrintLibNames || PrintLibFiles) { ++ if (PrintLibs) { ++ OS << "-lLLVM-3.2svn"; ++ } else if (PrintLibNames || PrintLibFiles) { + // If no components were specified, default to "all". + if (Components.empty()) + Components.push_back("all"); +@@ -335,15 +337,6 @@ int main(int argc, char **argv) { + OS << Lib; + } else if (PrintLibFiles) { + OS << ActiveLibDir << '/' << Lib; +- } else if (PrintLibs) { +- // If this is a typical library name, include it using -l. +- if (Lib.startswith("lib") && Lib.endswith(".a")) { +- OS << "-l" << Lib.slice(3, Lib.size()-2); +- continue; +- } +- +- // Otherwise, print the full path. +- OS << ActiveLibDir << '/' << Lib; + } + } + OS << '\n'; From c9608480ef41de959d046d805746d61e9e7b5247 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 31 Mar 2013 21:13:02 -0500 Subject: [PATCH 65/94] add a hack to clang defaulting arm to hardfloat --- clang-hardfloat-hack.patch | 13 +++++++++++++ llvm.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 clang-hardfloat-hack.patch diff --git a/clang-hardfloat-hack.patch b/clang-hardfloat-hack.patch new file mode 100644 index 0000000..f1b0c60 --- /dev/null +++ b/clang-hardfloat-hack.patch @@ -0,0 +1,13 @@ +--- llvm-3.2.src.orig/tools/clang/lib/Driver/Tools.cpp 2012-11-21 01:56:23.000000000 -0600 ++++ llvm-3.2.src/tools/clang/lib/Driver/Tools.cpp 2013-03-31 21:08:41.890206683 -0500 +@@ -688,8 +688,8 @@ + } + default: + // Assume "soft", but warn the user we are guessing. +- FloatABI = "soft"; +- D.Diag(diag::warn_drv_assuming_mfloat_abi_is) << "soft"; ++ FloatABI = "hard"; ++ D.Diag(diag::warn_drv_assuming_mfloat_abi_is) << "hard"; + break; + } + } diff --git a/llvm.spec b/llvm.spec index 4aa3802..acd4159 100644 --- a/llvm.spec +++ b/llvm.spec @@ -35,7 +35,7 @@ Name: llvm Version: 3.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -51,6 +51,7 @@ Source3: llvm-Config-llvm-config.h Patch0: llvm-2.6-timestamp.patch Patch10: llvm-3.2-clang-driver-secondary-arch-triplets.patch +Patch11: clang-hardfloat-hack.patch # hack llvm-config to print -lLLVM-3.2svn instead of ALL THE THINGS # @@ -277,6 +278,7 @@ mv clang-%{version}%{?prerel}.src tools/clang # clang triplets %patch10 -p1 -b .orig +%patch11 -p1 -b .orig # fix llvm-config --libs #patch20 -p1 -b .orig @@ -574,6 +576,9 @@ exit 0 %endif %changelog +* Sun Mar 31 2013 Dennis Gilmore - 3.2-3 +- add a hack to clang defaulting arm to hardfloat + * Fri Mar 08 2013 Adam Jackson 3.2-2 - Update R600 patches - Move static libs to -static subpackage From 4a3f4354c79bf65edf39606afc604c5c25aec8b6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 4 Apr 2013 12:39:32 +0900 Subject: [PATCH 66/94] fix old bogus date and drop llvm-3.2-clang-driver-secondary-arch-triplets.patch since it didn't actually help - insufficient The triplets issue (#803433) really needs badly to be reported upstream. --- ...clang-driver-secondary-arch-triplets.patch | 26 ------------------- llvm.spec | 12 +++++---- 2 files changed, 7 insertions(+), 31 deletions(-) delete mode 100644 llvm-3.2-clang-driver-secondary-arch-triplets.patch diff --git a/llvm-3.2-clang-driver-secondary-arch-triplets.patch b/llvm-3.2-clang-driver-secondary-arch-triplets.patch deleted file mode 100644 index cfbbd36..0000000 --- a/llvm-3.2-clang-driver-secondary-arch-triplets.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp~ 2012-12-17 00:59:27.000000000 +0900 -+++ llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp 2013-02-12 19:18:00.755164292 +0900 -@@ -1054,10 +1054,12 @@ - static const char *const ARMLibDirs[] = { "/lib" }; - static const char *const ARMTriples[] = { - "arm-linux-gnueabi", -- "arm-linux-androideabi" -+ "arm-linux-androideabi", -+ "armv5tel-redhat-linux-gnueabi", - }; - static const char *const ARMHFTriples[] = { - "arm-linux-gnueabihf", -+ "armv7hl-redhat-linux-gnueabi", - }; - - static const char *const X86_64LibDirs[] = { "/lib64", "/lib" }; -@@ -1104,7 +1106,8 @@ - "powerpc-linux-gnu", - "powerpc-unknown-linux-gnu", - "powerpc-suse-linux", -- "powerpc-montavista-linuxspe" -+ "powerpc-montavista-linuxspe", -+ "ppc64-redhat-linux", - }; - static const char *const PPC64LibDirs[] = { "/lib64", "/lib" }; - static const char *const PPC64Triples[] = { diff --git a/llvm.spec b/llvm.spec index acd4159..8649b6e 100644 --- a/llvm.spec +++ b/llvm.spec @@ -35,7 +35,7 @@ Name: llvm Version: 3.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -50,7 +50,6 @@ Source3: llvm-Config-llvm-config.h # Data files should be installed with timestamps preserved Patch0: llvm-2.6-timestamp.patch -Patch10: llvm-3.2-clang-driver-secondary-arch-triplets.patch Patch11: clang-hardfloat-hack.patch # hack llvm-config to print -lLLVM-3.2svn instead of ALL THE THINGS @@ -276,8 +275,7 @@ mv clang-%{version}%{?prerel}.src tools/clang # llvm patches %patch0 -p1 -b .timestamp -# clang triplets -%patch10 -p1 -b .orig +# arm hard float %patch11 -p1 -b .orig # fix llvm-config --libs @@ -576,6 +574,10 @@ exit 0 %endif %changelog +* Thu Apr 4 2013 Jens Petersen - 3.2-4 +- fix bogus date for 2.9-0.2.rc1 +- drop insufficient llvm-3.2-clang-driver-secondary-arch-triplets.patch + * Sun Mar 31 2013 Dennis Gilmore - 3.2-3 - add a hack to clang defaulting arm to hardfloat @@ -725,7 +727,7 @@ exit 0 * Fri Mar 25 2011 Michel Salim - 2.9-0.3.rc2 - Update to 2.9rc2 -* Thu Mar 18 2011 Michel Salim - 2.9-0.2.rc1 +* Thu Mar 17 2011 Michel Salim - 2.9-0.2.rc1 - Split shared libraries into separate subpackage - Don't include test logs; breaks multilib (# 666195) - clang++: also search for platform-specific include files (# 680644) From bb18301e2a544676ba9d0704d448301a0a7dd9d1 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 1 May 2013 17:33:11 -0400 Subject: [PATCH 67/94] Tweak ld flags for memory usage and performance --- llvm-3.2-symbolic-shlib.patch | 12 ++++++++++++ llvm.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 llvm-3.2-symbolic-shlib.patch diff --git a/llvm-3.2-symbolic-shlib.patch b/llvm-3.2-symbolic-shlib.patch new file mode 100644 index 0000000..64d0422 --- /dev/null +++ b/llvm-3.2-symbolic-shlib.patch @@ -0,0 +1,12 @@ +diff -up llvm-3.2.src/tools/llvm-shlib/Makefile.jx llvm-3.2.src/tools/llvm-shlib/Makefile +--- llvm-3.2.src/tools/llvm-shlib/Makefile.jx 2012-08-06 16:52:18.000000000 -0400 ++++ llvm-3.2.src/tools/llvm-shlib/Makefile 2013-05-01 16:55:20.286980046 -0400 +@@ -76,7 +76,7 @@ endif + + ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU)) + # Don't allow unresolved symbols. +- LLVMLibsOptions += -Wl,--no-undefined ++ LLVMLibsOptions += -Wl,--no-undefined -Wl,-Bsymbolic + endif + + ifeq ($(HOST_OS),SunOS) diff --git a/llvm.spec b/llvm.spec index 8649b6e..944e8d1 100644 --- a/llvm.spec +++ b/llvm.spec @@ -35,7 +35,7 @@ Name: llvm Version: 3.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -62,6 +62,9 @@ Patch11: clang-hardfloat-hack.patch # test suite. i don't even. Patch20: llvm-3.2-llvm-config-dso-hack.patch +# hack the link flags for the shared libs for speed and memory usage +Patch21: llvm-3.2-symbolic-shlib.patch + # from http://people.freedesktop.org/~tstellar/llvm/3.2/ as of 7 March 2013 # ref: http://lists.freedesktop.org/archives/mesa-dev/2013-March/035561.html Patch600: R600-Mesa-9.1.patch.gz @@ -280,6 +283,7 @@ mv clang-%{version}%{?prerel}.src tools/clang # fix llvm-config --libs #patch20 -p1 -b .orig +%patch21 -p1 -b .orig %patch600 -p1 -b .orig %patch601 -p1 -b .orig @@ -574,6 +578,9 @@ exit 0 %endif %changelog +* Wed May 01 2013 Adam Jackson 3.2-5 +- Tweak ld flags for memory usage and performance + * Thu Apr 4 2013 Jens Petersen - 3.2-4 - fix bogus date for 2.9-0.2.rc1 - drop insufficient llvm-3.2-clang-driver-secondary-arch-triplets.patch From 6531bd75df164132f20601010078ffe8a60cfb46 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 6 May 2013 12:00:54 -0400 Subject: [PATCH 68/94] Only build codegen backends for arches that actually exist in Fedora --- llvm.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 944e8d1..a81e4d6 100644 --- a/llvm.spec +++ b/llvm.spec @@ -35,7 +35,7 @@ Name: llvm Version: 3.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -327,6 +327,7 @@ export CXX=c++ --enable-libffi \ --enable-shared \ --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) \ + --enable-targets=x86,powerpc,arm,cpp,nvptx \ --enable-experimental-targets=R600 # FIXME file this @@ -578,6 +579,9 @@ exit 0 %endif %changelog +* Mon May 06 2013 Adam Jackson 3.2-6 +- Only build codegen backends for arches that actually exist in Fedora + * Wed May 01 2013 Adam Jackson 3.2-5 - Tweak ld flags for memory usage and performance From 94fba1fe65b21a341639136711ec89719b877bc5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 8 May 2013 13:00:08 -0400 Subject: [PATCH 69/94] Bump to LLVM 3.3svn - Enable s390 backend --- .gitignore | 3 + llvm-3.2-llvm-config-dso-hack.patch | 2 +- llvm.spec | 94 ++++++++++++++--------------- sources | 6 +- 4 files changed, 53 insertions(+), 52 deletions(-) diff --git a/.gitignore b/.gitignore index f398901..78eed2e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ /llvm-3.2.src.tar.gz /clang-3.2.src.tar.gz /R600-Mesa-9.1.patch.gz +/clang-20130507.tar.xz +/compiler-rt-20130507.tar.xz +/llvm-20130507.tar.xz diff --git a/llvm-3.2-llvm-config-dso-hack.patch b/llvm-3.2-llvm-config-dso-hack.patch index 00dc39f..6b8c0af 100644 --- a/llvm-3.2-llvm-config-dso-hack.patch +++ b/llvm-3.2-llvm-config-dso-hack.patch @@ -7,7 +7,7 @@ diff -up llvm-3.2.src/tools/llvm-config/llvm-config.cpp.jx llvm-3.2.src/tools/ll - if (PrintLibs || PrintLibNames || PrintLibFiles) { + if (PrintLibs) { -+ OS << "-lLLVM-3.2svn"; ++ OS << "-lLLVM-3.3svn"; + } else if (PrintLibNames || PrintLibFiles) { // If no components were specified, default to "all". if (Components.empty()) diff --git a/llvm.spec b/llvm.spec index a81e4d6..ca1100b 100644 --- a/llvm.spec +++ b/llvm.spec @@ -19,11 +19,15 @@ %bcond_without ocaml %endif +# compiler-rt not actually working yet +%bcond_with crt %bcond_without clang #global prerel rcX %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} +%global gitdate 20130507 + # gold linker support # arch list from binutils spec %global gold_arches %ix86 x86_64 @@ -34,25 +38,33 @@ %endif Name: llvm -Version: 3.2 -Release: 6%{?dist} +Version: 3.3 +Release: 0.2.%{gitdate}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages License: NCSA URL: http://llvm.org/ -Source0: %{downloadurl}/llvm-%{version}%{?prerel:%{prerel}}.src.tar.gz -Source1: %{downloadurl}/clang-%{version}%{?prerel:%{prerel}}.src.tar.gz +#Source0: %{downloadurl}/llvm-%{version}%{?prerel:%{prerel}}.src.tar.gz +#Source1: %{downloadurl}/clang-%{version}%{?prerel:%{prerel}}.src.tar.gz +Source0: llvm-%{gitdate}.tar.xz +Source1: clang-%{gitdate}.tar.xz +Source2: compiler-rt-%{gitdate}.tar.xz # multilib fixes -Source2: llvm-Config-config.h -Source3: llvm-Config-llvm-config.h +Source10: llvm-Config-config.h +Source11: llvm-Config-llvm-config.h + +# snapshot scripts +Source100: make-llvm-snapshot.sh +Source101: make-clang-snapshot.sh +Source102: make-compiler-rt-snapshot.sh # Data files should be installed with timestamps preserved Patch0: llvm-2.6-timestamp.patch Patch11: clang-hardfloat-hack.patch -# hack llvm-config to print -lLLVM-3.2svn instead of ALL THE THINGS +# hack llvm-config to print -lLLVM-3.* instead of ALL THE THINGS # # you really, really, really want not to use the static libs, otherwise # if you ever end up with two (static) copies of llvm in the same process @@ -65,13 +77,6 @@ Patch20: llvm-3.2-llvm-config-dso-hack.patch # hack the link flags for the shared libs for speed and memory usage Patch21: llvm-3.2-symbolic-shlib.patch -# from http://people.freedesktop.org/~tstellar/llvm/3.2/ as of 7 March 2013 -# ref: http://lists.freedesktop.org/archives/mesa-dev/2013-March/035561.html -Patch600: R600-Mesa-9.1.patch.gz -Patch601: 0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch -Patch602: 0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch -Patch603: 0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch - BuildRequires: bison BuildRequires: chrpath BuildRequires: flex @@ -269,10 +274,15 @@ HTML documentation for LLVM's OCaml binding. %prep -%setup -q -n llvm-%{version}%{?prerel}.src %{?with_clang:-a1} +#setup -q -n llvm-%{version}%{?prerel}.src %{?with_clang:-a1} %{?with_crt:-a2} +%setup -q -n llvm-%{gitdate} %{?with_clang:-a1} %{?with_crt:-a2} rm -r -f tools/clang +rm -r -f llvm/projects/compiler-rt %if %{with clang} -mv clang-%{version}%{?prerel}.src tools/clang +mv clang-*/ tools/clang +%endif +%if %{with crt} +mv compiler-rt-*/ projects/compiler-rt %endif # llvm patches @@ -285,25 +295,14 @@ mv clang-%{version}%{?prerel}.src tools/clang #patch20 -p1 -b .orig %patch21 -p1 -b .orig -%patch600 -p1 -b .orig -%patch601 -p1 -b .orig -%patch602 -p1 -b .orig -%patch603 -p1 -b .orig - # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ ./configure - %build -# Build without -ftree-pre as a workaround for clang segfaulting on x86_64. -# https://bugzilla.redhat.com/show_bug.cgi?id=791365 -%global optflags %(echo %{optflags} | sed 's/-O2 /-O2 -fno-tree-pre /') - -# building with clang failing +# clang is lovely and all, but fedora builds with gcc export CC=gcc export CXX=c++ -# Disabling assertions now, rec. by pure and needed for OpenGTL %configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/%{name} \ @@ -323,11 +322,12 @@ export CXX=c++ %endif --disable-assertions \ --enable-debug-runtime \ + --enable-optimized \ --enable-jit \ --enable-libffi \ --enable-shared \ --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) \ - --enable-targets=x86,powerpc,arm,cpp,nvptx \ + --enable-targets=x86,powerpc,arm,cpp,nvptx,systemz \ --enable-experimental-targets=R600 # FIXME file this @@ -340,7 +340,7 @@ sed -i 's|ActiveLibDir = ActivePrefix + "/lib"|ActiveLibDir = ActivePrefix + "/% make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %ifarch ppc - OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments -UPPC" + OPTIMIZE_OPTION="%{optflags} -UPPC" %else OPTIMIZE_OPTION="%{optflags}" %endif @@ -360,9 +360,9 @@ mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}} pushd %{buildroot}%{_includedir}/llvm/Config mv config.h config-%{__isa_bits}.h -cp -p %{SOURCE2} config.h +cp -p %{SOURCE10} config.h mv llvm-config.h llvm-config-%{__isa_bits}.h -cp -p %{SOURCE3} llvm-config.h +cp -p %{SOURCE11} llvm-config.h popd # Create ld.so.conf.d entry @@ -430,26 +430,18 @@ find examples -name 'Makefile' | xargs -0r rm -f # the Koji build server does not seem to have enough RAM # for the default 16 threads +# the || : is wrong, i know, but the git snaps fail to make check due to +# broken makefiles in the doc dirs. + # LLVM test suite failing on ARM, PPC64 and s390(x) -make check LIT_ARGS="-v -j4" \ -%ifarch %{arm} ppc64 s390 s390x - | tee llvm-testlog-%{_arch}.txt -%else - %{nil} -%endif +make -k check LIT_ARGS="-v -j4" | tee llvm-testlog-%{_arch}.txt || : %if %{with clang} # clang test suite failing on PPC and s390(x) # FIXME: # unexpected failures on all platforms with GCC 4.7.0. # capture logs -make -C tools/clang/test TESTARGS="-v -j4" \ - | tee clang-testlog-%{_arch}.txt -#ifarch ppc ppc64 s390 s390x -# || : -#else -# %{nil} -#endif +make -C tools/clang/test TESTARGS="-v -j4" | tee clang-testlog-%{_arch}.txt || : %endif @@ -466,6 +458,10 @@ make -C tools/clang/test TESTARGS="-v -j4" \ # link llvm-config to the platform-specific file; # use ISA bits as priority so that 64-bit is preferred # over 32-bit if both are installed +# +# XXX ew alternatives though. seems like it'd be better to install a +# shell script that cases on $(arch) and calls out to the appropriate +# llvm-config-%d. alternatives \ --install \ %{_bindir}/llvm-config \ @@ -484,9 +480,6 @@ exit 0 %files %defattr(-,root,root,-) %doc CREDITS.TXT LICENSE.TXT README.txt -%ifarch %{arm} ppc64 s390 s390x -%doc llvm-testlog-%{_arch}.txt -%endif %{_bindir}/bugpoint %{_bindir}/llc %{_bindir}/lli @@ -501,6 +494,7 @@ exit 0 %files devel %defattr(-,root,root,-) +%doc llvm-testlog-%{_arch}.txt %{_bindir}/llvm-config-%{__isa_bits} %{_includedir}/%{name} %{_includedir}/%{name}-c @@ -579,6 +573,10 @@ exit 0 %endif %changelog +* Tue May 07 2013 Adam Jackson 3.3-0.1.20130507 +- Bump to LLVM 3.3svn +- Enable s390 backend + * Mon May 06 2013 Adam Jackson 3.2-6 - Only build codegen backends for arches that actually exist in Fedora diff --git a/sources b/sources index ee6fb33..d83f9f9 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -3896ef4334df08563b05d0848ba80582 clang-3.2.src.tar.gz -71610289bbc819e3e15fdd562809a2d7 llvm-3.2.src.tar.gz -610deacbd5928bbc62f630512f7d0292 R600-Mesa-9.1.patch.gz +f033b786761165f5b2cbe00ed861152b clang-20130507.tar.xz +f113764a80fc87ad2b5898b156fa8f4b compiler-rt-20130507.tar.xz +f8313d30e86c7f352f77da3521ead4da llvm-20130507.tar.xz From 9b3371e36854f5a493fcc39a6cc031231aead86e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 8 May 2013 13:05:11 -0400 Subject: [PATCH 70/94] add snapshot scripts --- make-clang-snapshot.sh | 18 ++++++++++++++++++ make-compiler-rt-snapshot.sh | 18 ++++++++++++++++++ make-llvm-snapshot.sh | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100755 make-clang-snapshot.sh create mode 100755 make-compiler-rt-snapshot.sh create mode 100755 make-llvm-snapshot.sh diff --git a/make-clang-snapshot.sh b/make-clang-snapshot.sh new file mode 100755 index 0000000..8414d83 --- /dev/null +++ b/make-clang-snapshot.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +DIRNAME=clang-$( date +%Y%m%d ) +URL=http://llvm.org/git/clang.git + +rm -rf $DIRNAME +git clone $URL $DIRNAME +cd $DIRNAME +if [ -z "$1" ]; then + git log | head -1 +else + git checkout $1 +fi +git log | head -1 | awk '{ print $2 }' > ../commitid +rm -rf .git +cd .. +tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz +rm -rf $DIRNAME diff --git a/make-compiler-rt-snapshot.sh b/make-compiler-rt-snapshot.sh new file mode 100755 index 0000000..0ae2a16 --- /dev/null +++ b/make-compiler-rt-snapshot.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +DIRNAME=compiler-rt-$( date +%Y%m%d ) +URL=http://llvm.org/git/compiler-rt.git + +rm -rf $DIRNAME +git clone $URL $DIRNAME +cd $DIRNAME +if [ -z "$1" ]; then + git log | head -1 +else + git checkout $1 +fi +git log | head -1 | awk '{ print $2 }' > ../commitid +rm -rf .git +cd .. +tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz +rm -rf $DIRNAME diff --git a/make-llvm-snapshot.sh b/make-llvm-snapshot.sh new file mode 100755 index 0000000..308ca7b --- /dev/null +++ b/make-llvm-snapshot.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +DIRNAME=llvm-$( date +%Y%m%d ) +URL=http://llvm.org/git/llvm.git + +rm -rf $DIRNAME +git clone $URL $DIRNAME +cd $DIRNAME +if [ -z "$1" ]; then + git log | head -1 +else + git checkout $1 +fi +git log | head -1 | awk '{ print $2 }' > ../commitid +rm -rf .git +cd .. +tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz +rm -rf $DIRNAME From 069eca6dd2a8851d94ec5147d0431af0b9592dc0 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 18 May 2013 14:02:58 +0100 Subject: [PATCH 71/94] Enable aarch64 target --- llvm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index ca1100b..4290ca0 100644 --- a/llvm.spec +++ b/llvm.spec @@ -39,7 +39,7 @@ Name: llvm Version: 3.3 -Release: 0.2.%{gitdate}%{?dist} +Release: 0.3.%{gitdate}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -327,7 +327,7 @@ export CXX=c++ --enable-libffi \ --enable-shared \ --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) \ - --enable-targets=x86,powerpc,arm,cpp,nvptx,systemz \ + --enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx,systemz \ --enable-experimental-targets=R600 # FIXME file this @@ -573,6 +573,9 @@ exit 0 %endif %changelog +* Sat May 18 2013 Peter Robinson 3.3-0.3.20130507 +- Enable aarch64 target + * Tue May 07 2013 Adam Jackson 3.3-0.1.20130507 - Bump to LLVM 3.3svn - Enable s390 backend From dd9e07d29feeb57f77a5263da19853093f0e5b23 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 28 May 2013 11:33:43 -0400 Subject: [PATCH 72/94] llvm 3.3-rc2 --- .gitignore | 2 ++ llvm.spec | 25 ++++++++++++------------- sources | 4 ++-- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 78eed2e..ec4aa17 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ /clang-20130507.tar.xz /compiler-rt-20130507.tar.xz /llvm-20130507.tar.xz +/cfe-3.3rc2-source.tar.gz +/llvm-3.3rc2-source.tar.gz diff --git a/llvm.spec b/llvm.spec index 4290ca0..78f0096 100644 --- a/llvm.spec +++ b/llvm.spec @@ -23,7 +23,7 @@ %bcond_with crt %bcond_without clang -#global prerel rcX +%global prerel rc2 %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} %global gitdate 20130507 @@ -39,16 +39,16 @@ Name: llvm Version: 3.3 -Release: 0.3.%{gitdate}%{?dist} +Release: 0.4.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages License: NCSA URL: http://llvm.org/ -#Source0: %{downloadurl}/llvm-%{version}%{?prerel:%{prerel}}.src.tar.gz -#Source1: %{downloadurl}/clang-%{version}%{?prerel:%{prerel}}.src.tar.gz -Source0: llvm-%{gitdate}.tar.xz -Source1: clang-%{gitdate}.tar.xz +Source0: %{downloadurl}/llvm-%{version}%{?prerel:%{prerel}}-source.tar.gz +Source1: %{downloadurl}/cfe-%{version}%{?prerel:%{prerel}}-source.tar.gz +#Source0: llvm-%{gitdate}.tar.xz +#Source1: clang-%{gitdate}.tar.xz Source2: compiler-rt-%{gitdate}.tar.xz # multilib fixes Source10: llvm-Config-config.h @@ -275,14 +275,10 @@ HTML documentation for LLVM's OCaml binding. %prep #setup -q -n llvm-%{version}%{?prerel}.src %{?with_clang:-a1} %{?with_crt:-a2} -%setup -q -n llvm-%{gitdate} %{?with_clang:-a1} %{?with_crt:-a2} -rm -r -f tools/clang -rm -r -f llvm/projects/compiler-rt +%setup -q -n llvm.src %{?with_clang:-a1} %{?with_crt:-a2} +rm -f tools/clang %if %{with clang} -mv clang-*/ tools/clang -%endif -%if %{with crt} -mv compiler-rt-*/ projects/compiler-rt +mv cfe.src tools/clang %endif # llvm patches @@ -573,6 +569,9 @@ exit 0 %endif %changelog +* Tue May 28 2013 Adam Jackson 3.3-0.4.rc2 +- llvm 3.3-rc2 + * Sat May 18 2013 Peter Robinson 3.3-0.3.20130507 - Enable aarch64 target diff --git a/sources b/sources index d83f9f9..0a629f7 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -f033b786761165f5b2cbe00ed861152b clang-20130507.tar.xz f113764a80fc87ad2b5898b156fa8f4b compiler-rt-20130507.tar.xz -f8313d30e86c7f352f77da3521ead4da llvm-20130507.tar.xz +5519f4bac1e038829fce0b8f34a74792 cfe-3.3rc2-source.tar.gz +063396afe869f515abbdb76673d22b69 llvm-3.3rc2-source.tar.gz From a418044a543ccb026cb84bafd7017ec9559147a8 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 4 Jun 2013 14:14:24 -0400 Subject: [PATCH 73/94] Rebuild for gcc 4.8.1 --- llvm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 78f0096..a603051 100644 --- a/llvm.spec +++ b/llvm.spec @@ -9,7 +9,7 @@ %if 0%{?fedora} == 18 %global gcc_version 4.7.2 %else -%global gcc_version 4.8.0 +%global gcc_version 4.8.1 %endif %ifarch s390 s390x sparc64 @@ -39,7 +39,7 @@ Name: llvm Version: 3.3 -Release: 0.4.%{prerel}%{?dist} +Release: 0.5.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -569,6 +569,9 @@ exit 0 %endif %changelog +* Tue Jun 04 2013 Adam Jackson 3.3-0.5.rc2 +- Rebuild for gcc 4.8.1 + * Tue May 28 2013 Adam Jackson 3.3-0.4.rc2 - llvm 3.3-rc2 From c6971175f487be0044c604f3bdfdeb112af0b33a Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 10 Jun 2013 12:47:39 -0400 Subject: [PATCH 74/94] llvm 3.3-rc3 --- .gitignore | 2 ++ llvm.spec | 11 +++++++---- sources | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ec4aa17..99af147 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ /llvm-20130507.tar.xz /cfe-3.3rc2-source.tar.gz /llvm-3.3rc2-source.tar.gz +/cfe-source-3.3rc3.tar.gz +/llvm-source-3.3rc3.tar.gz diff --git a/llvm.spec b/llvm.spec index a603051..f29a500 100644 --- a/llvm.spec +++ b/llvm.spec @@ -23,7 +23,7 @@ %bcond_with crt %bcond_without clang -%global prerel rc2 +%global prerel rc3 %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} %global gitdate 20130507 @@ -39,14 +39,14 @@ Name: llvm Version: 3.3 -Release: 0.5.%{prerel}%{?dist} +Release: 0.6.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages License: NCSA URL: http://llvm.org/ -Source0: %{downloadurl}/llvm-%{version}%{?prerel:%{prerel}}-source.tar.gz -Source1: %{downloadurl}/cfe-%{version}%{?prerel:%{prerel}}-source.tar.gz +Source0: %{downloadurl}/llvm-source-%{version}%{?prerel:%{prerel}}.tar.gz +Source1: %{downloadurl}/cfe-source-%{version}%{?prerel:%{prerel}}.tar.gz #Source0: llvm-%{gitdate}.tar.xz #Source1: clang-%{gitdate}.tar.xz Source2: compiler-rt-%{gitdate}.tar.xz @@ -569,6 +569,9 @@ exit 0 %endif %changelog +* Mon Jun 10 2013 Adam Jackson 3.3-0.6.rc3 +- llvm 3.3-rc3 + * Tue Jun 04 2013 Adam Jackson 3.3-0.5.rc2 - Rebuild for gcc 4.8.1 diff --git a/sources b/sources index 0a629f7..95ee219 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ f113764a80fc87ad2b5898b156fa8f4b compiler-rt-20130507.tar.xz -5519f4bac1e038829fce0b8f34a74792 cfe-3.3rc2-source.tar.gz -063396afe869f515abbdb76673d22b69 llvm-3.3rc2-source.tar.gz +35d7fc075fb92d1640cfc58e2116635b cfe-source-3.3rc3.tar.gz +98909ddc9016f2c6e9021202499f4dae llvm-source-3.3rc3.tar.gz From 3337b53c75f18a4f50006ed09cd57ef066131be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 17 Jul 2013 10:34:07 +0200 Subject: [PATCH 75/94] Perl 5.18 rebuild --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index f29a500..d349841 100644 --- a/llvm.spec +++ b/llvm.spec @@ -39,7 +39,7 @@ Name: llvm Version: 3.3 -Release: 0.6.%{prerel}%{?dist} +Release: 0.7.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -569,6 +569,9 @@ exit 0 %endif %changelog +* Wed Jul 17 2013 Petr Pisar - 3.3-0.7.rc3 +- Perl 5.18 rebuild + * Mon Jun 10 2013 Adam Jackson 3.3-0.6.rc3 - llvm 3.3-rc3 From 33d1985d4bdc21cf7a466d9fbe73413e2ab5f624 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 02:56:15 -0500 Subject: [PATCH 76/94] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index d349841..135d4ff 100644 --- a/llvm.spec +++ b/llvm.spec @@ -39,7 +39,7 @@ Name: llvm Version: 3.3 -Release: 0.7.%{prerel}%{?dist} +Release: 0.8.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -569,6 +569,9 @@ exit 0 %endif %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 3.3-0.8.rc3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Wed Jul 17 2013 Petr Pisar - 3.3-0.7.rc3 - Perl 5.18 rebuild From e9eba4e0cd6b9622320bd2da0a07166bbbdd09d6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 14 Sep 2013 14:14:25 +0100 Subject: [PATCH 77/94] Rebuild for OCaml 4.01.0. --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 135d4ff..98d7a66 100644 --- a/llvm.spec +++ b/llvm.spec @@ -39,7 +39,7 @@ Name: llvm Version: 3.3 -Release: 0.8.%{prerel}%{?dist} +Release: 0.9.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -569,6 +569,9 @@ exit 0 %endif %changelog +* Sat Sep 14 2013 Petr Pisar - 3.3-0.9.rc3 +- Rebuild for OCaml 4.01.0. + * Sat Aug 03 2013 Fedora Release Engineering - 3.3-0.8.rc3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From fe12f5f7430f59776cd08b3d1c202785956ad25a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 17 Oct 2013 20:19:34 +0200 Subject: [PATCH 78/94] 3.3-0.10.rc3 --- llvm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 98d7a66..9b0e56e 100644 --- a/llvm.spec +++ b/llvm.spec @@ -9,7 +9,7 @@ %if 0%{?fedora} == 18 %global gcc_version 4.7.2 %else -%global gcc_version 4.8.1 +%global gcc_version 4.8.2 %endif %ifarch s390 s390x sparc64 @@ -39,7 +39,7 @@ Name: llvm Version: 3.3 -Release: 0.9.%{prerel}%{?dist} +Release: 0.10.%{prerel}%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -569,6 +569,9 @@ exit 0 %endif %changelog +* Thu Oct 17 2013 Jakub Jelinek - 3.3-0.10.rc3 +- Rebuild for gcc 4.8.2 + * Sat Sep 14 2013 Petr Pisar - 3.3-0.9.rc3 - Rebuild for OCaml 4.01.0. From be655c46e5d3707531fb8bef5430a9c064653197 Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Tue, 12 Nov 2013 21:48:50 +0100 Subject: [PATCH 79/94] update to 3.3, add compiler-rt and lldb - update to 3.3 - enable compiler-rt compilation, enables ASAN - add lldb sources (LLVM debugger) - clean up documentation - remove patches applied upstream - remove unused patches and snapshot scripts - place all documentation files in %install (%files seems to have some limit on number of files matched by * wildcard) --- .gitignore | 19 +- ...low-type-promotion-for-scalar-stores.patch | 30 -- 0001-data-install-preserve-timestamps.patch | 22 ++ ...eDAG-Allow-promotion-of-scalar-loads.patch | 29 -- 0002-linker-flags-speedup-memory.patch | 22 ++ ...d-generating-illegal-vector-INT_TO_F.patch | 53 --- clang-hardfloat-hack.patch | 13 - llvm-2.6-timestamp.patch | 11 - llvm-3.1-docs-pod-markup-fixes.patch | 28 -- llvm-3.2-llvm-config-dso-hack.patch | 30 -- llvm-3.2-symbolic-shlib.patch | 12 - llvm-fix-ghc.patch | 128 ------- llvm.spec | 356 ++++++++++-------- make-clang-snapshot.sh | 18 - make-compiler-rt-snapshot.sh | 18 - make-llvm-snapshot.sh | 18 - sources | 7 +- 17 files changed, 247 insertions(+), 567 deletions(-) delete mode 100644 0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch create mode 100644 0001-data-install-preserve-timestamps.patch delete mode 100644 0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch create mode 100644 0002-linker-flags-speedup-memory.patch delete mode 100644 0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch delete mode 100644 clang-hardfloat-hack.patch delete mode 100644 llvm-2.6-timestamp.patch delete mode 100644 llvm-3.1-docs-pod-markup-fixes.patch delete mode 100644 llvm-3.2-llvm-config-dso-hack.patch delete mode 100644 llvm-3.2-symbolic-shlib.patch delete mode 100644 llvm-fix-ghc.patch delete mode 100755 make-clang-snapshot.sh delete mode 100755 make-compiler-rt-snapshot.sh delete mode 100755 make-llvm-snapshot.sh diff --git a/.gitignore b/.gitignore index 99af147..a0715bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,4 @@ -/llvm-3.0.tar.gz -/clang-3.0.tar.gz -/clang-3.1.src.tar.gz -/llvm-3.1.src.tar.gz -/llvm-3.2-R600-tstellar-git-b53ed46.patch.gz -/llvm-3.2.src.tar.gz -/clang-3.2.src.tar.gz -/R600-Mesa-9.1.patch.gz -/clang-20130507.tar.xz -/compiler-rt-20130507.tar.xz -/llvm-20130507.tar.xz -/cfe-3.3rc2-source.tar.gz -/llvm-3.3rc2-source.tar.gz -/cfe-source-3.3rc3.tar.gz -/llvm-source-3.3rc3.tar.gz +/cfe-*.src.tar.gz +/compiler-rt-*.src.tar.gz +/lldb-*.src.tar.gz +/llvm-*.src.tar.gz diff --git a/0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch b/0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch deleted file mode 100644 index 72c81cf..0000000 --- a/0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch +++ /dev/null @@ -1,30 +0,0 @@ -From af4d115e2c9c4cfd8b099aaef9a13c2972c36272 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 6 Dec 2012 18:05:30 +0000 -Subject: [PATCH] LegalizeDAG: Allow type promotion for scalar stores - ---- - lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp -index abf40b7..9946694 100644 ---- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp -+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp -@@ -731,9 +731,10 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) { - return; - } - case TargetLowering::Promote: { -- assert(VT.isVector() && "Unknown legal promote case!"); -- Value = DAG.getNode(ISD::BITCAST, dl, -- TLI.getTypeToPromoteTo(ISD::STORE, VT), Value); -+ EVT NVT = TLI.getTypeToPromoteTo(ISD::STORE, VT); -+ assert(NVT.getSizeInBits() == VT.getSizeInBits() && -+ "Can only promote stores to same size type"); -+ Value = DAG.getNode(ISD::BITCAST, dl, NVT, Value); - SDValue Result = - DAG.getStore(Chain, dl, Value, Ptr, - ST->getPointerInfo(), isVolatile, --- -1.7.11.4 - diff --git a/0001-data-install-preserve-timestamps.patch b/0001-data-install-preserve-timestamps.patch new file mode 100644 index 0000000..56e41fc --- /dev/null +++ b/0001-data-install-preserve-timestamps.patch @@ -0,0 +1,22 @@ +Preserve timestamps when installing data files + +--- + Makefile.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.rules b/Makefile.rules +index f0c542b..0ff92bb 100644 +--- a/Makefile.rules ++++ b/Makefile.rules +@@ -773,7 +773,7 @@ BCCompile.CXX = $(LLVMCXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) $(CPPFLAGS) \ + + ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755 + ScriptInstall = $(INSTALL) -m 0755 +-DataInstall = $(INSTALL) -m 0644 ++DataInstall = $(INSTALL) -p -m 0644 + + # When compiling under Mingw/Cygwin, the tblgen tool expects Windows + # paths. In this case, the SYSPATH function (defined in +-- +1.8.3.1 + diff --git a/0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch b/0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch deleted file mode 100644 index f136bda..0000000 --- a/0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 831cdb83e03319eeb36b6249e20e2908672397c2 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 6 Dec 2012 22:43:13 +0000 -Subject: [PATCH] LegalizeDAG: Allow promotion of scalar loads - ---- - lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp -index 9946694..2596f00 100644 ---- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp -+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp -@@ -890,10 +890,9 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) { - break; - } - case TargetLowering::Promote: { -- // Only promote a load of vector type to another. -- assert(VT.isVector() && "Cannot promote this load!"); -- // Change base type to a different vector type. - EVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT); -+ assert(NVT.getSizeInBits() == VT.getSizeInBits() && -+ "Can only promote loads to same size type"); - - SDValue Res = DAG.getLoad(NVT, dl, Chain, Ptr, LD->getPointerInfo(), - LD->isVolatile(), LD->isNonTemporal(), --- -1.7.11.4 - diff --git a/0002-linker-flags-speedup-memory.patch b/0002-linker-flags-speedup-memory.patch new file mode 100644 index 0000000..2fa53ad --- /dev/null +++ b/0002-linker-flags-speedup-memory.patch @@ -0,0 +1,22 @@ +Hack the linker flags for shared libs for speed and memory usage + +--- + tools/llvm-shlib/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile +index 6d6c6e9..4038df4 100644 +--- a/tools/llvm-shlib/Makefile ++++ b/tools/llvm-shlib/Makefile +@@ -76,7 +76,7 @@ endif + + ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU)) + # Don't allow unresolved symbols. +- LLVMLibsOptions += -Wl,--no-undefined ++ LLVMLibsOptions += -Wl,--no-undefined -Wl,-Bsymbolic + endif + + ifeq ($(HOST_OS),SunOS) +-- +1.8.3.1 + diff --git a/0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch b/0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch deleted file mode 100644 index f4c4e1e..0000000 --- a/0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 85259e7305201764ae9d85a7cbf2809da779bf5c Mon Sep 17 00:00:00 2001 -From: tstellar -Date: Wed, 2 Jan 2013 22:13:01 +0000 -Subject: [PATCH] DAGCombiner: Avoid generating illegal vector INT_TO_FP nodes - -DAGCombiner::reduceBuildVecConvertToConvertBuildVec() was making two -mistakes: - -1. It was checking the legality of scalar INT_TO_FP nodes and then generating -vector nodes. - -2. It was passing the result value type to -TargetLoweringInfo::getOperationAction() when it should have been -passing the value type of the first operand. - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171420 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 9 +++--- - .../R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll | 33 ++++++++++++++++++++++ - test/CodeGen/R600/vec4-expand.ll | 3 -- - test/CodeGen/X86/cvtv2f32.ll | 4 +++ - 4 files changed, 42 insertions(+), 7 deletions(-) - create mode 100644 test/CodeGen/R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll - -diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp -index 37d7731..d0ca5c0 100644 ---- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp -+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp -@@ -8514,11 +8514,8 @@ SDValue DAGCombiner::reduceBuildVecConvertToConvertBuildVec(SDNode *N) { - if (Opcode == ISD::DELETED_NODE && - (Opc == ISD::UINT_TO_FP || Opc == ISD::SINT_TO_FP)) { - Opcode = Opc; -- // If not supported by target, bail out. -- if (TLI.getOperationAction(Opcode, VT) != TargetLowering::Legal && -- TLI.getOperationAction(Opcode, VT) != TargetLowering::Custom) -- return SDValue(); - } -+ - if (Opc != Opcode) - return SDValue(); - -@@ -8543,6 +8540,10 @@ SDValue DAGCombiner::reduceBuildVecConvertToConvertBuildVec(SDNode *N) { - assert(SrcVT != MVT::Other && "Cannot determine source type!"); - - EVT NVT = EVT::getVectorVT(*DAG.getContext(), SrcVT, NumInScalars); -+ -+ if (!TLI.isOperationLegalOrCustom(Opcode, NVT)) -+ return SDValue(); -+ - SmallVector Opnds; - for (unsigned i = 0; i != NumInScalars; ++i) { - SDValue In = N->getOperand(i); - diff --git a/clang-hardfloat-hack.patch b/clang-hardfloat-hack.patch deleted file mode 100644 index f1b0c60..0000000 --- a/clang-hardfloat-hack.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- llvm-3.2.src.orig/tools/clang/lib/Driver/Tools.cpp 2012-11-21 01:56:23.000000000 -0600 -+++ llvm-3.2.src/tools/clang/lib/Driver/Tools.cpp 2013-03-31 21:08:41.890206683 -0500 -@@ -688,8 +688,8 @@ - } - default: - // Assume "soft", but warn the user we are guessing. -- FloatABI = "soft"; -- D.Diag(diag::warn_drv_assuming_mfloat_abi_is) << "soft"; -+ FloatABI = "hard"; -+ D.Diag(diag::warn_drv_assuming_mfloat_abi_is) << "hard"; - break; - } - } diff --git a/llvm-2.6-timestamp.patch b/llvm-2.6-timestamp.patch deleted file mode 100644 index ab0979e..0000000 --- a/llvm-2.6-timestamp.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- llvm-2.6/Makefile.rules.timestamp 2009-08-19 18:04:44.000000000 -0400 -+++ llvm-2.6/Makefile.rules 2009-09-09 02:10:38.287389725 -0400 -@@ -672,7 +672,7 @@ - - ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755 - ScriptInstall = $(INSTALL) -m 0755 --DataInstall = $(INSTALL) -m 0644 -+DataInstall = $(INSTALL) -p -m 0644 - - # When compiling under Mingw/Cygwin, the tblgen tool expects Windows - # paths. In this case, the SYSPATH function (defined in diff --git a/llvm-3.1-docs-pod-markup-fixes.patch b/llvm-3.1-docs-pod-markup-fixes.patch deleted file mode 100644 index cd8a62a..0000000 --- a/llvm-3.1-docs-pod-markup-fixes.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- llvm-3.1.src/docs/CommandGuide/lit.pod~ 2012-03-27 03:01:14.000000000 +0900 -+++ llvm-3.1.src/docs/CommandGuide/lit.pod 2013-01-23 12:47:30.297510832 +0900 -@@ -386,8 +386,6 @@ - ******************** - PASS: D (4 of 4) - --=back -- - =head2 LIT EXAMPLE TESTS - - The B distribution contains several example implementations of test suites ---- llvm-3.1.src/docs/CommandGuide/llvm-cov.pod~ 2011-11-29 08:39:25.000000000 +0900 -+++ llvm-3.1.src/docs/CommandGuide/llvm-cov.pod 2013-01-23 13:44:32.184212441 +0900 -@@ -18,12 +18,12 @@ - - =over - --=item B<-gcno=filename] -+=item B<-gcno=filename> - - This option selects input description file generated by compiler while instrumenting - program. - --=item B<-gcda=filename] -+=item B<-gcda=filename> - - This option selects coverage data file generated by instrumented compiler. - diff --git a/llvm-3.2-llvm-config-dso-hack.patch b/llvm-3.2-llvm-config-dso-hack.patch deleted file mode 100644 index 6b8c0af..0000000 --- a/llvm-3.2-llvm-config-dso-hack.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up llvm-3.2.src/tools/llvm-config/llvm-config.cpp.jx llvm-3.2.src/tools/llvm-config/llvm-config.cpp ---- llvm-3.2.src/tools/llvm-config/llvm-config.cpp.jx 2013-03-07 07:13:24.000000000 -0500 -+++ llvm-3.2.src/tools/llvm-config/llvm-config.cpp 2013-03-07 07:39:26.485677609 -0500 -@@ -316,7 +316,9 @@ int main(int argc, char **argv) { - if (!HasAnyOption) - usage(); - -- if (PrintLibs || PrintLibNames || PrintLibFiles) { -+ if (PrintLibs) { -+ OS << "-lLLVM-3.3svn"; -+ } else if (PrintLibNames || PrintLibFiles) { - // If no components were specified, default to "all". - if (Components.empty()) - Components.push_back("all"); -@@ -335,15 +337,6 @@ int main(int argc, char **argv) { - OS << Lib; - } else if (PrintLibFiles) { - OS << ActiveLibDir << '/' << Lib; -- } else if (PrintLibs) { -- // If this is a typical library name, include it using -l. -- if (Lib.startswith("lib") && Lib.endswith(".a")) { -- OS << "-l" << Lib.slice(3, Lib.size()-2); -- continue; -- } -- -- // Otherwise, print the full path. -- OS << ActiveLibDir << '/' << Lib; - } - } - OS << '\n'; diff --git a/llvm-3.2-symbolic-shlib.patch b/llvm-3.2-symbolic-shlib.patch deleted file mode 100644 index 64d0422..0000000 --- a/llvm-3.2-symbolic-shlib.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up llvm-3.2.src/tools/llvm-shlib/Makefile.jx llvm-3.2.src/tools/llvm-shlib/Makefile ---- llvm-3.2.src/tools/llvm-shlib/Makefile.jx 2012-08-06 16:52:18.000000000 -0400 -+++ llvm-3.2.src/tools/llvm-shlib/Makefile 2013-05-01 16:55:20.286980046 -0400 -@@ -76,7 +76,7 @@ endif - - ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU)) - # Don't allow unresolved symbols. -- LLVMLibsOptions += -Wl,--no-undefined -+ LLVMLibsOptions += -Wl,--no-undefined -Wl,-Bsymbolic - endif - - ifeq ($(HOST_OS),SunOS) diff --git a/llvm-fix-ghc.patch b/llvm-fix-ghc.patch deleted file mode 100644 index b737df0..0000000 --- a/llvm-fix-ghc.patch +++ /dev/null @@ -1,128 +0,0 @@ -Index: lib/Target/ARM/ARMFrameLowering.cpp -=================================================================== ---- lib/Target/ARM/ARMFrameLowering.cpp (revision 159085) -+++ lib/Target/ARM/ARMFrameLowering.cpp (working copy) -@@ -15,6 +15,8 @@ - #include "ARMBaseInstrInfo.h" - #include "ARMBaseRegisterInfo.h" - #include "ARMMachineFunctionInfo.h" -+#include "llvm/CallingConv.h" -+#include "llvm/Function.h" - #include "MCTargetDesc/ARMAddressingModes.h" - #include "llvm/Function.h" - #include "llvm/CodeGen/MachineFrameInfo.h" -@@ -151,6 +153,10 @@ - int FramePtrSpillFI = 0; - int D8SpillFI = 0; - -+ // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue. -+ if (MF.getFunction()->getCallingConv() == CallingConv::GHC) -+ return; -+ - // Allocate the vararg register save area. This is not counted in NumBytes. - if (VARegSaveSize) - emitSPUpdate(isARM, MBB, MBBI, dl, TII, -VARegSaveSize, -@@ -354,6 +360,10 @@ - int NumBytes = (int)MFI->getStackSize(); - unsigned FramePtr = RegInfo->getFrameRegister(MF); - -+ // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue. -+ if (MF.getFunction()->getCallingConv() == CallingConv::GHC) -+ return; -+ - if (!AFI->hasStackFrame()) { - if (NumBytes != 0) - emitSPUpdate(isARM, MBB, MBBI, dl, TII, NumBytes); -Index: lib/Target/ARM/ARMISelLowering.cpp -=================================================================== ---- lib/Target/ARM/ARMISelLowering.cpp (revision 159085) -+++ lib/Target/ARM/ARMISelLowering.cpp (working copy) -@@ -1171,6 +1171,8 @@ - return (Return ? RetCC_ARM_AAPCS : CC_ARM_AAPCS); - case CallingConv::ARM_APCS: - return (Return ? RetCC_ARM_APCS : CC_ARM_APCS); -+ case CallingConv::GHC: -+ return (Return ? RetCC_ARM_APCS : CC_ARM_APCS_GHC); - } - } - -Index: lib/Target/ARM/ARMCallingConv.td -=================================================================== ---- lib/Target/ARM/ARMCallingConv.td (revision 159085) -+++ lib/Target/ARM/ARMCallingConv.td (working copy) -@@ -79,7 +79,26 @@ - CCDelegateTo - ]>; - -+//===----------------------------------------------------------------------===// -+// ARM APCS Calling Convention for GHC -+//===----------------------------------------------------------------------===// - -+def CC_ARM_APCS_GHC : CallingConv<[ -+ // Handle all vector types as either f64 or v2f64. -+ CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType>, -+ CCIfType<[v2i64, v4i32, v8i16, v16i8, v4f32], CCBitConvertToType>, -+ -+ CCIfType<[v2f64], CCAssignToReg<[Q4, Q5]>>, -+ CCIfType<[f64], CCAssignToReg<[D8, D9, D10, D11]>>, -+ CCIfType<[f32], CCAssignToReg<[S16, S17, S18, S19, S20, S21, S22, S23]>>, -+ -+ // Promote i8/i16 arguments to i32. -+ CCIfType<[i8, i16], CCPromoteToType>, -+ -+ // Pass in STG registers: Base, Sp, Hp, R1, R2, R3, R4, SpLim -+ CCIfType<[i32], CCAssignToReg<[R4, R5, R6, R7, R8, R9, R10, R11]>> -+]>; -+ - //===----------------------------------------------------------------------===// - // ARM AAPCS (EABI) Calling Convention, common parts - //===----------------------------------------------------------------------===// -@@ -171,3 +190,9 @@ - // iOS ABI deviates from ARM standard ABI. R9 is not a callee-saved register. - // Also save R7-R4 first to match the stack frame fixed spill areas. - def CSR_iOS : CalleeSavedRegs<(add LR, R7, R6, R5, R4, (sub CSR_AAPCS, R9))>; -+ -+// GHC set of callee saved regs is empty as all those regs are -+// used for passing STG regs around -+// sub/add LR is a workaround for not being able to compile empty list: -+// def CSR_GHC : CalleeSavedRegs<()>; -+def CSR_GHC : CalleeSavedRegs<(sub (add LR), LR)>; -Index: lib/Target/ARM/ARMFastISel.cpp -=================================================================== ---- lib/Target/ARM/ARMFastISel.cpp (revision 159085) -+++ lib/Target/ARM/ARMFastISel.cpp (working copy) -@@ -1835,6 +1835,11 @@ - return (Return ? RetCC_ARM_AAPCS: CC_ARM_AAPCS); - case CallingConv::ARM_APCS: - return (Return ? RetCC_ARM_APCS: CC_ARM_APCS); -+ case CallingConv::GHC: -+ if (Return) -+ llvm_unreachable("Can't return in GHC call convention"); -+ else -+ return CC_ARM_APCS_GHC; - } - } - ---- lib/Target/ARM/ARMBaseRegisterInfo.cpp.orig 2012-07-12 09:59:58.181723592 +0100 -+++ lib/Target/ARM/ARMBaseRegisterInfo.cpp 2012-07-12 10:01:15.301344412 +0100 -@@ -62,7 +62,19 @@ - - const uint16_t* - ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { -- return (STI.isTargetIOS()) ? CSR_iOS_SaveList : CSR_AAPCS_SaveList; -+ bool ghcCall = false; -+ -+ if (MF) { -+ const Function *F = MF->getFunction(); -+ ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false); -+ } -+ -+ if (ghcCall) { -+ return CSR_GHC_SaveList; -+ } -+ else { -+ return (STI.isTargetIOS()) ? CSR_iOS_SaveList : CSR_AAPCS_SaveList; -+ } - } - - const uint32_t* diff --git a/llvm.spec b/llvm.spec index 9b0e56e..a8a3a5b 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,87 +1,57 @@ -# Build options: -# -# --with doxygen -# The doxygen docs are HUGE, so they are not built by default. +# Components skipped by default: %bcond_with doxygen -# clang header paths are hard-coded at compile time -# and need adjustment whenever there's a new GCC version -%if 0%{?fedora} == 18 -%global gcc_version 4.7.2 -%else -%global gcc_version 4.8.2 -%endif - -%ifarch s390 s390x sparc64 - # No ocaml on these arches - %bcond_with ocaml -%else - %bcond_without ocaml -%endif - -# compiler-rt not actually working yet -%bcond_with crt +# Components built by default: %bcond_without clang +%bcond_without crt +%bcond_without lldb -%global prerel rc3 -%global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} - -%global gitdate 20130507 - -# gold linker support -# arch list from binutils spec -%global gold_arches %ix86 x86_64 -%ifarch %gold_arches -%bcond_without gold +# Components enabled if supported by target arch: +%ifnarch s390 s390x sparc64 + %bcond_without ocaml %else -%bcond_with gold + %bcond_with ocaml %endif +%ifarch %ix86 x86_64 + %bcond_without gold +%else + %bcond_with gold +%endif + +# Documentation install path +%if 0%{fedora} < 20 + %global llvmdocdir() %{_docdir}/%1-%{version} +%else + %global llvmdocdir() %{_docdir}/%1 +%endif + +%global downloadurl http://llvm.org/releases/%{version} Name: llvm Version: 3.3 -Release: 0.10.%{prerel}%{?dist} +Release: 1%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages License: NCSA URL: http://llvm.org/ -Source0: %{downloadurl}/llvm-source-%{version}%{?prerel:%{prerel}}.tar.gz -Source1: %{downloadurl}/cfe-source-%{version}%{?prerel:%{prerel}}.tar.gz -#Source0: llvm-%{gitdate}.tar.xz -#Source1: clang-%{gitdate}.tar.xz -Source2: compiler-rt-%{gitdate}.tar.xz + +# source archives +Source0: %{downloadurl}/llvm-%{version}.src.tar.gz +Source1: %{downloadurl}/cfe-%{version}.src.tar.gz +Source2: %{downloadurl}/compiler-rt-%{version}.src.tar.gz +Source3: %{downloadurl}/lldb-%{version}.src.tar.gz + # multilib fixes -Source10: llvm-Config-config.h -Source11: llvm-Config-llvm-config.h +Source10: llvm-Config-config.h +Source11: llvm-Config-llvm-config.h -# snapshot scripts -Source100: make-llvm-snapshot.sh -Source101: make-clang-snapshot.sh -Source102: make-compiler-rt-snapshot.sh - -# Data files should be installed with timestamps preserved -Patch0: llvm-2.6-timestamp.patch - -Patch11: clang-hardfloat-hack.patch - -# hack llvm-config to print -lLLVM-3.* instead of ALL THE THINGS -# -# you really, really, really want not to use the static libs, otherwise -# if you ever end up with two (static) copies of llvm in the same process -# things will go boom quite nicely -# -# this isn't enabled yet because it makes the ocaml bindings fail the -# test suite. i don't even. -Patch20: llvm-3.2-llvm-config-dso-hack.patch - -# hack the link flags for the shared libs for speed and memory usage -Patch21: llvm-3.2-symbolic-shlib.patch +# patches +Patch1: 0001-data-install-preserve-timestamps.patch +Patch2: 0002-linker-flags-speedup-memory.patch BuildRequires: bison -BuildRequires: chrpath BuildRequires: flex -BuildRequires: gcc = %{gcc_version} -BuildRequires: gcc-c++ = %{gcc_version} BuildRequires: groff BuildRequires: libffi-devel BuildRequires: libtool-ltdl-devel @@ -130,8 +100,7 @@ Summary: Documentation for LLVM Group: Documentation BuildArch: noarch Requires: %{name} = %{version}-%{release} -# might seem redundant, but needed to kill off the old arch-ed -doc -# subpackage +# might seem redundant, but needed to kill off the old arch-ed -doc subpackage Obsoletes: %{name}-doc < %{version}-%{release} %description doc @@ -163,8 +132,7 @@ License: NCSA Group: Development/Languages Requires: llvm%{?_isa} = %{version}-%{release} # clang requires gcc, clang++ requires libstdc++-devel -Requires: gcc = %{gcc_version} -Requires: libstdc++-devel = %{gcc_version} +Requires: libstdc++-devel %description -n clang clang: noun @@ -201,17 +169,24 @@ framework and a standalone tool that finds bugs in C and Objective-C programs. The standalone tool is invoked from the command-line, and is intended to run in tandem with a build of a project or code base. - -%package -n clang-doc -Summary: Documentation for Clang -Group: Documentation -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description -n clang-doc -Documentation for the Clang compiler front-end. %endif +%if %{with lldb} +%package -n lldb +Summary: Next generation high-performance debugger +License: NCSA +Group: Development/Languages +Requires: llvm%{?_isa} = %{version}-%{release} +BuildRequires: swig +BuildRequires: libedit-devel +BuildRequires: python-devel + +%description -n lldb +LLDB is a next generation, high-performance debugger. It is built as a set +of reusable components which highly leverage existing libraries in the +larger LLVM Project, such as the Clang expression parser and LLVM +disassembler. +%endif %if %{with doxygen} %package apidoc @@ -274,40 +249,68 @@ HTML documentation for LLVM's OCaml binding. %prep -#setup -q -n llvm-%{version}%{?prerel}.src %{?with_clang:-a1} %{?with_crt:-a2} -%setup -q -n llvm.src %{?with_clang:-a1} %{?with_crt:-a2} -rm -f tools/clang +%setup -q -n llvm-%{version}.src %{?with_clang:-a1} %{?with_crt:-a2} %{?with_lldb:-a3} +rm -rf tools/clang tools/lldb projects/compiler-rt %if %{with clang} -mv cfe.src tools/clang +mv cfe-%{version}.src tools/clang +%endif +%if %{with crt} +mv compiler-rt-%{version}.src projects/compiler-rt +%endif +%if %{with lldb} +mv lldb-%{version}.src tools/lldb %endif -# llvm patches -%patch0 -p1 -b .timestamp - -# arm hard float -%patch11 -p1 -b .orig - -# fix llvm-config --libs -#patch20 -p1 -b .orig -%patch21 -p1 -b .orig +%patch1 -p1 +%patch2 -p1 # fix ld search path -sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ - ./configure +sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure %build # clang is lovely and all, but fedora builds with gcc export CC=gcc export CXX=c++ %configure \ - --prefix=%{_prefix} \ --libdir=%{_libdir}/%{name} \ + --disable-polly \ + --disable-libcpp \ + --enable-cxx11 \ + --enable-clang-arcmt \ + --enable-clang-static-analyzer \ + --enable-clang-rewriter \ + --enable-optimized \ + --disable-profiling \ + --disable-assertions \ + --disable-werror \ + --disable-expensive-checks \ + --enable-debug-runtime \ + --enable-keep-symbols \ + --enable-jit \ + --enable-docs \ %if %{with doxygen} --enable-doxygen \ +%else + --disable-doxygen \ %endif -%if %{with gold} - --with-binutils-include=%{_includedir} \ + --enable-threads \ + --enable-pthreads \ + --enable-zlib \ + --enable-pic \ + --enable-shared \ + --disable-embed-stdcxx \ + --enable-timestamps \ + --enable-backtraces \ + --enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx,systemz \ + --enable-experimental-targets=R600 \ +%if %{with ocaml} + --enable-bindings=ocaml \ +%else + --enable-bindings=none \ %endif + --enable-libffi \ + --enable-ltdl-install \ + \ %ifarch armv7hl armv7l --with-cpu=cortex-a8 \ --with-tune=cortex-a8 \ @@ -316,15 +319,12 @@ export CXX=c++ --with-fpu=vfpv3-d16 \ --with-abi=aapcs-linux \ %endif - --disable-assertions \ - --enable-debug-runtime \ - --enable-optimized \ - --enable-jit \ - --enable-libffi \ - --enable-shared \ - --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) \ - --enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx,systemz \ - --enable-experimental-targets=R600 + \ +%if %{with gold} + --with-binutils-include=%{_includedir} \ +%endif + --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/*/include) \ + --with-optimize-option=-O3 # FIXME file this # configure does not properly specify libdir @@ -332,7 +332,7 @@ sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config # FIXME upstream need to fix this # llvm-config.cpp hardcodes lib in it -sed -i 's|ActiveLibDir = ActivePrefix + "/lib"|ActiveLibDir = ActivePrefix + "/%{_lib}/%{name}"|g' tools/llvm-config/llvm-config.cpp +sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %ifarch ppc @@ -343,13 +343,7 @@ make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %install -# workaround for http://llvm.org/bugs/show_bug.cgi?id=11177 -%if %{with ocaml} -cp -p bindings/ocaml/llvm/META.llvm bindings/ocaml/llvm/Release/ -%endif - -make install DESTDIR=%{buildroot} \ - PROJ_docsdir=/moredocs +make install DESTDIR=%{buildroot} PROJ_docsdir=/moredocs # multilib fixes mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}} @@ -376,50 +370,69 @@ for f in scan-{build,view}; do ln -s %{_libdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f done -(cd tools/clang/tools && cp -pr scan-{build,view} \ - %{buildroot}%{_libdir}/clang-analyzer/) +(cd tools/clang/tools && cp -pr scan-{build,view} %{buildroot}%{_libdir}/clang-analyzer/) %endif -# Move documentation back to build directory -# -mv %{buildroot}/moredocs . -rm -f moredocs/*.tar.gz -rm -f moredocs/ocamldoc/html/*.tar.gz - -# and separate the apidoc -%if %{with doxygen} -mv moredocs/html/doxygen apidoc -mv tools/clang/docs/doxygen/html clang-apidoc -%endif - -# And prepare Clang documentation -# -%if %{with clang} -mkdir clang-docs -for f in LICENSE.TXT NOTES.txt README.txt; do # TODO.txt; do - ln tools/clang/$f clang-docs/ -done -rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools} -%endif - - -#find %%{buildroot} -name .dir -print0 | xargs -0r rm -f -file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d -file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d -#chrpath -d %%{buildroot}/%%{_libexecdir}/clang-cc - # Get rid of erroneously installed example files. rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.* -# FIXME file this bug -sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \ - %{buildroot}%{_bindir}/llvm-config-%{__isa_bits} +# remove executable bit from static libraries +find %{buildroot}%{_libdir} -name "*.a" -type f -print0 | xargs -0 chmod -x -chmod -x %{buildroot}%{_libdir}/%{name}/*.a +# Install man page for LLDB +%if %{with lldb} +mkdir -p %{buildroot}%{_mandir}/man1 +cp tools/lldb/docs/lldb.1 %{buildroot}%{_mandir}/man1/ +%endif -# remove documentation makefiles: -# they require the build directory to work -find examples -name 'Makefile' | xargs -0r rm -f +# Install documentation documentation +find %{buildroot}/moredocs/ -name "*.tar.gz" -print0 | xargs -0 rm -rf +mkdir -p %{buildroot}%{_docdir} + +# llvm +mkdir -p %{buildroot}%{llvmdocdir llvm} +for f in CREDITS.TXT LICENSE.TXT README.txt; do + cp $f %{buildroot}%{llvmdocdir llvm} +done + +# llvm-doc +mkdir -p %{buildroot}%{llvmdocdir llvm-doc} +cp -ar examples %{buildroot}%{llvmdocdir llvm-doc}/examples +find %{buildroot}%{llvmdocdir llvm-doc} -name Makefile -o -name CMakeLists.txt -o -name LLVMBuild.txt -print0 | xargs -0 rm -f + +# llvm-apidoc +%if %{with doxygen} +mv %{buildroot}/moredocs/html/doxygen %{buildroot}%{llvmdocdir llvm-apidoc} +%endif + +# llvm-ocaml-doc +%if %{with ocaml} +mv %{buildroot}/moredocs/ocamldoc/html %{buildroot}%{llvmdocdir llvm-ocaml-doc} +%endif + +# clang +%if %{with clang} +mkdir -p %{buildroot}%{llvmdocdir clang} +for f in LICENSE.TXT NOTES.txt README.txt CODE_OWNERS.TXT; do + cp tools/clang/$f %{buildroot}%{llvmdocdir clang}/ +done +%endif + +# clang-apidoc +%if %{with clang} +%if %{with doxygen} +cp -ar tools/clang/docs/doxygen/html %{buildroot}%{llvmdocdir clang-apidoc} +%endif +%endif + +# lldb +%if %{with lldb} +mkdir -p %{buildroot}%{llvmdocdir lldb} +cp tools/lldb/LICENSE.TXT %{buildroot}%{llvmdocdir lldb}/ +%endif + +# delete the rest of installed documentation (because it's bad) +rm -rf %{buildroot}/moredocs %check @@ -430,14 +443,16 @@ find examples -name 'Makefile' | xargs -0r rm -f # broken makefiles in the doc dirs. # LLVM test suite failing on ARM, PPC64 and s390(x) -make -k check LIT_ARGS="-v -j4" | tee llvm-testlog-%{_arch}.txt || : +mkdir -p %{buildroot}%{llvmdocdir llvm-devel} +make -k check LIT_ARGS="-v -j4" | tee %{buildroot}%{llvmdocdir llvm-devel}/testlog-%{_arch}.txt || : %if %{with clang} # clang test suite failing on PPC and s390(x) # FIXME: # unexpected failures on all platforms with GCC 4.7.0. # capture logs -make -C tools/clang/test TESTARGS="-v -j4" | tee clang-testlog-%{_arch}.txt || : +mkdir -p %{buildroot}%{llvmdocdir clang-devel} +make -C tools/clang/test TESTARGS="-v -j4" | tee %{buildroot}%{llvmdocdir clang-devel}/testlog-%{_arch}.txt || : %endif @@ -475,7 +490,7 @@ exit 0 %files %defattr(-,root,root,-) -%doc CREDITS.TXT LICENSE.TXT README.txt +%doc %{llvmdocdir llvm}/ %{_bindir}/bugpoint %{_bindir}/llc %{_bindir}/lli @@ -486,11 +501,14 @@ exit 0 %if %{with clang} %exclude %{_mandir}/man1/clang.1.* %endif +%if %{with lldb} +%exclude %{_mandir}/man1/lldb.1.* +%endif %doc %{_mandir}/man1/*.1.* %files devel %defattr(-,root,root,-) -%doc llvm-testlog-%{_arch}.txt +%doc %{llvmdocdir llvm-devel}/ %{_bindir}/llvm-config-%{__isa_bits} %{_includedir}/%{name} %{_includedir}/%{name}-c @@ -502,6 +520,9 @@ exit 0 %if %{with clang} %exclude %{_libdir}/%{name}/libclang.so %endif +%if %{with lldb} +%exclude %{_libdir}/%{name}/liblldb.so +%endif %{_libdir}/%{name}/*.so %files static @@ -511,7 +532,7 @@ exit 0 %if %{with clang} %files -n clang %defattr(-,root,root,-) -%doc clang-docs/* clang-testlog-%{_arch}.txt +%doc %{llvmdocdir clang}/ %{_bindir}/clang* %{_bindir}/c-index-test %{_libdir}/%{name}/libclang.so @@ -520,6 +541,7 @@ exit 0 %files -n clang-devel %defattr(-,root,root,-) +%doc %{llvmdocdir clang-devel}/ %{_includedir}/clang %{_includedir}/clang-c @@ -528,15 +550,21 @@ exit 0 %{_bindir}/scan-build %{_bindir}/scan-view %{_libdir}/clang-analyzer +%endif -%files -n clang-doc +%if %{with lldb} +%files -n lldb %defattr(-,root,root,-) -%doc tools/clang/docs/* +%doc %{llvmdocdir lldb}/ +%{_bindir}/lldb +%{_bindir}/lldb-platform +%{_libdir}/%{name}/liblldb.so +%doc %{_mandir}/man1/lldb.1.* %endif %files doc %defattr(-,root,root,-) -%doc examples moredocs/html +%doc %{llvmdocdir llvm-doc}/ %if %{with ocaml} %files ocaml @@ -553,22 +581,28 @@ exit 0 %files ocaml-doc %defattr(-,root,root,-) -%doc moredocs/ocamldoc/html/* +%doc %{llvmdocdir llvm-ocaml-doc}/ %endif %if %{with doxygen} %files apidoc %defattr(-,root,root,-) -%doc apidoc/* +%doc %{llvmdocdir llvm-apidoc}/ %if %{with clang} %files -n clang-apidoc %defattr(-,root,root,-) -%doc clang-apidoc/* +%doc %{llvmdocdir clang-apidoc}/ %endif %endif %changelog +* Tue Nov 12 2013 Jan Vcelak 3.3-1 +- upgrade to 3.3 release +- add compiler-rt, enables address sanitizer (#949489) +- add LLDB - debugger from LLVM project (#1009406) +- clean up documentation + * Thu Oct 17 2013 Jakub Jelinek - 3.3-0.10.rc3 - Rebuild for gcc 4.8.2 diff --git a/make-clang-snapshot.sh b/make-clang-snapshot.sh deleted file mode 100755 index 8414d83..0000000 --- a/make-clang-snapshot.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -DIRNAME=clang-$( date +%Y%m%d ) -URL=http://llvm.org/git/clang.git - -rm -rf $DIRNAME -git clone $URL $DIRNAME -cd $DIRNAME -if [ -z "$1" ]; then - git log | head -1 -else - git checkout $1 -fi -git log | head -1 | awk '{ print $2 }' > ../commitid -rm -rf .git -cd .. -tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz -rm -rf $DIRNAME diff --git a/make-compiler-rt-snapshot.sh b/make-compiler-rt-snapshot.sh deleted file mode 100755 index 0ae2a16..0000000 --- a/make-compiler-rt-snapshot.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -DIRNAME=compiler-rt-$( date +%Y%m%d ) -URL=http://llvm.org/git/compiler-rt.git - -rm -rf $DIRNAME -git clone $URL $DIRNAME -cd $DIRNAME -if [ -z "$1" ]; then - git log | head -1 -else - git checkout $1 -fi -git log | head -1 | awk '{ print $2 }' > ../commitid -rm -rf .git -cd .. -tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz -rm -rf $DIRNAME diff --git a/make-llvm-snapshot.sh b/make-llvm-snapshot.sh deleted file mode 100755 index 308ca7b..0000000 --- a/make-llvm-snapshot.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -DIRNAME=llvm-$( date +%Y%m%d ) -URL=http://llvm.org/git/llvm.git - -rm -rf $DIRNAME -git clone $URL $DIRNAME -cd $DIRNAME -if [ -z "$1" ]; then - git log | head -1 -else - git checkout $1 -fi -git log | head -1 | awk '{ print $2 }' > ../commitid -rm -rf .git -cd .. -tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz -rm -rf $DIRNAME diff --git a/sources b/sources index 95ee219..1c640f5 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ -f113764a80fc87ad2b5898b156fa8f4b compiler-rt-20130507.tar.xz -35d7fc075fb92d1640cfc58e2116635b cfe-source-3.3rc3.tar.gz -98909ddc9016f2c6e9021202499f4dae llvm-source-3.3rc3.tar.gz +8284891e3e311829b8e44ac813d0c9ef cfe-3.3.src.tar.gz +9c129ce24514467cfe492cf2fed8e2c4 compiler-rt-3.3.src.tar.gz +c583c80c25e56a41e3e5ae7c2f442929 lldb-3.3.src.tar.gz +40564e1dc390f9844f1711c08b08e391 llvm-3.3.src.tar.gz From 8d395c36703ce6100814bf1d5df11bea3dc4a6fa Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Thu, 21 Nov 2013 14:29:47 +0100 Subject: [PATCH 80/94] fix build, missing __clear_cache() declaration --- 0003-fix-clear-cache-declaration.patch | 23 +++++++++++++++++++++++ llvm.spec | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 0003-fix-clear-cache-declaration.patch diff --git a/0003-fix-clear-cache-declaration.patch b/0003-fix-clear-cache-declaration.patch new file mode 100644 index 0000000..c68cba3 --- /dev/null +++ b/0003-fix-clear-cache-declaration.patch @@ -0,0 +1,23 @@ +Fixes the build with gcc in gnu++98 and gnu++11 mode. + +https://github.com/llvm-mirror/llvm/commit/d1bf52275daa86e838ebbffc71efd43fc8c416f4 + +--- + lib/Support/Unix/Memory.inc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/Support/Unix/Memory.inc b/lib/Support/Unix/Memory.inc +index 72a8af6..91dc7da 100644 +--- a/lib/Support/Unix/Memory.inc ++++ b/lib/Support/Unix/Memory.inc +@@ -33,6 +33,7 @@ + #endif + + extern "C" void sys_icache_invalidate(const void *Addr, size_t len); ++extern "C" void __clear_cache(void *, void *); + + namespace { + +-- +1.8.3.1 + diff --git a/llvm.spec b/llvm.spec index a8a3a5b..f65545f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -29,7 +29,7 @@ Name: llvm Version: 3.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -49,6 +49,7 @@ Source11: llvm-Config-llvm-config.h # patches Patch1: 0001-data-install-preserve-timestamps.patch Patch2: 0002-linker-flags-speedup-memory.patch +Patch3: 0003-fix-clear-cache-declaration.patch BuildRequires: bison BuildRequires: flex @@ -263,6 +264,7 @@ mv lldb-%{version}.src tools/lldb %patch1 -p1 %patch2 -p1 +%patch3 -p1 # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure @@ -597,6 +599,9 @@ exit 0 %endif %changelog +* Thu Nov 21 2013 Jan Vcelak 3.3-2 +- fix build failure, missing __clear_cache() declaration + * Tue Nov 12 2013 Jan Vcelak 3.3-1 - upgrade to 3.3 release - add compiler-rt, enables address sanitizer (#949489) From ccf33f4a845b9ffa2c316a2be5d47245418809fd Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Sat, 30 Nov 2013 00:35:14 +0100 Subject: [PATCH 81/94] properly obsolete clang-doc subpackage Resolves: #1035268 --- llvm.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index f65545f..c103e2a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -29,7 +29,7 @@ Name: llvm Version: 3.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -134,6 +134,8 @@ Group: Development/Languages Requires: llvm%{?_isa} = %{version}-%{release} # clang requires gcc, clang++ requires libstdc++-devel Requires: libstdc++-devel +# remove clang-doc pacakge +Obsoletes: clang-doc < %{version}-%{release} %description -n clang clang: noun @@ -206,7 +208,6 @@ API documentation for the LLVM compiler infrastructure. Summary: API documentation for Clang Group: Development/Languages BuildArch: noarch -Requires: clang-doc = %{version}-%{release} %description -n clang-apidoc @@ -599,6 +600,9 @@ exit 0 %endif %changelog +* Sat Nov 30 2013 Jan Vcelak 3.3-3 +- properly obsolete clang-doc subpackage (#1035268) + * Thu Nov 21 2013 Jan Vcelak 3.3-2 - fix build failure, missing __clear_cache() declaration From 713098981a59f062b731cc687a3d1bda13724165 Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Sat, 30 Nov 2013 00:41:41 +0100 Subject: [PATCH 82/94] clang-analyzer: fix scan-build search for compiler Resolves: #982645 --- llvm.spec | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/llvm.spec b/llvm.spec index c103e2a..45aab91 100644 --- a/llvm.spec +++ b/llvm.spec @@ -161,7 +161,8 @@ This package contains header files for the Clang compiler. Summary: A source code analysis framework License: NCSA Group: Development/Languages -Requires: clang%{?_isa} = %{version}-%{release} +BuildArch: noarch +Requires: clang = %{version}-%{release} # not picked up automatically since files are currently not instaled # in standard Python hierarchies yet Requires: python @@ -367,13 +368,14 @@ EOF %if %{with clang} # Static analyzer not installed by default: # http://clang-analyzer.llvm.org/installation#OtherPlatforms -mkdir -p %{buildroot}%{_libdir}/clang-analyzer -# create launchers +mkdir -p %{buildroot}%{_libexecdir}/clang-analyzer +(cd tools/clang/tools && cp -pr scan-{build,view} %{buildroot}%{_libexecdir}/clang-analyzer/) +# add clang into scan-build search path +ln -s ../../../bin/clang %{buildroot}%{_libexecdir}/clang-analyzer/scan-build/clang +# launchers in /bin for f in scan-{build,view}; do - ln -s %{_libdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f + ln -s %{_libexecdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f done - -(cd tools/clang/tools && cp -pr scan-{build,view} %{buildroot}%{_libdir}/clang-analyzer/) %endif # Get rid of erroneously installed example files. @@ -552,7 +554,7 @@ exit 0 %defattr(-,root,root,-) %{_bindir}/scan-build %{_bindir}/scan-view -%{_libdir}/clang-analyzer +%{_libexecdir}/clang-analyzer %endif %if %{with lldb} @@ -602,6 +604,8 @@ exit 0 %changelog * Sat Nov 30 2013 Jan Vcelak 3.3-3 - properly obsolete clang-doc subpackage (#1035268) +- clang-analyzer: fix scan-build search for compiler (#982645) +- clang-analyzer: switch package architecture to noarch * Thu Nov 21 2013 Jan Vcelak 3.3-2 - fix build failure, missing __clear_cache() declaration From ab1203ad2d8ffbe954a63689ca0feb1252c9f66c Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Thu, 19 Dec 2013 20:24:48 +0100 Subject: [PATCH 83/94] remove RPATHs from binaries --- llvm.spec | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/llvm.spec b/llvm.spec index 45aab91..2acf58a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -29,7 +29,7 @@ Name: llvm Version: 3.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -52,6 +52,7 @@ Patch2: 0002-linker-flags-speedup-memory.patch Patch3: 0003-fix-clear-cache-declaration.patch BuildRequires: bison +BuildRequires: chrpath BuildRequires: flex BuildRequires: groff BuildRequires: libffi-devel @@ -268,8 +269,10 @@ mv lldb-%{version}.src tools/lldb %patch2 -p1 %patch3 -p1 -# fix ld search path +# fix library paths sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure +sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config.in +sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp %build # clang is lovely and all, but fedora builds with gcc @@ -330,14 +333,6 @@ export CXX=c++ --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/*/include) \ --with-optimize-option=-O3 -# FIXME file this -# configure does not properly specify libdir -sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config - -# FIXME upstream need to fix this -# llvm-config.cpp hardcodes lib in it -sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp - make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \ %ifarch ppc OPTIMIZE_OPTION="%{optflags} -UPPC" @@ -439,6 +434,9 @@ cp tools/lldb/LICENSE.TXT %{buildroot}%{llvmdocdir lldb}/ # delete the rest of installed documentation (because it's bad) rm -rf %{buildroot}/moredocs +# remove RPATHs +file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d +file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d %check # the Koji build server does not seem to have enough RAM @@ -602,6 +600,9 @@ exit 0 %endif %changelog +* Fri Dec 20 2013 Jan Vcelak 3.3-4 +- remove RPATHs + * Sat Nov 30 2013 Jan Vcelak 3.3-3 - properly obsolete clang-doc subpackage (#1035268) - clang-analyzer: fix scan-build search for compiler (#982645) From f6033f2696fa62b40c40bac1631c4f5bbb7576e5 Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Thu, 19 Dec 2013 20:25:44 +0100 Subject: [PATCH 84/94] run ldconfig when installing lldb Resolves: #1044431 --- llvm.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llvm.spec b/llvm.spec index 2acf58a..ae87c8b 100644 --- a/llvm.spec +++ b/llvm.spec @@ -467,6 +467,11 @@ make -C tools/clang/test TESTARGS="-v -j4" | tee %{buildroot}%{llvmdocdir clang- %postun -n clang -p /sbin/ldconfig %endif +%if %{with lldb} +%post -n lldb -p /sbin/ldconfig +%postun -n lldb -p /sbin/ldconfig +%endif + %posttrans devel # link llvm-config to the platform-specific file; @@ -602,6 +607,7 @@ exit 0 %changelog * Fri Dec 20 2013 Jan Vcelak 3.3-4 - remove RPATHs +- run ldconfig when installing lldb (#1044431) * Sat Nov 30 2013 Jan Vcelak 3.3-3 - properly obsolete clang-doc subpackage (#1035268) From 9dd4cd3a179af07e6a606f3b250721d6d97d3e63 Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Thu, 19 Dec 2013 20:55:05 +0100 Subject: [PATCH 85/94] fix: scan-build manual page is installed into wrong location Resolves: #1038829 --- llvm.spec | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/llvm.spec b/llvm.spec index ae87c8b..9c1e661 100644 --- a/llvm.spec +++ b/llvm.spec @@ -363,10 +363,24 @@ EOF %if %{with clang} # Static analyzer not installed by default: # http://clang-analyzer.llvm.org/installation#OtherPlatforms -mkdir -p %{buildroot}%{_libexecdir}/clang-analyzer -(cd tools/clang/tools && cp -pr scan-{build,view} %{buildroot}%{_libexecdir}/clang-analyzer/) -# add clang into scan-build search path + +# scan-view +mkdir -p %{buildroot}%{_libexecdir}/clang-analyzer/ +cp -pr tools/clang/tools/scan-view %{buildroot}%{_libexecdir}/clang-analyzer/ + +# scan-build +mkdir -p %{buildroot}%{_libexecdir}/clang-analyzer/scan-build +for file in c++-analyzer ccc-analyzer scan-build scanview.css sorttable.js; do + cp -p tools/clang/tools/scan-build/$file %{buildroot}%{_libexecdir}/clang-analyzer/scan-build/ +done + +# scan-build manual page +mkdir -p %{buildroot}%{_mandir}/man1 +cp -p tools/clang/tools/scan-build/scan-build.1 %{buildroot}%{_mandir}/man1/ + +# scan-build requires clang in search path ln -s ../../../bin/clang %{buildroot}%{_libexecdir}/clang-analyzer/scan-build/clang + # launchers in /bin for f in scan-{build,view}; do ln -s %{_libexecdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f @@ -508,6 +522,7 @@ exit 0 %{_bindir}/opt %if %{with clang} %exclude %{_mandir}/man1/clang.1.* +%exclude %{_mandir}/man1/scan-build.1.* %endif %if %{with lldb} %exclude %{_mandir}/man1/lldb.1.* @@ -555,6 +570,7 @@ exit 0 %files -n clang-analyzer %defattr(-,root,root,-) +%{_mandir}/man1/scan-build.1.* %{_bindir}/scan-build %{_bindir}/scan-view %{_libexecdir}/clang-analyzer @@ -608,6 +624,7 @@ exit 0 * Fri Dec 20 2013 Jan Vcelak 3.3-4 - remove RPATHs - run ldconfig when installing lldb (#1044431) +- fix: scan-build manual page is installed into wrong location (#1038829) * Sat Nov 30 2013 Jan Vcelak 3.3-3 - properly obsolete clang-doc subpackage (#1035268) From 4ac733a9d6fc8b6eda1a42dba87c0e5c9a78272c Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Thu, 19 Dec 2013 22:24:23 +0100 Subject: [PATCH 86/94] fix: requirements for llvm-ocaml-devel packages Resolves: #975914 --- llvm.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 9c1e661..7eae2bb 100644 --- a/llvm.spec +++ b/llvm.spec @@ -232,7 +232,7 @@ OCaml binding for LLVM. %package ocaml-devel Summary: Development files for %{name}-ocaml Group: Development/Libraries -Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Requires: %{name}-static%{?_isa} = %{version}-%{release} Requires: %{name}-ocaml%{?_isa} = %{version}-%{release} Requires: ocaml @@ -625,6 +625,7 @@ exit 0 - remove RPATHs - run ldconfig when installing lldb (#1044431) - fix: scan-build manual page is installed into wrong location (#1038829) +- fix: requirements for llvm-ocaml-devel packages (#975914) * Sat Nov 30 2013 Jan Vcelak 3.3-3 - properly obsolete clang-doc subpackage (#1035268) From 0242d4d552613113814d3310733f4c8850789a8c Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Thu, 19 Dec 2013 21:51:53 +0100 Subject: [PATCH 87/94] include LLVM cmake modules into devel package Resolves: #914713 --- llvm.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm.spec b/llvm.spec index 7eae2bb..187d118 100644 --- a/llvm.spec +++ b/llvm.spec @@ -448,6 +448,10 @@ cp tools/lldb/LICENSE.TXT %{buildroot}%{llvmdocdir lldb}/ # delete the rest of installed documentation (because it's bad) rm -rf %{buildroot}/moredocs +# install CMake modules +mkdir -p %{buildroot}%{_datadir}/llvm/cmake/ +cp -p cmake/modules/*.cmake %{buildroot}%{_datadir}/llvm/cmake/ + # remove RPATHs file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d @@ -513,6 +517,7 @@ exit 0 %files %defattr(-,root,root,-) %doc %{llvmdocdir llvm}/ +%dir %{_datadir}/llvm %{_bindir}/bugpoint %{_bindir}/llc %{_bindir}/lli @@ -535,6 +540,7 @@ exit 0 %{_bindir}/llvm-config-%{__isa_bits} %{_includedir}/%{name} %{_includedir}/%{name}-c +%{_datadir}/llvm/cmake %files libs %defattr(-,root,root,-) @@ -626,6 +632,7 @@ exit 0 - run ldconfig when installing lldb (#1044431) - fix: scan-build manual page is installed into wrong location (#1038829) - fix: requirements for llvm-ocaml-devel packages (#975914) +- add LLVM cmake modules into llvm-devel (#914713) * Sat Nov 30 2013 Jan Vcelak 3.3-3 - properly obsolete clang-doc subpackage (#1035268) From 230d47c2ff2b6350cdb0964b96197d8025bae4ce Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Sun, 5 Jan 2014 10:35:22 +0100 Subject: [PATCH 88/94] fix macro expansion when checking Fedora release --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 187d118..faa5792 100644 --- a/llvm.spec +++ b/llvm.spec @@ -19,7 +19,7 @@ %endif # Documentation install path -%if 0%{fedora} < 20 +%if 0%{?fedora} < 20 %global llvmdocdir() %{_docdir}/%1-%{version} %else %global llvmdocdir() %{_docdir}/%1 From bf2cfe23d517a27f0eb60c48d7a389dddd832445 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 14 Jan 2014 10:15:26 +1000 Subject: [PATCH 89/94] update to llvm 3.4 release --- .gitignore | 1 + 0002-linker-flags-speedup-memory.patch | 20 ++++------------ 0003-fix-clear-cache-declaration.patch | 23 ------------------ llvm.spec | 33 +++++++++++++++----------- sources | 8 +++---- 5 files changed, 29 insertions(+), 56 deletions(-) delete mode 100644 0003-fix-clear-cache-declaration.patch diff --git a/.gitignore b/.gitignore index a0715bb..ec79ea7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /compiler-rt-*.src.tar.gz /lldb-*.src.tar.gz /llvm-*.src.tar.gz +/clang-3.4.src.tar.gz diff --git a/0002-linker-flags-speedup-memory.patch b/0002-linker-flags-speedup-memory.patch index 2fa53ad..a5fb7dc 100644 --- a/0002-linker-flags-speedup-memory.patch +++ b/0002-linker-flags-speedup-memory.patch @@ -1,22 +1,12 @@ -Hack the linker flags for shared libs for speed and memory usage - ---- - tools/llvm-shlib/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile -index 6d6c6e9..4038df4 100644 ---- a/tools/llvm-shlib/Makefile -+++ b/tools/llvm-shlib/Makefile -@@ -76,7 +76,7 @@ endif +diff -up llvm-3.4/tools/llvm-shlib/Makefile.orig llvm-3.4/tools/llvm-shlib/Makefile +--- llvm-3.4/tools/llvm-shlib/Makefile.orig 2013-11-01 00:35:00.000000000 +1000 ++++ llvm-3.4/tools/llvm-shlib/Makefile 2014-01-14 10:13:20.069858909 +1000 +@@ -75,7 +75,7 @@ endif - ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU)) + ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD)) # Don't allow unresolved symbols. - LLVMLibsOptions += -Wl,--no-undefined + LLVMLibsOptions += -Wl,--no-undefined -Wl,-Bsymbolic endif ifeq ($(HOST_OS),SunOS) --- -1.8.3.1 - diff --git a/0003-fix-clear-cache-declaration.patch b/0003-fix-clear-cache-declaration.patch deleted file mode 100644 index c68cba3..0000000 --- a/0003-fix-clear-cache-declaration.patch +++ /dev/null @@ -1,23 +0,0 @@ -Fixes the build with gcc in gnu++98 and gnu++11 mode. - -https://github.com/llvm-mirror/llvm/commit/d1bf52275daa86e838ebbffc71efd43fc8c416f4 - ---- - lib/Support/Unix/Memory.inc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/Support/Unix/Memory.inc b/lib/Support/Unix/Memory.inc -index 72a8af6..91dc7da 100644 ---- a/lib/Support/Unix/Memory.inc -+++ b/lib/Support/Unix/Memory.inc -@@ -33,6 +33,7 @@ - #endif - - extern "C" void sys_icache_invalidate(const void *Addr, size_t len); -+extern "C" void __clear_cache(void *, void *); - - namespace { - --- -1.8.3.1 - diff --git a/llvm.spec b/llvm.spec index faa5792..692f8c5 100644 --- a/llvm.spec +++ b/llvm.spec @@ -25,11 +25,12 @@ %global llvmdocdir() %{_docdir}/%1 %endif -%global downloadurl http://llvm.org/releases/%{version} +#global prerel rc3 +%global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} Name: llvm -Version: 3.3 -Release: 4%{?dist} +Version: 3.4 +Release: 1%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -37,10 +38,12 @@ License: NCSA URL: http://llvm.org/ # source archives -Source0: %{downloadurl}/llvm-%{version}.src.tar.gz -Source1: %{downloadurl}/cfe-%{version}.src.tar.gz -Source2: %{downloadurl}/compiler-rt-%{version}.src.tar.gz -Source3: %{downloadurl}/lldb-%{version}.src.tar.gz +Source0: %{downloadurl}/llvm-%{version}%{?prerel}.src.tar.gz +Source1: %{downloadurl}/clang-%{version}%{?prerel}.src.tar.gz +Source2: %{downloadurl}/compiler-rt-%{version}%{?prerel}.src.tar.gz +%if %{with lldb} +Source3: %{downloadurl}/lldb-%{version}%{?prerel}.src.tar.gz +%endif # multilib fixes Source10: llvm-Config-config.h @@ -49,7 +52,6 @@ Source11: llvm-Config-llvm-config.h # patches Patch1: 0001-data-install-preserve-timestamps.patch Patch2: 0002-linker-flags-speedup-memory.patch -Patch3: 0003-fix-clear-cache-declaration.patch BuildRequires: bison BuildRequires: chrpath @@ -253,21 +255,20 @@ HTML documentation for LLVM's OCaml binding. %prep -%setup -q -n llvm-%{version}.src %{?with_clang:-a1} %{?with_crt:-a2} %{?with_lldb:-a3} +%setup -q %{?with_clang:-a1} %{?with_crt:-a2} %{?with_lldb:-a3} rm -rf tools/clang tools/lldb projects/compiler-rt %if %{with clang} -mv cfe-%{version}.src tools/clang +mv clang-%{version} tools/clang %endif %if %{with crt} -mv compiler-rt-%{version}.src projects/compiler-rt +mv compiler-rt-%{version} projects/compiler-rt %endif %if %{with lldb} -mv lldb-%{version}.src tools/lldb +mv lldb-%{version} tools/lldb %endif %patch1 -p1 %patch2 -p1 -%patch3 -p1 # fix library paths sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure @@ -521,6 +522,7 @@ exit 0 %{_bindir}/bugpoint %{_bindir}/llc %{_bindir}/lli +%{_bindir}/lli-child-target %exclude %{_bindir}/llvm-config-%{__isa_bits} %{_bindir}/llvm* %{_bindir}/macho-dump @@ -601,7 +603,7 @@ exit 0 %defattr(-,root,root,-) %{_libdir}/ocaml/*.cma %{_libdir}/ocaml/*.cmi -%{_libdir}/ocaml/META.llvm +%{_libdir}/ocaml/META.llvm* %files ocaml-devel %defattr(-,root,root,-) @@ -627,6 +629,9 @@ exit 0 %endif %changelog +* Tue Jan 14 2014 Dave Airlie 3.4-1 +- update to llvm 3.4 release + * Fri Dec 20 2013 Jan Vcelak 3.3-4 - remove RPATHs - run ldconfig when installing lldb (#1044431) diff --git a/sources b/sources index 1c640f5..5ac19b5 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -8284891e3e311829b8e44ac813d0c9ef cfe-3.3.src.tar.gz -9c129ce24514467cfe492cf2fed8e2c4 compiler-rt-3.3.src.tar.gz -c583c80c25e56a41e3e5ae7c2f442929 lldb-3.3.src.tar.gz -40564e1dc390f9844f1711c08b08e391 llvm-3.3.src.tar.gz +b378f1e2c424e03289effc75268d3d2c clang-3.4.src.tar.gz +7ed60a0463f9fdfa20db7109d4624cee lldb-3.4.src.tar.gz +7938353e3a3bda85733a165e7ac4bb84 compiler-rt-3.4.src.tar.gz +46ed668a1ce38985120dbf6344cf6116 llvm-3.4.src.tar.gz From eb791e93dd9e6e1be118965a934f403882fbd326 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 14 Jan 2014 10:15:26 +1000 Subject: [PATCH 90/94] update to llvm 3.4 release (part 2) add lldb-devel subpackage --- llvm.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/llvm.spec b/llvm.spec index 692f8c5..075bf68 100644 --- a/llvm.spec +++ b/llvm.spec @@ -193,6 +193,14 @@ LLDB is a next generation, high-performance debugger. It is built as a set of reusable components which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression parser and LLVM disassembler. + +%package -n lldb-devel +Summary: Header files for LLDB +Group: Development/Languages +Requires: lldb%{?_isa} = %{version}-%{release} + +%description -n lldb-devel +This package contains header files for the LLDB debugger. %endif %if %{with doxygen} @@ -592,6 +600,10 @@ exit 0 %{_bindir}/lldb-platform %{_libdir}/%{name}/liblldb.so %doc %{_mandir}/man1/lldb.1.* + +%files -n lldb-devel +%defattr(-,root,root,-) +%{_includedir}/lldb %endif %files doc @@ -603,6 +615,7 @@ exit 0 %defattr(-,root,root,-) %{_libdir}/ocaml/*.cma %{_libdir}/ocaml/*.cmi +%{_libdir}/ocaml/dll*.so %{_libdir}/ocaml/META.llvm* %files ocaml-devel From 283a960f2b518795884a2979a1640e2988fc1348 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 14 Jan 2014 17:55:43 +1000 Subject: [PATCH 91/94] add ncurses-devel buildreq --- llvm.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 075bf68..1743311 100644 --- a/llvm.spec +++ b/llvm.spec @@ -65,6 +65,7 @@ BuildRequires: binutils-devel %if %{with ocaml} BuildRequires: ocaml-ocamldoc %endif +BuildRequires: ncurses-devel BuildRequires: zip # for DejaGNU test suite BuildRequires: dejagnu tcl-devel python @@ -90,7 +91,7 @@ Group: Development/Languages Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libffi-devel Requires: libstdc++-devel >= 3.4 - +Requires: ncurses-devel Requires(posttrans): /usr/sbin/alternatives Requires(postun): /usr/sbin/alternatives From b04ba796ebcec425a7f776c4fc91994d865c82e7 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 14 Jan 2014 17:58:29 +1000 Subject: [PATCH 92/94] add ncurses-devel BR and Requires --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 1743311..a1fd3e1 100644 --- a/llvm.spec +++ b/llvm.spec @@ -30,7 +30,7 @@ Name: llvm Version: 3.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -643,6 +643,9 @@ exit 0 %endif %changelog +* Tue Jan 14 2014 Dave Airlie 3.4-2 +- add ncurses-devel BR and Requires + * Tue Jan 14 2014 Dave Airlie 3.4-1 - update to llvm 3.4 release From 53ecfe1814bbbd95c5b5e618cf9593e8f819c64a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 16 Jan 2014 14:03:28 +1000 Subject: [PATCH 93/94] llvm: don't build lldb on powerpc this fails to build upstream due to a collision between https://bugzilla.redhat.com/show_bug.cgi?id=1049976 --- llvm.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index a1fd3e1..eea19fd 100644 --- a/llvm.spec +++ b/llvm.spec @@ -4,7 +4,6 @@ # Components built by default: %bcond_without clang %bcond_without crt -%bcond_without lldb # Components enabled if supported by target arch: %ifnarch s390 s390x sparc64 @@ -17,6 +16,13 @@ %else %bcond_with gold %endif +# ppc64 fails to build lldb upstream +%ifnarch ppc ppc64 + %bcond_without lldb +%else + %bcond_with lldb +%endif + # Documentation install path %if 0%{?fedora} < 20 From eaac0fa3d345977f76f3b2f426437c5581472a38 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 17 Jan 2014 09:51:03 +1000 Subject: [PATCH 94/94] bump nvr for lldb on ppc disable --- llvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index eea19fd..f088013 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ Name: llvm Version: 3.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -649,6 +649,9 @@ exit 0 %endif %changelog +* Fri Jan 17 2014 Dave Airlie 3.4-3 +- bump nvr for lldb on ppc disable + * Tue Jan 14 2014 Dave Airlie 3.4-2 - add ncurses-devel BR and Requires