commit a5973cd8b1ed4725680d200c7ab018bfd43f367ea46506f04806b49282a99b18 Author: Martin Pluskal Date: Mon Apr 4 11:49:45 2022 +0000 Accepting request 966700 from home:aaronpuchert:llvm-next - Update to version 14.0.0. * For details, see the release notes: - https://releases.llvm.org/14.0.0/docs/ReleaseNotes.html - https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html - https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html - https://releases.llvm.org/14.0.0/projects/libcxx/docs/ReleaseNotes.html - https://releases.llvm.org/14.0.0/tools/lld/docs/ReleaseNotes.html * New LLVM tools: - llvm-debuginfod-find: Tool to fetch debuginfod artifacts. - llvm-tli-checker: LLVM TargetLibraryInfo versus SDK checker. * New Clang tools: - clang-linker-wrapper: A wrapper utility over the host linker. - clang-nvlink-wrapper: A wrapper tool over nvlink program. - Add clang-repl-private-deps.patch to make link dependencies of clang-repl private, otherwise CMake can't install. - Add PPCISelLowering-Avoid-emitting-calls-to-__multi3.patch to fix build on PowerPC (32-bit). - Drop llvm-exegesis-link-dylib.patch, instead we don't build llvm-exegesis anymore and add check-no-llvm-exegesis.patch to disable the corresponding tests. - Rebase patches: * lldb-cmake.patch * llvm-do-not-install-static-libraries.patch * lvm-normally-versioned-libllvm.patch - Drop patches that have landed upstream: * llvm-update-extract-section-script.patch OBS-URL: https://build.opensuse.org/request/show/966700 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm14?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch b/CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch new file mode 100644 index 0000000..2d2c434 --- /dev/null +++ b/CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch @@ -0,0 +1,132 @@ +From b49307ef82196729e1ab2508b73fc7fc80192668 Mon Sep 17 00:00:00 2001 +From: Aaron Puchert +Date: Sun, 14 Feb 2021 22:54:07 +0100 +Subject: [PATCH] [CMake] Look up target subcomponents in LLVM_AVAILABLE_LIBS + +In an installation using the all-contained libLLVM.so, individual +components are not available as targets, so we have to look them up in +LLVM_AVAILABLE_LIBS just like llvm_map_components_to_libnames does it. +Here I don't think we need the capitalized names though because we know +the right capitalization. But I might be wrong. + +This is required by dragonffi, who call llvm_map_components_to_libnames +on a list containing ${LLVM_NATIVE_ARCH}. Downstream bug report: +https://bugzilla.opensuse.org/show_bug.cgi?id=1180748. + +Differential Revision: https://reviews.llvm.org/D96670 +--- + llvm/cmake/modules/LLVM-Config.cmake | 61 +++++++++++++--------------- + 1 file changed, 28 insertions(+), 33 deletions(-) + +diff --git a/llvm/cmake/modules/LLVM-Config.cmake b/llvm/cmake/modules/LLVM-Config.cmake +index 5d9ec79c7c56..1cd10993b903 100644 +--- a/llvm/cmake/modules/LLVM-Config.cmake ++++ b/llvm/cmake/modules/LLVM-Config.cmake +@@ -125,47 +125,38 @@ endfunction(llvm_map_components_to_libraries) + # available and not a list of the components. + function(llvm_expand_pseudo_components out_components) + set( link_components ${ARGN} ) ++ if(NOT LLVM_AVAILABLE_LIBS) ++ # Inside LLVM itself available libs are in a global property. ++ get_property(LLVM_AVAILABLE_LIBS GLOBAL PROPERTY LLVM_LIBS) ++ endif() + foreach(c ${link_components}) + # add codegen, asmprinter, asmparser, disassembler + list(FIND LLVM_TARGETS_TO_BUILD ${c} idx) + if( NOT idx LESS 0 ) +- if( TARGET LLVM${c}CodeGen ) ++ list(FIND LLVM_AVAILABLE_LIBS LLVM${c}CodeGen lib_idx) ++ if( lib_idx GREATER_EQUAL 0 ) + list(APPEND expanded_components "${c}CodeGen") + else() +- if( TARGET LLVM${c} ) ++ list(FIND LLVM_AVAILABLE_LIBS LLVM${c} lib_idx) ++ if( lib_idx GREATER_EQUAL 0 ) + list(APPEND expanded_components "${c}") + else() + message(FATAL_ERROR "Target ${c} is not in the set of libraries.") + endif() + endif() +- if( TARGET LLVM${c}AsmPrinter ) +- list(APPEND expanded_components "${c}AsmPrinter") +- endif() +- if( TARGET LLVM${c}AsmParser ) +- list(APPEND expanded_components "${c}AsmParser") +- endif() +- if( TARGET LLVM${c}Desc ) +- list(APPEND expanded_components "${c}Desc") +- endif() +- if( TARGET LLVM${c}Disassembler ) +- list(APPEND expanded_components "${c}Disassembler") +- endif() +- if( TARGET LLVM${c}Info ) +- list(APPEND expanded_components "${c}Info") +- endif() +- if( TARGET LLVM${c}Utils ) +- list(APPEND expanded_components "${c}Utils") +- endif() ++ foreach(subcomponent IN ITEMS AsmPrinter AsmParser Desc Disassembler Info Utils) ++ list(FIND LLVM_AVAILABLE_LIBS LLVM${c}${subcomponent} lib_idx) ++ if( lib_idx GREATER_EQUAL 0 ) ++ list(APPEND expanded_components "${c}${subcomponent}") ++ endif() ++ endforeach() + elseif( c STREQUAL "nativecodegen" ) +- if( TARGET LLVM${LLVM_NATIVE_ARCH}CodeGen ) +- list(APPEND expanded_components "${LLVM_NATIVE_ARCH}CodeGen") +- endif() +- if( TARGET LLVM${LLVM_NATIVE_ARCH}Desc ) +- list(APPEND expanded_components "${LLVM_NATIVE_ARCH}Desc") +- endif() +- if( TARGET LLVM${LLVM_NATIVE_ARCH}Info ) +- list(APPEND expanded_components "${LLVM_NATIVE_ARCH}Info") +- endif() ++ foreach(subcomponent IN ITEMS CodeGen Desc Info) ++ list(FIND LLVM_AVAILABLE_LIBS LLVM${LLVM_NATIVE_ARCH}${subcomponent} lib_idx) ++ if( lib_idx GREATER_EQUAL 0 ) ++ list(APPEND expanded_components "${LLVM_NATIVE_ARCH}${subcomponent}") ++ endif() ++ endforeach() + elseif( c STREQUAL "AllTargetsCodeGens" ) + # Link all the codegens from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) +@@ -176,28 +167,32 @@ function(llvm_expand_pseudo_components out_components) + elseif( c STREQUAL "AllTargetsAsmParsers" ) + # Link all the asm parsers from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) +- if( TARGET LLVM${t}AsmParser ) ++ list(FIND LLVM_AVAILABLE_LIBS LLVM${t}AsmParser lib_idx) ++ if( lib_idx GREATER_EQUAL 0 ) + list(APPEND expanded_components "${t}AsmParser") + endif() + endforeach(t) + elseif( c STREQUAL "AllTargetsDescs" ) + # Link all the descs from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) +- if( TARGET LLVM${t}Desc ) ++ list(FIND LLVM_AVAILABLE_LIBS LLVM${t}Desc lib_idx) ++ if( lib_idx GREATER_EQUAL 0 ) + list(APPEND expanded_components "${t}Desc") + endif() + endforeach(t) + elseif( c STREQUAL "AllTargetsDisassemblers" ) + # Link all the disassemblers from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) +- if( TARGET LLVM${t}Disassembler ) ++ list(FIND LLVM_AVAILABLE_LIBS LLVM${t}Disassembler lib_idx) ++ if( lib_idx GREATER_EQUAL 0 ) + list(APPEND expanded_components "${t}Disassembler") + endif() + endforeach(t) + elseif( c STREQUAL "AllTargetsInfos" ) + # Link all the infos from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) +- if( TARGET LLVM${t}Info ) ++ list(FIND LLVM_AVAILABLE_LIBS LLVM${t}Info lib_idx) ++ if( lib_idx GREATER_EQUAL 0 ) + list(APPEND expanded_components "${t}Info") + endif() + endforeach(t) +-- +2.30.0 + diff --git a/PPCISelLowering-Avoid-emitting-calls-to-__multi3.patch b/PPCISelLowering-Avoid-emitting-calls-to-__multi3.patch new file mode 100644 index 0000000..376287f --- /dev/null +++ b/PPCISelLowering-Avoid-emitting-calls-to-__multi3.patch @@ -0,0 +1,350 @@ +From eb632027f696aa0f548e17624979054ccf5f3b36 Mon Sep 17 00:00:00 2001 +From: Aaron Puchert +Date: Sun, 20 Mar 2022 20:59:06 +0100 +Subject: [PATCH] [PPCISelLowering] Avoid emitting calls to __multi3, __muloti4 + +After D108936, @llvm.smul.with.overflow.i64 was lowered to __multi3 +instead of __mulodi4, which also doesn't exist on PowerPC 32-bit, not +even with compiler-rt. Block it as well so that we get inline code. + +Because libgcc doesn't have __muloti4, we block that as well. + +Fixes #54460. + +Reviewed By: craig.topper + +Differential Revision: https://reviews.llvm.org/D122090 +--- + llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 + + .../overflow-intrinsic-optimizations.ll | 12 ++ + .../umulo-128-legalisation-lowering.ll | 169 +++++++++--------- + .../PowerPC/urem-seteq-illegal-types.ll | 61 ++++--- + 4 files changed, 127 insertions(+), 117 deletions(-) + +diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +index cbeae0ab03b8..6c9d43ad8c03 100644 +--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp ++++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +@@ -1305,11 +1305,13 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM, + setBooleanVectorContents(ZeroOrNegativeOneBooleanContent); + } + ++ setLibcallName(RTLIB::MULO_I128, nullptr); + if (!isPPC64) { + // These libcalls are not available in 32-bit. + setLibcallName(RTLIB::SHL_I128, nullptr); + setLibcallName(RTLIB::SRL_I128, nullptr); + setLibcallName(RTLIB::SRA_I128, nullptr); ++ setLibcallName(RTLIB::MUL_I128, nullptr); + setLibcallName(RTLIB::MULO_I64, nullptr); + } + +diff --git a/llvm/test/CodeGen/PowerPC/overflow-intrinsic-optimizations.ll b/llvm/test/CodeGen/PowerPC/overflow-intrinsic-optimizations.ll +index 83e9d8ee627e..353dac3d2c95 100644 +--- a/llvm/test/CodeGen/PowerPC/overflow-intrinsic-optimizations.ll ++++ b/llvm/test/CodeGen/PowerPC/overflow-intrinsic-optimizations.ll +@@ -1,8 +1,10 @@ + ; RUN: llc %s -mtriple=powerpc -o - | FileCheck %s ++; RUN: llc %s -mtriple=powerpc64 -o - | FileCheck %s + + define i1 @no__mulodi4(i32 %a, i64 %b, i32* %c) { + ; CHECK-LABEL: no__mulodi4 + ; CHECK-NOT: bl __mulodi4 ++; CHECK-NOT: bl __multi3 + entry: + %0 = sext i32 %a to i64 + %1 = call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %0, i64 %b) +@@ -16,4 +18,14 @@ entry: + ret i1 %7 + } + ++define i1 @no__muloti4(i128 %a, i128 %b) { ++; CHECK-LABEL: no__muloti4 ++; CHECK-NOT: bl __muloti4 ++entry: ++ %0 = call { i128, i1 } @llvm.smul.with.overflow.i128(i128 %a, i128 %b) ++ %1 = extractvalue { i128, i1 } %0, 1 ++ ret i1 %1 ++} ++ + declare { i64, i1 } @llvm.smul.with.overflow.i64(i64, i64) ++declare { i128, i1 } @llvm.smul.with.overflow.i128(i128, i128) +diff --git a/llvm/test/CodeGen/PowerPC/umulo-128-legalisation-lowering.ll b/llvm/test/CodeGen/PowerPC/umulo-128-legalisation-lowering.ll +index 335946cb24de..778edba2719a 100644 +--- a/llvm/test/CodeGen/PowerPC/umulo-128-legalisation-lowering.ll ++++ b/llvm/test/CodeGen/PowerPC/umulo-128-legalisation-lowering.ll +@@ -32,110 +32,103 @@ define { i128, i8 } @muloti_test(i128 %l, i128 %r) unnamed_addr #0 { + ; + ; PPC32-LABEL: muloti_test: + ; PPC32: # %bb.0: # %start +-; PPC32-NEXT: mflr 0 +-; PPC32-NEXT: stw 0, 4(1) + ; PPC32-NEXT: stwu 1, -64(1) +-; PPC32-NEXT: stw 24, 32(1) # 4-byte Folded Spill +-; PPC32-NEXT: mfcr 12 + ; PPC32-NEXT: stw 26, 40(1) # 4-byte Folded Spill +-; PPC32-NEXT: mr 26, 7 +-; PPC32-NEXT: stw 28, 48(1) # 4-byte Folded Spill +-; PPC32-NEXT: mr 28, 4 +-; PPC32-NEXT: stw 29, 52(1) # 4-byte Folded Spill +-; PPC32-NEXT: mr 29, 8 +-; PPC32-NEXT: mr 24, 3 +-; PPC32-NEXT: li 3, 0 +-; PPC32-NEXT: li 4, 0 +-; PPC32-NEXT: li 7, 0 +-; PPC32-NEXT: li 8, 0 ++; PPC32-NEXT: mulhwu. 26, 7, 6 ++; PPC32-NEXT: mcrf 1, 0 ++; PPC32-NEXT: mfcr 12 ++; PPC32-NEXT: cmpwi 7, 5, 0 ++; PPC32-NEXT: cmpwi 2, 7, 0 ++; PPC32-NEXT: stw 22, 24(1) # 4-byte Folded Spill ++; PPC32-NEXT: mulhwu. 26, 5, 8 ++; PPC32-NEXT: mcrf 5, 0 + ; PPC32-NEXT: stw 23, 28(1) # 4-byte Folded Spill +-; PPC32-NEXT: mr 23, 5 ++; PPC32-NEXT: crnor 28, 30, 10 ++; PPC32-NEXT: stw 29, 52(1) # 4-byte Folded Spill ++; PPC32-NEXT: cmpwi 2, 9, 0 ++; PPC32-NEXT: mulhwu. 26, 3, 10 ++; PPC32-NEXT: mcrf 6, 0 ++; PPC32-NEXT: cmpwi 3, 3, 0 ++; PPC32-NEXT: stw 24, 32(1) # 4-byte Folded Spill ++; PPC32-NEXT: crnor 29, 10, 14 + ; PPC32-NEXT: stw 25, 36(1) # 4-byte Folded Spill +-; PPC32-NEXT: mr 25, 9 ++; PPC32-NEXT: mulhwu. 26, 9, 4 + ; PPC32-NEXT: stw 27, 44(1) # 4-byte Folded Spill +-; PPC32-NEXT: mr 27, 6 ++; PPC32-NEXT: crorc 28, 28, 6 ++; PPC32-NEXT: stw 28, 48(1) # 4-byte Folded Spill ++; PPC32-NEXT: crorc 20, 28, 22 + ; PPC32-NEXT: stw 30, 56(1) # 4-byte Folded Spill +-; PPC32-NEXT: mr 30, 10 +-; PPC32-NEXT: stw 12, 24(1) +-; PPC32-NEXT: bl __multi3 +-; PPC32-NEXT: mulhwu. 9, 26, 27 +-; PPC32-NEXT: mfcr 9 # cr0 +-; PPC32-NEXT: cmpwi 2, 26, 0 +-; PPC32-NEXT: stw 9, 20(1) +-; PPC32-NEXT: cmpwi 3, 23, 0 +-; PPC32-NEXT: crnor 12, 14, 10 +-; PPC32-NEXT: cmpwi 4, 24, 0 +-; PPC32-NEXT: mulhwu. 9, 23, 29 +-; PPC32-NEXT: mcrf 5, 0 +-; PPC32-NEXT: cmpwi 1, 25, 0 +-; PPC32-NEXT: crnor 4, 6, 18 +-; PPC32-NEXT: mulhwu. 9, 24, 30 +-; PPC32-NEXT: mcrf 6, 0 +-; PPC32-NEXT: mulhwu. 0, 25, 28 +-; PPC32-NEXT: mcrf 7, 0 +-; PPC32-NEXT: or. 0, 28, 24 +-; PPC32-NEXT: mcrf 2, 0 +-; PPC32-NEXT: or. 0, 29, 26 +-; PPC32-NEXT: crnor 5, 2, 10 +-; PPC32-NEXT: mullw 10, 26, 27 +-; PPC32-NEXT: lwz 26, 20(1) +-; PPC32-NEXT: mullw 9, 23, 29 +-; PPC32-NEXT: add 9, 10, 9 +-; PPC32-NEXT: mtcrf 128, 26 # cr0 +-; PPC32-NEXT: crorc 6, 12, 2 +-; PPC32-NEXT: crorc 20, 6, 22 +-; PPC32-NEXT: mulhwu 7, 29, 27 +-; PPC32-NEXT: add 9, 7, 9 +-; PPC32-NEXT: cmplw 9, 7 +-; PPC32-NEXT: crorc 21, 4, 26 +-; PPC32-NEXT: cror 20, 20, 0 +-; PPC32-NEXT: crorc 21, 21, 30 +-; PPC32-NEXT: mullw 11, 25, 28 +-; PPC32-NEXT: mullw 12, 24, 30 +-; PPC32-NEXT: add 10, 12, 11 +-; PPC32-NEXT: lwz 12, 24(1) +-; PPC32-NEXT: lwz 26, 40(1) # 4-byte Folded Reload +-; PPC32-NEXT: mulhwu 8, 28, 30 +-; PPC32-NEXT: add 10, 8, 10 +-; PPC32-NEXT: cmplw 10, 8 +-; PPC32-NEXT: cror 21, 21, 0 +-; PPC32-NEXT: cror 21, 5, 21 ++; PPC32-NEXT: mulhwu 0, 6, 10 ++; PPC32-NEXT: stw 12, 20(1) ++; PPC32-NEXT: crorc 21, 29, 26 ++; PPC32-NEXT: crorc 21, 21, 2 ++; PPC32-NEXT: li 11, 0 ++; PPC32-NEXT: mullw 26, 5, 10 ++; PPC32-NEXT: addc 0, 26, 0 ++; PPC32-NEXT: mulhwu 29, 5, 10 ++; PPC32-NEXT: addze 29, 29 ++; PPC32-NEXT: mullw 23, 5, 8 ++; PPC32-NEXT: mullw 22, 7, 6 ++; PPC32-NEXT: mulhwu 30, 6, 9 ++; PPC32-NEXT: mulhwu 12, 5, 9 ++; PPC32-NEXT: mulhwu 28, 8, 6 ++; PPC32-NEXT: mullw 25, 6, 9 ++; PPC32-NEXT: mullw 24, 5, 9 ++; PPC32-NEXT: mullw 5, 9, 4 ++; PPC32-NEXT: add 9, 22, 23 ++; PPC32-NEXT: add 9, 28, 9 ++; PPC32-NEXT: cmplw 1, 9, 28 ++; PPC32-NEXT: cror 20, 20, 4 ++; PPC32-NEXT: mullw 23, 3, 10 ++; PPC32-NEXT: add 26, 23, 5 ++; PPC32-NEXT: addc 5, 25, 0 ++; PPC32-NEXT: addze 30, 30 ++; PPC32-NEXT: or. 3, 4, 3 ++; PPC32-NEXT: mulhwu 27, 4, 10 ++; PPC32-NEXT: mcrf 1, 0 ++; PPC32-NEXT: addc 3, 29, 30 ++; PPC32-NEXT: add 26, 27, 26 ++; PPC32-NEXT: cmplw 6, 26, 27 ++; PPC32-NEXT: cror 21, 21, 24 ++; PPC32-NEXT: mullw 0, 4, 10 ++; PPC32-NEXT: or. 4, 8, 7 ++; PPC32-NEXT: addze 4, 11 ++; PPC32-NEXT: addc 7, 24, 3 ++; PPC32-NEXT: crnor 22, 2, 6 ++; PPC32-NEXT: mullw 28, 8, 6 ++; PPC32-NEXT: adde 8, 12, 4 ++; PPC32-NEXT: addc 3, 0, 28 ++; PPC32-NEXT: adde 9, 26, 9 ++; PPC32-NEXT: addc 4, 7, 3 ++; PPC32-NEXT: adde 3, 8, 9 ++; PPC32-NEXT: cror 21, 22, 21 ++; PPC32-NEXT: cmplw 4, 7 ++; PPC32-NEXT: cmplw 1, 3, 8 ++; PPC32-NEXT: lwz 12, 20(1) + ; PPC32-NEXT: cror 20, 21, 20 +-; PPC32-NEXT: mullw 0, 29, 27 ++; PPC32-NEXT: crandc 21, 4, 6 ++; PPC32-NEXT: crand 22, 6, 0 ++; PPC32-NEXT: cror 21, 22, 21 ++; PPC32-NEXT: crnor 20, 20, 21 ++; PPC32-NEXT: li 7, 1 ++; PPC32-NEXT: mullw 6, 6, 10 ++; PPC32-NEXT: bc 12, 20, .LBB0_1 ++; PPC32-NEXT: b .LBB0_2 ++; PPC32-NEXT: .LBB0_1: # %start ++; PPC32-NEXT: li 7, 0 ++; PPC32-NEXT: .LBB0_2: # %start + ; PPC32-NEXT: mtcrf 32, 12 # cr2 + ; PPC32-NEXT: mtcrf 16, 12 # cr3 +-; PPC32-NEXT: mtcrf 8, 12 # cr4 +-; PPC32-NEXT: lwz 29, 52(1) # 4-byte Folded Reload +-; PPC32-NEXT: mullw 7, 28, 30 +-; PPC32-NEXT: addc 7, 7, 0 +-; PPC32-NEXT: adde 11, 10, 9 +-; PPC32-NEXT: addc 9, 4, 7 +-; PPC32-NEXT: adde 8, 3, 11 +-; PPC32-NEXT: cmplw 6, 9, 4 +-; PPC32-NEXT: cmplw 8, 3 +-; PPC32-NEXT: crand 22, 2, 24 +-; PPC32-NEXT: crandc 23, 0, 2 +-; PPC32-NEXT: cror 22, 22, 23 +-; PPC32-NEXT: crnor 20, 20, 22 +-; PPC32-NEXT: li 3, 1 +-; PPC32-NEXT: bc 12, 20, .LBB0_2 +-; PPC32-NEXT: # %bb.1: # %start +-; PPC32-NEXT: ori 7, 3, 0 +-; PPC32-NEXT: b .LBB0_3 +-; PPC32-NEXT: .LBB0_2: # %start +-; PPC32-NEXT: li 7, 0 +-; PPC32-NEXT: .LBB0_3: # %start +-; PPC32-NEXT: mr 3, 8 +-; PPC32-NEXT: mr 4, 9 + ; PPC32-NEXT: lwz 30, 56(1) # 4-byte Folded Reload ++; PPC32-NEXT: lwz 29, 52(1) # 4-byte Folded Reload + ; PPC32-NEXT: lwz 28, 48(1) # 4-byte Folded Reload + ; PPC32-NEXT: lwz 27, 44(1) # 4-byte Folded Reload ++; PPC32-NEXT: lwz 26, 40(1) # 4-byte Folded Reload + ; PPC32-NEXT: lwz 25, 36(1) # 4-byte Folded Reload + ; PPC32-NEXT: lwz 24, 32(1) # 4-byte Folded Reload + ; PPC32-NEXT: lwz 23, 28(1) # 4-byte Folded Reload +-; PPC32-NEXT: lwz 0, 68(1) ++; PPC32-NEXT: lwz 22, 24(1) # 4-byte Folded Reload + ; PPC32-NEXT: addi 1, 1, 64 +-; PPC32-NEXT: mtlr 0 + ; PPC32-NEXT: blr + start: + %0 = tail call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %l, i128 %r) #2 +diff --git a/llvm/test/CodeGen/PowerPC/urem-seteq-illegal-types.ll b/llvm/test/CodeGen/PowerPC/urem-seteq-illegal-types.ll +index ef73fa686b3c..65ea57eaf3b9 100644 +--- a/llvm/test/CodeGen/PowerPC/urem-seteq-illegal-types.ll ++++ b/llvm/test/CodeGen/PowerPC/urem-seteq-illegal-types.ll +@@ -208,43 +208,46 @@ define <3 x i1> @test_urem_vec(<3 x i11> %X) nounwind { + define i1 @test_urem_oversized(i66 %X) nounwind { + ; PPC-LABEL: test_urem_oversized: + ; PPC: # %bb.0: +-; PPC-NEXT: mflr 0 +-; PPC-NEXT: stw 0, 4(1) +-; PPC-NEXT: stwu 1, -16(1) +-; PPC-NEXT: mr 6, 5 +-; PPC-NEXT: mr 5, 4 +-; PPC-NEXT: mr 4, 3 +-; PPC-NEXT: lis 3, 12057 +-; PPC-NEXT: lis 7, -12795 +-; PPC-NEXT: ori 9, 3, 37186 +-; PPC-NEXT: ori 10, 7, 40665 +-; PPC-NEXT: li 3, 0 +-; PPC-NEXT: li 7, 0 +-; PPC-NEXT: li 8, 2 +-; PPC-NEXT: bl __multi3 +-; PPC-NEXT: rotlwi 7, 6, 31 +-; PPC-NEXT: lis 3, -5526 +-; PPC-NEXT: rlwimi 7, 5, 31, 0, 0 +-; PPC-NEXT: rotlwi 5, 5, 31 +-; PPC-NEXT: rlwimi 5, 4, 31, 0, 0 +-; PPC-NEXT: ori 3, 3, 61135 +-; PPC-NEXT: cmplwi 1, 5, 13 +-; PPC-NEXT: cmplw 7, 3 +-; PPC-NEXT: rlwinm 4, 4, 31, 31, 31 ++; PPC-NEXT: lis 6, -12795 ++; PPC-NEXT: ori 6, 6, 40665 ++; PPC-NEXT: mulhwu 7, 5, 6 ++; PPC-NEXT: lis 9, 12057 ++; PPC-NEXT: ori 9, 9, 37186 ++; PPC-NEXT: mullw 11, 4, 6 ++; PPC-NEXT: addc 7, 11, 7 ++; PPC-NEXT: lis 11, -5526 ++; PPC-NEXT: ori 11, 11, 61135 ++; PPC-NEXT: mulhwu 8, 4, 6 ++; PPC-NEXT: addze 8, 8 ++; PPC-NEXT: mulhwu 10, 5, 9 ++; PPC-NEXT: mullw 4, 4, 9 ++; PPC-NEXT: mullw 9, 5, 9 ++; PPC-NEXT: addc 7, 9, 7 ++; PPC-NEXT: addze 9, 10 ++; PPC-NEXT: rotlwi 10, 7, 31 ++; PPC-NEXT: mullw 3, 3, 6 ++; PPC-NEXT: mullw 6, 5, 6 ++; PPC-NEXT: slwi 5, 5, 1 ++; PPC-NEXT: add 3, 5, 3 ++; PPC-NEXT: rotlwi 5, 6, 31 ++; PPC-NEXT: rlwimi 5, 7, 31, 0, 0 ++; PPC-NEXT: add 7, 8, 9 ++; PPC-NEXT: add 4, 4, 7 ++; PPC-NEXT: add 3, 4, 3 ++; PPC-NEXT: rlwimi 10, 3, 31, 0, 0 ++; PPC-NEXT: cmplw 5, 11 ++; PPC-NEXT: cmplwi 1, 10, 13 ++; PPC-NEXT: rlwinm 3, 3, 31, 31, 31 + ; PPC-NEXT: crand 20, 6, 0 + ; PPC-NEXT: crandc 21, 4, 6 +-; PPC-NEXT: rlwimi. 4, 6, 1, 30, 30 ++; PPC-NEXT: rlwimi. 3, 6, 1, 30, 30 + ; PPC-NEXT: cror 20, 20, 21 + ; PPC-NEXT: crnand 20, 2, 20 + ; PPC-NEXT: li 3, 1 + ; PPC-NEXT: bc 12, 20, .LBB5_1 +-; PPC-NEXT: b .LBB5_2 ++; PPC-NEXT: blr + ; PPC-NEXT: .LBB5_1: + ; PPC-NEXT: li 3, 0 +-; PPC-NEXT: .LBB5_2: +-; PPC-NEXT: lwz 0, 20(1) +-; PPC-NEXT: addi 1, 1, 16 +-; PPC-NEXT: mtlr 0 + ; PPC-NEXT: blr + ; + ; PPC64LE-LABEL: test_urem_oversized: +-- +2.35.1 + diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..1e2f2c8 --- /dev/null +++ b/_constraints @@ -0,0 +1,42 @@ + + + + + 35 + + + 4096 + + + + + + armv6l + armv7l + i586 + ppc + s390 + + + + 10 + + + 2048 + + + + + + riscv64 + + + + 14000 + + + + diff --git a/assume-opensuse.patch b/assume-opensuse.patch new file mode 100644 index 0000000..d9f1c07 --- /dev/null +++ b/assume-opensuse.patch @@ -0,0 +1,34 @@ +Index: clang-12.0.0rc1.src/lib/Driver/Distro.cpp +=================================================================== +--- clang-12.0.0rc1.src.orig/lib/Driver/Distro.cpp ++++ clang-12.0.0rc1.src/lib/Driver/Distro.cpp +@@ -93,6 +93,8 @@ static Distro::DistroType DetectLsbRelease... + } + + static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) { ++ return Distro::OpenSUSE; ++/* + Distro::DistroType Version = Distro::UnknownDistro; + + // Newer freedesktop.org's compilant systemd-based systems +@@ -200,7 +202,7 @@ static Distro::DistroType DetectDistro(l + if (VFS.exists("/etc/gentoo-release")) + return Distro::Gentoo; + +- return Distro::UnknownDistro; ++ return Distro::UnknownDistro;*/ + } + + static Distro::DistroType GetDistro(llvm::vfs::FileSystem &VFS, +Index: clang-12.0.0rc1.src/unittests/Driver/CMakeLists.txt +=================================================================== +--- clang-12.0.0rc1.src.orig/unittests/Driver/CMakeLists.txt ++++ clang-12.0.0rc1.src/unittests/Driver/CMakeLists.txt +@@ -5,7 +5,6 @@ set(LLVM_LINK_COMPONENTS + ) + + add_clang_unittest(ClangDriverTests +- DistroTest.cpp + ToolChainTest.cpp + ModuleCacheTest.cpp + MultilibTest.cpp diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..ef1816d --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,8 @@ +libLLVM14 +libclang-cpp14 +llvm14-devel + provides "llvm-devel- = " + conflicts "otherproviders(llvm-devel-)" +clang14-devel + provides "clang-devel- = " + conflicts "otherproviders(clang-devel-)" diff --git a/check-no-llvm-exegesis.patch b/check-no-llvm-exegesis.patch new file mode 100644 index 0000000..aea259c --- /dev/null +++ b/check-no-llvm-exegesis.patch @@ -0,0 +1,16 @@ +--- a/llvm/test/CMakeLists.txt ++++ b/llvm/test/CMakeLists.txt +@@ -81,7 +81,6 @@ set(LLVM_TEST_DEPENDS + dsymutil + llvm-dwarfdump + llvm-dwp +- llvm-exegesis + llvm-extract + llvm-gsymutil + llvm-isel-fuzzer +--- a/llvm/test/tools/llvm-exegesis/lit.local.cfg ++++ b/llvm/test/tools/llvm-exegesis/lit.local.cfg +@@ -1,2 +1 @@ +-if 'native' not in config.available_features: +- config.unsupported = True ++config.unsupported = True diff --git a/clang-14.0.0.src.tar.xz b/clang-14.0.0.src.tar.xz new file mode 100644 index 0000000..fd3e054 --- /dev/null +++ b/clang-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5d7ffb86ed57f97d7c471d542c4e5685db4b75fb817c4c3f027bfa49e561b9b +size 18536580 diff --git a/clang-docs-14.0.0.src.tar.xz b/clang-docs-14.0.0.src.tar.xz new file mode 100644 index 0000000..e19eec7 --- /dev/null +++ b/clang-docs-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:278e85a4294440256e2be13c8610f4f6aa8c2e7d3ad2074ab0d6b716f51811a6 +size 1413280 diff --git a/clang-repl-private-deps.patch b/clang-repl-private-deps.patch new file mode 100644 index 0000000..2d7bbfc --- /dev/null +++ b/clang-repl-private-deps.patch @@ -0,0 +1,33 @@ +From 3abb807f6773a980f4150b22336a9a4a8a19c1d5 Mon Sep 17 00:00:00 2001 +From: Aaron Puchert +Date: Sun, 27 Mar 2022 20:56:02 +0200 +Subject: [PATCH] Let clang-repl link privately against Clang components + +First of all, this is the convention: all other tools have their +dependencies private. While it does not have an effect on linking +(there is no linking against executables), it does have an effect +on exporting: having the targets private allows installing the tools +without the libraries in a statically linked build, or a build against +libclang-cpp.so. + +Differential Revision: https://reviews.llvm.org/D122546 +--- + clang/tools/clang-repl/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clang/tools/clang-repl/CMakeLists.txt b/clang/tools/clang-repl/CMakeLists.txt +index 30e3b2be9ed3..b51a18c10cdc 100644 +--- a/clang/tools/clang-repl/CMakeLists.txt ++++ b/clang/tools/clang-repl/CMakeLists.txt +@@ -11,7 +11,7 @@ add_clang_tool(clang-repl + ClangRepl.cpp + ) + +-clang_target_link_libraries(clang-repl PUBLIC ++clang_target_link_libraries(clang-repl PRIVATE + clangBasic + clangFrontend + clangInterpreter +-- +2.35.1 + diff --git a/clang-resourcedirs.patch b/clang-resourcedirs.patch new file mode 100644 index 0000000..74865a8 --- /dev/null +++ b/clang-resourcedirs.patch @@ -0,0 +1,13 @@ +Index: cfe-6.0.0rc1.src/lib/Driver/Driver.cpp +=================================================================== +--- cfe-6.0.0rc1.src.orig/lib/Driver/Driver.cpp ++++ cfe-6.0.0rc1.src/lib/Driver/Driver.cpp +@@ -115,7 +115,7 @@ Driver::Driver(StringRef ClangExecutable + // Dir is bin/ or lib/, depending on where BinaryPath is. + std::string Dir = std::string(llvm::sys::path::parent_path(BinaryPath)); + +- SmallString<128> P(Dir); ++ SmallString<128> P((Dir != "") ? Dir : "/usr/bin/"); + if (CustomResourceDir != "") { + llvm::sys::path::append(P, CustomResourceDir); + } else { diff --git a/clang-tools-extra-14.0.0.src.tar.xz b/clang-tools-extra-14.0.0.src.tar.xz new file mode 100644 index 0000000..85f04f5 --- /dev/null +++ b/clang-tools-extra-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f49de4b4502a6608425338e2d93bbe4529cac0a22f2dc1c119ef175a4e1b5bf0 +size 2849264 diff --git a/compact_unwind_encoding.h b/compact_unwind_encoding.h new file mode 100644 index 0000000..2112149 --- /dev/null +++ b/compact_unwind_encoding.h @@ -0,0 +1,477 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// +// Darwin's alternative to DWARF based unwind encodings. +// +//===----------------------------------------------------------------------===// + + +#ifndef __COMPACT_UNWIND_ENCODING__ +#define __COMPACT_UNWIND_ENCODING__ + +#include + +// +// Compilers can emit standard DWARF FDEs in the __TEXT,__eh_frame section +// of object files. Or compilers can emit compact unwind information in +// the __LD,__compact_unwind section. +// +// When the linker creates a final linked image, it will create a +// __TEXT,__unwind_info section. This section is a small and fast way for the +// runtime to access unwind info for any given function. If the compiler +// emitted compact unwind info for the function, that compact unwind info will +// be encoded in the __TEXT,__unwind_info section. If the compiler emitted +// DWARF unwind info, the __TEXT,__unwind_info section will contain the offset +// of the FDE in the __TEXT,__eh_frame section in the final linked image. +// +// Note: Previously, the linker would transform some DWARF unwind infos into +// compact unwind info. But that is fragile and no longer done. + + +// +// The compact unwind endoding is a 32-bit value which encoded in an +// architecture specific way, which registers to restore from where, and how +// to unwind out of the function. +// +typedef uint32_t compact_unwind_encoding_t; + + +// architecture independent bits +enum { + UNWIND_IS_NOT_FUNCTION_START = 0x80000000, + UNWIND_HAS_LSDA = 0x40000000, + UNWIND_PERSONALITY_MASK = 0x30000000, +}; + + + + +// +// x86 +// +// 1-bit: start +// 1-bit: has lsda +// 2-bit: personality index +// +// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=DWARF +// ebp based: +// 15-bits (5*3-bits per reg) register permutation +// 8-bits for stack offset +// frameless: +// 8-bits stack size +// 3-bits stack adjust +// 3-bits register count +// 10-bits register permutation +// +enum { + UNWIND_X86_MODE_MASK = 0x0F000000, + UNWIND_X86_MODE_EBP_FRAME = 0x01000000, + UNWIND_X86_MODE_STACK_IMMD = 0x02000000, + UNWIND_X86_MODE_STACK_IND = 0x03000000, + UNWIND_X86_MODE_DWARF = 0x04000000, + + UNWIND_X86_EBP_FRAME_REGISTERS = 0x00007FFF, + UNWIND_X86_EBP_FRAME_OFFSET = 0x00FF0000, + + UNWIND_X86_FRAMELESS_STACK_SIZE = 0x00FF0000, + UNWIND_X86_FRAMELESS_STACK_ADJUST = 0x0000E000, + UNWIND_X86_FRAMELESS_STACK_REG_COUNT = 0x00001C00, + UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION = 0x000003FF, + + UNWIND_X86_DWARF_SECTION_OFFSET = 0x00FFFFFF, +}; + +enum { + UNWIND_X86_REG_NONE = 0, + UNWIND_X86_REG_EBX = 1, + UNWIND_X86_REG_ECX = 2, + UNWIND_X86_REG_EDX = 3, + UNWIND_X86_REG_EDI = 4, + UNWIND_X86_REG_ESI = 5, + UNWIND_X86_REG_EBP = 6, +}; + +// +// For x86 there are four modes for the compact unwind encoding: +// UNWIND_X86_MODE_EBP_FRAME: +// EBP based frame where EBP is push on stack immediately after return address, +// then ESP is moved to EBP. Thus, to unwind ESP is restored with the current +// EPB value, then EBP is restored by popping off the stack, and the return +// is done by popping the stack once more into the pc. +// All non-volatile registers that need to be restored must have been saved +// in a small range in the stack that starts EBP-4 to EBP-1020. The offset/4 +// is encoded in the UNWIND_X86_EBP_FRAME_OFFSET bits. The registers saved +// are encoded in the UNWIND_X86_EBP_FRAME_REGISTERS bits as five 3-bit entries. +// Each entry contains which register to restore. +// UNWIND_X86_MODE_STACK_IMMD: +// A "frameless" (EBP not used as frame pointer) function with a small +// constant stack size. To return, a constant (encoded in the compact +// unwind encoding) is added to the ESP. Then the return is done by +// popping the stack into the pc. +// All non-volatile registers that need to be restored must have been saved +// on the stack immediately after the return address. The stack_size/4 is +// encoded in the UNWIND_X86_FRAMELESS_STACK_SIZE (max stack size is 1024). +// The number of registers saved is encoded in UNWIND_X86_FRAMELESS_STACK_REG_COUNT. +// UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION constains which registers were +// saved and their order. +// UNWIND_X86_MODE_STACK_IND: +// A "frameless" (EBP not used as frame pointer) function large constant +// stack size. This case is like the previous, except the stack size is too +// large to encode in the compact unwind encoding. Instead it requires that +// the function contains "subl $nnnnnnnn,ESP" in its prolog. The compact +// encoding contains the offset to the nnnnnnnn value in the function in +// UNWIND_X86_FRAMELESS_STACK_SIZE. +// UNWIND_X86_MODE_DWARF: +// No compact unwind encoding is available. Instead the low 24-bits of the +// compact encoding is the offset of the DWARF FDE in the __eh_frame section. +// This mode is never used in object files. It is only generated by the +// linker in final linked images which have only DWARF unwind info for a +// function. +// +// The permutation encoding is a Lehmer code sequence encoded into a +// single variable-base number so we can encode the ordering of up to +// six registers in a 10-bit space. +// +// The following is the algorithm used to create the permutation encoding used +// with frameless stacks. It is passed the number of registers to be saved and +// an array of the register numbers saved. +// +//uint32_t permute_encode(uint32_t registerCount, const uint32_t registers[6]) +//{ +// uint32_t renumregs[6]; +// for (int i=6-registerCount; i < 6; ++i) { +// int countless = 0; +// for (int j=6-registerCount; j < i; ++j) { +// if ( registers[j] < registers[i] ) +// ++countless; +// } +// renumregs[i] = registers[i] - countless -1; +// } +// uint32_t permutationEncoding = 0; +// switch ( registerCount ) { +// case 6: +// permutationEncoding |= (120*renumregs[0] + 24*renumregs[1] +// + 6*renumregs[2] + 2*renumregs[3] +// + renumregs[4]); +// break; +// case 5: +// permutationEncoding |= (120*renumregs[1] + 24*renumregs[2] +// + 6*renumregs[3] + 2*renumregs[4] +// + renumregs[5]); +// break; +// case 4: +// permutationEncoding |= (60*renumregs[2] + 12*renumregs[3] +// + 3*renumregs[4] + renumregs[5]); +// break; +// case 3: +// permutationEncoding |= (20*renumregs[3] + 4*renumregs[4] +// + renumregs[5]); +// break; +// case 2: +// permutationEncoding |= (5*renumregs[4] + renumregs[5]); +// break; +// case 1: +// permutationEncoding |= (renumregs[5]); +// break; +// } +// return permutationEncoding; +//} +// + + + + +// +// x86_64 +// +// 1-bit: start +// 1-bit: has lsda +// 2-bit: personality index +// +// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=DWARF +// rbp based: +// 15-bits (5*3-bits per reg) register permutation +// 8-bits for stack offset +// frameless: +// 8-bits stack size +// 3-bits stack adjust +// 3-bits register count +// 10-bits register permutation +// +enum { + UNWIND_X86_64_MODE_MASK = 0x0F000000, + UNWIND_X86_64_MODE_RBP_FRAME = 0x01000000, + UNWIND_X86_64_MODE_STACK_IMMD = 0x02000000, + UNWIND_X86_64_MODE_STACK_IND = 0x03000000, + UNWIND_X86_64_MODE_DWARF = 0x04000000, + + UNWIND_X86_64_RBP_FRAME_REGISTERS = 0x00007FFF, + UNWIND_X86_64_RBP_FRAME_OFFSET = 0x00FF0000, + + UNWIND_X86_64_FRAMELESS_STACK_SIZE = 0x00FF0000, + UNWIND_X86_64_FRAMELESS_STACK_ADJUST = 0x0000E000, + UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT = 0x00001C00, + UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION = 0x000003FF, + + UNWIND_X86_64_DWARF_SECTION_OFFSET = 0x00FFFFFF, +}; + +enum { + UNWIND_X86_64_REG_NONE = 0, + UNWIND_X86_64_REG_RBX = 1, + UNWIND_X86_64_REG_R12 = 2, + UNWIND_X86_64_REG_R13 = 3, + UNWIND_X86_64_REG_R14 = 4, + UNWIND_X86_64_REG_R15 = 5, + UNWIND_X86_64_REG_RBP = 6, +}; +// +// For x86_64 there are four modes for the compact unwind encoding: +// UNWIND_X86_64_MODE_RBP_FRAME: +// RBP based frame where RBP is push on stack immediately after return address, +// then RSP is moved to RBP. Thus, to unwind RSP is restored with the current +// EPB value, then RBP is restored by popping off the stack, and the return +// is done by popping the stack once more into the pc. +// All non-volatile registers that need to be restored must have been saved +// in a small range in the stack that starts RBP-8 to RBP-2040. The offset/8 +// is encoded in the UNWIND_X86_64_RBP_FRAME_OFFSET bits. The registers saved +// are encoded in the UNWIND_X86_64_RBP_FRAME_REGISTERS bits as five 3-bit entries. +// Each entry contains which register to restore. +// UNWIND_X86_64_MODE_STACK_IMMD: +// A "frameless" (RBP not used as frame pointer) function with a small +// constant stack size. To return, a constant (encoded in the compact +// unwind encoding) is added to the RSP. Then the return is done by +// popping the stack into the pc. +// All non-volatile registers that need to be restored must have been saved +// on the stack immediately after the return address. The stack_size/8 is +// encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048). +// The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT. +// UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION constains which registers were +// saved and their order. +// UNWIND_X86_64_MODE_STACK_IND: +// A "frameless" (RBP not used as frame pointer) function large constant +// stack size. This case is like the previous, except the stack size is too +// large to encode in the compact unwind encoding. Instead it requires that +// the function contains "subq $nnnnnnnn,RSP" in its prolog. The compact +// encoding contains the offset to the nnnnnnnn value in the function in +// UNWIND_X86_64_FRAMELESS_STACK_SIZE. +// UNWIND_X86_64_MODE_DWARF: +// No compact unwind encoding is available. Instead the low 24-bits of the +// compact encoding is the offset of the DWARF FDE in the __eh_frame section. +// This mode is never used in object files. It is only generated by the +// linker in final linked images which have only DWARF unwind info for a +// function. +// + + +// ARM64 +// +// 1-bit: start +// 1-bit: has lsda +// 2-bit: personality index +// +// 4-bits: 4=frame-based, 3=DWARF, 2=frameless +// frameless: +// 12-bits of stack size +// frame-based: +// 4-bits D reg pairs saved +// 5-bits X reg pairs saved +// DWARF: +// 24-bits offset of DWARF FDE in __eh_frame section +// +enum { + UNWIND_ARM64_MODE_MASK = 0x0F000000, + UNWIND_ARM64_MODE_FRAMELESS = 0x02000000, + UNWIND_ARM64_MODE_DWARF = 0x03000000, + UNWIND_ARM64_MODE_FRAME = 0x04000000, + + UNWIND_ARM64_FRAME_X19_X20_PAIR = 0x00000001, + UNWIND_ARM64_FRAME_X21_X22_PAIR = 0x00000002, + UNWIND_ARM64_FRAME_X23_X24_PAIR = 0x00000004, + UNWIND_ARM64_FRAME_X25_X26_PAIR = 0x00000008, + UNWIND_ARM64_FRAME_X27_X28_PAIR = 0x00000010, + UNWIND_ARM64_FRAME_D8_D9_PAIR = 0x00000100, + UNWIND_ARM64_FRAME_D10_D11_PAIR = 0x00000200, + UNWIND_ARM64_FRAME_D12_D13_PAIR = 0x00000400, + UNWIND_ARM64_FRAME_D14_D15_PAIR = 0x00000800, + + UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK = 0x00FFF000, + UNWIND_ARM64_DWARF_SECTION_OFFSET = 0x00FFFFFF, +}; +// For arm64 there are three modes for the compact unwind encoding: +// UNWIND_ARM64_MODE_FRAME: +// This is a standard arm64 prolog where FP/LR are immediately pushed on the +// stack, then SP is copied to FP. If there are any non-volatile registers +// saved, then are copied into the stack frame in pairs in a contiguous +// range right below the saved FP/LR pair. Any subset of the five X pairs +// and four D pairs can be saved, but the memory layout must be in register +// number order. +// UNWIND_ARM64_MODE_FRAMELESS: +// A "frameless" leaf function, where FP/LR are not saved. The return address +// remains in LR throughout the function. If any non-volatile registers +// are saved, they must be pushed onto the stack before any stack space is +// allocated for local variables. The stack sized (including any saved +// non-volatile registers) divided by 16 is encoded in the bits +// UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK. +// UNWIND_ARM64_MODE_DWARF: +// No compact unwind encoding is available. Instead the low 24-bits of the +// compact encoding is the offset of the DWARF FDE in the __eh_frame section. +// This mode is never used in object files. It is only generated by the +// linker in final linked images which have only DWARF unwind info for a +// function. +// + + + + + +//////////////////////////////////////////////////////////////////////////////// +// +// Relocatable Object Files: __LD,__compact_unwind +// +//////////////////////////////////////////////////////////////////////////////// + +// +// A compiler can generated compact unwind information for a function by adding +// a "row" to the __LD,__compact_unwind section. This section has the +// S_ATTR_DEBUG bit set, so the section will be ignored by older linkers. +// It is removed by the new linker, so never ends up in final executables. +// This section is a table, initially with one row per function (that needs +// unwind info). The table columns and some conceptual entries are: +// +// range-start pointer to start of function/range +// range-length +// compact-unwind-encoding 32-bit encoding +// personality-function or zero if no personality function +// lsda or zero if no LSDA data +// +// The length and encoding fields are 32-bits. The other are all pointer sized. +// +// In x86_64 assembly, these entry would look like: +// +// .section __LD,__compact_unwind,regular,debug +// +// #compact unwind for _foo +// .quad _foo +// .set L1,LfooEnd-_foo +// .long L1 +// .long 0x01010001 +// .quad 0 +// .quad 0 +// +// #compact unwind for _bar +// .quad _bar +// .set L2,LbarEnd-_bar +// .long L2 +// .long 0x01020011 +// .quad __gxx_personality +// .quad except_tab1 +// +// +// Notes: There is no need for any labels in the the __compact_unwind section. +// The use of the .set directive is to force the evaluation of the +// range-length at assembly time, instead of generating relocations. +// +// To support future compiler optimizations where which non-volatile registers +// are saved changes within a function (e.g. delay saving non-volatiles until +// necessary), there can by multiple lines in the __compact_unwind table for one +// function, each with a different (non-overlapping) range and each with +// different compact unwind encodings that correspond to the non-volatiles +// saved at that range of the function. +// +// If a particular function is so wacky that there is no compact unwind way +// to encode it, then the compiler can emit traditional DWARF unwind info. +// The runtime will use which ever is available. +// +// Runtime support for compact unwind encodings are only available on 10.6 +// and later. So, the compiler should not generate it when targeting pre-10.6. + + + + +//////////////////////////////////////////////////////////////////////////////// +// +// Final Linked Images: __TEXT,__unwind_info +// +//////////////////////////////////////////////////////////////////////////////// + +// +// The __TEXT,__unwind_info section is laid out for an efficient two level lookup. +// The header of the section contains a coarse index that maps function address +// to the page (4096 byte block) containing the unwind info for that function. +// + +#define UNWIND_SECTION_VERSION 1 +struct unwind_info_section_header +{ + uint32_t version; // UNWIND_SECTION_VERSION + uint32_t commonEncodingsArraySectionOffset; + uint32_t commonEncodingsArrayCount; + uint32_t personalityArraySectionOffset; + uint32_t personalityArrayCount; + uint32_t indexSectionOffset; + uint32_t indexCount; + // compact_unwind_encoding_t[] + // uint32_t personalities[] + // unwind_info_section_header_index_entry[] + // unwind_info_section_header_lsda_index_entry[] +}; + +struct unwind_info_section_header_index_entry +{ + uint32_t functionOffset; + uint32_t secondLevelPagesSectionOffset; // section offset to start of regular or compress page + uint32_t lsdaIndexArraySectionOffset; // section offset to start of lsda_index array for this range +}; + +struct unwind_info_section_header_lsda_index_entry +{ + uint32_t functionOffset; + uint32_t lsdaOffset; +}; + +// +// There are two kinds of second level index pages: regular and compressed. +// A compressed page can hold up to 1021 entries, but it cannot be used +// if too many different encoding types are used. The regular page holds +// 511 entries. +// + +struct unwind_info_regular_second_level_entry +{ + uint32_t functionOffset; + compact_unwind_encoding_t encoding; +}; + +#define UNWIND_SECOND_LEVEL_REGULAR 2 +struct unwind_info_regular_second_level_page_header +{ + uint32_t kind; // UNWIND_SECOND_LEVEL_REGULAR + uint16_t entryPageOffset; + uint16_t entryCount; + // entry array +}; + +#define UNWIND_SECOND_LEVEL_COMPRESSED 3 +struct unwind_info_compressed_second_level_page_header +{ + uint32_t kind; // UNWIND_SECOND_LEVEL_COMPRESSED + uint16_t entryPageOffset; + uint16_t entryCount; + uint16_t encodingsPageOffset; + uint16_t encodingsCount; + // 32-bit entry array + // encodings array +}; + +#define UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET(entry) (entry & 0x00FFFFFF) +#define UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX(entry) ((entry >> 24) & 0xFF) + + + +#endif + diff --git a/compiler-rt-14.0.0.src.tar.xz b/compiler-rt-14.0.0.src.tar.xz new file mode 100644 index 0000000..2a3beab --- /dev/null +++ b/compiler-rt-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27ab7fcfb21d108093c0be766a9ed5fe18c04e4f74f936069711a312c8ae0377 +size 2327888 diff --git a/default-to-i586.patch b/default-to-i586.patch new file mode 100644 index 0000000..0ede168 --- /dev/null +++ b/default-to-i586.patch @@ -0,0 +1,15 @@ +Index: cfe-6.0.0rc1.src/lib/Driver/ToolChains/Arch/X86.cpp +=================================================================== +--- cfe-6.0.0rc1.src.orig/lib/Driver/ToolChains/Arch/X86.cpp ++++ cfe-6.0.0rc1.src/lib/Driver/ToolChains/Arch/X86.cpp +@@ -102,8 +102,8 @@ const char *x86::getX86TargetCPU(const A + case llvm::Triple::FreeBSD: + return "i686"; + default: +- // Fallback to p4. +- return "pentium4"; ++ // Fallback to i586. ++ return "i586"; + } + } + diff --git a/libcxx-14.0.0.src.tar.xz b/libcxx-14.0.0.src.tar.xz new file mode 100644 index 0000000..84dd00d --- /dev/null +++ b/libcxx-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2afa906b1a9c6fef0c83af576f54191c33b5170de3c4adf01aab66a510af3fd6 +size 3065196 diff --git a/libcxxabi-14.0.0.src.tar.xz b/libcxxabi-14.0.0.src.tar.xz new file mode 100644 index 0000000..7453d3b --- /dev/null +++ b/libcxxabi-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6fd1b53ced3c9a230bf0660c58a0a26ef9b0e8257e4ef70d1f690fa84e77074 +size 561952 diff --git a/link-clang-shared.patch b/link-clang-shared.patch new file mode 100644 index 0000000..2efb7a2 --- /dev/null +++ b/link-clang-shared.patch @@ -0,0 +1,58 @@ +diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt +index ceef4b08637..606149ad74f 100644 +--- a/clang/tools/c-index-test/CMakeLists.txt ++++ b/clang/tools/c-index-test/CMakeLists.txt +@@ -18,6 +18,9 @@ if (LLVM_BUILD_STATIC) + target_link_libraries(c-index-test + PRIVATE + libclang_static ++ ) ++ clang_target_link_libraries(c-index-test ++ PRIVATE + clangCodeGen + clangIndex + ) +@@ -25,6 +28,9 @@ else() + target_link_libraries(c-index-test + PRIVATE + libclang ++ ) ++ clang_target_link_libraries(c-index-test ++ PRIVATE + clangAST + clangBasic + clangCodeGen +diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt +index 613ead1a36b..f86be77b8e7 100644 +--- a/clang/tools/libclang/CMakeLists.txt ++++ b/clang/tools/libclang/CMakeLists.txt +@@ -33,7 +33,7 @@ set(SOURCES + ../../include/clang-c/Index.h + ) + +-set(LIBS ++set(CLANG_LIB_DEPS + clangAST + clangBasic + clangDriver +@@ -46,7 +46,7 @@ set(LIBS + ) + + if (CLANG_ENABLE_ARCMT) +- list(APPEND LIBS clangARCMigrate) ++ list(APPEND CLANG_LIB_DEPS clangARCMigrate) + endif () + + if (HAVE_LIBDL) +@@ -108,6 +108,11 @@ add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC} INSTALL_WITH_TOOLCH + Support + ) + ++clang_target_link_libraries(libclang ++ PRIVATE ++ ${CLANG_LIB_DEPS} ++ ) ++ + if(ENABLE_STATIC) + foreach(name libclang obj.libclang libclang_static) + if (TARGET ${name}) diff --git a/link-clang-tools-extra-shared.patch b/link-clang-tools-extra-shared.patch new file mode 100644 index 0000000..9557b26 --- /dev/null +++ b/link-clang-tools-extra-shared.patch @@ -0,0 +1,48 @@ +diff --git a/clang-tools-extra/clang-include-fixer/plugin/CMakeLists.txt b/clang-tools-extra/clang-include-fixer/plugin/CMakeLists.txt +index 6d0328ed831..d531e44743a 100644 +--- a/clang-tools-extra/clang-include-fixer/plugin/CMakeLists.txt ++++ b/clang-tools-extra/clang-include-fixer/plugin/CMakeLists.txt +@@ -2,15 +2,18 @@ add_clang_library(clangIncludeFixerPlugin + IncludeFixerPlugin.cpp + + LINK_LIBS ++ clangIncludeFixer ++ ${LLVM_PTHREAD_LIB} ++ ++ DEPENDS ++ omp_gen ++ ) ++clang_target_link_libraries(clangIncludeFixerPlugin ++ PRIVATE + clangAST + clangBasic + clangFrontend +- clangIncludeFixer + clangParse + clangSema + clangTooling +- ${LLVM_PTHREAD_LIB} +- +- DEPENDS +- omp_gen + ) +diff --git a/clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt b/clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt +index 8f708cacfdf..b08e9cee954 100644 +--- a/clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt ++++ b/clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt +@@ -27,10 +27,13 @@ add_clang_library(clangDaemonTweaks OBJECT + SwapIfBranches.cpp + + LINK_LIBS +- clangAST +- clangBasic + clangDaemon + clangdSupport ++ ) ++ ++clang_target_link_libraries(clangDaemonTweaks INTERFACE ++ clangAST ++ clangBasic + clangFormat + clangLex + clangToolingCore diff --git a/lld-14.0.0.src.tar.xz b/lld-14.0.0.src.tar.xz new file mode 100644 index 0000000..7c81e43 --- /dev/null +++ b/lld-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88fc0f028aa8c0d9287920b101f288b03c7fabb584077326c5a0be482eb9115c +size 1362316 diff --git a/lld-default-sha1.patch b/lld-default-sha1.patch new file mode 100644 index 0000000..716e33f --- /dev/null +++ b/lld-default-sha1.patch @@ -0,0 +1,13 @@ +Index: lld-10.0.0.src/ELF/Driver.cpp +=================================================================== +--- lld-10.0.0.src.orig/ELF/Driver.cpp ++++ lld-10.0.0.src/ELF/Driver.cpp +@@ -693,7 +693,7 @@ getBuildId(opt::InputArgList &args) { + return {BuildIdKind::None, {}}; + + if (arg->getOption().getID() == OPT_build_id) +- return {BuildIdKind::Fast, {}}; ++ return {BuildIdKind::Sha1, {}}; + + StringRef s = arg->getValue(); + if (s == "fast") diff --git a/lldb-14.0.0.src.tar.xz b/lldb-14.0.0.src.tar.xz new file mode 100644 index 0000000..ed50529 --- /dev/null +++ b/lldb-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39c814255a905722587bd6aeb44d013d34cd510699ebc5901c9e1f8afe46faeb +size 10088792 diff --git a/lldb-cmake.patch b/lldb-cmake.patch new file mode 100644 index 0000000..2b05df2 --- /dev/null +++ b/lldb-cmake.patch @@ -0,0 +1,13 @@ +Index: lldb-10.0.0rc1.src/source/Host/CMakeLists.txt +=================================================================== +--- lldb-10.0.0rc1.src.orig/source/Host/CMakeLists.txt ++++ lldb-10.0.0rc1.src/source/Host/CMakeLists.txt +@@ -143,6 +143,8 @@ endif() + set(EXTRA_LIBS) + if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") + list(APPEND EXTRA_LIBS kvm) ++elseif (CMAKE_SYSTEM_NAME MATCHES "Linux") ++ list(APPEND EXTRA_LIBS dl pthread) + endif() + if (LLDB_ENABLE_LIBXML2) + list(APPEND EXTRA_LIBS LibXml2::LibXml2) diff --git a/llvm-14.0.0.src.tar.xz b/llvm-14.0.0.src.tar.xz new file mode 100644 index 0000000..45e0deb --- /dev/null +++ b/llvm-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4df7ed50b8b7017b90dc22202f6b59e9006a29a9568238c6af28df9c049c7b9b +size 49650544 diff --git a/llvm-better-detect-64bit-atomics-support.patch b/llvm-better-detect-64bit-atomics-support.patch new file mode 100644 index 0000000..c8bdacc --- /dev/null +++ b/llvm-better-detect-64bit-atomics-support.patch @@ -0,0 +1,22 @@ +Better detect 64bit atomics support. + +It appears that on i586 std::atomic::load is compiled into +instruction, but std::atomic::load uses __atomic_load_8. This must +be detected so the build system links it to libatomic. +Index: llvm-12.0.0.src/cmake/modules/CheckAtomic.cmake +=================================================================== +--- llvm-12.0.0.src.orig/cmake/modules/CheckAtomic.cmake ++++ llvm-12.0.0.src/cmake/modules/CheckAtomic.cmake +@@ -30,9 +30,12 @@ function(check_working_cxx_atomics64 var + #include + #include + std::atomic x (0); ++std::atomic y (0); + int main() { + uint64_t i = x.load(std::memory_order_relaxed); ++ double j = y.load(std::memory_order_relaxed); + (void)i; ++ (void)j; + return 0; + } + " ${varname}) diff --git a/llvm-do-not-install-static-libraries.patch b/llvm-do-not-install-static-libraries.patch new file mode 100644 index 0000000..a13b163 --- /dev/null +++ b/llvm-do-not-install-static-libraries.patch @@ -0,0 +1,134 @@ +This has similar effect as simply deleting the static libraries which we don't +want after installation. By not copying them in the first place we reduce the +disk usage during installation. + +Index: clang-14.0.0.src/cmake/modules/AddClang.cmake +=================================================================== +--- a/clang-14.0.0.src/cmake/modules/AddClang.cmake ++++ b/clang-14.0.0.src/cmake/modules/AddClang.cmake +@@ -106,12 +106,15 @@ macro(add_clang_library name) + + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN) + get_target_export_arg(${name} Clang export_to_clangtargets UMBRELLA clang-libraries) +- install(TARGETS ${lib} +- COMPONENT ${lib} +- ${export_to_clangtargets} +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ if (ARG_SHARED OR ARG_MODULE) ++ install(TARGETS ${lib} ++ COMPONENT ${lib} ++ ${export_to_clangtargets} ++ LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} ++ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${lib}) ++ endif() + + if (NOT LLVM_ENABLE_IDE) + add_llvm_install_targets(install-${lib} +@@ -121,7 +124,6 @@ macro(add_clang_library name) + + set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${lib}) + endif() +- set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${lib}) + else() + # Add empty "phony" target + add_custom_target(${lib}) +Index: cmake/modules/AddLLVM.cmake +=================================================================== +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -730,11 +730,14 @@ macro(add_llvm_library name) + endif() + + get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella}) +- install(TARGETS ${name} +- ${export_to_llvmexports} +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) ++ if(ARG_SHARED OR ARG_MODULE OR NOT LLVM_BUILD_LLVM_DYLIB) ++ install(TARGETS ${name} ++ ${export_to_llvmexports} ++ LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} ++ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) ++ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) ++ endif() + + if (NOT LLVM_ENABLE_IDE) + add_llvm_install_targets(install-${name} +@@ -742,7 +745,6 @@ macro(add_llvm_library name) + COMPONENT ${name}) + endif() + endif() +- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) + endif() + if (ARG_MODULE) + set_target_properties(${name} PROPERTIES FOLDER "Loadable modules") +Index: lld-14.0.0.src/cmake/modules/AddLLD.cmake +=================================================================== +--- a/lld-14.0.0.src/cmake/modules/AddLLD.cmake ++++ b/lld-14.0.0.src/cmake/modules/AddLLD.cmake +@@ -17,13 +17,6 @@ macro(add_lld_library name) + + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + get_target_export_arg(${name} LLD export_to_lldtargets) +- install(TARGETS ${name} +- COMPONENT ${name} +- ${export_to_lldtargets} +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") +- + if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) + add_llvm_install_targets(install-${name} + DEPENDS ${name} +Index: polly-14.0.0.src/cmake/polly_macros.cmake +=================================================================== +--- a/polly-14.0.0.src/cmake/polly_macros.cmake ++++ b/polly-14.0.0.src/cmake/polly_macros.cmake +@@ -42,12 +42,14 @@ macro(add_polly_library name) + llvm_config(${name} ${LLVM_LINK_COMPONENTS}) + endif( LLVM_LINK_COMPONENTS ) + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly") +- install(TARGETS ${name} +- EXPORT LLVMExports +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) ++ if (MODULE OR SHARED_LIBRARY OR NOT LLVM_BUILD_LLVM_DYLIB) ++ install(TARGETS ${name} ++ EXPORT LLVMExports ++ LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} ++ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) ++ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) ++ endif() + endif() +- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) + endmacro(add_polly_library) + + macro(add_polly_loadable_module name) +Index: polly-14.0.0.src/lib/CMakeLists.txt +=================================================================== +--- a/polly-14.0.0.src/lib/CMakeLists.txt ++++ b/polly-14.0.0.src/lib/CMakeLists.txt +@@ -74,7 +74,7 @@ set_target_properties(PollyCore PROPERTI + # It depends on all library it needs, such that with + # LLVM_POLLY_LINK_INTO_TOOLS=ON, its dependencies like PollyISL are linked as + # well. +-target_link_libraries(Polly PUBLIC ++target_link_libraries(Polly PRIVATE + ${ISL_TARGET} + ) + +@@ -143,7 +143,7 @@ else () + # hosts. This is not the case for bugpoint. Use LLVM_POLLY_LINK_INTO_TOOLS=ON + # instead which will automatically resolve the additional dependencies by + # Polly. +- target_link_libraries(LLVMPolly PUBLIC ${ISL_TARGET}) ++ target_link_libraries(LLVMPolly PRIVATE ${ISL_TARGET}) + if (GPU_CODEGEN) + target_link_libraries(LLVMPolly PUBLIC PollyPPCG) + endif () diff --git a/llvm-docs-14.0.0.src.tar.xz b/llvm-docs-14.0.0.src.tar.xz new file mode 100644 index 0000000..15fe9eb --- /dev/null +++ b/llvm-docs-14.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e9fcada110499d0c1bc7c12f79e9fc2cfa0989f520e6ae6afa808c4f01e2914 +size 6601284 diff --git a/llvm-fix-find-gcc5-install.patch b/llvm-fix-find-gcc5-install.patch new file mode 100644 index 0000000..9169ed6 --- /dev/null +++ b/llvm-fix-find-gcc5-install.patch @@ -0,0 +1,14 @@ +Index: cfe-7.0.0rc1.src/lib/Driver/ToolChains/Gnu.cpp +=================================================================== +--- cfe-7.0.0rc1.src.orig/lib/Driver/ToolChains/Gnu.cpp ++++ cfe-7.0.0rc1.src/lib/Driver/ToolChains/Gnu.cpp +@@ -1596,7 +1596,8 @@ Generic_GCC::GCCVersion Generic_GCC::GCC + MinorStr = MinorStr.slice(0, EndNumber); + } + } +- if (MinorStr.getAsInteger(10, GoodVersion.Minor) || GoodVersion.Minor < 0) ++ if (!MinorStr.str().empty() && ++ (MinorStr.getAsInteger(10, GoodVersion.Minor) || GoodVersion.Minor < 0)) + return BadVersion; + GoodVersion.MinorStr = MinorStr.str(); + diff --git a/llvm-normally-versioned-libllvm.patch b/llvm-normally-versioned-libllvm.patch new file mode 100644 index 0000000..2ff0dc7 --- /dev/null +++ b/llvm-normally-versioned-libllvm.patch @@ -0,0 +1,78 @@ +Before llvm4, both major and minor version updates of llvm were regularly +breaking API. Because of that, the libLLVM library was named in following +format: libLLVM-${major}-${minor}.so + + (https://bugs.llvm.org/show_bug.cgi?id=25059) + (https://reviews.llvm.org/D13841) + +The package containing this library was called libLLVM${major}_${minor} which +follows our guidelines. + +Since llvm4, llvm decided to follow semantic versioning and only break API if +the major version was increased. In addition they do not intend to ever have +minor version other than 0. + (http://blog.llvm.org/2016/12/llvms-new-versioning-scheme.html) + +The package was renamed to libLLVM${major}, which no longer follows the naming +guidelines, but since the package contained multiple libraries, it was not +detected. + +Since bnc#1049703 the libLLVM${major} package contains only the +libLLVM-${major}-${minor}.so library and no others. This triggers the +shlib-policy-name-error check in our packaging system. + +Because the reasons for using the libLLVM-${major}-${minor}.so format are no +longer valid, lets revert back to libLLVM.so.${major}.${minor}.${version} +format. That way the package name matches our guidelines. + +Index: llvm-8.0.0rc3.src/tools/llvm-config/llvm-config.cpp +=================================================================== +--- llvm-8.0.0rc3.src.orig/tools/llvm-config/llvm-config.cpp ++++ llvm-8.0.0rc3.src/tools/llvm-config/llvm-config.cpp +@@ -380,7 +380,6 @@ int main(int argc, char **argv) { + } else { + // default to the unix values: + SharedExt = "so"; +- SharedVersionedExt = LLVM_DYLIB_VERSION ".so"; + StaticExt = "a"; + StaticDir = SharedDir = ActiveLibDir; + StaticPrefix = SharedPrefix = "lib"; +@@ -393,7 +392,7 @@ int main(int argc, char **argv) { + + bool DyLibExists = false; + const std::string DyLibName = +- (SharedPrefix + "LLVM-" + SharedVersionedExt).str(); ++ (SharedPrefix + "LLVM." + SharedExt).str(); + + // If LLVM_LINK_DYLIB is ON, the single shared library will be returned + // for "--libs", etc, if they exist. This behaviour can be overridden with +Index: llvm-8.0.0rc3.src/tools/llvm-shlib/CMakeLists.txt +=================================================================== +--- llvm-8.0.0rc3.src.orig/tools/llvm-shlib/CMakeLists.txt ++++ llvm-8.0.0rc3.src/tools/llvm-shlib/CMakeLists.txt +@@ -42,7 +42,7 @@ if(LLVM_BUILD_LLVM_DYLIB) + if (LLVM_LINK_LLVM_DYLIB) + set(INSTALL_WITH_TOOLCHAIN INSTALL_WITH_TOOLCHAIN) + endif() +- add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${INSTALL_WITH_TOOLCHAIN} ${SOURCES}) ++ add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB ${INSTALL_WITH_TOOLCHAIN} ${SOURCES}) + + list(REMOVE_DUPLICATES LIB_NAMES) + if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU) +Index: llvm-14.0.0rc2.src/test/lit.cfg.py +=================================================================== +--- llvm-14.0.0rc2.src.orig/test/lit.cfg.py ++++ llvm-14.0.0rc2.src/test/lit.cfg.py +@@ -244,9 +244,9 @@ if config.link_llvm_dylib: + config.available_features.add('llvm-dylib') + config.substitutions.append( + ('%llvmdylib', +- '{}/libLLVM-{}{}'.format(config.llvm_shlib_dir, +- config.llvm_dylib_version, +- config.llvm_shlib_ext))) ++ '{}/libLLVM{}.{}'.format(config.llvm_shlib_dir, ++ config.llvm_shlib_ext, ++ config.llvm_dylib_version))) + + if config.have_tf_aot: + config.available_features.add("have_tf_aot") diff --git a/llvm-remove-clang-only-flags.patch b/llvm-remove-clang-only-flags.patch new file mode 100644 index 0000000..84ed114 --- /dev/null +++ b/llvm-remove-clang-only-flags.patch @@ -0,0 +1,21 @@ +Index: llvm-8.0.0rc3.src/cmake/modules/HandleLLVMOptions.cmake +=================================================================== +--- llvm-8.0.0rc3.src.orig/cmake/modules/HandleLLVMOptions.cmake ++++ llvm-8.0.0rc3.src/cmake/modules/HandleLLVMOptions.cmake +@@ -413,8 +413,6 @@ if( MSVC ) + + # Specific default warnings-as-errors for compilers accepting GCC-compatible warning flags: + if ( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" ) +- add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME) +- add_flag_if_supported("-Werror=unguarded-availability-new" WERROR_UNGUARDED_AVAILABILITY_NEW) + endif( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" ) + + # Modules enablement for GCC-compatible compilers: +@@ -586,7 +584,6 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPI + endif() + + add_flag_if_supported("-Wimplicit-fallthrough" IMPLICIT_FALLTHROUGH_FLAG) +- add_flag_if_supported("-Wcovered-switch-default" COVERED_SWITCH_DEFAULT_FLAG) + append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS) + append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS) + diff --git a/llvm14-rpmlintrc b/llvm14-rpmlintrc new file mode 100644 index 0000000..ddd60ef --- /dev/null +++ b/llvm14-rpmlintrc @@ -0,0 +1,15 @@ +# This line is mandatory to access the configuration functions +from Config import * + +addFilter("devel-file-in-non-devel-package .*/clang/.*/include/.*") +addFilter("devel-file-in-non-devel-package .*/clang/.*/lib/.*") +addFilter("devel-file-in-non-devel-package .*/usr/include/.*") + +addFilter("devel-file-in-non-devel-package .*/lib.*/*.a") +addFilter("devel-file-in-non-devel-package .*/lib.*/*.so") + +# We're deliberately conflicting with SLE. (https://code.opensuse.org/leap/features/issue/55) +addFilter("SUSE_Backports_policy-SLE_conflict") + +# Archive seems to be deliberately empty on some architectures. +addFilter("lto-no-text-in-archive .*/lib.*/clang/.*/lib/linux/libclang_rt.asan_static-.*.a") diff --git a/llvm14.changes b/llvm14.changes new file mode 100644 index 0000000..2fea5fe --- /dev/null +++ b/llvm14.changes @@ -0,0 +1,2520 @@ +------------------------------------------------------------------- +Sun Apr 3 14:13:45 UTC 2022 - Aaron Puchert + +- Update to version 14.0.0. + * For details, see the release notes: + - https://releases.llvm.org/14.0.0/docs/ReleaseNotes.html + - https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html + - https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html + - https://releases.llvm.org/14.0.0/projects/libcxx/docs/ReleaseNotes.html + - https://releases.llvm.org/14.0.0/tools/lld/docs/ReleaseNotes.html + * New LLVM tools: + - llvm-debuginfod-find: Tool to fetch debuginfod artifacts. + - llvm-tli-checker: LLVM TargetLibraryInfo versus SDK checker. + * New Clang tools: + - clang-linker-wrapper: A wrapper utility over the host linker. + - clang-nvlink-wrapper: A wrapper tool over nvlink program. +- Add clang-repl-private-deps.patch to make link dependencies of + clang-repl private, otherwise CMake can't install. +- Add PPCISelLowering-Avoid-emitting-calls-to-__multi3.patch to + fix build on PowerPC (32-bit). +- Drop llvm-exegesis-link-dylib.patch, instead we don't build + llvm-exegesis anymore and add check-no-llvm-exegesis.patch to + disable the corresponding tests. +- Rebase patches: + * lldb-cmake.patch + * llvm-do-not-install-static-libraries.patch + * lvm-normally-versioned-libllvm.patch +- Drop patches that have landed upstream: + * llvm-update-extract-section-script.patch + +------------------------------------------------------------------- +Sun Apr 3 13:42:27 UTC 2022 - Aaron Puchert + +- Split up Clang libraries: libclang.so is no longer so-versioned + alongside LLVM but will stay at libclang.so.13 for now. So we + put it into a separate package from libclang-cpp.so. Since we + can't have multiple LLVM versions generate the same package, we + prefix it for the non-default LLVM with a mechanism inspired by + the GCC packaging. +- Use the same mechanism to for libc++ and package Clang scripts + only for the default version. This means we'll no longer have to + touch the package when a new major version comes out. +- Make sure we properly clean up the clang scripts if we're not + packaging them. +- Let python3-clang use libclang.so.XX, which means we can always + build it and makes it depend on libclang instead of clang-devel. +- Fix some rpmlint issues: we don't need explicit library + dependencies that are detected automatically, and we add proper + library dependencies to the *-devel packages. +- Merge llvm-LTO-devel into llvm-devel. That's where the header + files already are, and they are hard to separate. +- Let llvm-polly-devel depend on llvm-devel. +- Remove libLTO from baselibs, it doesn't seem to be needed. +- Only suggest documentation packages. + +------------------------------------------------------------------- +Sat Feb 19 15:23:13 UTC 2022 - Aaron Puchert + +- Let clang-devel accept a newer version of clang-tools: + we don't keep multiple versions of the latter. + +------------------------------------------------------------------- +Tue Feb 15 12:13:13 UTC 2022 - Aaron Puchert + +- AND instead of OR in License tag after sr#954337. + +------------------------------------------------------------------- +Mon Feb 14 14:31:30 UTC 2022 - Aaron Puchert + +- More conflicts for addition to Leap: clang-tools conflicts with + llvm9 because that doesn't have the move of hmaptool yet, and + llvm13-devel with llvm{5,7} as they used to have FileCheck.1.gz. + +------------------------------------------------------------------- +Tue Feb 8 23:14:36 UTC 2022 - Aaron Puchert + +- Add SUSE_Backports_policy-SLE_conflict to rpmlintrc, we're + deliberately conflicting with SLE here to offer a newer version + than what SUSE wants to support. + (https://code.opensuse.org/leap/features/issue/55) + +------------------------------------------------------------------- +Thu Feb 3 21:56:28 UTC 2022 - Aaron Puchert + +- Update to version 13.0.1. + * This release contains bug-fixes for the LLVM 13.0.0 release. + This release is API and ABI compatible with 13.0.0. +- Rebase llvm-do-not-install-static-libraries.patch. +- Drop obsolete patches: + * llvm-fix-building-with-GCC-12.patch +- Drop RUNPATH from packaged binaries, instead set LD_LIBRARY_PATH + for building and testing to simulate behavior of actual package. + +------------------------------------------------------------------- +Mon Jan 31 21:16:52 UTC 2022 - Andreas Schwab + +- Update constraints for riscv64 + +------------------------------------------------------------------- +Thu Jan 20 00:11:33 UTC 2022 - John Paul Adrian Glaubitz + +- Add support for experimental targets and enable the M68k backend +- Add patch to fix testsuite after enabling the M68k backend + + llvm-update-extract-section-script.patch + +------------------------------------------------------------------- +Sat Dec 18 15:05:40 UTC 2021 - Aaron Puchert + +- BuildRequires: python-rpm-macros to fix Leap 15.3 build. +- More memory for GCC compile jobs. + +------------------------------------------------------------------- +Fri Nov 12 13:30:15 UTC 2021 - Alberto Planas Dominguez + +- Add FileCheck into the devel package, as is required for testing + Rust (boo#1192629) + +------------------------------------------------------------------- +Tue Nov 2 21:18:57 UTC 2021 - Aaron Puchert + +- Let clang recommend gcc and glibc-devel as we need both for + building executables. No hard requirement because Clang can be + used as a frontend only. (boo#1191587) +- Set minimal CMake version required. + +------------------------------------------------------------------- +Tue Nov 2 13:30:06 UTC 2021 - Martin Liška + +- Backport llvm-fix-building-with-GCC-12.patch in order to fix building + with GCC 12. + +------------------------------------------------------------------- +Sat Oct 2 20:13:04 UTC 2021 - Aaron Puchert + +- Update to version 13.0.0. + * For details, see the release notes: + - https://releases.llvm.org/13.0.0/docs/ReleaseNotes.html + - https://releases.llvm.org/13.0.0/tools/clang/docs/ReleaseNotes.html + - https://releases.llvm.org/13.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html + - https://releases.llvm.org/13.0.0/projects/libcxx/docs/ReleaseNotes.html + - https://releases.llvm.org/13.0.0/tools/lld/docs/ReleaseNotes.html + * New LLVM tools: + - llvm-otool: Mach-O object file displaying tool. + - llvm-sim: LLVM IR Similarity Visualizer. + - llvm-tapi-diff: Diff tool for tbd files. + - llvm-windres: Tool to manipulate Windows resources. + * llvm-elfabi was removed. + * New Clang tools: + - clang-repl, an interactive interpreter for C/C++. + - intercept-build, analyze-build: the former intercepts build + commands to build a compilation database, the latter runs + the static analyzer over all translation units. + - scan-build-py: Python reimplementation of scan-build. +- Rebase patches: + * link-clang-shared.patch + * llvm-do-not-install-static-libraries.patch + * llvm-exegesis-link-dylib.patch +- Drop patches that have landed upstream: + * tablegen-test-link-static.patch +- Run tests on more architectures, disable those that seem to hang. + Don't run libcxx tests at all anymore because they take so long. +- Relax constraints so that we can build on more machines. + +------------------------------------------------------------------- +Sat Sep 18 13:54:44 UTC 2021 - Aaron Puchert + +- Set CMAKE_LINKER to workaround CMake wanting to use lld just + because we're using clang as compiler. Fixes build on aarch64. + (https://bugs.llvm.org/show_bug.cgi?id=51115) + +------------------------------------------------------------------- +Sat Jul 10 21:30:44 UTC 2021 - Aaron Puchert + +- Update to version 12.0.1. + * This release contains bug-fixes for the LLVM 12.0.0 release. + This release is API and ABI compatible with 12.0.0. +- Rebase llvm-do-not-install-static-libraries.patch. +- Drop obsolete patches: + * clangd-cmake-non-standard-layout.patch + * compiler-rt-Remove-cyclades-inclusion-in-sanitizer.patch + * lld-no-version-on-undefined-weak-lazy-symbols.patch + +------------------------------------------------------------------- +Fri Jul 2 21:01:53 UTC 2021 - Aaron Puchert + +- Add compiler-rt-Remove-cyclades-inclusion-in-sanitizer.patch: + Fix build with linux-glibc-devel 5.13. + +------------------------------------------------------------------- +Thu May 13 08:20:30 UTC 2021 - Martin Liška + +- Set memory limits for DWZ to 4x. + +------------------------------------------------------------------- +Fri Apr 16 21:59:40 UTC 2021 - Aaron Puchert + +- Update to version 12.0.0. + * For details, see the release notes: + - https://releases.llvm.org/12.0.0/docs/ReleaseNotes.html + - https://releases.llvm.org/12.0.0/tools/clang/docs/ReleaseNotes.html + - https://releases.llvm.org/12.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html + - https://releases.llvm.org/12.0.0/projects/libcxx/docs/ReleaseNotes.html + - https://releases.llvm.org/12.0.0/tools/lld/docs/ReleaseNotes.html +- Rebase patches: + * assume-opensuse.patch + * lldb-cmake.patch + * llvm-better-detect-64bit-atomics-support.patch + * llvm-do-not-install-static-libraries.patch + * llvm_build_tablegen_component_as_shared_library.patch +- Drop patches that have landed upstream: + * Fix-missing-include.patch +- Always use ld.bfd for stage 1, use lld for stage 2 where we use + ThinLTO and where it's supported, gold where lld doesn't work, + and ld.bfd where we don't use ThinLTO. (boo#1181621) +- Add lld-no-version-on-undefined-weak-lazy-symbols.patch to fix a + bug in lld that made libLLVM.so contain a corrupt symbol version. +- Add clangd-cmake-non-standard-layout.patch to fix build in our + non-monorepo layout. + +------------------------------------------------------------------- +Sun Feb 14 22:28:42 UTC 2021 - Aaron Puchert + +- Don't use gold and ThinLTO on ppc64le because of boo#1181621. +- Fix-missing-include.patch: fix build with GCC 11. (boo#1181875) +- CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch: + Fix target component lookup. (boo#1180748) + +------------------------------------------------------------------- +Sat Jan 9 16:19:46 UTC 2021 - Aaron Puchert + +- Update to version 11.0.1. + * This release contains bug-fixes for the LLVM 11.0.0 release. + This release is API and ABI compatible with 11.0.0. +- Rebase llvm-do-not-install-static-libraries.patch. +- Drop obsolete compiler-rt-dont-compile-assembly-files-as-c.patch. +- Make documentation tarballs more reproducible. + +------------------------------------------------------------------- +Wed Jan 6 08:40:26 UTC 2021 - Guillaume GARDET + +- Increase required RAM for aarch64 + +------------------------------------------------------------------- +Fri Jan 1 13:04:35 UTC 2021 - Callum Farmer + +- Move BFD plugins to %{_libdir} + +------------------------------------------------------------------- +Mon Dec 14 14:18:19 UTC 2020 - Andreas Schwab + +- polly-pthread.patch: Remove, std::call_once no longer needs libpthread + +------------------------------------------------------------------- +Mon Nov 23 17:29:28 UTC 2020 - Aaron Puchert + +- Add compiler-rt-dont-compile-assembly-files-as-c.patch to fix + build failure with newer CMake versions. + +------------------------------------------------------------------- +Sat Nov 14 22:09:41 UTC 2020 - Aaron Puchert + +- Let CMake files in {llvm,clang}X-devel refer to the versioned + binaries that come with the package instead of the symlink + managed by update-alternatives. (boo#1178513) + +------------------------------------------------------------------- +Sat Oct 24 15:12:33 UTC 2020 - Aaron Puchert + +- Disable ThinLTO on aarch64 because of hangs. (boo#1178070) +- Enable ThinLTO on ppc64 and ppc64le, the internal error is gone. + +------------------------------------------------------------------- +Mon Oct 19 21:57:00 UTC 2020 - Aaron Puchert + +- Update to version 11.0.0. + * For details, see the release notes: + - https://releases.llvm.org/11.0.0/docs/ReleaseNotes.html + - https://releases.llvm.org/11.0.0/tools/clang/docs/ReleaseNotes.html + - https://releases.llvm.org/11.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html + - https://releases.llvm.org/11.0.0/projects/libcxx/docs/ReleaseNotes.html + - https://releases.llvm.org/11.0.0/tools/lld/docs/ReleaseNotes.html + * New LLVM tools: llvm-gsymutil, llvm-ml. + * clang-import-test was removed. +- Drop obsolete patches: + * clang-ignore-stack-clash-protector.patch + * fix-atomics-test.patch + * restore-llvm10-abi.patch +- Rebase patches: + * clang-resourcedirs.patch + * default-to-i586.patch + * link-clang-shared.patch + * link-clang-tools-extra-shared.patch + * lldb-cmake.patch + * llvm-do-not-install-static-libraries.patch + * lto-disable-cache.patch +- Add llvm-exegesis-link-dylib.patch: link llvm-exegesis with + libLLVM.so, the advanced functionality is not available anyway. +- Remove -fstack-clash-protection on architectures where it isn't + actually supported, because that prevents feature detection. +- Make sure we also build AttributeReference for the documentation. + This requires building via CMake. Also shorten the paths. + +------------------------------------------------------------------- +Thu Jul 30 21:20:08 UTC 2020 - Aaron Puchert + +- Add ld.lld as an alternative for ld. (boo#1174656) + +------------------------------------------------------------------- +Wed Jul 22 21:54:01 UTC 2020 - Aaron Puchert + +- Update to version 10.0.1. + * This release contains bug-fixes for the LLVM 10.0.0 release. + This release is API and ABI compatible with 10.0.0. +- Rebase llvm-do-not-install-static-libraries.patch. +- Replace ValueLattice-Add-new-state-for-undef-constants.patch, + which landed upstream in a modified version, by + restore-llvm10-abi.patch that resets the ABI to our 10.0.0. +- Rewrite lld-default-sha1.patch to be version-independent. +- Set flags consistently, so that we don't lose -DNDEBUG on 32-bit + architectures. Also we don't need the opt flags twice. This leads + to a significant reduction in binary sizes on 32-bit arches. +- Make it easier to package release candidates. +- Enable most tests on 32-bit ARM, but not for libcxx. +- Add fix-atomics-test.patch for architectures where native atomics + are not available. +- Lower build constraints for riscv64 a bit to allow building on + more workers. +- Allow more compile jobs in stage 2. + +------------------------------------------------------------------- +Sun Jul 12 11:49:47 UTC 2020 - Aaron Puchert + +- Factor out computation of the number of jobs into a macro. +- Choose mem_per_compile_job dependent on build stage, let stage 1 + on x86_64 use more memory. +- More generous memory allocation on riscv64. + +------------------------------------------------------------------- +Tue Jun 23 07:18:55 UTC 2020 - Ismail Dönmez + +- Add lld-default-sha1.patch to make lld generate SHA1 build-ids by + default, otherwise our tools cannot process the debuginfo. + +------------------------------------------------------------------- +Tue Mar 24 22:30:06 UTC 2020 - Aaron Puchert + +- Update to version 10.0.0. + * For details, see the release notes: + - https://releases.llvm.org/10.0.0/docs/ReleaseNotes.html + - https://releases.llvm.org/10.0.0/tools/clang/docs/ReleaseNotes.html + - https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html + - https://releases.llvm.org/10.0.0/projects/libcxx/docs/ReleaseNotes.html + - https://releases.llvm.org/10.0.0/tools/lld/docs/ReleaseNotes.html + * New LLVM tools: llvm-ifs, llvm-install-name-tool, llvm-reduce. + * New Clang tools: clang-move, clang-offload-wrapper, pp-trace. + * lldb-mi moved to a separate project and is no longer available. +- Dropped obsolete patches: + * clang-fix-powerpc-triplet.patch + * clang-riscv64-rv64gc.diff + * compiler-rt-move-fdp.patch + * compiler-rt-sanitizer-ipc-perm.patch + * D60657-riscv-pcrel_lo.diff + * gwp-asan-lto.patch + * libcxx-tests-linux-distribution.patch + * link-lldb-shared.patch + * llvm-riscv64-fix-cffi.diff + * openmp-export-fini.patch + * riscv-eh-frame-fixup.patch + * riscv64-suse-linux.patch +- Rebased patches: + * assume-opensuse.patch + * link-clang-tools-extra-shared.patch + * lldb-cmake.patch + * llvm_build_tablegen_component_as_shared_library.patch + * llvm-do-not-install-static-libraries.patch + * llvm-remove-clang-only-flags.patch + * lto-disable-cache.patch + * polly-pthread.patch + * tests-use-python3.patch +- Add tablegen-test-link-static.patch: fix TableGenTests. +- Add ValueLattice-Add-new-state-for-undef-constants.patch: fix + miscompilation on ppc64/s390x that was leading to test crashes. +- Enable ThinLTO on aarch64. +- Disable ThinLTO on ppc64le due to internal error in gold. +- Delete object files and static libraries from build tree in + %install already, because debuginfo extraction happens after + that. If we do it after %check, we run out of disk space. +- Run tests "manually", because we've already removed many targets. +- Don't build unit tests, because some of them are now statically + linked, which is very expensive with LTO. Also unit tests are + probably not very interesting on the distribution level, we don't + expect them to perform different than in upstream. The relevant + upstream change for this is https://reviews.llvm.org/D54439. +- Drop %if for openSUSE 13.2. + +------------------------------------------------------------------- +Mon Mar 23 22:42:09 UTC 2020 - Aaron Puchert + +- Remove conflicts of clang-tools with {clang,llvm}{7,8}: the + relevant binaries have been removed from those packages. This + allows having clang-tools together with older versions of llvm. + For a smooth installation we add OrderWithRequires dependencies. +- Fix typos in (still inactive) !%{with clang_scripts} part. + +------------------------------------------------------------------- +Wed Mar 11 22:58:26 UTC 2020 - Aaron Puchert + +- Require clang-tools for clangX-devel. + +------------------------------------------------------------------- +Sat Mar 7 22:41:55 UTC 2020 - Aaron Puchert + +- Move all clang-related scripts (including those originally in + clangX-checker), hmaptool and clang-doc into a common + unversioned subpackage clang-tools, like python3-clang. + The scripts reference the unversioned executables, so allowing + multiple versions via update-alternatives would be misleading. + The clang-doc executable will come with assets in Clang 10, so + we have to take it out of update-alternatives as well. + This should be the proper solution to boo#1161873. +- Include run-find-all-symbols script in clang-tools. +- Remove metadata for clangX-include-fixer subpackage that never + had any files and thus wasn't released as rpm. There are so many + clang binaries that packaging them separately doesn't scale. +- Fix lldb version string, adapt lldb-cmake.patch (boo#1165517). +- Remove unneccesary libtool dependency. +- Don't let clang depend on libc++, we link it with libstdc++. +- Recommend gold plugin if clang and gold are installed. + +------------------------------------------------------------------- +Fri Feb 7 10:29:11 UTC 2020 - Richard Biener + +- Add vim-plugin-llvm Conflicts to clang subpackage which now + contains files formerly in llvmN-vim-plugins, conflicting with + packages from older llvm releases. + +------------------------------------------------------------------- +Thu Feb 6 10:58:59 UTC 2020 - Richard Biener + +- Add back emacs-llvm Provides and Conflicts to clang subpackage + originally in llvm-emacs-plugins to properly conflict with + llvm-emacs-plugins from older llvm releases. + +------------------------------------------------------------------- +Tue Feb 4 08:41:49 UTC 2020 - Richard Biener + +- Add clang5-devel to clang9-doc conflicts. + +------------------------------------------------------------------- +Mon Feb 3 08:53:12 UTC 2020 - Andreas Schwab + +- Add compiler-rt-sanitizer-ipc-perm.patch: Fix sanitizer-common + build with glibc 2.31. + +------------------------------------------------------------------- +Wed Jan 29 22:33:02 UTC 2020 - Aaron Puchert + +- Move clang-{format,include-fixer,rename}.{el,py} files from + llvm-*-plugins to clang package. (boo#1161873) +- Drop the now empty llvm-emacs-plugins package. + +------------------------------------------------------------------- +Mon Jan 27 08:03:55 UTC 2020 - Richard Biener + +- Add polly and lld build conditionals, remove excessive Requires + to clang from docs. Fix conditional for libc++ use. + [jsc#SLE-7400, jsc#SLE-7614, jsc#SLE-7452, jsc#SLE-8920, jsc#SLE-7390, + jsc#SLE-7587] + +------------------------------------------------------------------- +Wed Jan 15 14:34:50 UTC 2020 - Aaron Puchert + +- Undo spec-cleaner changes that we don't want. + * Reintroduce blank lines in configuration. + * Use packageand syntax that works for older versions of RPM. + * Don't use %{_bindir} on left-hand side of sed replacements. + +------------------------------------------------------------------- +Sat Jan 11 20:14:12 UTC 2020 - Andreas Schwab + +- riscv-eh-frame-fixup.patch: Remove changesets that alter the libLLVM ABI + +------------------------------------------------------------------- +Fri Jan 8 15:30:21 UTC 2020 - Jaime Caamaño Ruiz + +- Add upstream patch to export compiler-rt FuzzedDataProvider header, + required by Envoy 1.12.2: + * compiler-rt-move-fdp.patch + +------------------------------------------------------------------- +Mon Jan 6 19:31:23 UTC 2020 - Andreas Schwab + +- riscv-eh-frame-fixup.patch: Fix handling of .eh_frame on RISC-V +- polly-pthread.patch: Add missing -lpthread + +------------------------------------------------------------------- +Fri Jan 3 15:28:52 UTC 2020 - Andreas Schwab + +- Enable support for riscv64 +- clang-riscv64-rv64gc.diff, riscv64-suse-linux.patch, + llvm-riscv64-fix-cffi.diff, D60657-riscv-pcrel_lo.diff: Backports from + master + +------------------------------------------------------------------- +Fri Dec 20 21:13:19 UTC 2019 - Aaron Puchert + +- Update to version 9.0.1. + * This release contains bug-fixes for the LLVM 9.0.0 release. + This release is API and ABI compatible with 9.0.0. +- Drop patches that have landed upstream: + * dont-install-example-analyzer-plugins.patch + * fix-module-test.patch + * llvm-add-missing-include.patch +- Drop set-revision.patch, don't provide revision number in clang. + The upstream repository has moved from Subversion to git, so the + revision number is just a hash, which limits its usefulness. +- Rebase llvm-do-not-install-static-libraries.patch. + +------------------------------------------------------------------- +Thu Dec 5 23:49:17 UTC 2019 - Aaron Puchert + +- Modify libcxx-tests-linux-distribution.patch to remove dependency + on python-distro again: we don't have expected failures. + +------------------------------------------------------------------- +Thu Dec 5 08:31:30 UTC 2019 - Martin Liška + +- Add llvm-add-missing-include.patch in order to fix + boo#1158367. + +------------------------------------------------------------------- +Tue Dec 3 23:52:49 UTC 2019 - Aaron Puchert + +- Add gwp-asan-lto.patch: Make sure there are no LLVM IR files in + static libraries that we package. +- Add libcxx-tests-linux-distribution.patch (boo#1158293): + Replace platform.linux_distribution by distro.linux_distribution. +- Make documentation packages noarch. + +------------------------------------------------------------------- +Mon Nov 4 02:34:19 UTC 2019 - Aaron Puchert + +- Add openmp-export-fini.patch: Export termination function for + libomp.so, solves boo#1155108. +- Remove flaky test case in libcxx. + +------------------------------------------------------------------- +Wed Oct 30 08:44:49 UTC 2019 - Fabian Vogt + +- Fix typo, BOLL -> BOOL + +------------------------------------------------------------------- +Sat Oct 19 11:12:03 UTC 2019 - Aaron Puchert + +- Let new {llvm,clang}*-doc packages "Conflict" with older devel + packages, which they were split from. +- Let doc packages conflict with older versions of themselves. + +------------------------------------------------------------------- +Mon Oct 14 14:16:20 UTC 2019 - Stefan Brüns + +- (Build)Require only python3-base instead of full python3 package, + the additional modules are not required. Helps shortening the + build dependency chain. +- Remove python3-* requires from lldb9 subpackage, and add it to + the bindings/pretty-printer subpackage (python3-lldb9). +- Add python3-base Requires to python3-clang subpackage + +------------------------------------------------------------------- +Sat Sep 28 13:28:45 UTC 2019 - Aaron Puchert + +- Add dont-install-example-analyzer-plugins.patch: Remove example + analyzer plugins from install targets instead of deleting them. +- Add fix-module-test.patch: fix test instead of deleting it. +- Don't build static libc++ (with ThinLTO that's not useful anyway). +- Don't build libc++experimental. +- Don't package libc++abi.so with libc++-devel, it's already contained + in the (required) libc++abi-devel. +- Be more specific about files in libc++-devel. + +------------------------------------------------------------------- +Sun Sep 22 19:42:25 UTC 2019 - Aaron Puchert + +- Update to version 9.0.0. + * For details, see the release notes: + - https://releases.llvm.org/9.0.0/docs/ReleaseNotes.html + - https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNotes.html + - https://releases.llvm.org/9.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html + - https://releases.llvm.org/9.0.0/projects/libcxx/docs/ReleaseNotes.html + - https://releases.llvm.org/9.0.0/tools/lld/docs/ReleaseNotes.html +- Change License to "Apache-2.0 WITH LLVM-exception OR NCSA". + (https://llvm.org/foundation/relicensing/) +- Allow building with ThinLTO and enable it on some architectures. +- Disable LTO cache in lto-disable-cache.patch. +- Unset MALLOC_CHECK_ for compilation to mitigate lock contention. +- No debug info for ppc like for the other 32-bit targets. +- Clean up _constraints: same constraints for 32-bit targets. +- Don't use BUILD_SHARED_LIBS for Clang anymore, since the newly + available libclang-cpp.so should expose the full C++ API. +- Link tools with libclang-cpp.so by using CLANG_LINK_CLANG_DYLIB, + similar to LLVM_BUILD_LLVM_DYLIB for libLLVM.so. +- Remove obsolete n_clang_allow_BUILD_SHARED_LIBRARY.patch. +- Add link-clang-shared.patch to link more clang targets with + libclang-cpp.so, especially libclang.so. +- Add link-clang-tools-extra-shared.patch, link-lldb-shared.patch: + link targets in clang-tools-extra and lldb with libclang-cpp.so. +- Simplify llvm-do-not-install-static-libraries.patch, also handle + Clang, for which we now get static libraries. +- Package documentation for llvm and clang separately, recommend + them for the main package: they are not required for development, + but actually useful for working with the non-devel packages. +- Recommend editor plugins not just for llvm-devel. +- Recommend libstdc++ for Clang again. +- Move diagtool from llvm to clang subpackage. +- Properly distinguish between %{_relver} and %{version}. +- Drop aarch64-disable-memorytest.patch and reactivate test. +- Rebase clang-resourcedirs.patch. +- Rebase llvm-normally-versioned-libllvm.patch. +- Rebase llvm-remove-clang-only-flags.patch. +- Rebase llvm_build_tablegen_component_as_shared_library.patch. +- Rebase set-revision.patch. +- Increase disk space for build. + +------------------------------------------------------------------- +Sun Sep 22 11:13:10 UTC 2019 - Lubos Lunak + +- Make lldb recommend python3-lldb (it contains pretty printers). + +------------------------------------------------------------------- +Wed Aug 21 21:53:49 UTC 2019 - Aaron Puchert + +- Use python3 shebangs everywhere (boo#1146533). +- Drop obsolete opt-viewer-Do-not-require-python-2.patch. + +------------------------------------------------------------------- +Fri Aug 16 09:53:24 UTC 2019 - Aaron Puchert + +- Remove unneccesary dependencies: + * groff, bison and flex don't seem to be used. + * jsoncpp is no longer used since r338461. + * Move some BuildRequires to subpackages. + * Don't recommend scan-{build,view} in clang (boo#1145444). + * Devel packages are only required in other devel packages, + when their headers are included in the installed headers. +- Add versions to Provides/Conflicts except for files. +- Remove unused (since r268685) CMake flags LLVM_ENABLE_TIMESTAMPS. +- Fix installation of opt-viewer files when python3-clang is no + longer built. + +------------------------------------------------------------------- +Sat Jul 20 18:45:23 UTC 2019 - Aaron Puchert + +- Update to version 8.0.1. + * This release contains bug-fixes for the LLVM 8.0.0 release. + This release is API and ABI compatible with 8.0.0. +- Don't run LLVM tests on ppc at all because of sporadic hangs. + +------------------------------------------------------------------- +Fri Jun 28 09:55:21 UTC 2019 - Guillaume GARDET + +- Increase RAM for armv6/7 to avoid OOM and be scheduled on fast + worker + +------------------------------------------------------------------- +Thu Jun 27 23:03:49 UTC 2019 - Aaron Puchert + +- Use the documented LLVM_ENABLE_RTTI to enable RTTI instead of + LLVM_REQUIRES_RTTI, which "is an internal flag that individual + targets can use to force RTTI". (boo#1139584) +- Drop obsolete llvm-build-tests-with-rtti.patch. + +------------------------------------------------------------------- +Tue Jun 18 21:26:33 UTC 2019 - Aaron Puchert + +- Exclude riscv64 for now since it fails to build. + +------------------------------------------------------------------- +Sat Jun 15 20:11:03 UTC 2019 - Aaron Puchert + +- Change some groups: + * put libraries in System/Libraries, + * devel packages in Development/Libraries, + * clang in Development/Languages/C and C++, + * the gold plugin in Development/Tools/Building. +- Add some URLs, use https:// when possible. +- Remove unneeded devel dependencies. +- Only suggest a C++ standard library for clang. It's also a + C compiler and needs no C++ library when only used as such. +- Fix Supplements for editor plugins. +- Fix some rpmlint issues: + * Reword summary and description for Polly. + * Fix /usr/bin/env shebangs. + * Remove executable bit where not needed. + * Move bash completion to /usr. + * Remove hard dependency of libclang8 to libstdc++-devel. +- Make rpm macros work properly. +- Remove sources from documentation. +- Run %fdupes on the right directories. +- Enable tests for libcxx. +- Reduce memory requirements for compile jobs depending on arch. + +------------------------------------------------------------------- +Sun May 12 19:11:24 UTC 2019 - Aaron Puchert + +- Avoid relocation overflow on ppc by not building GPU backends. +- Update baselibs.conf. + +------------------------------------------------------------------- +Wed Apr 24 17:20:07 UTC 2019 - Martin Liška + +- Disable LTO (boo#1133254). + +------------------------------------------------------------------- +Sat Mar 23 23:29:21 UTC 2019 - aaronpuchert@alice-dsl.net + +- Fix packaging on ppc: the sanitizers aren't available there, so + the directories /usr/lib/clang/*/{lib,share} are missing. +- Package LLVMgold even when we don't use gold for linking. + It's promised in /usr/lib/cmake/llvm/LLVMExports.cmake. +- Unignore test failures on PowerPC64 architectures. The failures + in ppc are unrelated to AMDGPU, so we remove that remark. +- Fix dependencies: the gold plugin shouldn't depend on llvm-devel. + libc++abi-devel should depend on libc++abi. +- Fix typo. + +------------------------------------------------------------------- +Tue Mar 19 09:16:11 UTC 2019 - Adrian Schröter + +- Enable libc++ on ARM (Needed for tensorflow) + +------------------------------------------------------------------- +Mon Mar 11 12:53:39 UTC 2019 - msrb@suse.com + +- Update to 8.0.0 + * For details, see the release notes: + https://llvm.org/releases/8.0.0/docs/ReleaseNotes.html + https://llvm.org/releases/8.0.0/tools/clang/docs/ReleaseNotes.html + https://llvm.org/releases/8.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html + https://llvm.org/releases/8.0.0/tools/lld/docs/ReleaseNotes.html + +- Drop llvm-unittests-Don-t-install-TestPlugin.so.patch, + llvm-drop-llvm-optional-clang-specific-optimization.patch, + llvm-D51108.patch, + llvm-Ensure-that-variant-part-discriminator-is-read-by-Me.patch, + llvm-test-Fix-Assembler-debug-info.ll.patch + * Already included upstream + +- Add 0001-CMake-Add-install-targets-for-utilities-to-LLVM-expo.patch + +------------------------------------------------------------------- +Sun Mar 10 20:24:03 UTC 2019 - aaronpuchert@alice-dsl.net + +- Remove -fno-strict-aliasing, which upstream doesn't use any more + since r245304 in 2015. (http://reviews.llvm.org/D12036) + It's probably also not needed for modern versions of GCC. + It was enabled in r105644 because of some bugs there. +- Add a clang-%{_sonum} symlink, which is referenced by + /usr/lib64/cmake/clang/ClangTargets.cmake (boo#1120098) +- Package clang builtin headers with libclang. The library is + basically unusable without the builtin headers. Currently + consumers of libclang have to require clang as well, although + only the headers are needed. + +------------------------------------------------------------------- +Tue Feb 26 09:44:21 UTC 2019 - msrb@suse.com + +- llvm-Ensure-that-variant-part-discriminator-is-read-by-Me.patch, + llvm-test-Fix-Assembler-debug-info.ll.patch + * Fix crash in rustc (boo#1126907) + +------------------------------------------------------------------- +Sun Feb 17 21:38:04 UTC 2019 - John Paul Adrian Glaubitz + +- Allow use of Gold linker to be conditional +- Disable Gold linker on ppc + + LLVM currently doesn't build with Gold on ppc + +------------------------------------------------------------------- +Tue Jan 15 10:28:38 UTC 2019 - msrb@suse.com + +- Readd clang-7 and clang++-7 symlinks + * Fixes uses of clang-devel (boo#1120098) + +------------------------------------------------------------------- +Mon Jan 14 13:06:55 UTC 2019 - msrb@suse.com + +- Update to llvm 7.0.1 + * This release contains bug-fixes for the LLVM 7.0.0 release. + This release is API and ABI compatible with 7.0.0. + +------------------------------------------------------------------- +Sun Dec 30 19:11:05 UTC 2018 - Dirk Mueller + +- enable gold unconditionally like with llvm6 and older +- reenable openmp support again for aarch64 (like it was already in llvm6) + +------------------------------------------------------------------- +Wed Dec 19 19:45:44 UTC 2018 - Todd R + +- Use %license macro +- Use upstream-recommended %{_rpmconfigdir}/macros.d directory + for the rpm macros. + +------------------------------------------------------------------- +Fri Dec 14 23:08:04 UTC 2018 - John Paul Adrian Glaubitz + +- Remove ppc from Exclude field in spec file +- Allow use of Gold linker to be conditional +- Disable Gold linker on ppc +- Add patch to fix SUSE GNU triplet on ppc + * clang-fix-powerpc-triplet.patch +- Add patch from upstream to fix ABI issue on ppc + * llvm-D51108.patch +- Limit list of enabled targets on ppc + * PowerPC;AMDGPU;BPF;NVPTX +- Ignore testsuite failures on ppc + +------------------------------------------------------------------- +Tue Dec 11 10:26:04 UTC 2018 - msrb@suse.com + +- llvm-drop-llvm-optional-clang-specific-optimization.patch + * Fix ABI incompatibility when libLLVM (built with clang) is + linked to a program build with gcc. (boo#1119092) + +------------------------------------------------------------------- +Tue Oct 23 07:52:09 UTC 2018 - msrb@suse.com + +- opt-viewer-Find-style-css-in-usr-share.patch + * Make sure opt-viewer installed in /usr/bin can find resources + from /usr/share/opt-viewer. (boo#1112730) + +------------------------------------------------------------------- +Fri Oct 19 12:32:11 UTC 2018 - msrb@suse.com + +- llvm-unittests-Don-t-install-TestPlugin.so.patch + * It is only used for testing and is causing failures when + processing LLVMExports.cmake. + +------------------------------------------------------------------- +Tue Aug 28 06:58:07 UTC 2018 - msrb@suse.com + +- Update to llvm 7.0.0 + * For details, see the release notes: + https://llvm.org/releases/7.0.0/docs/ReleaseNotes.html + https://llvm.org/releases/7.0.0/tools/clang/docs/ReleaseNotes.html + https://llvm.org/releases/7.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html + https://llvm.org/releases/7.0.0/tools/lld/docs/ReleaseNotes.html + +- Remove no longer needed patches: + * llvm6-fix-gdb-index-crash.patch + * lldb-fix-build-with-python-3.7.patch + * lldb-add-pthread-dl-libs.patch + * polly-cmake-Trust-pkg-config-in-FindJsoncpp.patch + +- Add tests-use-python3.patch + * Prevents tests from failing because of missing python 2. + +- Add llvm-better-detect-64bit-atomics-support.patch + * Fixes build on i586. + +------------------------------------------------------------------- +Mon Aug 27 11:30:36 UTC 2018 - msrb@suse.com + +- Updated llvm-remove-clang-only-flags.patch + - Exclude also "-Werror=unguarded-availability-new" (bsc#1106000) + +------------------------------------------------------------------- +Wed Jul 25 07:29:54 UTC 2018 - msrb@suse.com + +- Update to llvm 6.0.1 + * This release contains bug-fixes for the LLVM 6.0.0 release. It + is API and ABI compatible with 6.0.0. +- Remove no longer needed llvm6-fix-InstCombine.patch +- Add lldb-fix-build-with-python-3.7.patch + * Fix build with python 3.7 + +------------------------------------------------------------------- +Fri Jun 29 00:21:52 UTC 2018 - l.lunak@centrum.cz + +- llvm6-fix-gdb-index-crash.patch + * From upstream, fix lld --gdb-index crash. + +------------------------------------------------------------------- +Thu Jun 14 10:21:57 UTC 2018 - msrb@suse.com + +- Do not requires gcc6 for older sle versions. + * llvm6 is not built on <= 12 SP3 and this was preventing build + on 12 SP4. + +------------------------------------------------------------------- +Thu May 17 15:26:21 UTC 2018 - msrb@suse.com + +- llvm_build_tablegen_component_as_shared_library.patch + * Build TableGen component as its own shared library because it + is not included in the libLLVM library and is needed for ldc. + (bsc#1086445) + +------------------------------------------------------------------- +Thu May 17 11:18:46 UTC 2018 - tchvatal@suse.com + +- Add patch llvm6-fix-InstCombine.patch to fix InstCombine init + * Will be fixed in 6.0.1 release + +------------------------------------------------------------------- +Wed May 9 10:32:04 UTC 2018 - msrb@suse.com + +- Do not build stage1 with debug info. It was accidentally added + with the use of %optflags. This should fix out of memory errors + on 32bit architectures and speed up build everywhere else. + (bsc#1092697) + +------------------------------------------------------------------- +Wed Apr 11 09:18:29 UTC 2018 - msrb@suse.com + +- llvm-build-tests-with-rtti.patch + * Fixes build failure with gcc 8. (bnc#1087136) + +------------------------------------------------------------------- +Thu Apr 5 09:33:40 UTC 2018 - msrb@suse.com + +- Do not export Polly static libraries which we do not distribute. + * Updated llvm-do-not-install-static-libraries.patch +- Use external jsoncpp instead of the bundled one. + * Added polly-cmake-Trust-pkg-config-in-FindJsoncpp.patch +- llvm6-devel must require llvm6-polly-devel + * Files in llvm6-devel reference Polly. + +------------------------------------------------------------------- +Mon Mar 19 13:53:06 UTC 2018 - msrb@suse.com + +- Update to llvm 6.0.0 + * Added polly + * Notable changes: + - Retpoline Spectre variant 2 mitigation + - GlobalISel by default for AArch64 at -O0 + - improved scheduling on several x86 micro-architectures + - Clang defaults to -std=gnu++14 instead of -std=gnu++98 + - support for some upcoming C++2a features + - improved optimizations, new compiler warnings, many bug + fixes, and more. + +- Use alternatives for clang's bash autocomplete to prevent + conflicts with other versions. + +------------------------------------------------------------------- +Thu Feb 15 11:38:38 UTC 2018 - msrb@suse.com + +- Remove liblldb5 and lldb5-devel from baselibs.conf. They are only + build for x86_64, so no point having them in baselibs.conf. + +------------------------------------------------------------------- +Wed Feb 7 14:21:48 UTC 2018 - msrb@suse.com + +- Use %optflags, except for FORTIFY_SOURCE which is not compatible + with compiler-rt. +- Exclude static libraries differently. + * Drop llvm-split-static-library-exports-into-their-own-export-file.diff + * Drop clang-split-static-library-exports-into-their-own-export-file.diff + * Update llvm-do-not-install-static-libraries.patch to not use + EXCLUDE_FROM_ALL which is not available in cmake 3.5. + - This fixes build on SLE12. +- Do not force gcc6 on OpenSUSE - fixes build. +- Reduce the amount of concurent link jobs by increasing their + memory requirement - to reduce stalls in OBS. + +------------------------------------------------------------------- +Wed Jan 31 08:48:48 UTC 2018 - msrb@suse.com + +- Cleanup %ifarch conditions, remove targets unintentionally added + to s390/s390x. (bnc#1078436) + +------------------------------------------------------------------- +Tue Jan 30 09:24:22 UTC 2018 - msrb@suse.com + +- Limit the amount of parallel link jobs, but no longer limit + compile jobs. This should prevent running out of memory during + linking while not longer slowing down compilation. +- Remove build dependency on procps + +------------------------------------------------------------------- +Mon Jan 29 12:17:55 UTC 2018 - msrb@suse.com + +- Reduce disk size requirement to 30GB in _constraints. We no + longer need that much since we stopped building static libraries. + +------------------------------------------------------------------- +Thu Jan 18 15:23:59 UTC 2018 - msrb@suse.com + +- n_clang_allow_BUILD_SHARED_LIBRARY.patch + * Allow buildling clang with BUILD_SHARED_LIBRARY while the rest + is built with LLVM_LINK_LLVM_DYLIB. (bnc#1065464) +- Remove clang-devel-static. + +------------------------------------------------------------------- +Wed Jan 10 14:56:18 UTC 2018 - msrb@suse.com + +- Place gold plugin to the right directory. (bnc#1073210) + * It must be in /usr/lib/bfd-plugins on all architectures. + * Remove llvm5-gold from baselibs.conf - nothing needs a 32bit + version of it and it would now conflict with the 64bit one. +- Reduce _constraints requirements on 32bit architectures. + * Since we had to disable debuginfo on them, they require much + less. + +------------------------------------------------------------------- +Wed Jan 10 10:24:49 UTC 2018 - normand@linux.vnet.ibm.com + +- ignore make check error for PowerPC as bypass + https://bugs.llvm.org/show_bug.cgi?id=35871 + +------------------------------------------------------------------- +Mon Jan 8 13:12:13 UTC 2018 - dmueller@suse.com + +- disable debuginfo build for ARM as well + +------------------------------------------------------------------- +Fri Jan 5 08:55:59 UTC 2018 - msrb@suse.com + +- Delete intermediate files during build to reduce total disk usage + (bnc#1074625) + +------------------------------------------------------------------- +Thu Jan 4 10:28:07 UTC 2018 - msrb@suse.com + +- Update to llvm 5.0.1 + * This release contains bug-fixes for the LLVM 5.0.0 release. + * This release is API and ABI compatible with 5.0.0. +- llvm-do-not-install-static-libraries.patch + * Updated. + +------------------------------------------------------------------- +Fri Dec 22 08:56:05 UTC 2017 - fcrozat@suse.com + +- Increase minimum memory and disk sizes required for building in + _constraints. + +------------------------------------------------------------------- +Wed Dec 13 16:30:20 UTC 2017 - msrb@suse.com + +- Rename python3-lldb to python3-lldb5 so it can work with llvm + meta package. + +------------------------------------------------------------------- +Mon Dec 11 10:33:00 UTC 2017 - msrb@suse.com + +- Rename python packages to follow naming conventions. +- Remove unnecessary dependencies on python3. +- Make opt-viewer not require python2. + * opt-viewer-Do-not-require-python-2.patch + +------------------------------------------------------------------- +Mon Dec 4 15:41:52 UTC 2017 - msrb@suse.com + +- Switch to python3. +- Fix %check tests when used with python3. + * Define LANG=C.UTF-8 when running the tests. +- Add explicit Provides/Conflicts to llvm5-devel, + clang5-devel-static and lldb5-devel. + * These are required to be validated by obs repo-checker. + +------------------------------------------------------------------- +Fri Dec 1 08:52:55 UTC 2017 - msrb@suse.com + +- Use LLVM_OPTIMIZED_TABLEGEN to speed up build. (bnc#1064786) +- Fix files of lldb4 to work correctly with update-alternatives. +- Remove Conflicts clang(LLDB) from lldb4-devel - it does not + exist. It would be provided automatically, but no such cmake file + is installed. +- llvm-do-not-install-static-libraries.patch + * Do not install static libraries instead of installing them and + deleting after. + * Reduces disk usage during build. (bnc#1064786) +- Do not build unnecessary parts during stage1. + * Speeds up build a bit. (bnc#1064786) + +------------------------------------------------------------------- +Mon Nov 20 08:45:53 UTC 2017 - msrb@suse.com + +- Updated baselibs.conf to reference version 5 packages. +- Deleted rogue llvm5.spec.r29 file. +- Deleted arm_suse_support.diff, llvm-add_a_LLVM_USE_LINKER.patch, + libsanitizer.patch. + - No longer used, applied already in the source. + +------------------------------------------------------------------- +Tue Oct 17 07:31:06 UTC 2017 - msrb@suse.com + +- llvm-normally-versioned-libllvm.patch + * Change libLLVM naming scheme to match our naming guidelines. + * The reasons for the original naming scheme are no longer valid, + more details in the patch. + +------------------------------------------------------------------- +Fri Oct 13 09:09:15 UTC 2017 - msrb@suse.com + +- Disable all thread related tests in libcxx. Many of them use + timeouts to detect failure. They can fail randomly if the machine + is under heavy load (happens often in OBS). + +------------------------------------------------------------------- +Tue Oct 10 12:14:31 UTC 2017 - msrb@suse.com + +- Drop llvm5-devel-static. llvm5-devel contains shared library with + the same content. + +------------------------------------------------------------------- +Mon Oct 9 10:58:51 UTC 2017 - msrb@suse.com + +- Increase disk space requirement in _constraints to 45GB. + Otherwise the build gets stuck in random places. + +- Skip build of lldb5 python on distributions with swig < 3.0.11 + +------------------------------------------------------------------- +Wed Aug 30 12:08:18 UTC 2017 - msrb@suse.com + +- Copy from llvm4. +- Update to llvm 5.0.0. + +------------------------------------------------------------------- +Wed Aug 30 12:08:17 UTC 2017 - msrb@suse.com + +- Use LLVM_BUILD_LLVM_DYLIB instead of BUILD_SHARED_LIBS to build + single libLLVM library. This is the recommended way. The old way + was causing various issues. + * llvm-split-static-library-exports-into-their-own-export-file.diff + * clang-split-static-library-exports-into-their-own-export-file.diff + (bnc#1049703) + +- Add lld, linker for Clang/LLVM + (sr#517692) + +- Include clang++-MAJOR.MINOR symbolic link + (bnc#1012260) + +- Remove unnecessary dependency on flex and bison. + +- Make sure all binaries are managed by update-alternatives + +- Add llvm-add_a_LLVM_USE_LINKER.patch and link using gold to + prevent memory exhaustion on some build machines. + +- Reduce debuginfo on x86 architecture. LLVM libraries are so big that they + exhaust all memory on 32 bit machine if linked with full debuginfo. + +- Speed up build by skipping parts that are not required in stage1. + +- Build lldb in-tree as one of the llvm tools. + +------------------------------------------------------------------- +Tue Aug 29 11:32:24 UTC 2017 - meissner@suse.com + +- clang-ignore-stack-clash-protector.patch: ignore -fstack-clash-protection + for now. + +------------------------------------------------------------------- +Tue Aug 8 08:02:38 UTC 2017 - schwab@suse.de + +- xlocale.patch: don't use obsolete +- libsanitizer.patch: fix use of undocumented types + +------------------------------------------------------------------- +Sun Jul 16 18:16:07 UTC 2017 - dmueller@suse.com + +- build fixes for armv6 (skip testsuite as it requires 64bit, + set the list of targets to include ARM and remove triplet hack) + +------------------------------------------------------------------- +Sat Jul 1 01:52:09 UTC 2017 - jimmy@boombatower.com + +- Include provides and conflics in baselibs.conf for llvm4-devel, + clang4-devel, llvm4-LTO-devel, and llvm4-gold. + +------------------------------------------------------------------- +Mon Jun 26 09:10:01 UTC 2017 - idonmez@suse.com + +- Update to version 4.0.1 + * Minor bugfixes + +------------------------------------------------------------------- +Fri Jun 2 12:42:08 UTC 2017 - idonmez@suse.com + +- Use gcc6 only for SLE boo#1041469 + +------------------------------------------------------------------- +Tue May 9 08:29:31 UTC 2017 - idonmez@suse.com + +- Package libLLVMFuzzer + +------------------------------------------------------------------- +Wed Apr 19 15:08:25 UTC 2017 - dmueller@suse.com + +- readd arm_suse_support.diff which was accidentally removed + in the 4.0.0 update + +------------------------------------------------------------------- +Wed Apr 5 12:09:39 UTC 2017 - afaerber@suse.de + +- Enable AMDGPU and NVPTX targets everywhere except for S/390. + The AMDGPU target is needed for Mesa Clover (sr#485802). + +------------------------------------------------------------------- +Tue Apr 4 09:14:41 UTC 2017 - idonmez@suse.com + +- Use gcc6 on SLE12 + +------------------------------------------------------------------- +Thu Mar 30 11:33:27 UTC 2017 - idonmez@suse.com + +- Package license & credits + +------------------------------------------------------------------- +Mon Mar 27 07:58:36 UTC 2017 - idonmez@suse.com + +- Update to version 4.0.0 + * See + + http://releases.llvm.org/4.0.0/docs/ReleaseNotes.html and + + http://releases.llvm.org/4.0.0/tools/clang/docs/ReleaseNotes.html + + http://releases.llvm.org/4.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html +- Drop the following patches, fixed upstream: + amdgpu_revert_r280589.patch + arm_suse_support.diff + clang-fix-substitutions-abi_tag.patch + clang-incomplete-field-types.patch + glibc-2.24-libcxx.patch + llvm-install-CheckAtomic.patch + revert-cmake-soname.patch + +------------------------------------------------------------------- +Fri Feb 24 13:26:11 UTC 2017 - idonmez@suse.com + +- Enable BPF for all arches bsc#1026191 + +------------------------------------------------------------------- +Wed Jan 25 12:06:36 UTC 2017 - idonmez@suse.com + +- libc++ must depend on libc++abi + +------------------------------------------------------------------- +Wed Jan 25 10:13:44 UTC 2017 - idonmez@suse.com + +- Stop using otherproviders() due to an rpm parser bug, use + self-conflicts instead as suggested by mls. + +------------------------------------------------------------------- +Tue Jan 24 08:38:09 UTC 2017 - idonmez@suse.com + +- Add amdgpu_revert_r280589.patch to fix an amdgpu regression + bsc#1021577 + +------------------------------------------------------------------- +Tue Jan 17 09:37:34 UTC 2017 - jslaby@suse.com + +- Require LLVMgold and libLTO in llvm-devel, otherwise we get in CMake: + The imported target "LLVMgold" references the file + "/usr/lib64/LLVMgold.so" but this file does not exist. + This happens when requiring llvm3_9-devel directly, not llvm-devel. + +------------------------------------------------------------------- +Wed Dec 21 10:47:15 UTC 2016 - idonmez@suse.com + +- Update to version 3.9.1 + * See: + + http://llvm.org/releases/3.9.1/docs/ReleaseNotes.html + + http://llvm.org/releases/3.9.1/tools/clang/docs/ReleaseNotes.html + + http://llvm.org/releases/3.9.1/tools/clang/tools/extra/docs/ReleaseNotes.html + +------------------------------------------------------------------- +Wed Sep 28 22:06:59 UTC 2016 - toddrme2178@gmail.com + +- Update to version 3.9.0 + * Clang now supports the G++ abi_tag attribute. + * Clang will no longer pass --build-id by default to the linker. + * Improved C++1z support in Clang. + * Clang now has support for all OpenCL 2.0 features. + * Added support for all non-offloading features from OpenMP 4.5, + * The static analyzer now checks for incorrect usage of MPI APIs in C and C++. + * LLVM no longer does inter-procedural analysis and optimization + (except inlining) on functions with comdat linkage. + * LLVM now supports the Intel CPUs Skylake Server with AVX512 + (-march=skylake-avx512) and Knights Landing (-march=knl). + * More at: + + http://llvm.org/releases/3.9.0/docs/ReleaseNotes.html + + http://llvm.org/releases/3.9.0/tools/clang/docs/ReleaseNotes.html + + http://llvm.org/releases/3.9.0/tools/clang/tools/extra/docs/ReleaseNotes.html + * Fix the following patches: + + arm_suse_support.diff + + assume-opensuse.patch + + clang-resourcedirs.patch + + default-to-i586.patch + + glibc-2.23-libcxx.patch + + glibc-2.24-libcxx.patch + + lldb-add-pthread-dl-libs.patch + + lldb-cmake.patch + + llvm-fix-find-gcc5-install.patch + + llvm-remove-clang-only-flags.patch + + revert-cmake-soname.patch + + set-revision.patch + * Remove upstream-included patch: + + llvm-nonvoid-return.patch + * Remove patch for removed files: + + glibc-2.23-libcxx.patch +- Backport upstream patches: + * clang-fix-substitutions-abi_tag.patch + * clang-incomplete-field-types.patch + * llvm-install-CheckAtomic.patch +- Add clang%{_sonum}-include-fixer subpackage and associated + libfindAllSymbols%{_sonum} and libfindAllSymbols%{_sonum}-devel + subpackages. +- Add sanstats to llvm binary list. + +------------------------------------------------------------------- +Fri Sep 23 18:01:42 UTC 2016 - toddrme2178@gmail.com + +- Change update-alternatives to use %postun instead of %preun, + which is now what Factory maintainers are requesting. +- Use the minor version to set the update-alternatives priority so + the most recent version of the LLVM, Clang, and LLDB are used by + default. +- Add LLVM rpm macros so downstream packages can have some idea how + LLVM was built. + +------------------------------------------------------------------- +Tue Sep 20 15:47:16 UTC 2016 - toddrme2178@gmail.com + +- Rename libomp to make it possible to have multiple versions available. + +------------------------------------------------------------------- +Fri Sep 9 18:27:26 UTC 2016 - toddrme2178@gmail.com + +- Split the old llvm package into this version-specific package + and a wrapper package. +- Implement update-alternatives to allow parallel installation + of many of the subpackages. +- Rename subpackages that can be parallel-installed to a + version-specific name based on the associated shared library's + current .so number. +- Various fixes to support the above changes. + +------------------------------------------------------------------- +Wed Sep 7 10:05:32 UTC 2016 - tchvatal@suse.com + +- Sort a bit with spec-cleaner +- Remove the latest switch for now, things should be either coinstallable + or not, we don't need to bother around with compilation like this + +------------------------------------------------------------------- +Thu Aug 31 20:36:58 UTC 2016 - toddrme2178@gmail.com + +- Update to llvm 3.8.1 + * See http://llvm.org/releases/3.8.1/docs/ReleaseNotes.html and + http://llvm.org/releases/3.8.1/tools/docs/ReleaseNotes.html +- Use versioned libLLVM (to libLLVM3_8) and libclang (to libclang3_8) +- Change versioning of liblldb3_8 to liblldb-3_8 and use a variable + to control the name instead of hard-coding it. +- Use bcond_with and bcond_without to enable/disable build options + instead of hard-coding them. +- Put buildrequires as requires in -devel packages to avoid linker errors + when building packages against the -devel packages. +- Add ffi support (disabled by default). +- Add oprofile support (disabled by default). +- Add valgrind support (disabled by default). +- Link cmake files to the normal cmake file directory to allow autodetection + of cmake interfaces. +- Remove unused lldb components from main spec file. +- Split llvm python bindings into own subpackage. +- Split emacs plugin into own subpackage +- Move additional vim plugins into vim plugins package +- Split libc++, libLTO, LLVMgold, libomp, clang-chekers into own subpackages +- Make python-clang, llvm-vim-plugins, and llvm-emacs-plugins noarch since + they aren't architecture-specific. +- Make packages besides llvm, llvm-clang, and the shared libraries conflict + with other versions. This will be important when multiple LLVM versions + are supported. +- Various spec file cleanups +- Rebase patches: + * arm_suse_support.diff + * assume-opensuse.patch + * clang-resourcedirs.patch + * default-to-i586.patch + * glibc-2.23-libcxx.patch + * glibc-2.24-libcxx.patch + * lldb-add-pthread-dl-libs.patch + * lldb-cmake.patch + * llvm-fix-find-gcc5-install.patch + * llvm-nonvoid-return.patch + * llvm-remove-clang-only-flags.patch + * revert-cmake-soname.patch + * set-revision.patch + +------------------------------------------------------------------- +Fri Aug 26 10:03:56 UTC 2016 - tchvatal@suse.com + +- Start conversion to use cmake macros with now introduced + compatibility for ninja +- Reduce number of threads if we don't have enough memory +- Add patch for the nonvoid returns: + * llvm-nonvoid-return.patch + +------------------------------------------------------------------- +Thu Jul 28 09:59:01 UTC 2016 - normand@linux.vnet.ibm.com + +- for ppc64le set memory to 4GB in _constraints file + (failure in Factory:PowerPC) + +------------------------------------------------------------------- +Wed Jul 13 12:26:46 UTC 2016 - schwab@suse.de + +- glibc-2.24-libcxx.patch: fix libcxx testsuite for glibc 2.24 + +------------------------------------------------------------------- +Wed May 18 13:22:17 UTC 2016 - ronisbr@gmail.com + +- Build LLDB separated from LLVM. +- Re-enable python bindings for the LLDB API. + +------------------------------------------------------------------- +Wed May 18 11:14:38 UTC 2016 - idonmez@suse.com + +- Disable libcxx/lldb/openmp for SLE fate#319582 + +------------------------------------------------------------------- +Mon Apr 25 07:25:22 UTC 2016 - idonmez@suse.com + +- Update rpmlintrc to whitelist libLTO.so + +------------------------------------------------------------------- +Mon Apr 11 08:45:56 UTC 2016 - idonmez@suse.com + +- Re-enable glibc-2.23 patch for Tumbleweed + +------------------------------------------------------------------- +Sun Apr 10 19:18:41 UTC 2016 - dmueller@suse.com + +- fix arm_suse_support.diff for armv6hl +- adjust compile flags for llvm on armv6hl (fixes Mesa build) + +------------------------------------------------------------------- +Mon Apr 4 17:53:14 UTC 2016 - idonmez@suse.com + +- Update llvm-remove-clang-only-flags.patch to remove + -Wcovered-switch-default flag for gcc compatibility. + +------------------------------------------------------------------- +Wed Mar 16 09:28:51 UTC 2016 - idonmez@suse.com + +- Use gcc for stage1 bootstrap +- Add back libstdc++-devel dependency for clang since libc++ is + only available for x86-64 atm. + +------------------------------------------------------------------- +Thu Mar 10 12:05:39 UTC 2016 - idonmez@suse.com + +- Comment out glibc-2.23-libcxx.patch until glibc 2.23 actually + hits the Factory. + +------------------------------------------------------------------- +Tue Mar 8 18:52:11 UTC 2016 - idonmez@suse.com + +- Update to llvm 3.8.0 + * See http://llvm.org/releases/3.8.0/docs/ReleaseNotes.html and + http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html +- Fold lldb build into llvm and disable python support +- Drop clang-disable-ada-extension.patch, libcxxabi-exceptions.patch + and cmake-host-triple.patch +- Add revert-cmake-soname.patch to fix soname handling + +------------------------------------------------------------------- +Wed Mar 2 09:08:12 UTC 2016 - idonmez@suse.com + +- Add glibc-2.23-libcxx.patch to fix test failures with glibc 2.23 + +------------------------------------------------------------------- +Sat Oct 3 17:00:28 UTC 2015 - mimi.vx@gmail.com + +- Remove FFI support because its fragile + +------------------------------------------------------------------- +Sun Sep 27 12:03:57 UTC 2015 - idonmez@suse.com + +- Enable OpenMP for x86, x86_64, ppc64 and ppc64le + +------------------------------------------------------------------- +Mon Sep 14 13:10:49 UTC 2015 - idonmez@suse.com + +- Enable all targets on x86, x86_64 + +------------------------------------------------------------------- +Wed Sep 2 08:14:39 UTC 2015 - idonmez@suse.com + +- Update to version 3.7.0 + * See http://llvm.org/releases/3.7.0/docs/ReleaseNotes.html +- Merge aarch64-suse-support.patch into arm_suse_support.diff +- Refresh arm_suse_support.diff, llvm-fix-find-gcc5-install.patch +- Remove llvm-fix-parsearmarch.patch, upstream. + +------------------------------------------------------------------- +Tue May 26 11:54:49 CEST 2015 - ro@suse.de + +- fix build on s390x (one typo in ifarch and one change in filelist) + +------------------------------------------------------------------- +Mon May 25 13:59:37 UTC 2015 - idonmez@suse.com + +- Update to version 3.6.1 + * No changelog upstream + +------------------------------------------------------------------- +Fri Apr 24 12:19:33 UTC 2015 - idonmez@suse.com + +- Add llvm-fix-parsearmarch.patch to fix parsing armv{6,7}hl archs. + +------------------------------------------------------------------- +Mon Mar 2 10:12:32 UTC 2015 - idonmez@suse.com + +- Update to version 3.6.0 + * See http://llvm.org/releases/3.6.0/docs/ReleaseNotes.html +- Add python-xml dependency for regression tests +- Removed the following patches, fixed upstream: + * arm-remove-xfails.diff + * libcxx-libdir.patch + * llvm-config-lib64.patch + * llvm-fix-intrusiverefcntptr.patch + +------------------------------------------------------------------- +Fri Feb 20 13:40:11 UTC 2015 - rguenther@suse.com + +- Add llvm-fix-intrusiverefcntptr.patch to fix build of LLVM tools + with GCC 5. +- Add llvm-fix-find-gcc5-install.patch to properly find installed GCC 5. + +------------------------------------------------------------------- +Wed Jan 28 10:08:43 UTC 2015 - idonmez@suse.com + +- Add a gcc dependency for clang, this is heavyweight but we need + libgcc_s which comes with the gcc package (bnc#893359) + +------------------------------------------------------------------- +Fri Dec 12 12:36:22 UTC 2014 - idonmez@suse.com + +- Conditionalize libcxx{abi} build on build_libcxx variable +- Turn libc++.so into an ldscript so it links to libc++abi + automatically. + +------------------------------------------------------------------- +Tue Oct 21 08:39:22 UTC 2014 - dmueller@suse.com + +- fix constraints for armv6l/armv7l (there is no 4GB RAM on 32bit) + +------------------------------------------------------------------- +Mon Sep 29 09:40:52 UTC 2014 - idonmez@suse.com + +- Rename llvm-remove-werror-date-time.patch to + llvm-remove-clang-only-flags.patch and remove more clang only + flags. + +------------------------------------------------------------------- +Fri Sep 26 08:54:08 UTC 2014 - idonmez@suse.com + +- Enable shared libs on PPC64 + +------------------------------------------------------------------- +Thu Sep 25 10:16:50 UTC 2014 - idonmez@suse.com + +- Require llvm-clang not just clang + +------------------------------------------------------------------- +Wed Sep 17 11:01:31 UTC 2014 - idonmez@suse.com + +- Add llvm-remove-werror-date-time.patch to remove -Werror=date-time + for CXXFLAGS, gcc does not support it and it creeps into + llvm-config --cflags + +------------------------------------------------------------------- +Wed Sep 17 10:53:20 UTC 2014 - idonmez@suse.com + +- Remove wrong Requires from the llvm-devel package + +------------------------------------------------------------------- +Wed Sep 17 08:09:17 UTC 2014 - idonmez@suse.com + +- Add default target triple form ARM, fixes bnc#893359 + +------------------------------------------------------------------- +Fri Sep 5 16:09:45 UTC 2014 - idonmez@suse.com + +- Use ninja for building + +------------------------------------------------------------------- +Thu Sep 4 12:26:10 UTC 2014 - idonmez@suse.com + +- Update to llvm 3.5.0 + * Major update, see http://llvm.org/releases/3.5.0/docs/ReleaseNotes.html +- Use upstream pristine tarballs +- Add libc++/libc++abi support clang (only on x86_64) +- Add libcxxabi-exceptions.patch to fix libcxxabi exception handling +- Add libcxx-libdir.patch to fix libdir on 64bit arches +- Remove asan-disable-hugemalloctest.patch and + cmake-patchversion.patch, fixed upstream. + +------------------------------------------------------------------- +Fri Aug 15 14:23:39 UTC 2014 - idonmez@suse.com + +- Fix the sed line for minimal damage. + +------------------------------------------------------------------- +Wed Jul 23 19:45:30 UTC 2014 - idonmez@suse.com + +- Add baselibs.conf to source files + +------------------------------------------------------------------- +Wed Jul 23 17:00:40 UTC 2014 - idonmez@suse.com + +- Add cmake-patchversion.patch to sync config.h.in + with config.h.cmake + +------------------------------------------------------------------- +Tue Jul 22 12:09:53 UTC 2014 - idonmez@suse.com + +- Update to llvm 3.4.2 + * Minor bugfix release +- Drop clang-max_align_t.patch, applied upstream. + +------------------------------------------------------------------- +Sat Jun 21 13:40:52 UTC 2014 - arnaud@versini.eu + +- Add clang-max_align_t.patch to resolve issue with libstdc++ 4.9 + max_align_t missing declaration + +------------------------------------------------------------------- +Tue May 13 10:44:33 UTC 2014 - peter.trommler@ohm-hochschule.de + +- build compiler-rt on ppc64 (don't delete it) + +------------------------------------------------------------------- +Thu Apr 3 11:58:28 UTC 2014 - idonmez@suse.com + +- Fix resource dir for libclang case (clang-resourcedirs.patch) +- Always build tests + +------------------------------------------------------------------- +Sat Feb 22 18:18:57 CET 2014 - ro@suse.de + +- complete ifarchs for s390 + +------------------------------------------------------------------- +Fri Jan 24 13:15:48 UTC 2014 - idonmez@suse.com + +- Remove non-existing doc subpackage + +------------------------------------------------------------------- +Fri Jan 24 09:23:08 UTC 2014 - idonmez@suse.com + +- Add a dependency on ncurses-devel since libLLVM now links to + tinfo. + +------------------------------------------------------------------- +Tue Jan 14 13:57:57 UTC 2014 - idonmez@suse.com + +- Add 32bit libclang bnc#857131 + +------------------------------------------------------------------- +Tue Jan 7 08:47:50 UTC 2014 - idonmez@suse.com + +- Update to final llvm 3.4 release + * See http://llvm.org/releases/3.4/docs/ReleaseNotes.html for + complete changelog. + +------------------------------------------------------------------- +Tue Dec 24 13:47:24 UTC 2013 - idonmez@suse.com + +- Update to final release candidate (r197980) + +------------------------------------------------------------------- +Sat Dec 21 18:20:20 UTC 2013 - idonmez@suse.com + +- Update to r197866 from release_34 branch + +------------------------------------------------------------------- +Tue Dec 17 11:31:23 UTC 2013 - idonmez@suse.com + +- Update to r197490 from release_34 branch + +------------------------------------------------------------------- +Thu Dec 12 10:43:42 UTC 2013 - idonmez@suse.com + +- Update to r197142 from release_34 branch +- Disable assertions again now that PPC64 backend is fixed + +------------------------------------------------------------------- +Tue Dec 10 09:48:59 UTC 2013 - idonmez@suse.com + +- Update to r196899 from release_34 branch +- Remove compiler_rt-r196612.patch, merged upstream + +------------------------------------------------------------------- +Mon Dec 9 11:42:44 UTC 2013 - idonmez@suse.com + +- Add compiler_rt-r196612.patch to fix ubsan failures on i586 + +------------------------------------------------------------------- +Mon Dec 9 08:54:48 UTC 2013 - idonmez@suse.com + +- Update to r196762 from release_34 branch + +------------------------------------------------------------------- +Mon Dec 9 02:23:07 UTC 2013 - dvaleev@suse.com + +- enable ppc64le + +------------------------------------------------------------------- +Thu Dec 5 13:10:13 UTC 2013 - idonmez@suse.com + +- Update to r196503 from release_34 branch to get compiler_rt fixes + +------------------------------------------------------------------- +Thu Dec 5 08:31:52 UTC 2013 - idonmez@suse.com + +- Update to r196487 from release_34 branch to get compiler_rt fixes + +------------------------------------------------------------------- +Wed Dec 4 13:33:55 UTC 2013 - idonmez@suse.com + +- Ship cmake files for llvm (needed for lldb and such) + +------------------------------------------------------------------- +Wed Dec 4 10:07:59 UTC 2013 - idonmez@suse.com + +- Update to r196371 from release_34 branch + +------------------------------------------------------------------- +Wed Dec 4 03:27:29 UTC 2013 - termim@gmail.com + +- install python binding to libclang + +------------------------------------------------------------------- +Mon Dec 1 08:42:08 UTC 2013 - idonmez@suse.com + +- Update to r196358 from llvm 3.4 branch +- Add asan-disable-hugemalloctest.patch to disable + ASAN HugeMallocTest, it requires 4.1+ GB of RAM. +- Refresh patches + * aarch64-suse-support.patch + * arm_suse_support.diff + * assume-opensuse.patch + * default-to-i586.patch +- Drop upstream patches + * llvm-disable-pretty-stack-trace.patch + * r189852.diff + * unreachable-code.patch + * llvm-no-visibility.patch + +------------------------------------------------------------------- +Tue Oct 22 20:57:00 UTC 2013 - dmueller@suse.com + +- add r189852.diff: Remove vtables optimisation that breaks ARM + and PowerPC +- Disable testsuite on ARMv7, takes forever to run + +------------------------------------------------------------------- +Thu Oct 17 10:23:32 UTC 2013 - schwab@suse.de + +- Fix file list for %arm + +------------------------------------------------------------------- +Wed Oct 9 11:16:08 UTC 2013 - dmueller@suse.com + +- use %arm, not arm in arch conditions +- add arm-remove-xfails.diff: remove XFAILs in testsuite + that pass and thereby make check fail + +------------------------------------------------------------------- +Fri Sep 27 15:15:58 UTC 2013 - idonmez@suse.com + +- Set DisablePrettyStackTrace to true since it messes up signal + handling. bnc#839074 and fdo#60929 implemented with + llvm-disable-pretty-stack-trace.patch) + +------------------------------------------------------------------- +Wed Aug 28 20:31:11 UTC 2013 - schwab@suse.de + +- Fix filelist for aarch64 + +------------------------------------------------------------------- +Wed Aug 28 11:07:16 UTC 2013 - schwab@suse.de + +- aarch64-suse-support.patch: Enable AArch64 suse toolchain support + +------------------------------------------------------------------- +Wed Aug 28 11:02:06 UTC 2013 - idonmez@suse.com + +- Add s390x support + +------------------------------------------------------------------- +Wed Aug 28 10:57:32 UTC 2013 - idonmez@suse.com + +- Remove unused chrpath dependency +- Re-enable ARCMT since libclang depends on it + +------------------------------------------------------------------- +Mon Aug 26 07:23:57 UTC 2013 - schwab@suse.de + +- Define host_triple for aarch64 + +------------------------------------------------------------------- +Thu Aug 22 10:59:28 UTC 2013 - idonmez@suse.com + +- Fix ARMv6 build + +------------------------------------------------------------------- +Wed Aug 21 11:04:35 UTC 2013 - idonmez@suse.com + +- Only enable PowerPC on ppc64 + +------------------------------------------------------------------- +Mon Aug 12 16:43:26 UTC 2013 - idonmez@suse.com + +- Disable shared libs on PowerPC +- Disable ARCMT, it only makes sense for iOS/OSX + +------------------------------------------------------------------- +Tue Aug 6 05:51:46 UTC 2013 - idonmez@suse.com + +- Fix build + +------------------------------------------------------------------- +Wed Jul 17 12:54:40 UTC 2013 - idonmez@suse.com + +- Disable building unit-tests, should fix undefined reference + problem on ARM & PowerPC + +------------------------------------------------------------------- +Tue Jul 16 08:35:00 UTC 2013 - coolo@suse.com + +- do not build on slow or low memory workers + +------------------------------------------------------------------- +Thu Jul 4 11:55:43 UTC 2013 - idonmez@suse.com + +- Drop disable_neon_in_armv7.diff, neon seems to be working fine +- Add cmake-host-triple.patch to pass a host triple argument + +------------------------------------------------------------------- +Wed Jul 3 13:13:25 UTC 2013 - idonmez@suse.com + +- Create libLLVM and libclang subpackages. + +------------------------------------------------------------------- +Wed Jun 19 12:58:24 UTC 2013 - llunak@suse.com + +- Fix finding internal headers on x86_64 + +------------------------------------------------------------------- +Wed Jun 19 12:41:30 UTC 2013 - idonmez@suse.com + +- Fix ARM v5/v7 builds + +------------------------------------------------------------------- +Tue Jun 18 13:42:57 UTC 2013 - tobias.johannes.klausmann@mni.thm.de + +- Create a baselibs.conf + Provide *-32 Bit Packages for x86_64 + +------------------------------------------------------------------- +Thu Jun 13 18:33:31 UTC 2013 - tobias.johannes.klausmann@mni.thm.de + +- Initial version of a cmake based buildscript + + Updated arm_suse_support.diff (patch6) to work with llvm 3.3 + + Set version in spec to 3.3 + +------------------------------------------------------------------- +Thu Jun 13 11:42:33 UTC 2013 - idonmez@suse.com + +- Update to final 3.3 release (r183898) + +------------------------------------------------------------------- +Fri May 24 11:21:39 UTC 2013 - idonmez@suse.com + +- Disable debug symbols on PPC64 + +------------------------------------------------------------------- +Tue May 21 09:46:02 UTC 2013 - idonmez@suse.com + +- Update to version 3.3 RC2 + * Small bugfixes + +------------------------------------------------------------------- +Tue May 14 11:23:07 UTC 2013 - idonmez@suse.com + +- Enable ARM64 support + +------------------------------------------------------------------- +Thu May 9 09:05:41 UTC 2013 - idonmez@suse.com + +- Add unreachable-code.patch to fix unreachable code warnings on SLE + +------------------------------------------------------------------- +Wed May 8 08:56:28 UTC 2013 - idonmez@suse.com + +- Update to version 3.3 RC1 + * Added support for AArch64, ARM’s 64-bit architecture. + * LLVM now has a new SLP vectorizer. + * LLVM and clang now support IBM’s z/Architecture. + * The R600 backend was added in this release, it supports + AMD GPUs (HD2XXX - HD7XXX). + * See http://llvm.org/releases/3.3/docs/ReleaseNotes.html for + complete changelog. + +- Drop upstream patches: + * pr13303.patch + * pr14795.patch + * pr14831.patch + * python-ulimit.patch + +------------------------------------------------------------------- +Wed Jan 16 18:38:01 UTC 2013 - llunak@suse.com + +- pr13303.patch: reapply, was temporarily reverted upstream + +------------------------------------------------------------------- +Fri Jan 11 11:56:09 UTC 2013 - idonmez@suse.com + +- Add pre-generated doc files, remove sphinx dependency + +------------------------------------------------------------------- +Tue Jan 8 15:16:56 UTC 2013 - llunak@suse.com + +- pr14795.patch: Fix incorrect line numbers after -frewrite-includes + (PR#14795) +- pr14831.patch: Do not incorrectly warn about pragmas in -frewrite-includes + (PR#14831) + +------------------------------------------------------------------- +Mon Dec 31 09:29:12 UTC 2012 - dmueller@suse.com + +- disable cross-compile mode in stage2 for armv5/v7 + +------------------------------------------------------------------- +Thu Dec 20 14:51:18 UTC 2012 - idonmez@suse.com + +- Update to final 3.2 release + * No code changes since rc3 + +------------------------------------------------------------------- +Sun Dec 16 08:44:03 UTC 2012 - idonmez@suse.com + +- Update to r170281 from release_32 branch + * SROA fixes + +------------------------------------------------------------------- +Fri Dec 14 18:13:40 UTC 2012 - idonmez@suse.com + +- Disable compilation on PPC, only PPC64 is supported. + +------------------------------------------------------------------- +Fri Dec 14 13:18:39 UTC 2012 - idonmez@suse.com + +- Add python-ulimit.patch: Don't set a limit on address space. + This enables us running tests on PowerPC. + +------------------------------------------------------------------- +Wed Dec 12 11:08:16 UTC 2012 - idonmez@suse.com + +- Unbreak PowerPC support + +------------------------------------------------------------------- +Sat Dec 8 15:45:07 UTC 2012 - idonmez@suse.com + +- Update to r169678 from release_32 branch + * This is 3.2rc3 + +------------------------------------------------------------------- +Wed Dec 5 17:27:57 UTC 2012 - idonmez@suse.com + +- Update to r169391 from release_32 branch + * SROA fixes + +------------------------------------------------------------------- +Tue Dec 4 13:15:12 UTC 2012 - guillaume@opensuse.org + +- Fix ARM build + +------------------------------------------------------------------- +Mon Dec 3 13:32:14 UTC 2012 - schuetzm@gmx.net + +- Fix llvm-config --libdir to return /usr/lib64 where appropriate. + The old method of using sed on the executable does no longer + work, because llvm-config is now a binary. + +------------------------------------------------------------------- +Fri Nov 30 07:27:46 UTC 2012 - idonmez@suse.com + +- Update to r168987 from release_32 branch + * Crash fixes + * Miscompilation fixes + +------------------------------------------------------------------- +Tue Nov 20 08:59:09 UTC 2012 - idonmez@suse.com + +- Stop excluding ppc64 architecture + +------------------------------------------------------------------- +Tue Nov 20 08:25:54 UTC 2012 - idonmez@suse.com + +- Update to r168357 from release_32 branch + * Fixes a miscompilation with gcc 4.7 + +------------------------------------------------------------------- +Sun Nov 18 15:28:10 UTC 2012 - idonmez@suse.com + +- Update to r168286 from release_32 branch + * Fixes llvm PR14309 + +------------------------------------------------------------------- +Thu Nov 15 08:21:58 UTC 2012 - idonmez@suse.com + +- Update to r168031 from release_32 branch + * This is 3.2rc1 + +------------------------------------------------------------------- +Mon Nov 12 08:05:08 UTC 2012 - idonmez@suse.com + +- Update to r167720 from release_32 branch + * Thread local variables may have a specified TLS model. + * LLVM now has a loop optimizer. + * SROA has been rewritten to be more powerful. + * A new optimization pass added to merge stack objects + which are used in disjoint areas of the code. + * LLVM now merge consecutive loads and stores. + * New TableGen infrastructure to support bundling for + Very Long Instruction Word (VLIW) architectures. + * Added a new target independent VLIW packetizer. + * A probability based block placement and code layout algorithm + was added to LLVM's code generator. + * The ARM target now includes a full featured macro assembler, + including direct-to-object module support for clang. + * A new IR-level pass, called "TargetTransformInfo" provides + a number of low-level interfaces. + +- Refresh default-to-i586.patch to apply again +- Drop following patches (fixed upstream) + * arm-suse-support.patch + * pr12463.patch + * pr13141.patch + * pr13303.patch + * rewrite-includes.patch + * clang-fix-mips-test.patch (fixed differently in spec file) + +------------------------------------------------------------------- +Sat Oct 27 06:01:06 UTC 2012 - coolo@suse.com + +- add explicit buildrequire groff for man pages + +------------------------------------------------------------------- +Mon Sep 10 10:16:41 UTC 2012 - idonmez@suse.com + +- Fix debuginfo generation + +------------------------------------------------------------------- +Thu Jul 19 14:14:20 UTC 2012 - llunak@suse.com + +- make link time optimization plugin accessible to ar/nm/ranlib +- build the plugin properly + +------------------------------------------------------------------- +Thu Jul 14 17:30:58 UTC 2012 - adrian@suse.de + +- fix arm build + +------------------------------------------------------------------- +Fri Jul 13 21:03:40 UTC 2012 - llunak@suse.com + +- change rewrite-includes patch to use options to match upstream + changed option names + +------------------------------------------------------------------- +Fri Jul 13 10:14:15 UTC 2012 - llunak@suse.com + +- fix debuginfo generation (PR#13303) + +------------------------------------------------------------------- +Mon Jun 18 20:26:51 UTC 2012 - llunak@suse.com + +- Do not reject PCH because of -DFOO duplication (PR#13141) + +------------------------------------------------------------------- +Tue May 15 09:01:26 UTC 2012 - idonmez@suse.com + +- Update to final 3.1 release + +------------------------------------------------------------------- +Thu May 10 11:40:06 UTC 2012 - idonmez@suse.com + +- Depend on python-base so we don't pull whole Mesa + +------------------------------------------------------------------- +Tue May 8 08:21:42 UTC 2012 - llunak@suse.com + +- make -rewrite-includes support -C and -CC + +------------------------------------------------------------------- +Thu May 3 07:32:06 UTC 2012 - llunak@suse.com + +- patch for -rewrite-includes feature + +------------------------------------------------------------------- +Mon Apr 30 12:39:14 UTC 2012 - idonmez@suse.com + +- Update to svn revision 155819 from 3.1 branch + * C++11 fixes + +------------------------------------------------------------------- +Fri Apr 27 10:02:17 UTC 2012 - idonmez@suse.com + +- Update to svn revision 155700 from 3.1 branch + * Crash fixes + * C++11 fixes + +------------------------------------------------------------------- +Thu Apr 26 12:35:35 UTC 2012 - idonmez@suse.com + +- Update to svn revision 155574 from 3.1 branch + * Crash fixes + * Correctly enable compiler-rt + * Remove unneeded runtime python dependencies + +------------------------------------------------------------------- +Thu Apr 26 10:55:02 UTC 2012 - idonmez@suse.com + +- Switch to 2-stage bootstrap because we don't do build-compare + anyway. + +------------------------------------------------------------------- +Wed Apr 25 09:40:32 UTC 2012 - idonmez@suse.com + +- More fixes to llvm-config + +------------------------------------------------------------------- +Tue Apr 24 10:12:32 UTC 2012 - idonmez@suse.com + +- Fix llvm-config --libs output + +------------------------------------------------------------------- +Sun Apr 22 19:24:24 UTC 2012 - idonmez@suse.com + +- Update to svn revision 155320 from 3.1 branch + * AVX fixes + +------------------------------------------------------------------- +Tue Apr 17 07:48:50 UTC 2012 - idonmez@suse.com + +- Update to svn revision 154914 from 3.1 branch + + Major new features: + + * AddressSanitizer, a fast memory error detector. + * MachineInstr Bundles, Support to model instruction + bundling / packing. + * ARM Integrated Assembler, A full featured assembler + and direct-to-object support for ARM. + * Basic Block Placement Probability driven basic block placement. + + LLVM IR and Core Improvements + + * IR support for half float + * IR support for vectors of pointers, including vector GEPs. + * Module flags have been introduced. + * Loads can now have range metadata attached to them to + describe the possible values being loaded. + * Inline cost heuristics have been completely overhauled + and now closely model constant propagation through call sites, + disregard trivially dead code costs, and + can model C++ STL iterator patterns. + + Optimizer Improvements + + * The loop unroll pass now is able to unroll loops with + run-time trip counts. This feature is turned off by default, + and is enabled with the -unroll-runtime flag. + * A new basic-block autovectorization pass is available. + Pass -vectorize to run this pass along with some associated + post-vectorization cleanup passes. + + X86-32 and X86-64 Target Improvements + + * Bug fixes and improved support for AVX1 + * Support for AVX2 (still incomplete at this point) + + ARM Target Improvements + + * The constant island pass now supports basic block and + constant pool entry alignments greater than 4 bytes. + + Clang Changes + + * New: -Wdangling-else, -Wstrncat-size + * Improved: -Wformat, -Wempty-body, -Wliteral-conversion + * Clang 3.1 adds support for anonymous structs and anonymous unions, + added in the latest ISO C standard. Use -std=c11 or -std=gnu11 + to enable support for the new language standard. + The new C11 features are backwards-compatible and are available + as an extension in all language modes. + * All warning and language selection flags which previously accepted + c1x have been updated to accept c11. The old c1x forms have been removed. + * Generalized constant expressions + * Lambda expressions + * Generalized initializers + * Unrestricted unions + * User-defined literals + * Forward-declared enumerations + * Atomics (both libc++'s and libstdc++4.7's are supported) + + +------------------------------------------------------------------- +Tue Mar 20 12:40:27 UTC 2012 - idonmez@suse.com + +- Target i586-linux for 32bit builds + +------------------------------------------------------------------- +Tue Dec 27 21:33:48 UTC 2011 - idonmez@suse.com + +- Add upstream fix for llvm PR11642 + +------------------------------------------------------------------- +Sun Dec 25 15:29:46 UTC 2011 - idonmez@suse.com + +- Don't run gcc for ada files, just fail instead. + +------------------------------------------------------------------- +Thu Dec 22 15:33:24 UTC 2011 - idonmez@suse.com + +- Add clang-glibc2.14.patch to support glibc 2.14 headers +- Install profiling support + +------------------------------------------------------------------- +Mon Dec 5 13:19:22 UTC 2011 - idoenmez@suse.de + +- Switch to 3-stage bootstrap + +------------------------------------------------------------------- +Fri Dec 2 12:22:07 UTC 2011 - idoenmez@suse.de + +- Build first stage compiler with -O0 to workaround gcc 4.5 bug + +------------------------------------------------------------------- +Thu Dec 1 18:04:15 UTC 2011 - idoenmez@suse.de + +- Update to final 3.0 release + * No real change since rc2 + +------------------------------------------------------------------- +Tue Nov 29 13:23:32 UTC 2011 - idoenmez@suse.de + +- Use %{_lib} macro instead of checking for x86_64 + +------------------------------------------------------------------- +Wed Nov 16 14:28:17 UTC 2011 - idonmez@suse.com + +- Enable ARM support again +- Switch to optimized build + +------------------------------------------------------------------- +Thu Nov 10 14:54:50 UTC 2011 - idonmez@suse.com + +- Disable ARM support, VM goes out of memory while compiling it + +------------------------------------------------------------------- +Thu Nov 10 10:33:01 UTC 2011 - idonmez@suse.com + +- Really enable ARM support +- Remove forcing -frtti + +------------------------------------------------------------------- +Mon Nov 7 15:05:52 UTC 2011 - idonmez@suse.com + +- Update to r143961 from llvm-3.0 branch + * No longer hardcoding include paths + +------------------------------------------------------------------- +Mon Nov 7 09:17:40 UTC 2011 - idonmez@suse.com + +- Fix LLVMgold.so path for x86-64 + +------------------------------------------------------------------- +Sun Nov 6 22:03:12 UTC 2011 - idonmez@suse.com + +- Enable ld gold support + +------------------------------------------------------------------- +Tue Nov 1 11:31:57 UTC 2011 - idonmez@suse.com + +- Update r143456 from llvm-3.0 branch + * llvm/clang 3.0rc2 + +------------------------------------------------------------------- +Fri Oct 28 20:54:16 UTC 2011 - idonmez@suse.com + +- Add llvm-pr9614-part{1,2}.patch to fix LLVM PR9614 + +------------------------------------------------------------------- +Fri Oct 28 08:23:03 UTC 2011 - idonmez@suse.com + +- Fixup dependencies so that llvm-clang doesn't depend + on llvm-clang-devel + +------------------------------------------------------------------- +Tue Oct 25 07:13:47 UTC 2011 - idonmez@suse.com + +- Update to r142912 llvm-3.0 branch + * Fixes to python bindings + +------------------------------------------------------------------- +Fri Oct 21 06:57:07 UTC 2011 - idonmez@suse.com + +- Update to r142641 + * llvm/clang 3.0 rc1 + +------------------------------------------------------------------- +Thu Oct 20 17:56:08 UTC 2011 - idonmez@suse.com + +- Enable ARM code generation + +------------------------------------------------------------------- +Wed Oct 19 15:47:10 UTC 2011 - idonmez@suse.com + +- Fix libdir on x86_64 + +------------------------------------------------------------------- +Tue Oct 18 10:42:09 UTC 2011 - idonmez@suse.com + +- Update to r142341 + * First build from 3.0 branch + * -Wc++98-compat warnings for the lexer + * Add flags for the remaining shift related warnings + (-Wshift-count-negative, -Wshift-count-overflow). + * Only warn in -Wliteral-conversion if the conversion + loses information + * Added clang_getCompletionAnnotation and + clang_getCompletionNumAnnotations to retrieve annotations + from completion string. + * Add support for -std=gnu90 and -std=c++03, for compatibility + with modern gcc. +- Switch to tar.bz2 and remove xz dependency + +------------------------------------------------------------------- +Thu Sep 29 08:10:42 UTC 2011 - idonmez@suse.com + +- Update to r140780 + * Code cleanup + * Crash fixes + * Add support for alignment-specifiers in C1X and C++11 + * Introduce a new compiler switch: -fms-compatility + * Emit debug info for c++0x nullptr. + +------------------------------------------------------------------- +Tue Sep 13 07:36:30 UTC 2011 - idonmez@suse.com + +- Update to r139589 + * C++0x fixes + * PCH fixes + +------------------------------------------------------------------- +Thu Sep 1 14:03:14 UTC 2011 - idonmez@suse.com + +- Update to r138939 + * Many crash fixes. + * Performance optimizations. + * Allow C99 hexfloats in C++0x mode. + * Add missing function _mm_ucomige_sd to emmintrin.h. + +------------------------------------------------------------------- +Fri Aug 12 09:22:18 UTC 2011 - idonmez@novell.com + +- Update to r137452 + * Fix problems found by PVS-Studio + * More AVX fixes + * Many C++ fixes +- Add assume-opensuse.patch to remove dependency on openSUSE-release + +------------------------------------------------------------------- +Wed Aug 3 11:18:31 UTC 2011 - idonmez@novell.com + +- Update to r136773 + * Many AVX fixes + * Support for C++0x unicode string and character literals + +------------------------------------------------------------------- +Tue Jul 19 14:03:21 UTC 2011 - vljn@ovi.com + +- Update to r135431 + * API changes to match Mesa requirements + +------------------------------------------------------------------- +Mon Jul 11 08:33:59 UTC 2011 - idonmez@novell.com + +- Update to r134888 + * Type system rewrite + +------------------------------------------------------------------- +Sat Jul 9 09:27:17 UTC 2011 - idonmez@novell.com + +- Update to r134813 + * Mainly gcc compatibility fixes + +------------------------------------------------------------------- +Fri Jul 8 11:31:27 UTC 2011 - idonmez@novell.com + +- Update to r134698 + * Up to 80x speed improvements with -Wuninitialized + +------------------------------------------------------------------- +Thu Jul 7 11:37:40 UTC 2011 - idonmez@novell.com + +- Enable RTTI support +- Disable assertions because they are not thread safe +- Update to r134611 + * Many C++ fixes and speedups + * Updates for AVX instruction support + * gcc 4.6.1 support + +------------------------------------------------------------------- +Sat Jul 2 19:31:38 UTC 2011 - idonmez@novell.com + +- Fix manpage generation (bnc #703591) + +------------------------------------------------------------------- +Sun Jun 5 14:39:53 UTC 2011 - idonmez@novell.com + +- Update to r132667 + +------------------------------------------------------------------- +Sun May 29 16:34:46 UTC 2011 - idonmez@novell.com + +- Update to use cmake buildsystem +- Remove unmaintained ocaml support + +------------------------------------------------------------------- +Thu May 26 11:01:57 UTC 2011 - idonmez@novell.com + +- Drop ocaml support because its unmaintained +- Update to latest svn revision 132050 + + Start of the upcoming 3.0 version + + Support for gcc 4.6 c++ headers + + Better support for C++0x + +------------------------------------------------------------------- +Fri Apr 29 12:07:59 UTC 2011 - idoenmez@novell.com + +- Fix ocaml dependency + +------------------------------------------------------------------- +Thu Apr 7 08:22:48 UTC 2011 - idoenmez@novell.com + +- Update to 2.9 + + Type Based Alias Analysis (TBAA) is now implemented in clang + + LLVM now generates better debug information + + Inline assembly now supports multiple alternative constraints + +------------------------------------------------------------------- +Wed Apr 6 18:50:59 CEST 2011 - stepan@coresystems.de + +- drop revision from Requires: fields +- update to 2.8.99 revision 129008. + +------------------------------------------------------------------- +Mon Mar 7 20:09:51 CET 2011 - jslaby@suse.de + +- spec file cleanup + +------------------------------------------------------------------- +Wed Dec 22 11:41:15 UTC 2010 - dmacvicar@suse.de + +- Do not require specific ffi version but gather the + appropiate one from the distro + +------------------------------------------------------------------- +Fri Dec 10 04:57:21 UTC 2010 - reddwarf@opensuse.org + +- Fix compatibility with C++0x compilers (g++ 4.5) + +------------------------------------------------------------------- +Mon Nov 29 10:31:49 UTC 2010 - ismail@namtrac.org + +- Fix C include paths + +------------------------------------------------------------------- +Fri Nov 26 12:48:54 UTC 2010 - ismail@namtrac.org + +- Fix header path for openSUSE 11.4 +- Enabled PIC for x86 for loadable module support +- Enable package tests for llvm and clang +- Disable package timestamps to silence an rpmlint warning + +------------------------------------------------------------------- +Wed Jun 2 00:00:00 UTC 2010 - anschneider@exsuse.de + +- Fixed the build on x86 plattforms. +- Package the clang c++-analyzer. + +------------------------------------------------------------------- +Sat May 1 00:00:00 UTC 2010 - jslaby@suse.de + +- update to llvm 2.7 + +------------------------------------------------------------------- +Mon Mar 15 00:00:00 UTC 2010 - jslaby@suse.de + +- added vim plugins + +------------------------------------------------------------------- +Sun Mar 14 00:00:00 UTC 2010 - jslaby@suse.de + +- added libffi-devel to llvm-devel requires so that build does not fail +- fixed build of explicit constructors with gcc45 + +------------------------------------------------------------------- +Mon Nov 2 00:00:00 UTC 2009 - jslaby@suse.de + +- Initial 2.6 release + diff --git a/llvm14.spec b/llvm14.spec new file mode 100644 index 0000000..2d093d6 --- /dev/null +++ b/llvm14.spec @@ -0,0 +1,2078 @@ +# +# spec file for package llvm14 +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define _relver 14.0.0 +%define _version %_relver%{?_rc:rc%_rc} +%define _tagver %_relver%{?_rc:-rc%_rc} +%define _minor 14.0 +%define _sonum 14 +%define _itsme14 1 +# Integer version used by update-alternatives +%define _uaver 1400 +%define _soclang 13 +%define _socxx 1 + +%ifarch x86_64 aarch64 %arm +%bcond_without libcxx +%else +%bcond_with libcxx +%endif + +%ifarch aarch64 ppc64 ppc64le %{ix86} x86_64 +%bcond_without openmp +%else +%bcond_with openmp +%endif + +# We use gold where we want to use ThinLTO, but where lld isn't supported (well). +%ifarch %{ix86} ppc64 s390x +%bcond_without gold +%else +%bcond_with gold +%endif + +%ifarch x86_64 +%bcond_without lldb +%bcond_without lldb_python +%else +%bcond_with lldb +%bcond_with lldb_python +%endif + +# Disabled on ARM because it's awfully slow and often times out. (boo#1178070) +%ifarch %{ix86} ppc64 ppc64le s390x x86_64 +%bcond_without thin_lto +%else +%bcond_with thin_lto +%endif + +%bcond_with ffi +%bcond_with oprofile +%bcond_with valgrind +%bcond_without polly +%bcond_without lld + +%define _plv %{!?product_libs_llvm_ver:%{_sonum}}%{?product_libs_llvm_ver} + +# Expands to -n if we're providing the distribution default for the given package. +%define multisource() %{expand:%%{?_itsme%{expand:%%{!?product_libs_llvm_ver_%{1}:%%{_plv}}%%{?product_libs_llvm_ver_%{1}}}:-n}} + +# set_jobs type memory +# Set max__jobs so that every job of the given type has at least the +# given amount of memory. +%define set_jobs() \ + max_%{1}_jobs="%{?jobs:%{jobs}}" \ + if test -n "$max_%{1}_jobs" -a "$max_%{1}_jobs" -gt 1 ; then \ + max_jobs="$(($avail_mem / %2))" \ + test "$max_%{1}_jobs" -gt "$max_jobs" && max_%{1}_jobs="$max_jobs" && echo "Warning: Reducing number of %{1} jobs to $max_jobs because of memory limits" \ + test "$max_%{1}_jobs" -le 0 && max_%{1}_jobs=1 && echo "Warning: Not %{1}ing in parallel at all because of memory limits" \ + fi + +# Compatibility with distros that don't have /usr/libexec. +%if "%{_libexecdir}" == "%{_prefix}/libexec" +%define _libexecdir_fallback %{_libexecdir} +%else +%define _libexecdir_fallback %{_bindir} +%endif + +%define _dwz_low_mem_die_limit 40000000 +%define _dwz_max_die_limit 200000000 + +Name: llvm14 +Version: %_relver%{?_rc:~rc%_rc} +Release: 0 +Summary: Low Level Virtual Machine +License: Apache-2.0 WITH LLVM-exception AND NCSA +Group: Development/Languages/Other +URL: https://www.llvm.org/ +# NOTE: please see README.packaging in the llvm package for details on how to update this package +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/llvm-%{_version}.src.tar.xz +Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/clang-%{_version}.src.tar.xz +Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/clang-tools-extra-%{_version}.src.tar.xz +Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/compiler-rt-%{_version}.src.tar.xz +Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/libcxx-%{_version}.src.tar.xz +Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/libcxxabi-%{_version}.src.tar.xz +Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/openmp-%{_version}.src.tar.xz +Source7: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/lld-%{_version}.src.tar.xz +Source8: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/lldb-%{_version}.src.tar.xz +Source9: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/polly-%{_version}.src.tar.xz +Source10: https://github.com/llvm/llvm-project/raw/llvmorg-%{_tagver}/libunwind/include/mach-o/compact_unwind_encoding.h +# Docs are created manually, see below +Source50: llvm-docs-%{_version}.src.tar.xz +Source51: clang-docs-%{_version}.src.tar.xz +Source100: %{name}-rpmlintrc +Source101: baselibs.conf +# PATCH-FIX-OPENSUSE lto-disable-cache.patch -- Disable ThinLTO cache +Patch0: lto-disable-cache.patch +# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features +Patch2: assume-opensuse.patch +# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit +Patch3: default-to-i586.patch +Patch4: clang-resourcedirs.patch +Patch5: llvm-remove-clang-only-flags.patch +Patch6: llvm-fix-find-gcc5-install.patch +Patch9: link-clang-shared.patch +Patch10: link-clang-tools-extra-shared.patch +# PATCH-FIX-OPENSUSE lldb-cmake.patch -- Fix ncurses include path. +Patch11: lldb-cmake.patch +Patch13: llvm-normally-versioned-libllvm.patch +Patch14: llvm-do-not-install-static-libraries.patch +Patch20: llvm_build_tablegen_component_as_shared_library.patch +Patch21: tests-use-python3.patch +Patch22: llvm-better-detect-64bit-atomics-support.patch +Patch24: opt-viewer-Find-style-css-in-usr-share.patch +# PATCH-FIX-OPENSUSE check-no-llvm-exegesis.patch -- Don't let tests depend on llvm-exegesis. +# We don't build this because it's not useful without libpfm and can't link with libLLVM.so. +Patch25: check-no-llvm-exegesis.patch +# PATCH-FIX-OPENSUSE lld-default-sha1.patch +Patch26: lld-default-sha1.patch +# Fix lookup of targets in installed CMake files. (boo#1180748, https://reviews.llvm.org/D96670) +Patch33: CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch +# Make link dependencies of clang-repl private (https://reviews.llvm.org/D122546). +Patch34: clang-repl-private-deps.patch +# Fix build on ppc (boo#1197111, https://reviews.llvm.org/D122090) +Patch35: PPCISelLowering-Avoid-emitting-calls-to-__multi3.patch +BuildRequires: binutils-devel >= 2.21.90 +BuildRequires: cmake >= 3.13.4 +BuildRequires: fdupes +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: libstdc++-devel +BuildRequires: ninja +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: python3-base +BuildRequires: pkgconfig(libedit) +BuildRequires: pkgconfig(zlib) +Requires(post): update-alternatives +Requires(postun):update-alternatives +# llvm does not work on s390 +ExcludeArch: s390 +%if %{with gold} +BuildRequires: binutils-gold +%endif +%if %{with ffi} +BuildRequires: pkgconfig(libffi) +%endif +%if %{with valgrind} +BuildRequires: pkgconfig(valgrind) +%endif +%if %{with oprofile} +BuildRequires: oprofile-devel +%endif +Suggests: %{name}-doc + +%description +LLVM is a compiler infrastructure designed for compile-time, +link-time, runtime, and idle-time optimization of programs from +arbitrary programming languages. + +The compiler infrastructure includes mirror sets of programming +tools as well as libraries with equivalent functionality. + +%package -n libLLVM%{_sonum} +Summary: Libraries for LLVM +Group: System/Libraries + +%description -n libLLVM%{_sonum} +This package contains the shared libraries needed for LLVM. + +%package devel +Summary: Header Files for LLVM +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} +%if %{with openmp} +# Referenced by LLVMExports.cmake +Requires: libomp%{_sonum}-devel +%endif +Requires: libLLVM%{_sonum} = %{version} +Requires: libLTO%{_sonum} = %{version} +Requires: libstdc++-devel +Requires: libtool +Requires: llvm%{_sonum}-gold +%if %{with polly} +# Referenced by LLVMExports.cmake +Requires: llvm%{_sonum}-polly-devel +%endif +Requires: pkgconfig +Conflicts: llvm-devel-provider < %{version} +%if %{suse_version} <= 1500 +# llvm{5,7} in SLE/Leap 15.x used to have the man page for FileCheck. +Conflicts: llvm5 +Conflicts: llvm7 +%endif +Conflicts: cmake(LLVM) +Obsoletes: llvm%{_sonum}-LTO-devel <= %{version} +Provides: llvm%{_sonum}-LTO-devel = %{version} +Provides: llvm-devel-provider = %{version} +%if %{with ffi} +Requires: pkgconfig(libffi) +%endif +%if %{with valgrind} +Requires: pkgconfig(valgrind) +%endif +%if %{with oprofile} +Requires: oprofile-devel +%endif + +%description devel +This package contains library and header files needed to develop +new native programs that use the LLVM infrastructure. + +%package doc +Summary: Documentation for LLVM +Group: Documentation/HTML +Requires: %{name} = %{version} +# The docs used to be contained in the devel package. +Conflicts: llvm-devel-provider < 9.0.0 +Conflicts: llvm-doc-provider < %{version} +Provides: llvm-doc-provider = %{version} +BuildArch: noarch + +%description doc +This package contains documentation for the LLVM infrastructure. + +%package -n clang%{_sonum} +Summary: CLANG frontend for LLVM +Group: Development/Languages/C and C++ +URL: https://clang.llvm.org/ +Requires(post): update-alternatives +Requires(postun):update-alternatives +Recommends: clang-tools +Recommends: gcc +Recommends: glibc-devel +Recommends: libstdc++-devel +Suggests: clang%{_sonum}-doc +Suggests: libc++-devel + +%description -n clang%{_sonum} +This package contains the clang (C language) frontend for LLVM. + +%package -n clang-tools +Summary: Tools for Clang +Group: Development/Languages/C and C++ +URL: https://clang-analyzer.llvm.org/ +# Avoid multiple provider errors +Requires: clang%{_sonum} +# Some binaries used to be in the clang package. +Conflicts: clang5 +Conflicts: clang6 +# hmaptool used to be contained in the llvm package. +Conflicts: llvm5 +Conflicts: llvm6 +%if %{suse_version} <= 1500 +# llvm9 in SLE/Leap 15.x is still affected. +Conflicts: llvm9 +%endif +Conflicts: scan-build < %{version} +Conflicts: scan-view < %{version} +Provides: scan-build = %{version} +Provides: scan-view = %{version} +Conflicts: emacs-llvm < %{version} +Provides: emacs-llvm = %{version} +Conflicts: vim-plugin-llvm < %{version} + +%description -n clang-tools +This package contains tools and scripts for using Clang, including: +* bash completions for clang, +* the clang-doc tool, +* plugins for using clang-format, clang-rename, clang-include-fixer + in vim and emacs. +* scripts for using clang-format: git-clang-format and clang-format-diff, +* scripts for using clang-tidy: run-clang-tidy and clang-tidy-diff, +* scripts for using the Clang static analyzer: scan-build and scan-view, +* a script for using find-all-symbols: run-find-all-symbols. + +%package %{multisource libclang%{_soclang}} libclang%{_soclang} +Summary: Clang stable C API for indexing and code completion +Group: System/Libraries +Provides: libclang%{_soclang} = %{version} +Conflicts: libclang%{_soclang} < %{version} + +%description %{multisource libclang%{_soclang}} libclang%{_soclang} +This library exposes a limited C API for indexing and code completion for +code written in languages of the C family. +It is designed to be stable across major versions of LLVM. + +It corresponds to the header files in %{_includedir}/clang-c. + +%package -n libclang-cpp%{_sonum} +Summary: Clang full C++ API +Group: System/Libraries + +%description -n libclang-cpp%{_sonum} +This library exposes the full C++ API to Clang that is used to implement +all Clang tools. It is not stable across major LLVM versions. + +It corresponds to the header files in %{_includedir}/clang. + +%package -n clang%{_sonum}-devel +Summary: CLANG frontend for LLVM (devel package) +Group: Development/Libraries/C and C++ +Requires: %{name}-devel = %{version} +Requires: clang%{_sonum} = %{version} +Requires: clang-tools >= %{version} +Requires: libclang%{_soclang} >= %{version} +Requires: libclang-cpp%{_sonum} = %{version} +Conflicts: cmake(Clang) + +%description -n clang%{_sonum}-devel +This package contains the clang (C language) frontend for LLVM. +(development files) + +%package -n clang%{_sonum}-doc +Summary: Documentation for Clang +Group: Documentation/HTML +Conflicts: clang-doc-provider < %{version} +# The docs used to be contained in the devel package. +Conflicts: clang5-devel +Conflicts: clang6-devel +Conflicts: clang7-devel +Conflicts: clang8-devel +Provides: clang-doc-provider = %{version} +BuildArch: noarch + +%description -n clang%{_sonum}-doc +This package contains documentation for the Clang compiler. + +%package -n libLTO%{_sonum} +Summary: Link-time optimizer for LLVM +Group: System/Libraries + +%description -n libLTO%{_sonum} +This package contains the link-time optimizer for LLVM. + +%package gold +Summary: Gold linker plugin for LLVM +Group: Development/Tools/Building +Conflicts: llvm-gold-provider < %{version} +Provides: llvm-gold-provider = %{version} +Supplements: packageand(clang%{_sonum}:binutils-gold) + +%description gold +This package contains the Gold linker plugin for LLVM. + +%package -n libomp%{_sonum}-devel +Summary: MPI plugin for LLVM +Group: Development/Libraries/C and C++ +Conflicts: libomp-devel < %{version} +Provides: libomp-devel = %{version} + +%description -n libomp%{_sonum}-devel +This package contains the OpenMP MPI plugin for LLVM. + +%package %{multisource libcxx%{_socxx}} libc++%{_socxx} +Summary: C++ standard library implementation +Group: System/Libraries +URL: https://libcxx.llvm.org/ +Requires: libc++abi%{_socxx} = %{version} +Provides: libc++%{_socxx} = %{version} + +%description %{multisource libcxx%{_socxx}} libc++%{_socxx} +This package contains libc++, a new implementation of the C++ +standard library, targeting C++11. + +%package %{multisource libcxx_devel} libc++-devel +Summary: C++ standard library implementation (devel package) +Group: Development/Libraries/C and C++ +Requires: libc++%{_socxx} >= %{version} +Requires: libc++abi-devel = %{version} +Conflicts: libc++.so < %{version} +Provides: libc++.so = %{version} + +%description %{multisource libcxx_devel} libc++-devel +This package contains libc++, a new implementation of the C++ +standard library, targeting C++11. (development files) + +%package %{multisource libcxxabi%{_socxx}} libc++abi%{_socxx} +Summary: C++ standard library ABI +Group: System/Libraries +URL: https://libcxxabi.llvm.org/ +Provides: libc++abi%{_socxx} = %{version} + +%description %{multisource libcxxabi%{_socxx}} libc++abi%{_socxx} +This package contains the ABI for libc++, a new implementation +of the C++ standard library, targeting C++11. + +%package %{multisource libcxx_devel} libc++abi-devel +Summary: C++ standard library ABI (devel package) +Group: Development/Libraries/C and C++ +Requires: libc++abi%{_socxx} >= %{version} +Conflicts: libc++abi.so < %{version} +Provides: libc++abi.so = %{version} + +%description %{multisource libcxx_devel} libc++abi-devel +This package contains the ABI for libc++, a new implementation +of the C++ standard library, targeting C++11. +(development files) + +%package vim-plugins +Summary: Vim plugins for LLVM +Group: Productivity/Text/Editors +Supplements: packageand(llvm%{_sonum}:vim) +Conflicts: vim-plugin-llvm < %{version} +Provides: vim-plugin-llvm = %{version} +BuildArch: noarch + +%description vim-plugins +This package contains vim plugins for LLVM like syntax highlighting. + +%package -n python3-clang%{_sonum} +Summary: Python bindings for libclang +Group: Development/Libraries/Python +Requires: libclang%{_soclang} >= %{version} +Requires: python3-base +Conflicts: %{python3_sitearch}/clang/ +Provides: %{python3_sitearch}/clang/ +BuildArch: noarch + +%description -n python3-clang%{_sonum} +This package contains the Python bindings to clang (C language) +frontend for LLVM. + +%package -n lld%{_sonum} +Summary: Linker for Clang/LLVM +Group: Development/Tools/Building +URL: https://lld.llvm.org/ +Requires(post): update-alternatives +Requires(postun):update-alternatives + +%description -n lld%{_sonum} +LLD is a linker from the LLVM project. That is a drop-in replacement for system linkers and runs much faster than them. It also provides features that are useful for toolchain developers. + +%package opt-viewer +Summary: Tools for visualising the LLVM optimization records +Group: Development/Languages/Other +BuildRequires: python3-base +Requires: python3-PyYAML +Requires: python3-Pygments +Conflicts: opt-viewer < %{version} +Provides: opt-viewer = %{version} +BuildArch: noarch + +%description opt-viewer +Set of tools for visualising the LLVM optimization records generated with -fsave-optimization-record. Used for compiler-assisted performance analysis. + +%if %{with lldb} +%package -n lldb%{_sonum} +Summary: Software debugger built using LLVM libraries +Group: Development/Tools/Debuggers +URL: https://lldb.llvm.org/ +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libedit) +BuildRequires: pkgconfig(libffi) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(panel) +BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(zlib) +Requires(post): update-alternatives +Requires(postun):update-alternatives +Recommends: python3-lldb%{_sonum} +ExclusiveArch: x86_64 + +%description -n lldb%{_sonum} +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 liblldb%{_sonum} +Summary: LLDB software debugger runtime library +Group: System/Libraries + +%description -n liblldb%{_sonum} +This subpackage contains the main LLDB component. + +%package -n lldb%{_sonum}-devel +Summary: Development files for LLDB +Group: Development/Libraries/C and C++ +Requires: clang%{_sonum}-devel = %{version} +Requires: liblldb%{_sonum} = %{version} +Requires: llvm%{_sonum}-devel = %{version} +Requires: pkgconfig(libedit) +Requires: pkgconfig(libxml-2.0) +Conflicts: lldb-devel-provider < %{version} +Provides: lldb-devel-provider = %{version} + +%description -n lldb%{_sonum}-devel +This package contains the development files for LLDB. + +%if %{with lldb_python} +%package -n python3-lldb%{_sonum} +Summary: Python bindings for liblldb +Group: Development/Libraries/Python +BuildRequires: swig >= 3.0.11 +Requires: liblldb%{_sonum} = %{version} +Requires: python3-base +Requires: python3-six +Conflicts: %{python3_sitearch}/lldb/ +Provides: %{python3_sitearch}/lldb/ + +%description -n python3-lldb%{_sonum} +This package contains the Python bindings for LLDB. It also contains +pretty printers for the C++ standard library. +%endif + +%endif + +%if %{with polly} +%package polly +Summary: LLVM Framework for High-Level Loop and Data-Locality Optimizations +Group: Development/Languages/Other +URL: https://polly.llvm.org/ +Conflicts: llvm-polly-provider < %{version} +Provides: llvm-polly-provider = %{version} + +%description polly +Polly is a high-level loop and data-locality optimizer and optimization +infrastructure for LLVM. It uses an abstract mathematical representation based +on integer polyhedra to analyze and optimize the memory access pattern of a +program. Polly can currently perform classical loop transformations, especially +tiling and loop fusion to improve data-locality. It can also exploit OpenMP +level parallelism and expose SIMDization opportunities. + +%package polly-devel +Summary: Development files for Polly +Group: Development/Libraries/C and C++ +Requires: llvm%{_sonum}-devel = %{version} +Requires: llvm%{_sonum}-polly = %{version} +Conflicts: llvm-polly-devel-provider < %{version} +Provides: llvm-polly-devel-provider = %{version} + +%description polly-devel +This package contains the development files for Polly. +%endif + +%prep +%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -b 50 -b 51 -n llvm-%{_version}.src + +%patch0 -p2 +%patch5 -p1 +%patch13 -p1 +%patch14 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch24 -p1 +%patch25 -p2 +%patch33 -p2 +%patch35 -p2 + +pushd clang-%{_version}.src +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch6 -p1 +%patch9 -p2 +%patch34 -p2 + +# We hardcode openSUSE +rm unittests/Driver/DistroTest.cpp + +# We hardcode i586 +rm test/Driver/x86_features.c +rm test/Driver/nacl-direct.c +popd + +pushd clang-tools-extra-%{_version}.src +%patch10 -p2 +popd + +pushd lld-%{_version}.src +%patch26 -p1 +# lld got a compile-time dependency on libunwind that we don't want. (https://reviews.llvm.org/D86805) +mkdir include/mach-o +cp %{SOURCE10} include/mach-o +popd + +%if %{with lldb} +pushd lldb-%{_version}.src +%patch11 -p1 +popd +%endif + +%if %{with libcxx} +pushd libcxx-%{_version}.src +rm test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp +rm test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp +rm test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp + +# These tests often verify timing and can randomly fail if the system is under heavy load. It happens sometimes on our build machines. +rm -rf test/std/thread/ +popd +%endif + +# Move into right place +mv clang-%{_version}.src tools/clang +mv compiler-rt-%{_version}.src projects/compiler-rt +mv clang-tools-extra-%{_version}.src tools/clang/tools/extra +%if %{with lld} +mv lld-%{_version}.src tools/lld +%endif +%if %{with polly} +mv polly-%{_version}.src tools/polly +%endif + +%if %{with lldb} +mv lldb-%{_version}.src tools/lldb +%endif + +%if %{with openmp} +mv openmp-%{_version}.src projects/openmp +%endif + +%if %{with libcxx} +mv libcxx-%{_version}.src projects/libcxx +mv libcxxabi-%{_version}.src projects/libcxxabi +%endif + +%build +%define _lto_cflags %{nil} + +# Use optflags, but: +# 1) Remove the -D_FORTIFY_SOURCE=2 because llvm does not build correctly with +# hardening. The problem is in sanitizers from compiler-rt. +# 2) Remove the -g. We don't want it in stage1 and it will be added by cmake in +# the following stage. +flags=$(echo %{optflags} | sed 's/-D_FORTIFY_SOURCE=./-D_FORTIFY_SOURCE=0/;s/\B-g\b//g') + +%ifarch armv6hl +flags+=" -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" +%endif +%ifarch armv7hl +flags+=" -mfloat-abi=hard -march=armv7-a -mtune=cortex-a15 -mfpu=vfpv3-d16" +%endif + +CFLAGS=$flags +CXXFLAGS=$flags + +# By default build everything +TARGETS_TO_BUILD="all" +EXPERIMENTAL_TARGETS_TO_BUILD="M68k" +%ifarch s390 s390x +# No graphics cards on System z +TARGETS_TO_BUILD="host;BPF" +EXPERIMENTAL_TARGETS_TO_BUILD= +%endif +%ifarch %arm +# TODO: Document why those. +TARGETS_TO_BUILD="host;ARM;AMDGPU;BPF;NVPTX" +EXPERIMENTAL_TARGETS_TO_BUILD= +%endif +%ifarch ppc64 ppc64le +# TODO: Document why those. +TARGETS_TO_BUILD="host;AMDGPU;BPF;NVPTX" +EXPERIMENTAL_TARGETS_TO_BUILD= +%endif +%ifarch ppc +# TODO: Graphics cards turned off because of relocation overflows. +TARGETS_TO_BUILD="host;BPF" +EXPERIMENTAL_TARGETS_TO_BUILD= +%endif + +mem_per_compile_job=1000000 +%ifarch i586 ppc armv6hl armv7hl +# 32-bit arches need less memory than 64-bit arches. +mem_per_compile_job=600000 +%endif + +mem_per_link_job=3000000 +%ifarch riscv64 +# Give RISCV link jobs more memory. +mem_per_link_job=4000000 +%endif + +echo "Available memory:" +cat /proc/meminfo +echo "System limits:" +ulimit -a +avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo) +%set_jobs link $mem_per_link_job +%set_jobs compile $mem_per_compile_job + +%define __builder ninja +%define __builddir stage1 +# -z,now is breaking now, it needs to be fixed +%cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \ + -DLLVM_LINK_LLVM_DYLIB:BOOL=OFF \ + -DLLVM_PARALLEL_COMPILE_JOBS="$max_compile_jobs" \ + -DLLVM_PARALLEL_LINK_JOBS="$max_link_jobs" \ + -DENABLE_LINKER_BUILD_ID=ON \ + -DLLVM_BINUTILS_INCDIR=%{_includedir} \ + -DLLVM_BUILD_TOOLS:BOOL=OFF \ + -DLLVM_BUILD_UTILS:BOOL=OFF \ + -DLLVM_BUILD_EXAMPLES:BOOL=OFF \ + -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD:BOOL=OFF \ + -DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \ + -DLLVM_INCLUDE_TESTS:BOOL=OFF \ + -DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_TARGETS_TO_BUILD=Native \ + -DCLANG_ENABLE_ARCMT:BOOL=OFF \ + -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF \ + -DCOMPILER_RT_BUILD_SANITIZERS:BOOL=OFF \ + -DCOMPILER_RT_BUILD_XRAY:BOOL=OFF \ + -DCOMPILER_RT_USE_LIBCXX:BOOL=OFF \ + -DLIBCXX_INCLUDE_BENCHMARKS:BOOL=OFF \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-keep-memory" \ + -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-keep-memory" \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-keep-memory" +ninja -v %{?_smp_mflags} clang llvm-tblgen clang-tblgen \ +%if %{with thin_lto} + llvm-ar llvm-ranlib \ +%if %{with gold} + LLVMgold +%else + lld +%endif +%endif + +cd .. + +# Remove files that won't be needed anymore. +# This reduces the total amount of disk space used during build. (bnc#1074625) +find ./stage1 \( -name '*.o' -or -name '*.a' \) -delete + +# 3) Remove -fstack-clash-protection on architectures where it isn't supported. +# Using it just prints a warning, but that warning prevents the configuration +# step, which uses -Werror, from recognizing the availability of other flags. +if ! ${PWD}/stage1/bin/clang -c -xc -Werror -fstack-clash-protection -o /dev/null /dev/null; +then + flags=$(echo $flags | sed 's/-fstack-clash-protection//'); +fi +CFLAGS=$flags +CXXFLAGS=$flags + +# Clang uses a bit less memory. +mem_per_compile_job=700000 +%ifarch i586 ppc armv6hl armv7hl +# 32-bit arches need less memory than 64-bit arches. +mem_per_compile_job=500000 +%endif + +%set_jobs compile $mem_per_compile_job +%if %{with thin_lto} +# A single ThinLTO job is fully parallel already. +max_link_jobs=1 +%endif + +%define __builddir build +export PATH=${PWD}/stage1/bin:$PATH +export CC=${PWD}/stage1/bin/clang +export CXX=${PWD}/stage1/bin/clang++ +%if %{with thin_lto} +export LLVM_AR=${PWD}/stage1/bin/llvm-ar +export LLVM_RANLIB=${PWD}/stage1/bin/llvm-ranlib +export LLD=${PWD}/stage1/bin/ld.lld +%endif +export LLVM_TABLEGEN=${PWD}/stage1/bin/llvm-tblgen +export CLANG_TABLEGEN=${PWD}/stage1/bin/clang-tblgen +# Build is using absolute paths assuming the monorepo layout, so we need this. +export CLANG_TOOLS_EXTRA_DIR=${PWD}/tools/clang/tools/extra +# The build occasionally uses tools linking against previously built +# libraries (mostly libLLVM.so), but we don't want to set RUNPATHs. +export LD_LIBRARY_PATH=${PWD}/build/%{_lib} +# -z,now is breaking now, it needs to be fixed +%cmake \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ + -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ + -DCLANG_LINK_CLANG_DYLIB:BOOL=ON \ + -DLLVM_PARALLEL_COMPILE_JOBS="$max_compile_jobs" \ + -DLLVM_PARALLEL_LINK_JOBS="$max_link_jobs" \ +%if %{with thin_lto} + -DLLVM_ENABLE_LTO=Thin \ + -DCMAKE_AR="${LLVM_AR}" \ + -DCMAKE_RANLIB="${LLVM_RANLIB}" \ +%if %{with gold} + -DCMAKE_LINKER=%{_bindir}/ld.gold \ + -DLLVM_USE_LINKER=gold \ +%else + -DCMAKE_LINKER=${LLD} \ + -DLLVM_USE_LINKER=${LLD} \ +%endif +%else + -DCMAKE_LINKER=%{_bindir}/ld \ +%endif +%ifarch %arm ppc s390 %{ix86} + -DCMAKE_C_FLAGS_RELWITHDEBINFO="-g1" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g1" \ +%endif + -DENABLE_LINKER_BUILD_ID=ON \ + -DLLVM_TABLEGEN="${LLVM_TABLEGEN}" \ + -DCLANG_TABLEGEN="${CLANG_TABLEGEN}" \ + -DLLVM_ENABLE_RTTI:BOOL=ON \ + -DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_ENABLE_PIC=ON \ + -DLLVM_BINUTILS_INCDIR=%{_includedir} \ + -DLLVM_TARGETS_TO_BUILD=${TARGETS_TO_BUILD} \ + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=${EXPERIMENTAL_TARGETS_TO_BUILD} \ + -DLLVM_TOOL_LLVM_EXEGESIS_BUILD:BOOL=OFF \ + -DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \ + -DCOMPILER_RT_USE_LIBCXX:BOOL=OFF \ + -DLIBCXX_INCLUDE_BENCHMARKS:BOOL=OFF \ +%if %{with libcxx} + -DLIBCXX_ENABLE_SHARED=YES \ + -DLIBCXX_ENABLE_STATIC=NO \ + -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO \ + -DLIBCXXABI_ENABLE_SHARED=YES \ + -DLIBCXXABI_ENABLE_STATIC=NO \ +%endif +%if "%{_lib}" == "lib64" + -DLLVM_LIBDIR_SUFFIX=64 \ +%endif +%if %{with ffi} + -DLLVM_ENABLE_FFI=ON \ +%endif +%if %{with oprofile} + -DLLVM_USE_OPROFILE=ON \ +%endif +%if %{without lldb_python} + -DLLDB_DISABLE_PYTHON=ON \ +%else + -DLLDB_USE_SYSTEM_SIX:BOOL=ON \ +%endif + -DCMAKE_SKIP_RPATH:BOOL=ON \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--build-id=sha1" \ + -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--build-id=sha1" \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--build-id=sha1" \ + -DLLVM_POLLY_LINK_INTO_TOOLS=OFF \ + -DPOLLY_BUNDLED_ISL:BOOL=ON + +# ThinLTO uses multiple threads from the linker process for optimizations, which +# causes an extremely high lock contention on allocations due to MALLOC_CHECK_, +# so we deactivate it for compilation. The tests will have it activated again. +%if %{with thin_lto} +MALLOC_CHECK_BACK=$MALLOC_CHECK_ +unset MALLOC_CHECK_ +%endif + +ninja -v %{?_smp_mflags} + +%if %{with thin_lto} +MALLOC_CHECK_=$MALLOC_CHECK_BACK +%endif + +cd .. + +%install +# Installation seems to build some files not contained in "all". +export LD_LIBRARY_PATH=${PWD}/build/%{_lib} +%cmake_install + +# Install FileCheck needed for testing Rust boo#1192629 +install -m 0755 build/bin/FileCheck %{buildroot}%{_bindir}/FileCheck + +# Remove files that won't be needed anymore. +# This reduces the total amount of disk space used during build. (bnc#1074625) +find ./build \( -name '*.o' -or -name '*.a' \) -delete + +# Docs are prebuilt due to sphinx dependency +# +# tar xf llvm-%{_version}.src.tar.xz +# pushd llvm-%{_version}.src/tools +# tar xf ../../clang-%{_version}.src.tar.xz +# mv clang-%{_version}.src clang +# cd .. +# ln -s ../../../build/tools/clang/docs/{Attribute,Diagnostics}Reference.rst tools/clang/docs +# mkdir build; cd build +# cmake -G Ninja -DLLVM_ENABLE_SPHINX:BOOL=ON -DLLVM_BUILD_DOCS:BOOL=ON \ +# -DSPHINX_WARNINGS_AS_ERRORS:BOOL=OFF -DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF .. +# ninja gen-{Attribute,Diagnostics}Reference.rst +# ninja -j1 docs-{llvm,clang}-{html,man} +# popd +# tar --sort=name --owner=0 --group=0 --mtime="@${SOURCE_DATE_EPOCH}" \ +# --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \ +# -cJf llvm-docs-%{_version}.src.tar.xz llvm-%{_version}.src/build/docs/{man,html} +# tar --sort=name --owner=0 --group=0 --mtime="@${SOURCE_DATE_EPOCH}" \ +# --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \ +# -cJf clang-docs-%{_version}.src.tar.xz llvm-%{_version}.src/build/tools/clang/docs/{man,html} + +# Build man/html pages +pushd build/docs +rm -rf %{buildroot}%{_prefix}/docs +mkdir -p %{buildroot}%{_docdir}/llvm +mkdir -p %{buildroot}%{_mandir}/man1 +cp -r man/* %{buildroot}%{_mandir}/man1 +cp -r html/* %{buildroot}%{_docdir}/llvm +rm -r %{buildroot}%{_docdir}/llvm/_sources +popd + +pushd build/tools/clang/docs +mkdir -p %{buildroot}%{_docdir}/llvm-clang +cp -r man/* %{buildroot}%{_mandir}/man1 +cp -r html/* %{buildroot}%{_docdir}/llvm-clang +rm -r %{buildroot}%{_docdir}/llvm-clang/_sources +popd + +# install python bindings +install -d %{buildroot}%{python3_sitelib}/clang +pushd tools/clang/bindings/python +cp clang/*.py %{buildroot}%{python3_sitelib}/clang +# Make the bindings use the current so number, so that we don't need an unversioned libclang.so. +sed -i "s/file = 'libclang\.so'/file = 'libclang.so.%{_soclang}'/" %{buildroot}%{python3_sitelib}/clang/cindex.py +install -d %{buildroot}%{_docdir}/python-clang/examples/cindex +cp -r examples %{buildroot}%{_docdir}/python-clang +install -d %{buildroot}%{_docdir}/python-clang/tests/cindex/INPUTS +cp -r tests %{buildroot}%{_docdir}/python-clang +popd + +# Scripts for clang use unversioned executables, so it doesn't make sense to +# have multiple versions of them. We package them only for the default version. +%if %{_plv} == %{_sonum} +%if "%{_libexecdir}" != "%{_prefix}/libexec" +mv %{buildroot}%{_prefix}/libexec/{c++,ccc}-analyzer %{buildroot}%{_bindir} +mv %{buildroot}%{_prefix}/libexec/{analyze,intercept}-{cc,c++} %{buildroot}%{_bindir} +%endif + +mv %{buildroot}%{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff +mv %{buildroot}%{_datadir}/clang/clang-tidy-diff.py %{buildroot}%{_bindir}/clang-tidy-diff +mv %{buildroot}%{_datadir}/clang/run-find-all-symbols.py %{buildroot}%{_bindir}/run-find-all-symbols + +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions +mv %{buildroot}%{_datadir}/clang/bash-autocomplete.sh %{buildroot}%{_datadir}/bash-completion/completions/clang + +# We don't care about applescript or sublime text +rm %{buildroot}%{_datadir}/clang/*.applescript +rm %{buildroot}%{_datadir}/clang/clang-format-sublime.py +%else +rm %{buildroot}%{_bindir}/{analyze,intercept}-build +rm %{buildroot}%{_bindir}/clang-doc +rm %{buildroot}%{_bindir}/git-clang-format +rm %{buildroot}%{_bindir}/hmaptool +rm %{buildroot}%{_bindir}/run-clang-tidy +rm %{buildroot}%{_bindir}/scan-{build,build-py,view} +rm -r %{buildroot}%{_prefix}/lib/lib{ear,scanbuild} +rm %{buildroot}%{_prefix}/libexec/{c++,ccc}-analyzer +rm %{buildroot}%{_prefix}/libexec/{analyze,intercept}-{cc,c++} +rm -r %{buildroot}%{_datadir}/{clang,scan-build,scan-view}/ +rm %{buildroot}%{_mandir}/man1/scan-build.1 +%endif + +# Note that bfd-plugins is in /usr/lib/bfd-plugins before binutils 2.33.1 +mkdir -p %{buildroot}%{_libdir}/bfd-plugins +ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/ + +install -m 755 -d %{buildroot}%{_datadir}/vim/site/ +for i in ftdetect ftplugin indent syntax; do + cp -r utils/vim/$i %{buildroot}%{_datadir}/vim/site/ +done +mv utils/vim/README utils/vim/README.vim + +install -d %{buildroot}%{python3_sitelib} +mv %{buildroot}%{_datadir}/opt-viewer/opt-diff.py %{buildroot}%{_bindir}/opt-diff +mv %{buildroot}%{_datadir}/opt-viewer/opt-stats.py %{buildroot}%{_bindir}/opt-stats +mv %{buildroot}%{_datadir}/opt-viewer/opt-viewer.py %{buildroot}%{_bindir}/opt-viewer +mv %{buildroot}%{_datadir}/opt-viewer/optpmap.py %{buildroot}%{python3_sitelib}/optpmap.py +mv %{buildroot}%{_datadir}/opt-viewer/optrecord.py %{buildroot}%{python3_sitelib}/optrecord.py + +rm %{buildroot}%{_mandir}/man1/{,clang-,lldb-,mlir-}tblgen.1 +rm %{buildroot}%{_mandir}/man1/llvm-{exegesis,locstats}.1 + +%if %{with lldb_python} +# Python: fix binary libraries location. +rm %{buildroot}%{python3_sitearch}/lldb/_lldb.%{cpython3_soabi}.so +liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) +ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.%{cpython3_soabi}.so +%endif + +# Stuff we don't want to include +rm %{buildroot}%{_includedir}/mach-o/compact_unwind_encoding.h +rm %{buildroot}%{_mandir}/man1/lit.1 + +# These are only available as static libraries, which we don't ship. +rm -rf %{buildroot}%{_includedir}/{clang-tidy,lld} +rm -rf %{buildroot}%{_libdir}/cmake/lld/ + +%if %{with openmp} +rm %{buildroot}%{_libdir}/libgomp.so +rm %{buildroot}%{_libdir}/libiomp*.so +rm %{buildroot}%{_libdir}/libarcher_static.a +%endif + +# Prepare for update-alternatives usage +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +binfiles=( bugpoint dsymutil llc lli \ + llvm-addr2line llvm-ar llvm-as llvm-bcanalyzer llvm-bitcode-strip llvm-c-test llvm-cat llvm-cfi-verify + llvm-cov llvm-cxxdump llvm-cxxfilt llvm-cxxmap llvm-debuginfod-find llvm-cvtres llvm-diff llvm-dis \ + llvm-dlltool llvm-dwarfdump llvm-dwp llvm-extract llvm-gsymutil llvm-ifs \ + llvm-install-name-tool llvm-jitlink llvm-lib llvm-libtool-darwin \ + llvm-link llvm-lipo llvm-lto llvm-lto2 llvm-mc llvm-mca \ + llvm-ml llvm-mt llvm-modextract llvm-nm llvm-objcopy llvm-objdump llvm-opt-report llvm-otool \ + llvm-pdbutil llvm-profdata llvm-profgen llvm-ranlib llvm-rc llvm-readelf llvm-readobj llvm-reduce \ + llvm-rtdyld llvm-sim llvm-size llvm-split llvm-stress llvm-strings llvm-strip \ + llvm-symbolizer llvm-tapi-diff llvm-tblgen llvm-tli-checker llvm-undname llvm-windres \ + llvm-xray opt sancov sanstats split-file verify-uselistorder \ + c-index-test clang clangd clang++ clang-apply-replacements \ + clang-change-namespace clang-check clang-cl clang-extdef-mapping clang-format \ + clang-include-fixer clang-linker-wrapper clang-move clang-nvlink-wrapper clang-offload-bundler \ + clang-offload-wrapper clang-query clang-refactor clang-repl clang-scan-deps clang-rename \ + clang-reorder-fields clang-tidy diagtool find-all-symbols modularize pp-trace \ +%if %{with lldb} + lldb lldb-argdumper lldb-instr lldb-server lldb-vscode \ +%endif +%if %{with lld} + ld.lld lld lld-link ld64.lld wasm-ld \ +%endif + ) +manfiles=( bugpoint dsymutil llc lli \ + llvm-addr2line llvm-ar llvm-as llvm-bcanalyzer llvm-cov llvm-cxxfilt llvm-cxxmap llvm-diff \ + llvm-dis llvm-dwarfdump llvm-extract llvm-install-name-tool \ + llvm-lib llvm-libtool-darwin llvm-link llvm-lipo llvm-mca \ + llvm-nm llvm-objcopy llvm-objdump llvm-otool llvm-pdbutil \ + llvm-profdata llvm-profgen llvm-ranlib llvm-readelf llvm-readobj \ + llvm-size llvm-stress llvm-strings llvm-strip llvm-symbolizer llvm-tblgen llvm-tli-checker opt \ + clang diagtool ) + +# Fix the clang -> clang-X.Y symlink to work with update-alternatives +mv %{buildroot}%{_bindir}/clang-%{_sonum} %{buildroot}%{_bindir}/clang +ln -s %{_bindir}/clang-%{_relver} %{buildroot}%{_bindir}/clang-%{_sonum} +ln -s %{_bindir}/clang-%{_relver} %{buildroot}%{_bindir}/clang-%{_minor} + +# Add clang++-X.Y symbolic link as well - it seems to be expected by some +# software. https://bugzilla.opensuse.org/show_bug.cgi?id=1012260 +ln -s %{_bindir}/clang++-%{_relver} %{buildroot}%{_bindir}/clang++-%{_sonum} +ln -s %{_bindir}/clang++-%{_relver} %{buildroot}%{_bindir}/clang++-%{_minor} + +# Rewrite symlinks to point to new location +for p in "${binfiles[@]}" ; do + if [ -h "%{buildroot}%{_bindir}/$p" ] ; then + ln -f -s %{_bindir}/$(readlink %{buildroot}%{_bindir}/$p)-%{_relver} %{buildroot}%{_bindir}/$p + fi +done +for p in "${binfiles[@]}" ; do + mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{_relver} + ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p +done +for p in "${manfiles[@]}" ; do + mv %{buildroot}%{_mandir}/man1/$p.1 %{buildroot}%{_mandir}/man1/$p-%{_relver}.1 + ln -s -f %{_sysconfdir}/alternatives/$p.1%{ext_man} %{buildroot}%{_mandir}/man1/$p.1%{ext_man} +done + +# Also rewrite the CMake files referring to the binaries. +sed -i "$( + for p in "${binfiles[@]}"; do + echo "s|\"\${_IMPORT_PREFIX}/bin/$p\"|\"\${_IMPORT_PREFIX}/bin/$p-%{_relver}\"|g" + done +)" %{buildroot}%{_libdir}/cmake/{llvm/LLVMExports,clang/ClangTargets}-relwithdebinfo.cmake + +# rpm macro for version checking +mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/ +cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.llvm <