The package rpms/llvm.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/llvm.git/commit/?id=8f4eab1072a0f...
https://src.fedoraproject.org/cgit/rpms/llvm.git/commit/?id=ca4631e1f82de....
Change:
+%ifarch %{arm}
-%ifarch %{arm}
Thanks.
Full change:
============
commit c2e80ad87a4e0e66695e8e6a5172f470bebf330d
Merge: 2839cf6 f3d30bd
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Tue Dec 5 01:03:27 2017 +0000
Merge branch 'master' into f27
commit f3d30bd5c70c5aa9e443fd946c0ed6b025e071de
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Mon Nov 20 19:53:57 2017 +0000
Backport debuginfo fix for rust
diff --git a/0001-Merging-r318289.patch b/0001-Merging-r318289.patch
new file mode 100644
index 0000000..d4bff92
--- /dev/null
+++ b/0001-Merging-r318289.patch
@@ -0,0 +1,157 @@
+From d61468959556ddc180c6c28edff476244fd0e8a6 Mon Sep 17 00:00:00 2001
+From: tstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8>
+Date: Fri, 17 Nov 2017 18:48:34 +0000
+Subject: [PATCH] Merging r318289:
+
+------------------------------------------------------------------------
+r318289 | jdevlieghere | 2017-11-15 02:57:05 -0800 (Wed, 15 Nov 2017) | 14 lines
+
+[DebugInfo] Fix potential CU mismatch for SubprogramScopeDIEs.
+
+In constructAbstractSubprogramScopeDIE there can be a potential mismatch
+between `this` and the CU of ContextDIE when a scope is shared between
+two DISubprograms belonging to a different CU. In that case, `this` is
+the CU that was specified in the IR, but the CU of ContextDIE is that of
+the first subprogram that was emitted. This patch fixes the mismatch by
+looking up the CU of ContextDIE, and switching to use that.
+
+This fixes PR35212 (
https://bugs.llvm.org/show_bug.cgi?id=35212)
+
+Patch by Philip Craig!
+
+Differential revision:
https://reviews.llvm.org/D39981
+------------------------------------------------------------------------
+
+git-svn-id:
https://llvm.org/svn/llvm-project/llvm/branches/release_50@318542
91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 20 ++++++++----
+ lib/CodeGen/AsmPrinter/DwarfDebug.h | 5 ++-
+ test/DebugInfo/cross-cu-scope.ll | 50 +++++++++++++++++++++++++++++
+ 3 files changed, 67 insertions(+), 8 deletions(-)
+ create mode 100644 test/DebugInfo/cross-cu-scope.ll
+
+diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+index 676c48f..333d14a 100644
+--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
++++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+@@ -621,6 +621,7 @@ void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
+ auto *SP = cast<DISubprogram>(Scope->getScopeNode());
+
+ DIE *ContextDIE;
++ DwarfCompileUnit *ContextCU = this;
+
+ if (includeMinimalInlineScopes())
+ ContextDIE = &getUnitDie();
+@@ -631,18 +632,23 @@ void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
+ else if (auto *SPDecl = SP->getDeclaration()) {
+ ContextDIE = &getUnitDie();
+ getOrCreateSubprogramDIE(SPDecl);
+- } else
++ } else {
+ ContextDIE = getOrCreateContextDIE(resolve(SP->getScope()));
++ // The scope may be shared with a subprogram that has already been
++ // constructed in another CU, in which case we need to construct this
++ // subprogram in the same CU.
++ ContextCU = DD->lookupCU(ContextDIE->getUnitDie());
++ }
+
+ // Passing null as the associated node because the abstract definition
+ // shouldn't be found by lookup.
+- AbsDef = &createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, nullptr);
+- applySubprogramAttributesToDefinition(SP, *AbsDef);
++ AbsDef = &ContextCU->createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE,
nullptr);
++ ContextCU->applySubprogramAttributesToDefinition(SP, *AbsDef);
+
+- if (!includeMinimalInlineScopes())
+- addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
+- if (DIE *ObjectPointer = createAndAddScopeChildren(Scope, *AbsDef))
+- addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
++ if (!ContextCU->includeMinimalInlineScopes())
++ ContextCU->addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
++ if (DIE *ObjectPointer = ContextCU->createAndAddScopeChildren(Scope, *AbsDef))
++ ContextCU->addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
+ }
+
+ DIE *DwarfCompileUnit::constructImportedEntityDIE(
+diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
+index 5dfe06c..78ee9a1 100644
+--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
++++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
+@@ -283,7 +283,7 @@ class DwarfDebug : public DebugHandlerBase {
+ // 0, referencing the comp_dir of all the type units that use it.
+ MCDwarfDwoLineTable SplitTypeUnitFileTable;
+ /// @}
+-
++
+ /// True iff there are multiple CUs in this module.
+ bool SingleCU;
+ bool IsDarwin;
+@@ -562,6 +562,9 @@ public:
+ bool isLexicalScopeDIENull(LexicalScope *Scope);
+
+ bool hasDwarfPubSections(bool includeMinimalInlineScopes) const;
++
++ /// Find the matching DwarfCompileUnit for the given CU DIE.
++ DwarfCompileUnit *lookupCU(const DIE *Die) { return CUDieMap.lookup(Die); }
+ };
+ } // End of namespace llvm
+
+diff --git a/test/DebugInfo/cross-cu-scope.ll b/test/DebugInfo/cross-cu-scope.ll
+new file mode 100644
+index 0000000..7c71f27
+--- /dev/null
++++ b/test/DebugInfo/cross-cu-scope.ll
+@@ -0,0 +1,50 @@
++; RUN: %llc_dwarf %s -filetype=obj -o %t
++; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
++
++; Reduced test case from PR35212. Two DISubprogram belong to a different CU but
++; share a scope. Both are declarations and end up in the scope's CU. We want to
++; check that the CU from the context DIE is used (rather than from the IR).
++; This manifests itself by the DW_base_type ending up in the second CU, rather
++; than in the first one as specified in the IR.
++
++; CHECK: DW_TAG_compile_unit
++; CHECK-NEXT: discriminator 0
++; CHECK: DW_TAG_compile_unit
++; CHECK-NEXT: discriminator 1
++; CHECK: DW_TAG_structure_type
++; CHECK-NOT: NULL
++; CHECK: DW_TAG_subprogram
++; CHECK-NOT: NULL
++; CHECK: DW_TAG_formal_parameter
++; CHECK-NOT: NULL
++; CHECK: DW_AT_type{{.*}}{[[USIZE_LABEL:0x[0-9a-f]+]]}
++; CHECK: NULL
++; CHECK: [[USIZE_LABEL]]: DW_TAG_base_type
++; CHECK-NOT: NULL
++; CHECK: DW_AT_name{{.*}}"usize"
++
++define hidden void @foo() !dbg !4 {
++ ret void, !dbg !7
++}
++
++!llvm.dbg.cu = !{!0, !2}
++!llvm.module.flags = !{!3}
++
++!0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "clang
LLVM (rustc version 1.23.0-nightly (discriminator 0))", isOptimized: true,
runtimeVersion: 0, emissionKind: FullDebug)
++!1 = !DIFile(filename: "../lib.rs", directory:
"/home/alex/code/rust4/lol")
++!2 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "clang
LLVM (rustc version 1.23.0-nightly (discriminator 1))", isOptimized: true,
runtimeVersion: 0, emissionKind: FullDebug)
++!3 = !{i32 2, !"Debug Info Version", i32 3}
++!4 = distinct !DISubprogram(name: "clone<alloc::string::String>",
linkageName: "_ZN5alloc3vec8{{impl}}28clone<alloc::string::String>E",
scope: null, file: !1, line: 1519, type: !5, isLocal: false, isDefinition: true,
scopeLine: 1519, flags: DIFlagPrototyped, isOptimized: true, unit: !0, templateParams: !6,
variables: !6)
++!5 = !DISubroutineType(types: !6)
++!6 = !{}
++!7 = !DILocation(line: 1612, scope: !8, inlinedAt: !11)
++!8 = distinct !DILexicalBlock(scope: !9, file: !1, line: 86, column: 12)
++!9 = distinct !DISubprogram(name:
"allocate_in<alloc::string::String,alloc::heap::Heap>", linkageName:
"_ZN5alloc7raw_vec8{{impl}}52allocate_in<alloc::string::String,alloc::heap::Heap>E",
scope: !10, file: !1, line: 82, type: !5, isLocal: false, isDefinition: true, scopeLine:
82, flags: DIFlagPrototyped, isOptimized: true, unit: !2, templateParams: !6, variables:
!6)
++!10 = distinct !DICompositeType(tag: DW_TAG_structure_type, name:
"RawVec<alloc::string::String, alloc::heap::Heap>", file: !1, size: 128,
align: 64, elements: !6, identifier: "5c6e4db16d2c64555e40661d70c4d81e")
++!11 = distinct !DILocation(line: 86, scope: !8, inlinedAt: !12)
++!12 = distinct !DILocation(line: 141, scope: !13, inlinedAt: !17)
++!13 = distinct !DISubprogram(name:
"with_capacity<alloc::string::String>", linkageName:
"_ZN5alloc7raw_vec8{{impl}}36with_capacity<alloc::string::String>E",
scope: !10, file: !1, line: 140, type: !5, isLocal: false, isDefinition: true, scopeLine:
140, flags: DIFlagPrototyped, isOptimized: true, unit: !0, templateParams: !6, variables:
!14)
++!14 = !{!15}
++!15 = !DILocalVariable(name: "cap", arg: 1, scope: !13, file: !1, line: 1,
type: !16)
++!16 = !DIBasicType(name: "usize", size: 64, encoding: DW_ATE_unsigned)
++!17 = !DILocation(line: 1521, scope: !4)
+--
+1.8.3.1
+
diff --git a/llvm.spec b/llvm.spec
index ba73a95..9861e4d 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -12,7 +12,7 @@
Name: llvm
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: The Low Level Virtual Machine
License: NCSA
@@ -25,6 +25,7 @@
Patch3: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
# FIXME: Symbol versioning breaks some unittests when statically linking
# libstdc++, so we disable it for now.
Patch4: 0001-Revert-Add-a-linker-script-to-version-LLVM-symbols.patch
+Patch5: 0001-Merging-r318289.patch
BuildRequires: cmake
BuildRequires: zlib-devel
@@ -215,6 +216,9 @@ fi
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%changelog
+* Mon Nov 20 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.0-5
+- Backport debuginfo fix for rust
+
* Fri Nov 03 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.0-4
- Reduce debuginfo size for ARM
commit ca4631e1f82de5be2b6b3ce5e0366c3a79cdf79b
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Sat Nov 4 01:38:36 2017 +0000
Reduce debuginfo size for ARM
This fixes the previous attempt to disable debuginfo, which left
debuginfo enabled and disabled stripping it from the libraries.
libLLVM.so was almost 1GB in the ARM builds, but now is about
47 MB.
diff --git a/llvm.spec b/llvm.spec
index dc0bfa3..ba73a95 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -12,7 +12,7 @@
Name: llvm
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: The Low Level Virtual Machine
License: NCSA
@@ -97,27 +97,17 @@ for f in `grep -Rl 'XFAIL.\+arm' test/ExecutionEngine `; do
rm $f; done
mkdir -p _build
cd _build
-%ifarch s390
+%ifarch s390 %{arm}
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
-# There is not enough memory on the ARM builders to build with debuginfo.
-# We also enable less targets on ARM to save memory.
-%ifarch %{arm}
-%global debug_package %{nil}
-%endif
-
# force off shared libs as cmake macros turns it on.
%cmake .. \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-%ifarch %{arm}
- -DCMAKE_BUILD_TYPE=Release \
-%else
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-%endif
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-Bsymbolic -static-libstdc++" \
-%ifarch s390
+%ifarch s390 %{arm}
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
%endif
@@ -127,11 +117,7 @@ cd _build
-DLLVM_LIBDIR_SUFFIX= \
%endif
\
-%ifarch %{arm}
- -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;NVPTX;AArch64;ARM;BPF" \
-%else
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF"
\
-%endif
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \
-DLLVM_ENABLE_ZLIB:BOOL=ON \
-DLLVM_ENABLE_FFI:BOOL=ON \
@@ -229,6 +215,9 @@ fi
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%changelog
+* Fri Nov 03 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.0-4
+- Reduce debuginfo size for ARM
+
* Tue Oct 10 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.0-2
- Reduce memory usage on ARM by disabling debuginfo and some non-ARM targets.
commit 8f4eab1072a0ff80096b953b36d2493a8c75817f
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Tue Oct 10 21:08:40 2017 +0000
Reduce memory usage on ARM
Disable debuginfo and some non-ARM targets.
diff --git a/llvm.spec b/llvm.spec
index 17ccaf0..dc0bfa3 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -12,7 +12,7 @@
Name: llvm
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: The Low Level Virtual Machine
License: NCSA
@@ -102,10 +102,20 @@ cd _build
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
+# There is not enough memory on the ARM builders to build with debuginfo.
+# We also enable less targets on ARM to save memory.
+%ifarch %{arm}
+%global debug_package %{nil}
+%endif
+
# force off shared libs as cmake macros turns it on.
%cmake .. \
-DBUILD_SHARED_LIBS:BOOL=OFF \
+%ifarch %{arm}
+ -DCMAKE_BUILD_TYPE=Release \
+%else
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
+%endif
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-Bsymbolic -static-libstdc++" \
%ifarch s390
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
@@ -117,7 +127,11 @@ cd _build
-DLLVM_LIBDIR_SUFFIX= \
%endif
\
+%ifarch %{arm}
+ -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;NVPTX;AArch64;ARM;BPF" \
+%else
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF"
\
+%endif
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \
-DLLVM_ENABLE_ZLIB:BOOL=ON \
-DLLVM_ENABLE_FFI:BOOL=ON \
@@ -215,6 +229,9 @@ fi
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%changelog
+* Tue Oct 10 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.0-2
+- Reduce memory usage on ARM by disabling debuginfo and some non-ARM targets.
+
* Mon Sep 25 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.0-1
- 5.0.0 Release
commit ac4d3051327e73ae889760188b46b1ce7781d604
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Tue Oct 3 23:13:41 2017 +0000
Add missing patch.
diff --git a/0001-Revert-Add-a-linker-script-to-version-LLVM-symbols.patch
b/0001-Revert-Add-a-linker-script-to-version-LLVM-symbols.patch
new file mode 100644
index 0000000..af11182
--- /dev/null
+++ b/0001-Revert-Add-a-linker-script-to-version-LLVM-symbols.patch
@@ -0,0 +1,61 @@
+From 2912190aec4a215849a6dea0463f6599425fb7c7 Mon Sep 17 00:00:00 2001
+From: Tom Stellard <tstellar(a)redhat.com>
+Date: Mon, 14 Aug 2017 17:46:14 -0700
+Subject: [PATCH] Revert "Add a linker script to version LLVM symbols"
+
+This reverts commit cd789d8cfe12aa374e66eafc748f4fc06e149ca7.
+
+Conflicts:
+ tools/llvm-shlib/CMakeLists.txt
+---
+ cmake/modules/AddLLVM.cmake | 3 +--
+ tools/llvm-shlib/CMakeLists.txt | 8 ++------
+ tools/llvm-shlib/simple_version_script.map.in | 1 -
+ 3 files changed, 3 insertions(+), 9 deletions(-)
+ delete mode 100644 tools/llvm-shlib/simple_version_script.map.in
+
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index e1ad9b9..e5ee4ee 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -81,9 +81,8 @@ function(add_llvm_symbol_exports target_name export_file)
+ # Gold and BFD ld require a version script rather than a plain list.
+ set(native_export_file "${target_name}.exports")
+ # FIXME: Don't write the "local:" line on OpenBSD.
+- # in the export file, also add a linker script to version LLVM symbols (form:
LLVM_N.M)
+ add_custom_command(OUTPUT ${native_export_file}
+- COMMAND echo "LLVM_${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR} {" >
${native_export_file}
++ COMMAND echo "{" > ${native_export_file}
+ COMMAND grep -q "[[:alnum:]]" ${export_file} && echo "
global:" >> ${native_export_file} || :
+ COMMAND sed -e "s/$/;/" -e "s/^/ /" < ${export_file}
>> ${native_export_file}
+ COMMAND echo " local: *;" >> ${native_export_file}
+diff --git a/tools/llvm-shlib/CMakeLists.txt b/tools/llvm-shlib/CMakeLists.txt
+index 907345a..01a37b5 100644
+--- a/tools/llvm-shlib/CMakeLists.txt
++++ b/tools/llvm-shlib/CMakeLists.txt
+@@ -37,13 +37,9 @@ endif()
+ add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
+
+ list(REMOVE_DUPLICATES LIB_NAMES)
+-if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR
("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be
"GNU ld for elf"
+- configure_file(
+- ${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map.in
+- ${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map)
+-
++if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR
("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR
("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be
"GNU ld for elf"
+ # GNU ld doesn't resolve symbols in the version script.
+- set(LIB_NAMES
-Wl,--version-script,${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map
-Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
++ set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+ set(LIB_NAMES -Wl,-all_load ${LIB_NAMES})
+ endif()
+diff --git a/tools/llvm-shlib/simple_version_script.map.in
b/tools/llvm-shlib/simple_version_script.map.in
+deleted file mode 100644
+index e9515fe..0000000
+--- a/tools/llvm-shlib/simple_version_script.map.in
++++ /dev/null
+@@ -1 +0,0 @@
+-LLVM_@LLVM_VERSION_MAJOR@.(a)LLVM_VERSION_MINOR@ { global: *; };
+--
+1.8.3.1
+
commit 3d29fda1ea7b5957812adb24bcc478d68f58091a
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Tue Aug 22 22:40:25 2017 +0000
5.0.0 Release
diff --git a/.gitignore b/.gitignore
index 6ed87d2..e72f01f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,3 +32,4 @@
/llvm-3.9.1.src.tar.xz
/llvm-4.0.0.src.tar.xz
/llvm-4.0.1.src.tar.xz
+/llvm-5.0.0.src.tar.xz
diff --git a/0001-CMake-Split-static-library-exports-into-their-own-ex.patch
b/0001-CMake-Split-static-library-exports-into-their-own-ex.patch
index 2804e1b..123fb1a 100644
--- a/0001-CMake-Split-static-library-exports-into-their-own-ex.patch
+++ b/0001-CMake-Split-static-library-exports-into-their-own-ex.patch
@@ -1,4 +1,4 @@
-From a5f39924a3466eb12d764993aaa8c1c308f92925 Mon Sep 17 00:00:00 2001
+From 80d3393d3e324dd8bef7de1b9c6db3010585f3e8 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar(a)redhat.com>
Date: Sat, 29 Apr 2017 02:03:23 +0000
Subject: [PATCH] CMake: Split static library exports into their own export
@@ -31,10 +31,10 @@ Differential Revision:
https://reviews.llvm.org/D32668
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
-index b3c7746..7d9d253 100644
+index 1c92265..e1ad9b9 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
-@@ -587,7 +587,11 @@ macro(add_llvm_library name)
+@@ -603,7 +603,11 @@ macro(add_llvm_library name)
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
@@ -69,10 +69,10 @@ index ac4b0b7..f77c905 100644
install(FILES
diff --git a/cmake/modules/LLVMConfig.cmake.in b/cmake/modules/LLVMConfig.cmake.in
-index c30c92b..f0f17b2 100644
+index 7a8eb36..1fa0028 100644
--- a/cmake/modules/LLVMConfig.cmake.in
+++ b/cmake/modules/LLVMConfig.cmake.in
-@@ -73,6 +73,8 @@ if(NOT TARGET LLVMSupport)
+@@ -77,6 +77,8 @@ if(NOT TARGET LLVMSupport)
set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")
include("@LLVM_CONFIG_EXPORTS_FILE@")
@llvm_config_include_buildtree_only_exports@
@@ -80,7 +80,7 @@ index c30c92b..f0f17b2 100644
+ include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
endif()
- include(${LLVM_CMAKE_DIR}/LLVM-Config.cmake)
+ set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On)
--
-2.9.3
+1.8.3.1
diff --git a/llvm.spec b/llvm.spec
index ccfd06b..17ccaf0 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -6,10 +6,13 @@
%endif
%global llvm_bindir %{_libdir}/%{name}
+%global maj_ver 5
+%global min_ver 0
+%global patch_ver 0
Name: llvm
-Version: 4.0.1
-Release: 6%{?dist}
+Version: %{maj_ver}.%{min_ver}.%{patch_ver}
+Release: 1%{?dist}
Summary: The Low Level Virtual Machine
License: NCSA
@@ -18,11 +21,10 @@
Source0:
http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
# recognize s390 as SystemZ when configuring build
Patch0: llvm-3.7.1-cmake-s390.patch
-Patch2: rust-lang-llvm-pr67.patch
Patch3: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
-Patch4: 0001-Revert-Revert-CMake-Move-sphinx-detection-into-AddSp.patch
-Patch5: 0001-CMake-Fix-docs-llvm-man-target-when-clang-llvm-is-in.patch
-Patch6: 0001-CMake-Add-LLVM_UTILS_INSTALL_DIR-option.patch
+# FIXME: Symbol versioning breaks some unittests when statically linking
+# libstdc++, so we disable it for now.
+Patch4: 0001-Revert-Add-a-linker-script-to-version-LLVM-symbols.patch
BuildRequires: cmake
BuildRequires: zlib-devel
@@ -185,6 +187,7 @@ fi
%{_mandir}/man1/*.1.*
%exclude %{_bindir}/llvm-config-%{__isa_bits}
%exclude %{_mandir}/man1/llvm-config.1.*
+%{_datadir}/opt-viewer
%files libs
%{_libdir}/BugpointPasses.so
@@ -192,7 +195,7 @@ fi
%if %{with gold}
%{_libdir}/LLVMgold.so
%endif
-%{_libdir}/libLLVM-4.0*.so
+%{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
%{_libdir}/libLTO.so*
%files devel
@@ -212,6 +215,9 @@ fi
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%changelog
+* Mon Sep 25 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.0-1
+- 5.0.0 Release
+
* Mon Sep 18 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.1-6
- Add Requires: libedit-devel for llvm-devel
diff --git a/sources b/sources
index 63d18e7..3d177fc 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,3 @@
SHA512 (llvm-4.0.0.src.tar.xz) =
cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704
SHA512 (llvm-4.0.1.src.tar.xz) =
16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
+SHA512 (llvm-5.0.0.src.tar.xz) =
e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a