From 3a3e3ad6735beda5f6a980a388e8cffc82981e96 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 31 Aug 2024 10:36:49 +0800 Subject: [PATCH 001/205] change the date of a previous changelog entry to address following error: ``` error: %changelog not in descending chronological order ``` when preparing the rpm, rpm warns at seeing the changelog entry not in descending chronological order. so "fix" it. Signed-off-by: Kefu Chai --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 2101cbe..f3f8a70 100644 --- a/llvm.spec +++ b/llvm.spec @@ -623,7 +623,7 @@ fi * Fri Apr 12 2024 Tom Stellard - 18.1.3-1 - 18.1.3 Release -* Tue Mar 19 2024 Zhengyu He - 18.1.2-2 +* Thu Mar 21 2024 Zhengyu He - 18.1.2-2 - Add support for riscv64 * Thu Mar 21 2024 Tom Stellard - 18.1.2-1 From 1f02e1af7d7143015cc43b102b4fd6ffa6e99a8d Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 16 Feb 2021 11:40:45 +0100 Subject: [PATCH 002/205] Prepare for snapshot build Increase verbosity for %autosetup Modified patch so it cleanly applies Renaming man pages is no longer needed Fix this error: mv /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/clang-tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/lldb-tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/llvm-tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/mlir-tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/llvm-tblgen.1 mv: target '/builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/llvm-tblgen.1' is not a directory Add entry for changelog when building a snapshot Reset 0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch because it is not applicable to LLVM 12 Moved BuildRequires: python3-psutil out in PR See https://src.fedoraproject.org/rpms/llvm/pull-request/91 Make download path for snapshot sources-easily adjustable Added cmake subpackage with shared cmake files Install cmake files into /usr/lib64/cmake/llvm with the llvm-devel pkg --- ...source-interleave-prefix-test-case-c.patch | 29 +++++++++++++++++++ llvm.spec | 19 ++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch diff --git a/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch b/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch new file mode 100644 index 0000000..1f423e9 --- /dev/null +++ b/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch @@ -0,0 +1,29 @@ +From ff206863a626dad99d011aeb60770270c300e56f Mon Sep 17 00:00:00 2001 +From: Konrad Kleine +Date: Tue, 27 Apr 2021 14:41:57 +0200 +Subject: [PATCH] [PATCH][llvm] Make source-interleave-prefix test case + compatible with llvm-test + +llvm-test runs test from a directory that's not the upstream one, and that leads +to some false positive. Workaround this by forcing the current working +directory. +--- + llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test +index 746add22f96e..8b28b877e372 100644 +--- a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test ++++ b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test +@@ -11,7 +11,7 @@ + + ; RUN: sed -e "s,SRC_COMPDIR,./Inputs,g" %p/Inputs/source-interleave.ll > %t-relative-path.ll + ; RUN: llc -o %t-relative-path.o -filetype=obj -mtriple=x86_64-pc-linux %t-relative-path.ll +-; RUN: llvm-objdump --prefix myprefix --source %t-relative-path.o 2>&1 | \ ++; RUN: mkdir -p %t0 && cd %t0 && llvm-objdump --prefix myprefix --source %t-relative-path.o 2>&1 | \ + ; RUN: FileCheck %s --check-prefix=CHECK-BROKEN-PREFIX -DFILE=%t-relative-path.o -DPREFIX=. -DCOMPDIR=/Inputs + ; CHECK-BROKEN-PREFIX: warning: '[[FILE]]': failed to find source [[PREFIX]][[COMPDIR]]{{[/\\]}}source-interleave-x86_64.c + +-- +2.31.1 + diff --git a/llvm.spec b/llvm.spec index f3f8a70..3519181 100644 --- a/llvm.spec +++ b/llvm.spec @@ -50,6 +50,19 @@ %global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src %global third_party_srcdir third-party-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src +%if %{with snapshot_build} +%undefine rc_ver +%global llvm_snapshot_vers pre%{llvm_snapshot_yyyymmdd}.g%{llvm_snapshot_git_revision_short} +# FIXME(kkleine): Until we have the top-level "cmake" directory of the LLVM +# source tree separated out, we're going to use the complete source tarball +# ("llvm-project" instead of "llvm") for this. +%global llvm_srcdir llvm-project-%{llvm_snapshot_version_major}.%{llvm_snapshot_version_minor}.%{llvm_snapshot_version_patch}.src/llvm +%global maj_ver %{llvm_snapshot_version_major} +%global min_ver %{llvm_snapshot_version_minor} +%global patch_ver %{llvm_snapshot_version_patch} +%endif + + %if %{with compat_build} %global pkg_name llvm%{maj_ver} %global exec_suffix -%{maj_ver} @@ -200,6 +213,12 @@ Requires(postun): /sbin/ldconfig %description libs Shared libraries for the LLVM compiler infrastructure. +%package cmake-devel +Summary: LLVM Shared development CMake files + +%description cmake-devel +Some CMake files that are shared by LLVM sub-projects when building. + %package static Summary: LLVM static libraries Conflicts: %{name}-devel < 8 From e03138764b81f82d386da67a173342c7fdb17a3b Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 9 Nov 2021 15:12:39 +0100 Subject: [PATCH 003/205] Rebased with new patches from rawhide that weren't yet in the streamline branch --- ...PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch b/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch index 1f423e9..389ffde 100644 --- a/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch +++ b/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch @@ -1,7 +1,7 @@ -From ff206863a626dad99d011aeb60770270c300e56f Mon Sep 17 00:00:00 2001 +From 9c27c5d86fc0bfc3e5e19b23343463a9b3b40b72 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 27 Apr 2021 14:41:57 +0200 -Subject: [PATCH] [PATCH][llvm] Make source-interleave-prefix test case +Subject: [PATCH 1/3] [PATCH][llvm] Make source-interleave-prefix test case compatible with llvm-test llvm-test runs test from a directory that's not the upstream one, and that leads From 40998353e98d7ed53cd274a171b362d502f6c247 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 4 Jan 2022 18:55:42 +0100 Subject: [PATCH 004/205] Use llvm_snapshot_version_suffix --- llvm.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 3519181..a9be0aa 100644 --- a/llvm.spec +++ b/llvm.spec @@ -52,7 +52,6 @@ %if %{with snapshot_build} %undefine rc_ver -%global llvm_snapshot_vers pre%{llvm_snapshot_yyyymmdd}.g%{llvm_snapshot_git_revision_short} # FIXME(kkleine): Until we have the top-level "cmake" directory of the LLVM # source tree separated out, we're going to use the complete source tarball # ("llvm-project" instead of "llvm") for this. From a183e0b7c95a0b7c7795c43f842237976ac6ec7d Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 12 Jan 2022 13:38:40 +0100 Subject: [PATCH 005/205] Only package cmake-devel when building a snapshot package and when NOT building in compat mode --- llvm.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm.spec b/llvm.spec index a9be0aa..21d538a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -212,11 +212,13 @@ Requires(postun): /sbin/ldconfig %description libs Shared libraries for the LLVM compiler infrastructure. +%if %{without compat_build} && %{with snapshot_build} %package cmake-devel Summary: LLVM Shared development CMake files %description cmake-devel Some CMake files that are shared by LLVM sub-projects when building. +%endif %package static Summary: LLVM static libraries From b8f6841e87f4293fa2eaa82933ac70219afe5a08 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 14 Feb 2022 18:08:51 +0100 Subject: [PATCH 006/205] Rebased patched on pagure/streamline --- ...H-llvm-Make-source-interleave-prefix-test-case-c.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch b/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch index 389ffde..5b692f5 100644 --- a/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch +++ b/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch @@ -1,8 +1,8 @@ -From 9c27c5d86fc0bfc3e5e19b23343463a9b3b40b72 Mon Sep 17 00:00:00 2001 +From 79a99a76c0f63777ece3a636a733424e242041cb Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 27 Apr 2021 14:41:57 +0200 -Subject: [PATCH 1/3] [PATCH][llvm] Make source-interleave-prefix test case - compatible with llvm-test +Subject: [PATCH][llvm] Make source-interleave-prefix test case compatible with + llvm-test llvm-test runs test from a directory that's not the upstream one, and that leads to some false positive. Workaround this by forcing the current working @@ -25,5 +25,5 @@ index 746add22f96e..8b28b877e372 100644 ; CHECK-BROKEN-PREFIX: warning: '[[FILE]]': failed to find source [[PREFIX]][[COMPDIR]]{{[/\\]}}source-interleave-x86_64.c -- -2.31.1 +2.34.1 From b3a8bff369731e7e59b9a24d30339f616c42b443 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 16 Feb 2022 22:08:10 +0100 Subject: [PATCH 007/205] Added 0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch By reverting this we fix these errors: CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): The dependency target "LLVMHello" of target "check-all" does not exist. Call Stack (most recent call first): CMakeLists.txt:578 (add_lit_target) CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): The dependency target "LLVMHello" of target "check-clang-tools" does not exist. Call Stack (most recent call first): /usr/lib64/cmake/llvm/AddLLVM.cmake:1842 (add_lit_target) /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:110 (add_lit_testsuite) CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): The dependency target "LLVMHello" of target "check-clang-extra-unit" does not exist. Call Stack (most recent call first): /usr/lib64/cmake/llvm/AddLLVM.cmake:1877 (add_lit_target) /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:118 (add_lit_testsuites) --- ...rt-cmake-Don-t-install-plugins-used-.patch | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch diff --git a/0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch b/0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch new file mode 100644 index 0000000..8ba6c50 --- /dev/null +++ b/0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch @@ -0,0 +1,76 @@ +From 026ac2367789992001d234d081c387d5c69d2040 Mon Sep 17 00:00:00 2001 +From: Konrad Kleine +Date: Wed, 16 Feb 2022 22:03:40 +0100 +Subject: [PATCH][clang] Revert "cmake: Don't install plugins used for examples + or tests" + +This reverts commit d0a767608773cfa3d8644c27796b63ff40962806. + +By reverting this we fix these errors: + +CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): + The dependency target "LLVMHello" of target "check-all" does not exist. +Call Stack (most recent call first): + CMakeLists.txt:578 (add_lit_target) + +CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): + The dependency target "LLVMHello" of target "check-clang-tools" does not + exist. +Call Stack (most recent call first): + /usr/lib64/cmake/llvm/AddLLVM.cmake:1842 (add_lit_target) + /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:110 (add_lit_testsuite) + +CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): + The dependency target "LLVMHello" of target "check-clang-extra-unit" does + not exist. +Call Stack (most recent call first): + /usr/lib64/cmake/llvm/AddLLVM.cmake:1877 (add_lit_target) + /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:118 (add_lit_testsuites) +--- + llvm/lib/Transforms/Hello/CMakeLists.txt | 2 +- + llvm/tools/bugpoint-passes/CMakeLists.txt | 2 +- + llvm/unittests/Passes/CMakeLists.txt | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/llvm/lib/Transforms/Hello/CMakeLists.txt b/llvm/lib/Transforms/Hello/CMakeLists.txt +index c4f10247c1a6..d9cd33a4938e 100644 +--- a/llvm/lib/Transforms/Hello/CMakeLists.txt ++++ b/llvm/lib/Transforms/Hello/CMakeLists.txt +@@ -10,7 +10,7 @@ if(WIN32 OR CYGWIN) + set(LLVM_LINK_COMPONENTS Core Support) + endif() + +-add_llvm_library( LLVMHello MODULE BUILDTREE_ONLY ++add_llvm_library( LLVMHello MODULE + Hello.cpp + + DEPENDS +diff --git a/llvm/tools/bugpoint-passes/CMakeLists.txt b/llvm/tools/bugpoint-passes/CMakeLists.txt +index eea3e239b808..56a7eacebf1a 100644 +--- a/llvm/tools/bugpoint-passes/CMakeLists.txt ++++ b/llvm/tools/bugpoint-passes/CMakeLists.txt +@@ -14,7 +14,7 @@ if(WIN32 OR CYGWIN) + set(LLVM_LINK_COMPONENTS Core) + endif() + +-add_llvm_library( BugpointPasses MODULE BUILDTREE_ONLY ++add_llvm_library( BugpointPasses MODULE + TestPasses.cpp + + DEPENDS +diff --git a/llvm/unittests/Passes/CMakeLists.txt b/llvm/unittests/Passes/CMakeLists.txt +index a5683cd3741f..82553a3a6e56 100644 +--- a/llvm/unittests/Passes/CMakeLists.txt ++++ b/llvm/unittests/Passes/CMakeLists.txt +@@ -26,7 +26,7 @@ if (NOT WIN32) + + set(LLVM_LINK_COMPONENTS) + foreach(PLUGIN TestPlugin DoublerPlugin) +- add_llvm_library(${PLUGIN} MODULE BUILDTREE_ONLY ${PLUGIN}.cpp) ++ add_llvm_library(${PLUGIN} MODULE ${PLUGIN}.cpp) + + # Put PLUGIN next to the unit test executable. + set_output_directory(${PLUGIN} +-- +2.34.1 + From e6cffe5cf21962aa132e4b7e50a8dd03ae407dc9 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 23 Feb 2022 10:16:22 +0100 Subject: [PATCH 008/205] Revert "Added 0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch" This reverts commit d2a9cee4212bae47ed66999e608f73dfc0087e92. --- ...rt-cmake-Don-t-install-plugins-used-.patch | 76 ------------------- 1 file changed, 76 deletions(-) delete mode 100644 0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch diff --git a/0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch b/0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch deleted file mode 100644 index 8ba6c50..0000000 --- a/0004-PATCH-clang-Revert-cmake-Don-t-install-plugins-used-.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 026ac2367789992001d234d081c387d5c69d2040 Mon Sep 17 00:00:00 2001 -From: Konrad Kleine -Date: Wed, 16 Feb 2022 22:03:40 +0100 -Subject: [PATCH][clang] Revert "cmake: Don't install plugins used for examples - or tests" - -This reverts commit d0a767608773cfa3d8644c27796b63ff40962806. - -By reverting this we fix these errors: - -CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): - The dependency target "LLVMHello" of target "check-all" does not exist. -Call Stack (most recent call first): - CMakeLists.txt:578 (add_lit_target) - -CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): - The dependency target "LLVMHello" of target "check-clang-tools" does not - exist. -Call Stack (most recent call first): - /usr/lib64/cmake/llvm/AddLLVM.cmake:1842 (add_lit_target) - /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:110 (add_lit_testsuite) - -CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): - The dependency target "LLVMHello" of target "check-clang-extra-unit" does - not exist. -Call Stack (most recent call first): - /usr/lib64/cmake/llvm/AddLLVM.cmake:1877 (add_lit_target) - /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:118 (add_lit_testsuites) ---- - llvm/lib/Transforms/Hello/CMakeLists.txt | 2 +- - llvm/tools/bugpoint-passes/CMakeLists.txt | 2 +- - llvm/unittests/Passes/CMakeLists.txt | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/llvm/lib/Transforms/Hello/CMakeLists.txt b/llvm/lib/Transforms/Hello/CMakeLists.txt -index c4f10247c1a6..d9cd33a4938e 100644 ---- a/llvm/lib/Transforms/Hello/CMakeLists.txt -+++ b/llvm/lib/Transforms/Hello/CMakeLists.txt -@@ -10,7 +10,7 @@ if(WIN32 OR CYGWIN) - set(LLVM_LINK_COMPONENTS Core Support) - endif() - --add_llvm_library( LLVMHello MODULE BUILDTREE_ONLY -+add_llvm_library( LLVMHello MODULE - Hello.cpp - - DEPENDS -diff --git a/llvm/tools/bugpoint-passes/CMakeLists.txt b/llvm/tools/bugpoint-passes/CMakeLists.txt -index eea3e239b808..56a7eacebf1a 100644 ---- a/llvm/tools/bugpoint-passes/CMakeLists.txt -+++ b/llvm/tools/bugpoint-passes/CMakeLists.txt -@@ -14,7 +14,7 @@ if(WIN32 OR CYGWIN) - set(LLVM_LINK_COMPONENTS Core) - endif() - --add_llvm_library( BugpointPasses MODULE BUILDTREE_ONLY -+add_llvm_library( BugpointPasses MODULE - TestPasses.cpp - - DEPENDS -diff --git a/llvm/unittests/Passes/CMakeLists.txt b/llvm/unittests/Passes/CMakeLists.txt -index a5683cd3741f..82553a3a6e56 100644 ---- a/llvm/unittests/Passes/CMakeLists.txt -+++ b/llvm/unittests/Passes/CMakeLists.txt -@@ -26,7 +26,7 @@ if (NOT WIN32) - - set(LLVM_LINK_COMPONENTS) - foreach(PLUGIN TestPlugin DoublerPlugin) -- add_llvm_library(${PLUGIN} MODULE BUILDTREE_ONLY ${PLUGIN}.cpp) -+ add_llvm_library(${PLUGIN} MODULE ${PLUGIN}.cpp) - - # Put PLUGIN next to the unit test executable. - set_output_directory(${PLUGIN} --- -2.34.1 - From 874643a49bd1c6d39c447ffc7b7a96a0328e344a Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Mon, 11 Apr 2022 14:05:29 +0200 Subject: [PATCH 009/205] Rebase downstream patches --- ...H-llvm-Make-source-interleave-prefix-test-case-c.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch b/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch index 5b692f5..09f363f 100644 --- a/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch +++ b/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch @@ -1,7 +1,7 @@ -From 79a99a76c0f63777ece3a636a733424e242041cb Mon Sep 17 00:00:00 2001 +From 7242925230776388c70b5bdf7e80aba92a9002c3 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 27 Apr 2021 14:41:57 +0200 -Subject: [PATCH][llvm] Make source-interleave-prefix test case compatible with +Subject: [PATCH] Make source-interleave-prefix test case compatible with llvm-test llvm-test runs test from a directory that's not the upstream one, and that leads @@ -12,7 +12,7 @@ directory. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test -index 746add22f96e..8b28b877e372 100644 +index 746add22..8b28b87 100644 --- a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test +++ b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test @@ -11,7 +11,7 @@ @@ -25,5 +25,5 @@ index 746add22f96e..8b28b877e372 100644 ; CHECK-BROKEN-PREFIX: warning: '[[FILE]]': failed to find source [[PREFIX]][[COMPDIR]]{{[/\\]}}source-interleave-x86_64.c -- -2.34.1 +1.8.3.1 From aa18d7c370cc712e41f4b4d9f5fe91299941e2af Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 19 May 2022 22:33:57 +0200 Subject: [PATCH 010/205] Fix /usr/bin/ld: cannot find /usr/lib64/clang/13.0.0/lib/linux/libclang_rt.profile-x86_64.a: No such file or directory --- llvm.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm.spec b/llvm.spec index 21d538a..e6d9925 100644 --- a/llvm.spec +++ b/llvm.spec @@ -158,6 +158,10 @@ BuildRequires: python3-setuptools # For origin certification BuildRequires: gnupg2 +%if %{with pgo_instrumented_build} +BuildRequires: compiler-rt +%endif + Requires: %{name}-libs%{?_isa} = %{version}-%{release} From 155c43c335cdafb8a0fec11b485c8cf2932082f9 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 27 Jun 2022 23:51:05 +0000 Subject: [PATCH 011/205] Add patch to fix some lit test failures --- ...-GTEST_TOTAL_SHARDS-checking-for-som.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch diff --git a/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch b/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch new file mode 100644 index 0000000..f737cc4 --- /dev/null +++ b/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch @@ -0,0 +1,42 @@ +From 14d3021c10d0853a3ae9931b610afca6d385201e Mon Sep 17 00:00:00 2001 +From: Yuanfang Chen +Date: Mon, 27 Jun 2022 16:12:45 -0700 +Subject: [PATCH] [lit][test] relaxed GTEST_TOTAL_SHARDS checking for some + googletests + +For machines with a small number of cores, GTEST_TOTAL_SHARDS may be +lower than 6. +--- + llvm/utils/lit/tests/googletest-crash.py | 2 +- + llvm/utils/lit/tests/googletest-format.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/llvm/utils/lit/tests/googletest-crash.py b/llvm/utils/lit/tests/googletest-crash.py +index d647d44afbcb..9034ac6394b2 100644 +--- a/llvm/utils/lit/tests/googletest-crash.py ++++ b/llvm/utils/lit/tests/googletest-crash.py +@@ -7,7 +7,7 @@ + # CHECK: *** TEST 'googletest-crash :: [[PATH]][[FILE]]/0{{.*}} FAILED *** + # CHECK-NEXT: Script(shard): + # CHECK-NEXT: -- +-# CHECK-NEXT: GTEST_OUTPUT=json:[[JSON:[^[:space:]]*\.json]] GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=6 GTEST_SHARD_INDEX=0 {{.*}}[[FILE]] ++# CHECK-NEXT: GTEST_OUTPUT=json:[[JSON:[^[:space:]]*\.json]] GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS={{[1-6]}} GTEST_SHARD_INDEX=0 {{.*}}[[FILE]] + # CHECK-NEXT: -- + # CHECK-EMPTY: + # CHECK-NEXT: [----------] 4 test from FirstTest +diff --git a/llvm/utils/lit/tests/googletest-format.py b/llvm/utils/lit/tests/googletest-format.py +index 2dedaa5d76d4..b66e8998cb84 100644 +--- a/llvm/utils/lit/tests/googletest-format.py ++++ b/llvm/utils/lit/tests/googletest-format.py +@@ -13,7 +13,7 @@ + # CHECK: *** TEST 'googletest-format :: [[PATH]][[FILE]]/0{{.*}} FAILED *** + # CHECK-NEXT: Script(shard): + # CHECK-NEXT: -- +-# CHECK-NEXT: GTEST_OUTPUT=json:{{[^[:space:]]*}} GTEST_SHUFFLE=1 GTEST_TOTAL_SHARDS=6 GTEST_SHARD_INDEX=0 GTEST_RANDOM_SEED=123 {{.*}}[[FILE]] ++# CHECK-NEXT: GTEST_OUTPUT=json:{{[^[:space:]]*}} GTEST_SHUFFLE=1 GTEST_TOTAL_SHARDS={{[1-6]}} GTEST_SHARD_INDEX=0 GTEST_RANDOM_SEED=123 {{.*}}[[FILE]] + # CHECK-NEXT: -- + # CHECK-EMPTY: + # CHECK-NEXT: Script: +-- +2.27.0 + From 782f58c76f9fb8790a377b867645677d3e0a01e7 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 28 Jun 2022 17:17:24 +0000 Subject: [PATCH 012/205] Revert "Add patch to fix some lit test failures" This reverts commit 941133aae9377418760cc1f7e86bc176b79b93dc. This patch is not present in the nightly tarballs we use for snapshot builds. --- ...-GTEST_TOTAL_SHARDS-checking-for-som.patch | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch diff --git a/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch b/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch deleted file mode 100644 index f737cc4..0000000 --- a/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 14d3021c10d0853a3ae9931b610afca6d385201e Mon Sep 17 00:00:00 2001 -From: Yuanfang Chen -Date: Mon, 27 Jun 2022 16:12:45 -0700 -Subject: [PATCH] [lit][test] relaxed GTEST_TOTAL_SHARDS checking for some - googletests - -For machines with a small number of cores, GTEST_TOTAL_SHARDS may be -lower than 6. ---- - llvm/utils/lit/tests/googletest-crash.py | 2 +- - llvm/utils/lit/tests/googletest-format.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/llvm/utils/lit/tests/googletest-crash.py b/llvm/utils/lit/tests/googletest-crash.py -index d647d44afbcb..9034ac6394b2 100644 ---- a/llvm/utils/lit/tests/googletest-crash.py -+++ b/llvm/utils/lit/tests/googletest-crash.py -@@ -7,7 +7,7 @@ - # CHECK: *** TEST 'googletest-crash :: [[PATH]][[FILE]]/0{{.*}} FAILED *** - # CHECK-NEXT: Script(shard): - # CHECK-NEXT: -- --# CHECK-NEXT: GTEST_OUTPUT=json:[[JSON:[^[:space:]]*\.json]] GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=6 GTEST_SHARD_INDEX=0 {{.*}}[[FILE]] -+# CHECK-NEXT: GTEST_OUTPUT=json:[[JSON:[^[:space:]]*\.json]] GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS={{[1-6]}} GTEST_SHARD_INDEX=0 {{.*}}[[FILE]] - # CHECK-NEXT: -- - # CHECK-EMPTY: - # CHECK-NEXT: [----------] 4 test from FirstTest -diff --git a/llvm/utils/lit/tests/googletest-format.py b/llvm/utils/lit/tests/googletest-format.py -index 2dedaa5d76d4..b66e8998cb84 100644 ---- a/llvm/utils/lit/tests/googletest-format.py -+++ b/llvm/utils/lit/tests/googletest-format.py -@@ -13,7 +13,7 @@ - # CHECK: *** TEST 'googletest-format :: [[PATH]][[FILE]]/0{{.*}} FAILED *** - # CHECK-NEXT: Script(shard): - # CHECK-NEXT: -- --# CHECK-NEXT: GTEST_OUTPUT=json:{{[^[:space:]]*}} GTEST_SHUFFLE=1 GTEST_TOTAL_SHARDS=6 GTEST_SHARD_INDEX=0 GTEST_RANDOM_SEED=123 {{.*}}[[FILE]] -+# CHECK-NEXT: GTEST_OUTPUT=json:{{[^[:space:]]*}} GTEST_SHUFFLE=1 GTEST_TOTAL_SHARDS={{[1-6]}} GTEST_SHARD_INDEX=0 GTEST_RANDOM_SEED=123 {{.*}}[[FILE]] - # CHECK-NEXT: -- - # CHECK-EMPTY: - # CHECK-NEXT: Script: --- -2.27.0 - From 510fde3cc243589c2f5e51ff4e3151c33c6c3471 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 28 Jun 2022 19:36:28 +0000 Subject: [PATCH 013/205] Add a patch from main branch to fix some lit tests --- ...-GTEST_TOTAL_SHARDS-checking-for-som.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch diff --git a/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch b/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch new file mode 100644 index 0000000..bea9d34 --- /dev/null +++ b/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch @@ -0,0 +1,25 @@ +From 9d37895a71cb7f2acdf3cd5dc30d05d06bfe6bc5 Mon Sep 17 00:00:00 2001 +From: Yuanfang Chen +Date: Tue, 28 Jun 2022 10:29:20 -0700 +Subject: [PATCH] [lit][test] relaxed GTEST_TOTAL_SHARDS checking for some + googletests (2) + +Missed this in 14d3021c10d08 +--- + llvm/utils/lit/tests/googletest-crash.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/llvm/utils/lit/tests/googletest-crash.py b/llvm/utils/lit/tests/googletest-crash.py +index 9034ac6394b2..f83e0dc7dd0e 100644 +--- a/llvm/utils/lit/tests/googletest-crash.py ++++ b/llvm/utils/lit/tests/googletest-crash.py +@@ -22,5 +22,5 @@ + # CHECK-NEXT: shard JSON output does not exist: [[JSON]] + # CHECK-NEXT: *** + # CHECK: Failed Tests (1): +-# CHECK-NEXT: googletest-crash :: [[PATH]][[FILE]]/0/6 ++# CHECK-NEXT: googletest-crash :: [[PATH]][[FILE]]/0/{{[1-6]}} + # CHECK: Failed{{ *}}: 1 +-- +2.27.0 + From ac7a6d72a5842dc843fbf0f458cdffe50a59d390 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 29 Jun 2022 01:49:44 +0000 Subject: [PATCH 014/205] Revert "Add a patch from main branch to fix some lit tests" This reverts commit 3debb1bf64734b1712c7ce26c0abb7f4bf2141e3. --- ...-GTEST_TOTAL_SHARDS-checking-for-som.patch | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch diff --git a/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch b/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch deleted file mode 100644 index bea9d34..0000000 --- a/0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9d37895a71cb7f2acdf3cd5dc30d05d06bfe6bc5 Mon Sep 17 00:00:00 2001 -From: Yuanfang Chen -Date: Tue, 28 Jun 2022 10:29:20 -0700 -Subject: [PATCH] [lit][test] relaxed GTEST_TOTAL_SHARDS checking for some - googletests (2) - -Missed this in 14d3021c10d08 ---- - llvm/utils/lit/tests/googletest-crash.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/llvm/utils/lit/tests/googletest-crash.py b/llvm/utils/lit/tests/googletest-crash.py -index 9034ac6394b2..f83e0dc7dd0e 100644 ---- a/llvm/utils/lit/tests/googletest-crash.py -+++ b/llvm/utils/lit/tests/googletest-crash.py -@@ -22,5 +22,5 @@ - # CHECK-NEXT: shard JSON output does not exist: [[JSON]] - # CHECK-NEXT: *** - # CHECK: Failed Tests (1): --# CHECK-NEXT: googletest-crash :: [[PATH]][[FILE]]/0/6 -+# CHECK-NEXT: googletest-crash :: [[PATH]][[FILE]]/0/{{[1-6]}} - # CHECK: Failed{{ *}}: 1 --- -2.27.0 - From 2112e4bb812e6fedb1f948119cf4963e47ecf791 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 6 Sep 2022 11:55:02 +0200 Subject: [PATCH 015/205] Patch renewal from rebased llvm-project pagure/streamline branch --- ...e-interleave-prefix-test-case-compat.patch | 10 +-- ...ke-Don-t-install-plugins-used-for-ex.patch | 76 +++++++++++++++++++ 2 files changed, 81 insertions(+), 5 deletions(-) rename 0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch => 0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch (86%) create mode 100644 0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch diff --git a/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch b/0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch similarity index 86% rename from 0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch rename to 0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch index 09f363f..be75a78 100644 --- a/0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch +++ b/0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch @@ -1,8 +1,8 @@ -From 7242925230776388c70b5bdf7e80aba92a9002c3 Mon Sep 17 00:00:00 2001 +From 03802b450aee4465471835e745086a126822bdf3 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 27 Apr 2021 14:41:57 +0200 -Subject: [PATCH] Make source-interleave-prefix test case compatible with - llvm-test +Subject: [PATCH 1/4] [PATCH] Make source-interleave-prefix test case + compatible with llvm-test llvm-test runs test from a directory that's not the upstream one, and that leads to some false positive. Workaround this by forcing the current working @@ -12,7 +12,7 @@ directory. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test -index 746add22..8b28b87 100644 +index 746add22f96e..8b28b877e372 100644 --- a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test +++ b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test @@ -11,7 +11,7 @@ @@ -25,5 +25,5 @@ index 746add22..8b28b87 100644 ; CHECK-BROKEN-PREFIX: warning: '[[FILE]]': failed to find source [[PREFIX]][[COMPDIR]]{{[/\\]}}source-interleave-x86_64.c -- -1.8.3.1 +2.37.1 diff --git a/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch b/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch new file mode 100644 index 0000000..5d9a2ae --- /dev/null +++ b/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch @@ -0,0 +1,76 @@ +From 1ac2fb3bc5bc471e9c3af0abbba4a0942ca14948 Mon Sep 17 00:00:00 2001 +From: Konrad Kleine +Date: Wed, 16 Feb 2022 22:03:40 +0100 +Subject: [PATCH 4/4] [PATCH] Revert "cmake: Don't install plugins used for + examples or tests" + +This reverts commit d0a767608773cfa3d8644c27796b63ff40962806. + +By reverting this we fix these errors: + +CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): + The dependency target "LLVMHello" of target "check-all" does not exist. +Call Stack (most recent call first): + CMakeLists.txt:578 (add_lit_target) + +CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): + The dependency target "LLVMHello" of target "check-clang-tools" does not + exist. +Call Stack (most recent call first): + /usr/lib64/cmake/llvm/AddLLVM.cmake:1842 (add_lit_target) + /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:110 (add_lit_testsuite) + +CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): + The dependency target "LLVMHello" of target "check-clang-extra-unit" does + not exist. +Call Stack (most recent call first): + /usr/lib64/cmake/llvm/AddLLVM.cmake:1877 (add_lit_target) + /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:118 (add_lit_testsuites) +--- + llvm/lib/Transforms/Hello/CMakeLists.txt | 2 +- + llvm/tools/bugpoint-passes/CMakeLists.txt | 2 +- + llvm/unittests/Passes/CMakeLists.txt | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/llvm/lib/Transforms/Hello/CMakeLists.txt b/llvm/lib/Transforms/Hello/CMakeLists.txt +index c4f10247c1a6..d9cd33a4938e 100644 +--- a/llvm/lib/Transforms/Hello/CMakeLists.txt ++++ b/llvm/lib/Transforms/Hello/CMakeLists.txt +@@ -10,7 +10,7 @@ if(WIN32 OR CYGWIN) + set(LLVM_LINK_COMPONENTS Core Support) + endif() + +-add_llvm_library( LLVMHello MODULE BUILDTREE_ONLY ++add_llvm_library( LLVMHello MODULE + Hello.cpp + + DEPENDS +diff --git a/llvm/tools/bugpoint-passes/CMakeLists.txt b/llvm/tools/bugpoint-passes/CMakeLists.txt +index eea3e239b808..56a7eacebf1a 100644 +--- a/llvm/tools/bugpoint-passes/CMakeLists.txt ++++ b/llvm/tools/bugpoint-passes/CMakeLists.txt +@@ -14,7 +14,7 @@ if(WIN32 OR CYGWIN) + set(LLVM_LINK_COMPONENTS Core) + endif() + +-add_llvm_library( BugpointPasses MODULE BUILDTREE_ONLY ++add_llvm_library( BugpointPasses MODULE + TestPasses.cpp + + DEPENDS +diff --git a/llvm/unittests/Passes/CMakeLists.txt b/llvm/unittests/Passes/CMakeLists.txt +index a5683cd3741f..82553a3a6e56 100644 +--- a/llvm/unittests/Passes/CMakeLists.txt ++++ b/llvm/unittests/Passes/CMakeLists.txt +@@ -26,7 +26,7 @@ if (NOT WIN32) + + set(LLVM_LINK_COMPONENTS) + foreach(PLUGIN TestPlugin DoublerPlugin) +- add_llvm_library(${PLUGIN} MODULE BUILDTREE_ONLY ${PLUGIN}.cpp) ++ add_llvm_library(${PLUGIN} MODULE ${PLUGIN}.cpp) + + # Put PLUGIN next to the unit test executable. + set_output_directory(${PLUGIN} +-- +2.37.1 + From c66e428a642af51d3374cd352dbad49cd2cc0985 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 6 Sep 2022 14:23:15 +0200 Subject: [PATCH 016/205] Try to lock llvm* and clang* packages so that we don't install LLVM from a previous copr build --- .copr/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.copr/Makefile b/.copr/Makefile index 753982b..dc6d7df 100644 --- a/.copr/Makefile +++ b/.copr/Makefile @@ -10,6 +10,11 @@ srpm: dnf install -y dnf-plugins-core fedora-packager dnf copr enable -y --setopt=reposdir=/tmp/yum.repos.d $(COPR_USERNAME)/$(COPR_PROJECT) dnf install -y --setopt=reposdir=/tmp/yum.repos.d llvm-snapshot-builder + for p in $(dnf --setopt=reposdir=/tmp/yum.repos.d repoquery llvm* clang* 2>/dev/null); do \ + echo "Locking package: $p"; \ + dnf --setopt=reposdir=/tmp/yum.repos.d versionlock $p; \ + done + cat /etc/dnf/plugins/versionlock.list rpmbuild \ --define "_srcrpmdir $(outdir)" \ --define "_sourcedir $(shell pwd)" \ From 739ec228d09e051d50e7fbaf09dc66c699c5fd11 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 6 Sep 2022 14:53:04 +0200 Subject: [PATCH 017/205] Revert "Try to lock llvm* and clang* packages so that we don't install LLVM from a previous copr build" This reverts commit 072ee8575fb1501b906d95d3a3749d22a695ef92. --- .copr/Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.copr/Makefile b/.copr/Makefile index dc6d7df..753982b 100644 --- a/.copr/Makefile +++ b/.copr/Makefile @@ -10,11 +10,6 @@ srpm: dnf install -y dnf-plugins-core fedora-packager dnf copr enable -y --setopt=reposdir=/tmp/yum.repos.d $(COPR_USERNAME)/$(COPR_PROJECT) dnf install -y --setopt=reposdir=/tmp/yum.repos.d llvm-snapshot-builder - for p in $(dnf --setopt=reposdir=/tmp/yum.repos.d repoquery llvm* clang* 2>/dev/null); do \ - echo "Locking package: $p"; \ - dnf --setopt=reposdir=/tmp/yum.repos.d versionlock $p; \ - done - cat /etc/dnf/plugins/versionlock.list rpmbuild \ --define "_srcrpmdir $(outdir)" \ --define "_sourcedir $(shell pwd)" \ From 3e0095a8cfae09ff2a612625e70ddde171d3f256 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 5 Oct 2022 22:07:08 +0200 Subject: [PATCH 018/205] Rebase onto pagure/main --- ...TCH-Make-source-interleave-prefix-test-case-compat.patch | 6 +++--- ...TCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch b/0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch index be75a78..3619520 100644 --- a/0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch +++ b/0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch @@ -1,8 +1,8 @@ -From 03802b450aee4465471835e745086a126822bdf3 Mon Sep 17 00:00:00 2001 +From fca5cbc9c0ad26a7ac61cafe90b4af49dab5605d Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 27 Apr 2021 14:41:57 +0200 -Subject: [PATCH 1/4] [PATCH] Make source-interleave-prefix test case - compatible with llvm-test +Subject: [PATCH] Make source-interleave-prefix test case compatible with + llvm-test llvm-test runs test from a directory that's not the upstream one, and that leads to some false positive. Workaround this by forcing the current working diff --git a/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch b/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch index 5d9a2ae..e9e77d3 100644 --- a/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch +++ b/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch @@ -1,8 +1,8 @@ -From 1ac2fb3bc5bc471e9c3af0abbba4a0942ca14948 Mon Sep 17 00:00:00 2001 +From 902523d6c3a0f6566699befa30bd1cc694de10b2 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 16 Feb 2022 22:03:40 +0100 -Subject: [PATCH 4/4] [PATCH] Revert "cmake: Don't install plugins used for - examples or tests" +Subject: [PATCH] Revert "cmake: Don't install plugins used for examples or + tests" This reverts commit d0a767608773cfa3d8644c27796b63ff40962806. From 132731e88cbf47fb0f89f8c9f2178d706560cdc9 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 6 Oct 2022 09:25:44 +0200 Subject: [PATCH 019/205] Move globals down for them to be expanded correctly --- llvm.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm.spec b/llvm.spec index e6d9925..7b895c8 100644 --- a/llvm.spec +++ b/llvm.spec @@ -61,6 +61,8 @@ %global patch_ver %{llvm_snapshot_version_patch} %endif +%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src +%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src %if %{with compat_build} %global pkg_name llvm%{maj_ver} From e9164d278f896d7510a566adbd771ca3250296ac Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 6 Oct 2022 21:43:33 +0200 Subject: [PATCH 020/205] Test without some patches --- ...e-interleave-prefix-test-case-compat.patch | 29 ------- ...ke-Don-t-install-plugins-used-for-ex.patch | 76 ------------------- 2 files changed, 105 deletions(-) delete mode 100644 0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch delete mode 100644 0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch diff --git a/0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch b/0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch deleted file mode 100644 index 3619520..0000000 --- a/0001-PATCH-Make-source-interleave-prefix-test-case-compat.patch +++ /dev/null @@ -1,29 +0,0 @@ -From fca5cbc9c0ad26a7ac61cafe90b4af49dab5605d Mon Sep 17 00:00:00 2001 -From: Konrad Kleine -Date: Tue, 27 Apr 2021 14:41:57 +0200 -Subject: [PATCH] Make source-interleave-prefix test case compatible with - llvm-test - -llvm-test runs test from a directory that's not the upstream one, and that leads -to some false positive. Workaround this by forcing the current working -directory. ---- - llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test -index 746add22f96e..8b28b877e372 100644 ---- a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test -+++ b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test -@@ -11,7 +11,7 @@ - - ; RUN: sed -e "s,SRC_COMPDIR,./Inputs,g" %p/Inputs/source-interleave.ll > %t-relative-path.ll - ; RUN: llc -o %t-relative-path.o -filetype=obj -mtriple=x86_64-pc-linux %t-relative-path.ll --; RUN: llvm-objdump --prefix myprefix --source %t-relative-path.o 2>&1 | \ -+; RUN: mkdir -p %t0 && cd %t0 && llvm-objdump --prefix myprefix --source %t-relative-path.o 2>&1 | \ - ; RUN: FileCheck %s --check-prefix=CHECK-BROKEN-PREFIX -DFILE=%t-relative-path.o -DPREFIX=. -DCOMPDIR=/Inputs - ; CHECK-BROKEN-PREFIX: warning: '[[FILE]]': failed to find source [[PREFIX]][[COMPDIR]]{{[/\\]}}source-interleave-x86_64.c - --- -2.37.1 - diff --git a/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch b/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch deleted file mode 100644 index e9e77d3..0000000 --- a/0004-PATCH-Revert-cmake-Don-t-install-plugins-used-for-ex.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 902523d6c3a0f6566699befa30bd1cc694de10b2 Mon Sep 17 00:00:00 2001 -From: Konrad Kleine -Date: Wed, 16 Feb 2022 22:03:40 +0100 -Subject: [PATCH] Revert "cmake: Don't install plugins used for examples or - tests" - -This reverts commit d0a767608773cfa3d8644c27796b63ff40962806. - -By reverting this we fix these errors: - -CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): - The dependency target "LLVMHello" of target "check-all" does not exist. -Call Stack (most recent call first): - CMakeLists.txt:578 (add_lit_target) - -CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): - The dependency target "LLVMHello" of target "check-clang-tools" does not - exist. -Call Stack (most recent call first): - /usr/lib64/cmake/llvm/AddLLVM.cmake:1842 (add_lit_target) - /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:110 (add_lit_testsuite) - -CMake Error at /usr/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): - The dependency target "LLVMHello" of target "check-clang-extra-unit" does - not exist. -Call Stack (most recent call first): - /usr/lib64/cmake/llvm/AddLLVM.cmake:1877 (add_lit_target) - /builddir/build/BUILD/clang-tools-extra-15.0.0.src/test/CMakeLists.txt:118 (add_lit_testsuites) ---- - llvm/lib/Transforms/Hello/CMakeLists.txt | 2 +- - llvm/tools/bugpoint-passes/CMakeLists.txt | 2 +- - llvm/unittests/Passes/CMakeLists.txt | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/llvm/lib/Transforms/Hello/CMakeLists.txt b/llvm/lib/Transforms/Hello/CMakeLists.txt -index c4f10247c1a6..d9cd33a4938e 100644 ---- a/llvm/lib/Transforms/Hello/CMakeLists.txt -+++ b/llvm/lib/Transforms/Hello/CMakeLists.txt -@@ -10,7 +10,7 @@ if(WIN32 OR CYGWIN) - set(LLVM_LINK_COMPONENTS Core Support) - endif() - --add_llvm_library( LLVMHello MODULE BUILDTREE_ONLY -+add_llvm_library( LLVMHello MODULE - Hello.cpp - - DEPENDS -diff --git a/llvm/tools/bugpoint-passes/CMakeLists.txt b/llvm/tools/bugpoint-passes/CMakeLists.txt -index eea3e239b808..56a7eacebf1a 100644 ---- a/llvm/tools/bugpoint-passes/CMakeLists.txt -+++ b/llvm/tools/bugpoint-passes/CMakeLists.txt -@@ -14,7 +14,7 @@ if(WIN32 OR CYGWIN) - set(LLVM_LINK_COMPONENTS Core) - endif() - --add_llvm_library( BugpointPasses MODULE BUILDTREE_ONLY -+add_llvm_library( BugpointPasses MODULE - TestPasses.cpp - - DEPENDS -diff --git a/llvm/unittests/Passes/CMakeLists.txt b/llvm/unittests/Passes/CMakeLists.txt -index a5683cd3741f..82553a3a6e56 100644 ---- a/llvm/unittests/Passes/CMakeLists.txt -+++ b/llvm/unittests/Passes/CMakeLists.txt -@@ -26,7 +26,7 @@ if (NOT WIN32) - - set(LLVM_LINK_COMPONENTS) - foreach(PLUGIN TestPlugin DoublerPlugin) -- add_llvm_library(${PLUGIN} MODULE BUILDTREE_ONLY ${PLUGIN}.cpp) -+ add_llvm_library(${PLUGIN} MODULE ${PLUGIN}.cpp) - - # Put PLUGIN next to the unit test executable. - set_output_directory(${PLUGIN} --- -2.37.1 - From 630ee401af064813a1a3344e254b632658fc05e6 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 9 Nov 2022 18:22:27 +0000 Subject: [PATCH 021/205] Compiles and installs again --- llvm.spec | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/llvm.spec b/llvm.spec index 7b895c8..cc29c86 100644 --- a/llvm.spec +++ b/llvm.spec @@ -160,10 +160,6 @@ BuildRequires: python3-setuptools # For origin certification BuildRequires: gnupg2 -%if %{with pgo_instrumented_build} -BuildRequires: compiler-rt -%endif - Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -218,14 +214,6 @@ Requires(postun): /sbin/ldconfig %description libs Shared libraries for the LLVM compiler infrastructure. -%if %{without compat_build} && %{with snapshot_build} -%package cmake-devel -Summary: LLVM Shared development CMake files - -%description cmake-devel -Some CMake files that are shared by LLVM sub-projects when building. -%endif - %package static Summary: LLVM static libraries Conflicts: %{name}-devel < 8 @@ -478,6 +466,7 @@ touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix} mkdir -p %{buildroot}%{pkg_datadir}/llvm/cmake cp -Rv ../cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake + %check # non reproducible errors rm test/tools/dsymutil/X86/swift-interface.test @@ -805,6 +794,9 @@ fi * Wed Nov 02 2022 Nikita Popov - 15.0.4-1 - Update to LLVM 15.0.4 +* Wed Nov 02 2022 Nikita Popov - 15.0.4-1 +- Update to LLVM 15.0.4 + * Tue Sep 27 2022 Nikita Popov - 15.0.0-2 - Export GetHostTriple.cmake From f60f1961ea60c5cd1f703f2bb70f0e831c91d30f Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 9 Nov 2022 18:22:27 +0000 Subject: [PATCH 022/205] Adapt to standalone third-party dir --- llvm.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llvm.spec b/llvm.spec index cc29c86..6de759f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -52,10 +52,6 @@ %if %{with snapshot_build} %undefine rc_ver -# FIXME(kkleine): Until we have the top-level "cmake" directory of the LLVM -# source tree separated out, we're going to use the complete source tarball -# ("llvm-project" instead of "llvm") for this. -%global llvm_srcdir llvm-project-%{llvm_snapshot_version_major}.%{llvm_snapshot_version_minor}.%{llvm_snapshot_version_patch}.src/llvm %global maj_ver %{llvm_snapshot_version_major} %global min_ver %{llvm_snapshot_version_minor} %global patch_ver %{llvm_snapshot_version_patch} @@ -63,6 +59,8 @@ %global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src %global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src +%global third_party_srcdir third-party-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src + %if %{with compat_build} %global pkg_name llvm%{maj_ver} From ab79dddfdb2e8837fdc4a8634387bec132d84a80 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 17 Nov 2022 09:10:57 +0000 Subject: [PATCH 023/205] Manually add https://reviews.llvm.org/D137890 --- llvm.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm.spec b/llvm.spec index 6de759f..721cbdf 100644 --- a/llvm.spec +++ b/llvm.spec @@ -128,6 +128,11 @@ Source6: release-keys.asc # RHEL-specific patch to avoid unwanted python3-myst-parser dep Patch101: 0101-Deactivate-markdown-doc.patch +# See https://reviews.llvm.org/D137890 for the next two patches +Patch2: 0001-llvm-Add-install-targets-for-gtest.patch +# Patching third-party dir with a 200 offset in patch number +Patch201: 0201-third-party-Add-install-targets-for-gtest.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang From ccb61b8660357ff6d09e2e389d3fc2c4135d6922 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 17 Nov 2022 09:14:57 +0000 Subject: [PATCH 024/205] Add missing patch files --- 0001-llvm-Add-install-targets-for-gtest.patch | 32 +++++++++++++ ...-party-Add-install-targets-for-gtest.patch | 47 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 0001-llvm-Add-install-targets-for-gtest.patch create mode 100644 0201-third-party-Add-install-targets-for-gtest.patch diff --git a/0001-llvm-Add-install-targets-for-gtest.patch b/0001-llvm-Add-install-targets-for-gtest.patch new file mode 100644 index 0000000..e84c444 --- /dev/null +++ b/0001-llvm-Add-install-targets-for-gtest.patch @@ -0,0 +1,32 @@ +From 8cc3870f09d728d9017c72eba9520117a4283fee Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Thu, 17 Nov 2022 09:01:10 +0000 +Subject: Add install targets for gtest + +Stand-alone builds need an installed version of gtest in order to run +the unittests. + +Differential Revision: https://reviews.llvm.org/D137890 +--- + llvm/CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt +index 60e1f29620af..d91338532815 100644 +--- a/llvm/CMakeLists.txt ++++ b/llvm/CMakeLists.txt +@@ -693,6 +693,11 @@ option(LLVM_BUILD_TESTS + "Build LLVM unit tests. If OFF, just generate build targets." OFF) + option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) + ++option(LLVM_INSTALL_GTEST ++ "Install the llvm gtest library. This should be on if you want to do ++ stand-alone builds of the other projects and run their unit tests." OFF) ++ ++ + option(LLVM_BUILD_BENCHMARKS "Add LLVM benchmark targets to the list of default + targets. If OFF, benchmarks still could be built using Benchmarks target." OFF) + option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." ON) +-- +2.34.3 + diff --git a/0201-third-party-Add-install-targets-for-gtest.patch b/0201-third-party-Add-install-targets-for-gtest.patch new file mode 100644 index 0000000..5c86130 --- /dev/null +++ b/0201-third-party-Add-install-targets-for-gtest.patch @@ -0,0 +1,47 @@ +From 8cc3870f09d728d9017c72eba9520117a4283fee Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Thu, 17 Nov 2022 09:01:10 +0000 +Subject: Add install targets for gtest + +Stand-alone builds need an installed version of gtest in order to run +the unittests. + +Differential Revision: https://reviews.llvm.org/D137890 +--- + third-party/unittest/CMakeLists.txt | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/third-party/unittest/CMakeLists.txt b/third-party/unittest/CMakeLists.txt +index 0e54e0e57c35..1d2a52730d7d 100644 +--- a/third-party/unittest/CMakeLists.txt ++++ b/third-party/unittest/CMakeLists.txt +@@ -65,12 +65,25 @@ if (NOT LLVM_ENABLE_THREADS) + endif () + + target_include_directories(llvm_gtest +- PUBLIC googletest/include googlemock/include ++ PUBLIC $ ++ $ ++ $ ++ $ + PRIVATE googletest googlemock + ) + + add_subdirectory(UnitTestMain) + ++if (LLVM_INSTALL_GTEST) ++export(TARGETS llvm_gtest llvm_gtest_main LLVMTestingSupport FILE LLVMGTestConfig.cmake) ++install(TARGETS llvm_gtest llvm_gtest_main LLVMTestingSupport EXPORT LLVMGTestConfig ++ ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT llvm_gtest) ++ install(EXPORT LLVMGTestConfig DESTINATION ${LLVM_INSTALL_PACKAGE_DIR} COMPONENT llvm_gtest) ++ add_llvm_install_targets(install-llvm_gtest COMPONENT llvm_gtest DEPENDS llvm_gtest LLVMGTestConfig.cmake) ++ install(DIRECTORY googletest/include/gtest/ DESTINATION include/llvm-gtest/gtest/ COMPONENT llvm_gtest) ++ install(DIRECTORY googlemock/include/gmock/ DESTINATION include/llvm-gmock/gmock/ COMPONENT llvm_gtest) ++endif() ++ + # When LLVM_LINK_LLVM_DYLIB is enabled, libLLVM.so is added to the interface + # link libraries for gtest and gtest_main. This means that any target, like + # unittests for example, that links against gtest will be forced to link +-- +2.34.3 + From e41f9058180ccbcf28f3e200e8fdf2221f15fe72 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 13 Mar 2023 10:26:01 +0000 Subject: [PATCH 025/205] Remove patch applied upstream --- 0001-llvm-Add-install-targets-for-gtest.patch | 32 ------------------- llvm.spec | 2 -- 2 files changed, 34 deletions(-) delete mode 100644 0001-llvm-Add-install-targets-for-gtest.patch diff --git a/0001-llvm-Add-install-targets-for-gtest.patch b/0001-llvm-Add-install-targets-for-gtest.patch deleted file mode 100644 index e84c444..0000000 --- a/0001-llvm-Add-install-targets-for-gtest.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 8cc3870f09d728d9017c72eba9520117a4283fee Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 17 Nov 2022 09:01:10 +0000 -Subject: Add install targets for gtest - -Stand-alone builds need an installed version of gtest in order to run -the unittests. - -Differential Revision: https://reviews.llvm.org/D137890 ---- - llvm/CMakeLists.txt | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt -index 60e1f29620af..d91338532815 100644 ---- a/llvm/CMakeLists.txt -+++ b/llvm/CMakeLists.txt -@@ -693,6 +693,11 @@ option(LLVM_BUILD_TESTS - "Build LLVM unit tests. If OFF, just generate build targets." OFF) - option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) - -+option(LLVM_INSTALL_GTEST -+ "Install the llvm gtest library. This should be on if you want to do -+ stand-alone builds of the other projects and run their unit tests." OFF) -+ -+ - option(LLVM_BUILD_BENCHMARKS "Add LLVM benchmark targets to the list of default - targets. If OFF, benchmarks still could be built using Benchmarks target." OFF) - option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." ON) --- -2.34.3 - diff --git a/llvm.spec b/llvm.spec index 721cbdf..ff2b6ec 100644 --- a/llvm.spec +++ b/llvm.spec @@ -128,8 +128,6 @@ Source6: release-keys.asc # RHEL-specific patch to avoid unwanted python3-myst-parser dep Patch101: 0101-Deactivate-markdown-doc.patch -# See https://reviews.llvm.org/D137890 for the next two patches -Patch2: 0001-llvm-Add-install-targets-for-gtest.patch # Patching third-party dir with a 200 offset in patch number Patch201: 0201-third-party-Add-install-targets-for-gtest.patch From de1386c84e0132e6c50eb23e7693d4115a3857cb Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 13 Mar 2023 15:46:17 +0000 Subject: [PATCH 026/205] Remove another upstreamed patch --- ...-party-Add-install-targets-for-gtest.patch | 47 ------------------- llvm.spec | 3 -- 2 files changed, 50 deletions(-) delete mode 100644 0201-third-party-Add-install-targets-for-gtest.patch diff --git a/0201-third-party-Add-install-targets-for-gtest.patch b/0201-third-party-Add-install-targets-for-gtest.patch deleted file mode 100644 index 5c86130..0000000 --- a/0201-third-party-Add-install-targets-for-gtest.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 8cc3870f09d728d9017c72eba9520117a4283fee Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 17 Nov 2022 09:01:10 +0000 -Subject: Add install targets for gtest - -Stand-alone builds need an installed version of gtest in order to run -the unittests. - -Differential Revision: https://reviews.llvm.org/D137890 ---- - third-party/unittest/CMakeLists.txt | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/third-party/unittest/CMakeLists.txt b/third-party/unittest/CMakeLists.txt -index 0e54e0e57c35..1d2a52730d7d 100644 ---- a/third-party/unittest/CMakeLists.txt -+++ b/third-party/unittest/CMakeLists.txt -@@ -65,12 +65,25 @@ if (NOT LLVM_ENABLE_THREADS) - endif () - - target_include_directories(llvm_gtest -- PUBLIC googletest/include googlemock/include -+ PUBLIC $ -+ $ -+ $ -+ $ - PRIVATE googletest googlemock - ) - - add_subdirectory(UnitTestMain) - -+if (LLVM_INSTALL_GTEST) -+export(TARGETS llvm_gtest llvm_gtest_main LLVMTestingSupport FILE LLVMGTestConfig.cmake) -+install(TARGETS llvm_gtest llvm_gtest_main LLVMTestingSupport EXPORT LLVMGTestConfig -+ ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT llvm_gtest) -+ install(EXPORT LLVMGTestConfig DESTINATION ${LLVM_INSTALL_PACKAGE_DIR} COMPONENT llvm_gtest) -+ add_llvm_install_targets(install-llvm_gtest COMPONENT llvm_gtest DEPENDS llvm_gtest LLVMGTestConfig.cmake) -+ install(DIRECTORY googletest/include/gtest/ DESTINATION include/llvm-gtest/gtest/ COMPONENT llvm_gtest) -+ install(DIRECTORY googlemock/include/gmock/ DESTINATION include/llvm-gmock/gmock/ COMPONENT llvm_gtest) -+endif() -+ - # When LLVM_LINK_LLVM_DYLIB is enabled, libLLVM.so is added to the interface - # link libraries for gtest and gtest_main. This means that any target, like - # unittests for example, that links against gtest will be forced to link --- -2.34.3 - diff --git a/llvm.spec b/llvm.spec index ff2b6ec..6de759f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -128,9 +128,6 @@ Source6: release-keys.asc # RHEL-specific patch to avoid unwanted python3-myst-parser dep Patch101: 0101-Deactivate-markdown-doc.patch -# Patching third-party dir with a 200 offset in patch number -Patch201: 0201-third-party-Add-install-targets-for-gtest.patch - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang From 693269178f157ca04a8e23ddb688f9385a986db5 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 14 Mar 2023 20:37:30 +0000 Subject: [PATCH 027/205] Add JITLink patch to fix clang failures on aarch64 with libgcc-13 --- ...ing-EHFrame-NULL-terminator-on-aarch.patch | 30 +++++++++++++++++++ llvm.spec | 3 ++ 2 files changed, 33 insertions(+) create mode 100644 0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch diff --git a/0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch b/0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch new file mode 100644 index 0000000..aa35075 --- /dev/null +++ b/0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch @@ -0,0 +1,30 @@ +From a95a465154273e59a32e406678ea0ebda6596fce Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 14 Mar 2023 13:11:52 -0400 +Subject: [PATCH] JITLink: Add missing EHFrame NULL terminator on aarch64/ELF + +This fixes test failures on AArch64 with libgcc-13: + +Clang :: Interpreter/global-dtor.cpp +Clang-Unit :: Interpreter/./ClangReplInterpreterTests/2/4 + +Differential Revision: https://reviews.llvm.org/D146067 +--- + llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp b/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp +index 5b9553ec8b11..3eb7e1bccde7 100644 +--- a/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp ++++ b/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp +@@ -552,6 +552,7 @@ void link_ELF_aarch64(std::unique_ptr G, + Config.PrePrunePasses.push_back(EHFrameEdgeFixer( + ".eh_frame", 8, aarch64::Pointer32, aarch64::Pointer64, + aarch64::Delta32, aarch64::Delta64, aarch64::NegDelta32)); ++ Config.PrePrunePasses.push_back(EHFrameNullTerminator(".eh_frame")); + + // Add a mark-live pass. + if (auto MarkLive = Ctx->getMarkLivePass(TT)) +-- +2.31.1 + diff --git a/llvm.spec b/llvm.spec index 6de759f..8963803 100644 --- a/llvm.spec +++ b/llvm.spec @@ -128,6 +128,9 @@ Source6: release-keys.asc # RHEL-specific patch to avoid unwanted python3-myst-parser dep Patch101: 0101-Deactivate-markdown-doc.patch +# https://reviews.llvm.org/D146067 +Patch0: 0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang From 4da55b8bb654f6d8dde5a544822311778a973de5 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 14 Mar 2023 23:52:06 +0000 Subject: [PATCH 028/205] Revert "Add JITLink patch to fix clang failures on aarch64 with libgcc-13" This reverts commit 34236f71a58b01dde121dd94d0d8ec7d69e8d158. This patch has been committed upstream. --- ...ing-EHFrame-NULL-terminator-on-aarch.patch | 30 ------------------- llvm.spec | 3 -- 2 files changed, 33 deletions(-) delete mode 100644 0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch diff --git a/0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch b/0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch deleted file mode 100644 index aa35075..0000000 --- a/0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a95a465154273e59a32e406678ea0ebda6596fce Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Tue, 14 Mar 2023 13:11:52 -0400 -Subject: [PATCH] JITLink: Add missing EHFrame NULL terminator on aarch64/ELF - -This fixes test failures on AArch64 with libgcc-13: - -Clang :: Interpreter/global-dtor.cpp -Clang-Unit :: Interpreter/./ClangReplInterpreterTests/2/4 - -Differential Revision: https://reviews.llvm.org/D146067 ---- - llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp b/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp -index 5b9553ec8b11..3eb7e1bccde7 100644 ---- a/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp -+++ b/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp -@@ -552,6 +552,7 @@ void link_ELF_aarch64(std::unique_ptr G, - Config.PrePrunePasses.push_back(EHFrameEdgeFixer( - ".eh_frame", 8, aarch64::Pointer32, aarch64::Pointer64, - aarch64::Delta32, aarch64::Delta64, aarch64::NegDelta32)); -+ Config.PrePrunePasses.push_back(EHFrameNullTerminator(".eh_frame")); - - // Add a mark-live pass. - if (auto MarkLive = Ctx->getMarkLivePass(TT)) --- -2.31.1 - diff --git a/llvm.spec b/llvm.spec index 8963803..6de759f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -128,9 +128,6 @@ Source6: release-keys.asc # RHEL-specific patch to avoid unwanted python3-myst-parser dep Patch101: 0101-Deactivate-markdown-doc.patch -# https://reviews.llvm.org/D146067 -Patch0: 0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang From 8ad022d25355f5486445d52130557af952546534 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 19 Apr 2023 23:09:05 +0000 Subject: [PATCH 029/205] Fix a test failure on s390x --- ...rch64-Only-run-tests-on-aarch64-host.patch | 26 +++++++++++++++++++ llvm.spec | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch diff --git a/0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch b/0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch new file mode 100644 index 0000000..817caf8 --- /dev/null +++ b/0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch @@ -0,0 +1,26 @@ +From a56ac2803a227a1983f58d501ea61127dee18f56 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Wed, 19 Apr 2023 16:05:58 -0700 +Subject: [PATCH] [llvm-exegesis][AArch64] Only run tests on aarch64 hosts + +The add-return.s test is failing on s390x. + +See also e30ce634f75c01cc8784cb0c4972c42987178c1d. +--- + llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg b/llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg +index 2c80c84ef2cc..c1c887bfcc47 100644 +--- a/llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg ++++ b/llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg +@@ -1,3 +1,6 @@ + if not ('AArch64' in config.root.targets): + # We need support for AArch64. + config.unsupported = True ++elif not ('aarch64' in config.root.host_triple): ++ # We need to be running on an PPC host. ++ config.unsupported = True +-- +2.31.1 + diff --git a/llvm.spec b/llvm.spec index 6de759f..d8aabf1 100644 --- a/llvm.spec +++ b/llvm.spec @@ -128,6 +128,9 @@ Source6: release-keys.asc # RHEL-specific patch to avoid unwanted python3-myst-parser dep Patch101: 0101-Deactivate-markdown-doc.patch +# Fix a test failure. https://reviews.llvm.org/D147699#4269505 +Patch0: 0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang From 6635237142a5d5e6b0951d7664db75f96a5ab205 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 22 Apr 2023 04:07:44 +0000 Subject: [PATCH 030/205] Revert "Fix a test failure on s390x" This reverts commit 9a451905d0b9bba85a6f737e27a901c01c4528c0. A fix has been merged upstream. --- ...rch64-Only-run-tests-on-aarch64-host.patch | 26 ------------------- llvm.spec | 3 --- 2 files changed, 29 deletions(-) delete mode 100644 0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch diff --git a/0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch b/0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch deleted file mode 100644 index 817caf8..0000000 --- a/0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch +++ /dev/null @@ -1,26 +0,0 @@ -From a56ac2803a227a1983f58d501ea61127dee18f56 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Wed, 19 Apr 2023 16:05:58 -0700 -Subject: [PATCH] [llvm-exegesis][AArch64] Only run tests on aarch64 hosts - -The add-return.s test is failing on s390x. - -See also e30ce634f75c01cc8784cb0c4972c42987178c1d. ---- - llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg b/llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg -index 2c80c84ef2cc..c1c887bfcc47 100644 ---- a/llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg -+++ b/llvm/test/tools/llvm-exegesis/AArch64/lit.local.cfg -@@ -1,3 +1,6 @@ - if not ('AArch64' in config.root.targets): - # We need support for AArch64. - config.unsupported = True -+elif not ('aarch64' in config.root.host_triple): -+ # We need to be running on an PPC host. -+ config.unsupported = True --- -2.31.1 - diff --git a/llvm.spec b/llvm.spec index d8aabf1..6de759f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -128,9 +128,6 @@ Source6: release-keys.asc # RHEL-specific patch to avoid unwanted python3-myst-parser dep Patch101: 0101-Deactivate-markdown-doc.patch -# Fix a test failure. https://reviews.llvm.org/D147699#4269505 -Patch0: 0001-llvm-exegesis-AArch64-Only-run-tests-on-aarch64-host.patch - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang From c322494fa689cfd3cd32019a638787a1a6850632 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 19 May 2023 13:17:48 +0000 Subject: [PATCH 031/205] Sync with rawhide --- llvm.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm.spec b/llvm.spec index 6de759f..9dbe5eb 100644 --- a/llvm.spec +++ b/llvm.spec @@ -327,7 +327,11 @@ export ASMFLAGS="%{build_cflags}" \ -DLLVM_INCLUDE_TESTS:BOOL=ON \ -DLLVM_BUILD_TESTS:BOOL=ON \ +%if %{with compat_build} + -DLLVM_INSTALL_GTEST:BOOL=OFF \ +%else -DLLVM_INSTALL_GTEST:BOOL=ON \ +%endif -DLLVM_LIT_ARGS=-v \ \ -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \ From ab194f104bc36cf9227e70517e212c757b05c658 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 12 Oct 2023 11:15:14 +0200 Subject: [PATCH 032/205] merge llvm, clang, compiler-rt and libomp repos * %check: export LD_LIBRARY_PATH because runtimes use external cmake projects that wouldn't find libclang++.so * %check: use LLVM's LIT_XFAIL to mark tests that are expected to fail and don't just delete them * clang: bring over *.patch files * clang: remove build requires tags from clang package that are already defined by main llvm package * clang: remove duplicates found in llvm globals and use %{pkg_datadir} instead of %{install_datadir} * clang: rename and use pkg_name -> pkg_name_clang * clang: use %{pkg_name_clang} instead of %{name} * compiler-rt and libomp: wrap in %if %{without compat_build} * libomp: also build libomp for s390x (See https://github.com/llvm/llvm-project/pull/66081) * libomp: exclude libomp-devel on s390x just like libomp itself * libomp: introduce pkg_name_libomp and cleanup the globals * libomp: remove gdb-plugin (NEED TO CONFIRM IF THIS IS REALLY TRUE) * libomp: filter out flaky libomp test: ompt/teams/distribute_dispatch.c * llvm: add BuildRequires: graphviz to llvm-doc * llvm: use %{pkg_name_llvm} instead of %{name} * make: added temporary Makefile so I can more easily run srpm or rpm builds locally * make: Added local-tmt-vm target (not really useful yet) * rpm: for non-RHEL add prefix like "Jan 05 16:17:06" to every log line This should help in finding out how long things take to build/install/... * rpm: fully specify %files for top-level packages * rpm: make all packages fully qualified * rpm: obsolete llvm-snapshot-builder * rpm: remove BuildRequires: python3-lit because we have it in-tree * rpm: remove BuildRequires: tags for clang and llvm specifics as we're building in-tree * rpm: rename %llvm_srcdir -> %srcdir_llvm * rpm: rename %pkg_name -> %pkg_name_llvm * rpm: use full qualified name in %description * rpm: use region comments in spec file to group by package. This allows editors to fold text to get a better overview * rpmlint: update rc file to reflect clang and compiler-rt (libomp has no rpmlint rc file) * use python-lit from within tree --- .copr/Makefile | 6 +- .copr/snapshot-info.sh | 76 ++ .gitignore | 5 + ...-funwind-tables-the-default-on-all-a.patch | 27 + 0001-Produce-DWARF4-by-default.patch | 113 +++ ...p-implicit-rpath-disabled-by-default.patch | 108 +++ 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch | 30 + ...a-Make-test-dependency-on-LLVMHello-.patch | 84 ++ ...ed-libraries-to-customize-the-soname.patch | 39 + ...clang-Don-t-install-static-libraries.patch | 25 + 0009-disable-myst-parser.patch | 26 + 0101-Deactivate-markdown-doc.patch | 13 +- DistributionFedora-stage2.cmake | 33 + DistributionFedora.cmake | 55 ++ Makefile | 96 +++ build.spec.inc | 213 +++++ changelog.spec.inc | 754 ++++++++++++++++++ check.spec.inc | 205 +++++ files.spec.inc | 295 +++++++ globals.spec.inc | 136 ++++ install.spec.inc | 226 ++++++ llvm.rpmlintrc | 31 + llvm.spec | 35 +- macros.clang | 11 + packages.spec.inc | 296 +++++++ patches.spec.inc | 32 + post_devel.spec.inc | 4 + postun_devel.spec.inc | 6 + prep.spec.inc | 50 ++ sources.spec.inc | 27 + version.spec.inc | 16 + 31 files changed, 3045 insertions(+), 28 deletions(-) create mode 100755 .copr/snapshot-info.sh create mode 100644 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch create mode 100644 0001-Produce-DWARF4-by-default.patch create mode 100644 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch create mode 100644 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch create mode 100644 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch create mode 100644 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch create mode 100644 0003-PATCH-clang-Don-t-install-static-libraries.patch create mode 100644 0009-disable-myst-parser.patch create mode 100644 DistributionFedora-stage2.cmake create mode 100644 DistributionFedora.cmake create mode 100644 Makefile create mode 100644 build.spec.inc create mode 100644 changelog.spec.inc create mode 100644 check.spec.inc create mode 100644 files.spec.inc create mode 100644 globals.spec.inc create mode 100644 install.spec.inc create mode 100644 macros.clang create mode 100644 packages.spec.inc create mode 100644 patches.spec.inc create mode 100644 post_devel.spec.inc create mode 100644 postun_devel.spec.inc create mode 100644 prep.spec.inc create mode 100644 sources.spec.inc create mode 100644 version.spec.inc diff --git a/.copr/Makefile b/.copr/Makefile index 753982b..230f2d7 100644 --- a/.copr/Makefile +++ b/.copr/Makefile @@ -4,12 +4,12 @@ COPR_USERNAME=$(shell rpm --eval %copr_username) COPR_PROJECT=$(shell rpm --eval %copr_projectname) +YYYYMMDD=$(shell date +%Y%m%d) .PHONY: srpm srpm: - dnf install -y dnf-plugins-core fedora-packager - dnf copr enable -y --setopt=reposdir=/tmp/yum.repos.d $(COPR_USERNAME)/$(COPR_PROJECT) - dnf install -y --setopt=reposdir=/tmp/yum.repos.d llvm-snapshot-builder + dnf install -y git tar xz curl --setopt=install_weak_deps=False + YYYYMMDD=$(YYYYMMDD) ./.copr/snapshot-info.sh > version.spec.inc rpmbuild \ --define "_srcrpmdir $(outdir)" \ --define "_sourcedir $(shell pwd)" \ diff --git a/.copr/snapshot-info.sh b/.copr/snapshot-info.sh new file mode 100755 index 0000000..2d95354 --- /dev/null +++ b/.copr/snapshot-info.sh @@ -0,0 +1,76 @@ +#!/usr/bin/bash + +# You need these packages to run this script: git tar xz curl-minimal + +set -e +set +x + +# This is important for systems that have a different local but want to produce +# a valid changelog date. +LANG=en_EN + +function loginfo() { + local msg=$1 + >&2 echo "[INFO]" $msg +} + +loginfo "Determine date in YYYYMMDD form" +llvm_snapshot_yyyymmdd=$(date +%Y%m%d) +[[ ! -z "${YYYYMMDD}" ]] && llvm_snapshot_yyyymmdd=$YYYYMMDD + +loginfo "Get the source tarball" +tarball_url=https://github.com/kwk/llvm-daily-fedora-rpms/releases/download/source-snapshot/llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz +tarball=llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz +if [ -e $tarball ]; then + loginfo "Source tarball already exists: $tarball" +else + loginfo "Downloading source tarball $tarball from $tarball_url" + curl -sL -o $tarball ${tarball_url} +fi + +loginfo "Grab git revision from tarball" +llvm_snapshot_git_revision=$(xzcat $tarball | git get-tar-commit-id) +llvm_snapshot_git_revision_short=$(echo "${llvm_snapshot_git_revision:0:14}") + +versionfile=llvm-project*.src/cmake/Modules/LLVMVersion.cmake +loginfo "Extract the ${versionfile} file from the source tarball" +if [ -e $versionfile ]; then + loginfo "CMakeLists.txt already exists: ${versionfile}" +else + tar -xf $tarball $versionfile +fi + +loginfo "Parse ${versionfile} for the LLVM version" +llvm_snapshot_version=$(grep -ioP 'set\(\s*LLVM_VERSION_(MAJOR|MINOR|PATCH)\s\K[0-9]+' ${versionfile} | paste -sd '.') +llvm_snapshot_version_major=$(echo $llvm_snapshot_version | cut -f1 -d.) +llvm_snapshot_version_minor=$(echo $llvm_snapshot_version | cut -f2 -d.) +llvm_snapshot_version_patch=$(echo $llvm_snapshot_version | cut -f3 -d.) +llvm_snapshot_version_suffix=pre${llvm_snapshot_yyyymmdd}.g${llvm_snapshot_git_revision_short} +llvm_snapshot_version_tag=${llvm_snapshot_version}~${llvm_snapshot_version_suffix} +llvm_snapshot_changelog_entry="* $(date +'%a %b %d %Y') LLVM snapshot - ${llvm_snapshot_version_tag}" + +tempfile=$(mktemp) +cat > $tempfile <&2 + +# One to redirect it away +cat $tempfile diff --git a/.gitignore b/.gitignore index d4e7b84..78c2c60 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,8 @@ /llvm-*.src/ /results_llvm/ /third-party/ +/llvm-git-revision-*.txt +/llvm-release-*.txt +/BUILD +/BUILDROOT +/out diff --git a/0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch b/0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch new file mode 100644 index 0000000..113f2a7 --- /dev/null +++ b/0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch @@ -0,0 +1,27 @@ +From 49f827b09db549de62dcaf8b90b3fcb3e08c0ee5 Mon Sep 17 00:00:00 2001 +From: Serge Guelton +Date: Mon, 6 Mar 2023 12:37:48 +0100 +Subject: [PATCH] Make -funwind-tables the default on all archs + +--- + clang/lib/Driver/ToolChains/Gnu.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp +index 24fbdcffc07b..8fed46b49515 100644 +--- a/clang/lib/Driver/ToolChains/Gnu.cpp ++++ b/clang/lib/Driver/ToolChains/Gnu.cpp +@@ -2904,6 +2904,10 @@ Generic_GCC::getDefaultUnwindTableLevel(const ArgList &Args) const { + case llvm::Triple::riscv64: + case llvm::Triple::x86: + case llvm::Triple::x86_64: ++ // Enable -funwind-tables on all architectures supported by Fedora: ++ // rhbz#1655546 ++ case llvm::Triple::systemz: ++ case llvm::Triple::arm: + return UnwindTableLevel::Asynchronous; + default: + return UnwindTableLevel::None; +-- +2.39.1 + diff --git a/0001-Produce-DWARF4-by-default.patch b/0001-Produce-DWARF4-by-default.patch new file mode 100644 index 0000000..195a982 --- /dev/null +++ b/0001-Produce-DWARF4-by-default.patch @@ -0,0 +1,113 @@ +From c51e7e9bcc3c5a0be34040c1f12a2bb50335cd6b Mon Sep 17 00:00:00 2001 +From: Konrad Kleine +Date: Thu, 24 Mar 2022 09:44:21 +0100 +Subject: [PATCH] Produce DWARF4 by default + +Have a look at the following commit to see when the move from DWARF 4 to 5 first happened upstream: + +https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4?diff=unified +--- + clang/test/CodeGen/dwarf-version.c | 8 ++++---- + clang/test/Driver/as-options.s | 4 ++-- + clang/test/Driver/cl-options.c | 2 +- + clang/test/Driver/clang-g-opts.c | 2 +- + clang/test/Driver/ve-toolchain.c | 2 +- + clang/test/Driver/ve-toolchain.cpp | 2 +- + 6 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c +index e63316ace69c..3d68b06c58ff 100644 +--- a/clang/test/CodeGen/dwarf-version.c ++++ b/clang/test/CodeGen/dwarf-version.c +@@ -2,10 +2,10 @@ + // RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3 + // RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 + // RUN: %clang -target x86_64-linux-gnu -gdwarf-5 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 +-// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 +-// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 +-// RUN: %clang --target=i386-pc-solaris -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 +-// RUN: %clang --target=i386-pc-solaris -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 ++// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 ++// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 ++// RUN: %clang --target=i386-pc-solaris -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 ++// RUN: %clang --target=i386-pc-solaris -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 + + // The -isysroot is used as a hack to avoid LIT messing with the SDKROOT + // environment variable which indirecty overrides the version in the target +diff --git a/clang/test/Driver/as-options.s b/clang/test/Driver/as-options.s +index 73d002c7ef7e..71d55f7fd537 100644 +--- a/clang/test/Driver/as-options.s ++++ b/clang/test/Driver/as-options.s +@@ -122,7 +122,7 @@ + // RUN: FileCheck --check-prefix=DEBUG %s + // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g0 -g %s -### 2>&1 | \ + // RUN: FileCheck --check-prefix=DEBUG %s +-// DEBUG: "-g" "-gdwarf-5" ++// DEBUG: "-g" "-gdwarf-4" + // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g -g0 %s -### 2>&1 | \ + // RUN: FileCheck --check-prefix=NODEBUG %s + // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 -g0 %s -### 2>&1 | \ +@@ -141,7 +141,7 @@ + // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-2 %s -### 2>&1 | \ + // RUN: FileCheck --check-prefix=GDWARF2 %s + // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf %s -### 2>&1 | \ +-// RUN: FileCheck --check-prefix=GDWARF5 %s ++// RUN: FileCheck --check-prefix=GDWARF4 %s + + // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 %s -### 2>&1 | \ + // RUN: FileCheck --check-prefix=GDWARF5 %s +diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c +index 6d929b19e7e2..373905c2e0fc 100644 +--- a/clang/test/Driver/cl-options.c ++++ b/clang/test/Driver/cl-options.c +@@ -569,7 +569,7 @@ + // RUN: %clang_cl -gdwarf /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s + // Z7_gdwarf-NOT: "-gcodeview" + // Z7_gdwarf: "-debug-info-kind=constructor" +-// Z7_gdwarf: "-dwarf-version= ++// Z7_gdwarf: "-dwarf-version=4 + + // RUN: %clang_cl /ZH:MD5 /c -### -- %s 2>&1 | FileCheck -check-prefix=ZH_MD5 %s + // ZH_MD5: "-gsrc-hash=md5" +diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c +index b1cdf411925a..082162f2cc30 100644 +--- a/clang/test/Driver/clang-g-opts.c ++++ b/clang/test/Driver/clang-g-opts.c +@@ -36,7 +36,7 @@ + + // CHECK-WITHOUT-G-NOT: -debug-info-kind + // CHECK-WITH-G: "-debug-info-kind=constructor" +-// CHECK-WITH-G: "-dwarf-version=5" ++// CHECK-WITH-G: "-dwarf-version=4" + // CHECK-WITH-G-DWARF4: "-dwarf-version=4" + // CHECK-WITH-G-DWARF2: "-dwarf-version=2" + +diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c +index 078341eb1202..6ccbef6a0c36 100644 +--- a/clang/test/Driver/ve-toolchain.c ++++ b/clang/test/Driver/ve-toolchain.c +@@ -6,7 +6,7 @@ + /// Checking dwarf-version + + // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s +-// DWARF_VER: "-dwarf-version=5" ++// DWARF_VER: "-dwarf-version=4" + + ///----------------------------------------------------------------------------- + /// Checking include-path +diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp +index cd48dd792f85..f77781d4c6fa 100644 +--- a/clang/test/Driver/ve-toolchain.cpp ++++ b/clang/test/Driver/ve-toolchain.cpp +@@ -7,7 +7,7 @@ + + // RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \ + // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s +-// DWARF_VER: "-dwarf-version=5" ++// DWARF_VER: "-dwarf-version=4" + + ///----------------------------------------------------------------------------- + /// Checking include-path +-- +2.41.0 + diff --git a/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch b/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch new file mode 100644 index 0000000..3269365 --- /dev/null +++ b/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch @@ -0,0 +1,108 @@ +From e3a1070bbd5f29190cb7b12d02cd8a63b03bbe79 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Thu, 9 Mar 2023 21:52:41 -0800 +Subject: Restore -fopenmp-implicit-rpath, disabled by default + +Used by redhat-rpm-config on older Fedora versions. +--- + clang/include/clang/Driver/Options.td | 6 ++++ + clang/lib/Driver/ToolChains/CommonArgs.cpp | 35 ++++++++++++++++++++++ + clang/lib/Driver/ToolChains/CommonArgs.h | 3 ++ + clang/test/OpenMP/Inputs/libomp.a | 1 + + 4 files changed, 45 insertions(+) + create mode 100644 clang/test/OpenMP/Inputs/libomp.a + +diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td +index 3a028fadb25b..6a3ac3f61e1b 100644 +--- a/clang/include/clang/Driver/Options.td ++++ b/clang/include/clang/Driver/Options.td +@@ -5415,6 +5415,12 @@ def offload_add_rpath: Flag<["--"], "offload-add-rpath">, + def no_offload_add_rpath: Flag<["--"], "no-offload-add-rpath">, + Flags<[NoArgumentUnused]>, + Alias; ++defm openmp_implicit_rpath: BoolFOption<"openmp-implicit-rpath", ++ LangOpts<"OpenMP">, ++ DefaultFalse, ++ PosFlag, ++ NegFlag, ++ BothFlags<[NoArgumentUnused]>>; + def r : Flag<["-"], "r">, Flags<[LinkerInput, NoArgumentUnused]>, + Group; + def regcall4 : Flag<["-"], "regcall4">, Group, +diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp +index faceee85a2f8..c058df97160b 100644 +--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp ++++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp +@@ -1124,6 +1124,39 @@ static void addOpenMPDeviceLibC(const ToolChain &TC, const ArgList &Args, + llvm::append_range(CmdArgs, Libraries); + } + ++void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC, ++ const ArgList &Args, ++ ArgStringList &CmdArgs) { ++ ++ if (Args.hasFlag(options::OPT_fopenmp_implicit_rpath, ++ options::OPT_fno_openmp_implicit_rpath, false)) { ++ // Default to clang lib / lib64 folder, i.e. the same location as device ++ // runtime ++ SmallString<256> DefaultLibPath = ++ llvm::sys::path::parent_path(TC.getDriver().Dir); ++ llvm::sys::path::append(DefaultLibPath, CLANG_INSTALL_LIBDIR_BASENAME); ++ CmdArgs.push_back("-rpath"); ++ CmdArgs.push_back(Args.MakeArgString(DefaultLibPath)); ++ } ++} ++ ++ ++void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC, ++ const ArgList &Args, ++ ArgStringList &CmdArgs) { ++ ++ if (Args.hasFlag(options::OPT_fopenmp_implicit_rpath, ++ options::OPT_fno_openmp_implicit_rpath, false)) { ++ // Default to clang lib / lib64 folder, i.e. the same location as device ++ // runtime ++ SmallString<256> DefaultLibPath = ++ llvm::sys::path::parent_path(TC.getDriver().Dir); ++ llvm::sys::path::append(DefaultLibPath, CLANG_INSTALL_LIBDIR_BASENAME); ++ CmdArgs.push_back("-rpath"); ++ CmdArgs.push_back(Args.MakeArgString(DefaultLibPath)); ++ } ++} ++ + void tools::addOpenMPRuntimeLibraryPath(const ToolChain &TC, + const ArgList &Args, + ArgStringList &CmdArgs) { +@@ -1195,6 +1228,8 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, + addOpenMPDeviceLibC(TC, Args, CmdArgs); + + addArchSpecificRPath(TC, Args, CmdArgs); ++ if (RTKind == Driver::OMPRT_OMP) ++ addOpenMPRuntimeSpecificRPath(TC, Args, CmdArgs); + addOpenMPRuntimeLibraryPath(TC, Args, CmdArgs); + + return true; +diff --git a/clang/lib/Driver/ToolChains/CommonArgs.h b/clang/lib/Driver/ToolChains/CommonArgs.h +index 2db0f889ca82..ab756a181970 100644 +--- a/clang/lib/Driver/ToolChains/CommonArgs.h ++++ b/clang/lib/Driver/ToolChains/CommonArgs.h +@@ -105,6 +105,9 @@ void AddAssemblerKPIC(const ToolChain &ToolChain, + const llvm::opt::ArgList &Args, + llvm::opt::ArgStringList &CmdArgs); + ++void addOpenMPRuntimeSpecificRPath(const ToolChain &TC, ++ const llvm::opt::ArgList &Args, ++ llvm::opt::ArgStringList &CmdArgs); + void addArchSpecificRPath(const ToolChain &TC, const llvm::opt::ArgList &Args, + llvm::opt::ArgStringList &CmdArgs); + void addOpenMPRuntimeLibraryPath(const ToolChain &TC, +diff --git a/clang/test/OpenMP/Inputs/libomp.a b/clang/test/OpenMP/Inputs/libomp.a +new file mode 100644 +index 000000000000..8b277f0dd5dc +--- /dev/null ++++ b/clang/test/OpenMP/Inputs/libomp.a +@@ -0,0 +1 @@ ++! +-- +2.43.0 + diff --git a/0001-Workaround-a-bug-in-ORC-on-ppc64le.patch b/0001-Workaround-a-bug-in-ORC-on-ppc64le.patch new file mode 100644 index 0000000..af236a1 --- /dev/null +++ b/0001-Workaround-a-bug-in-ORC-on-ppc64le.patch @@ -0,0 +1,30 @@ +From a2449cee8c995b56f1892502aab3dfad3d6f3ca1 Mon Sep 17 00:00:00 2001 +From: Tulio Magno Quites Machado Filho +Date: Fri, 8 Sep 2023 11:45:34 -0300 +Subject: [PATCH] Workaround a bug in ORC on ppc64le + +The Jit code appears to be returning the wrong printf symbol on ppc64le +after the transition of the default long double to IEEE 128-bit floating +point. +--- + clang/unittests/Interpreter/InterpreterTest.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp +index abb8e6377aab..7b6697ebc6ed 100644 +--- a/clang/unittests/Interpreter/InterpreterTest.cpp ++++ b/clang/unittests/Interpreter/InterpreterTest.cpp +@@ -243,7 +243,9 @@ TEST(IncrementalProcessing, FindMangledNameSymbol) { + EXPECT_FALSE(!Addr); + + // FIXME: Re-enable when we investigate the way we handle dllimports on Win. +-#ifndef _WIN32 ++ // FIXME: The printf symbol returned from the Jit may not be correct on ++ // ppc64le when the default long double is IEEE 128-bit fp. ++#if !defined _WIN32 && !(defined __PPC64__ && defined __LITTLE_ENDIAN__) + EXPECT_EQ((uintptr_t)&printf, Addr->getValue()); + #endif // _WIN32 + } +-- +2.41.0 + diff --git a/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch b/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch new file mode 100644 index 0000000..37284a2 --- /dev/null +++ b/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch @@ -0,0 +1,84 @@ +From 22d62b32cd3be5fb0ae10723b35a781e0f862b71 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 24 Jan 2023 22:46:25 +0000 +Subject: [PATCH] clang-tools-extra: Make test dependency on LLVMHello optional + +This fixes clang + clang-tools-extra standalone build after +--- + clang-tools-extra/test/CMakeLists.txt | 10 +++++++++- + clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp | 2 +- + clang-tools-extra/test/lit.cfg.py | 3 +++ + clang-tools-extra/test/lit.site.cfg.py.in | 1 + + 4 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt +index f4c529ee8af2..1cfb4dd529aa 100644 +--- a/clang-tools-extra/test/CMakeLists.txt ++++ b/clang-tools-extra/test/CMakeLists.txt +@@ -7,10 +7,15 @@ + set(CLANG_TOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") + set(CLANG_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..") + ++if (TARGET LLVMHello) ++ set (LLVM_HAS_LLVM_HELLO 1) ++endif() ++ + llvm_canonicalize_cmake_booleans( + CLANG_TIDY_ENABLE_STATIC_ANALYZER + CLANG_PLUGIN_SUPPORT + LLVM_INSTALL_TOOLCHAIN_ONLY ++ LLVM_HAS_LLVM_HELLO + ) + + configure_lit_site_cfg( +@@ -86,7 +91,10 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + endif() + + if(TARGET CTTestTidyModule) +- list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello) ++ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) ++ if (TARGET LLVMHello) ++ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) ++ endif() + target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}") + if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN)) + set(LLVM_LINK_COMPONENTS +diff --git a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp +index c66a94f458cf..b4e7a5d691e5 100644 +--- a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp ++++ b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp +@@ -1,4 +1,4 @@ +-// REQUIRES: plugins ++// REQUIRES: plugins, llvm-hello + // RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s + // CHECK-LIST: Enabled checks: + // CHECK-LIST-NEXT: mytest1 +diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py +index 9f64fd3d2ffa..1b258a00ddf9 100644 +--- a/clang-tools-extra/test/lit.cfg.py ++++ b/clang-tools-extra/test/lit.cfg.py +@@ -75,6 +75,9 @@ config.substitutions.append(("%clang_tidy_headers", clang_tidy_headers)) + if config.has_plugins and config.llvm_plugin_ext: + config.available_features.add("plugins") + ++if config.has_llvm_hello: ++ config.available_features.add("llvm-hello") ++ + # It is not realistically possible to account for all options that could + # possibly be present in system and user configuration files, so disable + # default configs for the test runs. +diff --git a/clang-tools-extra/test/lit.site.cfg.py.in b/clang-tools-extra/test/lit.site.cfg.py.in +index 4eb830a1baf1..6e5559348454 100644 +--- a/clang-tools-extra/test/lit.site.cfg.py.in ++++ b/clang-tools-extra/test/lit.site.cfg.py.in +@@ -11,6 +11,7 @@ config.target_triple = "@LLVM_TARGET_TRIPLE@" + config.host_triple = "@LLVM_HOST_TRIPLE@" + config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@ + config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@ ++config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@ + # Support substitution of the tools and libs dirs with user parameters. This is + # used when we can't determine the tool dir at configuration time. + config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@") +-- +2.40.1 + diff --git a/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch b/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch new file mode 100644 index 0000000..e425475 --- /dev/null +++ b/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch @@ -0,0 +1,39 @@ +From 3dc5722d5c7673a879f2b4680369d3ac8b6b64b6 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Wed, 4 Aug 2021 14:05:38 -0700 +Subject: [PATCH] cmake: Allow shared libraries to customize the soname using + LLVM_ABI_REVISION + +The LLVM_ABI_REVISION variable is intended to be used for release +candidates which introduce an ABI change to a shared library. This +variable can be specified per library, so there is not one global value +for all of LLVM. + +For example, if we LLVM X.0.0-rc2 introduces an ABI change for a library +compared with LLVM X.0.0-rc1, then the LLVM_ABI_REVISION number for +library will be incremented by 1. + +In the main branch, LLVM_ABI_REVISION should always be 0, it is only +meant to be used in the release branch. + +Differential Revision: https://reviews.llvm.org/D105594 +--- + clang/tools/clang-shlib/CMakeLists.txt | 5 +++++ + 3 files changed, 19 insertions(+), 2 deletions(-) + +diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt +index 9c1f8ea452b3..4d785924e4bb 100644 +--- a/clang/tools/clang-shlib/CMakeLists.txt ++++ b/clang/tools/clang-shlib/CMakeLists.txt +@@ -1,3 +1,8 @@ ++# In the main branch, LLVM_ABI_REVISION should always be 0. In the release ++# branches, this should be incremented before each release candidate every ++# time the ABI of libclang-cpp.so changes. ++set(LLVM_ABI_REVISION 0) ++ + # Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off + if (NOT LLVM_ENABLE_PIC) + return() +-- +2.27.0 + diff --git a/0003-PATCH-clang-Don-t-install-static-libraries.patch b/0003-PATCH-clang-Don-t-install-static-libraries.patch new file mode 100644 index 0000000..bc8fa51 --- /dev/null +++ b/0003-PATCH-clang-Don-t-install-static-libraries.patch @@ -0,0 +1,25 @@ +From 88704fc2eabb9dd19a9c3eb81a9b3dc37d95651c Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Fri, 31 Jan 2020 11:04:57 -0800 +Subject: [PATCH][clang] Don't install static libraries + +--- + clang/cmake/modules/AddClang.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake +index 5752f4277444..0f52822d91f0 100644 +--- a/clang/cmake/modules/AddClang.cmake ++++ b/clang/cmake/modules/AddClang.cmake +@@ -113,7 +113,7 @@ macro(add_clang_library name) + if(TARGET ${lib}) + target_link_libraries(${lib} INTERFACE ${LLVM_COMMON_LIBS}) + +- if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN) ++ if (ARG_SHARED AND (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} +-- +2.30.2 + diff --git a/0009-disable-myst-parser.patch b/0009-disable-myst-parser.patch new file mode 100644 index 0000000..12a5154 --- /dev/null +++ b/0009-disable-myst-parser.patch @@ -0,0 +1,26 @@ +From 988dd3f3363d8ab4ee53f61e0eb5afc6646c9d4f Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Tue, 26 Sep 2023 13:06:29 +0200 +Subject: [PATCH] disable myst parser + +--- + clang/docs/conf.py | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/clang/docs/conf.py b/clang/docs/conf.py +index ca310026f53e..dfb74273b5b2 100644 +--- a/clang/docs/conf.py ++++ b/clang/docs/conf.py +@@ -35,9 +35,6 @@ templates_path = ["_templates"] + + import sphinx + +-if sphinx.version_info >= (3, 0): +- extensions.append("myst_parser") +- + # The encoding of source files. + # source_encoding = 'utf-8-sig' + +-- +2.41.0 + diff --git a/0101-Deactivate-markdown-doc.patch b/0101-Deactivate-markdown-doc.patch index a8409aa..693a69f 100644 --- a/0101-Deactivate-markdown-doc.patch +++ b/0101-Deactivate-markdown-doc.patch @@ -1,8 +1,17 @@ +From a9fb2cb9a29e50bf4ba3c2e470e52ea091a807e5 Mon Sep 17 00:00:00 2001 +From: Konrad Kleine +Date: Fri, 3 Nov 2023 20:55:14 +0000 +Subject: [PATCH] Deactivate-markdown-doc + +--- + llvm/docs/conf.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py -index cf8a75980b53..b208ad138e89 100644 +index 0a3905201c85..81326257856a 100644 --- a/llvm/docs/conf.py +++ b/llvm/docs/conf.py -@@ -26,7 +26,7 @@ from datetime import date +@@ -26,7 +26,7 @@ sys.path.insert(0, os.path.abspath(".")) # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. diff --git a/DistributionFedora-stage2.cmake b/DistributionFedora-stage2.cmake new file mode 100644 index 0000000..99d5dc0 --- /dev/null +++ b/DistributionFedora-stage2.cmake @@ -0,0 +1,33 @@ +# This file sets up a CMakeCache for the second stage of a simple distribution +# bootstrap build. + +set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "") +set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "") + +set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "") + +set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") +set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "") + +# setup toolchain +set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") +set(LLVM_TOOLCHAIN_TOOLS + dsymutil + llvm-cov + llvm-dwarfdump + llvm-profdata + llvm-objdump + llvm-nm + llvm-size + CACHE STRING "") + +set(LLVM_DISTRIBUTION_COMPONENTS + clang + LTO + clang-format + clang-resource-headers + builtins + runtimes + ${LLVM_TOOLCHAIN_TOOLS} + CACHE STRING "") diff --git a/DistributionFedora.cmake b/DistributionFedora.cmake new file mode 100644 index 0000000..992d207 --- /dev/null +++ b/DistributionFedora.cmake @@ -0,0 +1,55 @@ +# This file sets up a CMakeCache for a simple distribution bootstrap build. + +# For the Jira project entitled "LLVM" you can open +# https://issues.redhat.com/rest/api/2/project/LLVM to find its pid. "1" stands +# for the issue type "Bug". +set(BUG_REPORT_URL "https://issues.redhat.com/secure/CreateIssue.jspa?issuetype=1&pid=12339624" CACHE STRING "") + +#Enable LLVM projects and runtimes +set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "") +set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "") + +# Only build the native target in stage1 since it is a throwaway build. +set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "") + +# Optimize the stage1 compiler, but don't LTO it because that wastes time. +set(CMAKE_BUILD_TYPE Release CACHE STRING "") + +# Setup vendor-specific settings. +set(PACKAGE_VENDOR LLVM.org CACHE STRING "") + +# Setting up the stage2 LTO option needs to be done on the stage1 build so that +# the proper LTO library dependencies can be connected. +set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") + +if (NOT APPLE) + # Since LLVM_ENABLE_LTO is ON we need a LTO capable linker + set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") +endif() + +# Expose stage2 targets through the stage1 build configuration. +set(CLANG_BOOTSTRAP_TARGETS + check-all + check-llvm + check-clang + llvm-config + test-suite + test-depends + llvm-test-depends + clang-test-depends + distribution + install-distribution + clang CACHE STRING "") + +# Setup the bootstrap build. +set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "") + +if(STAGE2_CACHE_FILE) + set(CLANG_BOOTSTRAP_CMAKE_ARGS + -C ${STAGE2_CACHE_FILE} + CACHE STRING "") +else() + set(CLANG_BOOTSTRAP_CMAKE_ARGS + -C ${CMAKE_CURRENT_LIST_DIR}/DistributionFedora-stage2.cmake + CACHE STRING "") +endif() diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..89a64f4 --- /dev/null +++ b/Makefile @@ -0,0 +1,96 @@ + +YYYYMMDD=$(shell date +%Y%m%d) +OUTDIR=$(shell pwd)/out +SPEC=llvm.spec +BUILDDIR=$(shell pwd)/BUILD +BUILDROOTDIR=$(shell pwd)/BUILD +SOURCEDIR=$(shell pwd) +FEDORA_RELEASE=f39 + +.PHONY: setup +setup: + mkdir -pv $(OUTDIR) + mkdir -pv $(BUILDDIR) + mkdir -pv $(BUILDROOTDIR) + mkdir -pv $(SOURCEDIR) + + YYYYMMDD=$(YYYYMMDD) ./.copr/snapshot-info.sh > $(SOURCEDIR)/version.spec.inc + +.PHONY: local-srpm +local-srpm: setup + rpmbuild \ + --define "yyyymmdd $(YYYYMMDD)" \ + --define "_srcrpmdir $(OUTDIR)" \ + --define "_sourcedir $(SOURCEDIR)" \ + --define "_disable_source_fetch 0" \ + -bs $(SPEC) + +.PHONY: local-rpm +local-rpm: setup + fedpkg --release $(FEDORA_RELEASE) -v \ + local \ + --builddir $(BUILDDIR) \ + --buildrootdir $(BUILDROOTDIR) \ + --define "yyyymmdd $(YYYYMMDD)" \ + --define "_disable_source_fetch 0" \ + -- $(SPEC) + +.PHONY: local-clean +local-clean: + -rm -rf $(BUILDDIR) + -rm -rf $(BUILDROOTDIR) + -rm -rf $(OUTDIR) + -rm -f *.txt + -rm -f *.tar.xz + -rm -f *.tar.xz.sig + -rm -rf x86_64 + -rm -rf noarch + -rm -rf *.src.rpm + +.PHONY: local-list-check +local-list-check: setup + fedpkg --release $(FEDORA_RELEASE) -v \ + local \ + --builddir $(BUILDDIR) \ + --buildrootdir $(BUILDROOTDIR) \ + --define "yyyymmdd $(YYYYMMDD)" \ + --define "_disable_source_fetch 0" \ + -- $(SPEC) -bl + +.PHONY: local-prep +local-prep: setup + fedpkg --release $(FEDORA_RELEASE) -v \ + prep \ + --builddir $(BUILDDIR) \ + --buildrootdir $(BUILDROOTDIR) \ + --define "yyyymmdd $(YYYYMMDD)" \ + --define "_disable_source_fetch 0" \ + -- $(SPEC) + + +.PHONY: local-tmt-vm +local-tmt-vm: + # This is to ensure the required packages are installed + rpm -q tmt tmt+provision-virtual + # This is to check if you've started libvirt + # If this fails, run: sudo systemctl start libvirtd + # systemctl status libvirtd --no-pager + # In case of: Failed to boot testcloud instance (authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage') + # Add yourself to libvirt group: sudo usermod -a -G libvirt $USER + cat /etc/group | grep libvirt | grep $(USER) + tmt \ + -c distro=fedora-rawhide \ + -c arch=x86_64 \ + -c snapshot=20240124 + run \ + -avv \ + provision \ + -h virtual.testcloud \ + -c system \ + -i fedora-rawhide \ + prepare \ + -h install \ + -c fedora-llvm-team/llvm-snapshots-big-merge-20240124 \ + test \ + report + diff --git a/build.spec.inc b/build.spec.inc new file mode 100644 index 0000000..b56c13a --- /dev/null +++ b/build.spec.inc @@ -0,0 +1,213 @@ +# Disable LTO to speed up builds +%if %{with snapshot_build} +%global _lto_cflags %nil +%endif + +# TODO(kkleine): In clang we had this %ifarch s390 s390x %{arm} aarch64 %ix86 ppc64le +%ifarch s390 s390x %{arm} %ix86 +# Decrease debuginfo verbosity to reduce memory consumption during final library linking +%global optflags %(echo %{optflags} | sed 's/-g /-g1 /') +%endif + +# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files. +export ASMFLAGS="%{build_cflags}" + +# We set CLANG_DEFAULT_PIE_ON_LINUX=OFF and PPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON to match the +# defaults used by Fedora's GCC. + +#region BEGIN: COPIED FROM CLANG + +# And disable LTO on AArch64 entirely. +%ifarch aarch64 +%define _lto_cflags %{nil} +%endif + +# TODO(kkleine): Make sure the paths actually work. I have the feeling this needs adjustment +pwd +%if 0%{?__isa_bits} == 64 +sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' llvm/test/lit.cfg.py +%else +sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' llvm/test/lit.cfg.py +%endif + +# Disable dwz on aarch64, because it takes a huge amount of time to decide not to optimize things. +%ifarch aarch64 +%define _find_debuginfo_dwz_opts %{nil} +%endif + +#endregion + +export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:`pwd`/llvm/%{_vpath_builddir}/%{_lib}" + +cd llvm + +# TODO(kkleine): Follow more closely the Distribution guidelines found here: https://llvm.org/docs/BuildingADistribution.html +# force off shared libs as cmake macros turns it on. +# TODO: Disable LLVM_UNREACHABLE_OPTIMIZE. +# TODO: LIBOMP_HAVE_VERSION_SCRIPT_FLAG should be set automatically. +%cmake -G Ninja \ + -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \ + \ + \ + -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ +%if 0%{?fedora} || 0%{?rhel} > 9 + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON \ +%endif + -DPYTHON_EXECUTABLE=%{__python3} \ +%if %{with compat_build} + -DLLVM_INCLUDE_TESTS:BOOL=OFF \ + -DCLANG_INCLUDE_TESTS:BOOL=OFF \ + -DCLANG_BUILD_TOOLS:BOOL=OFF \ +%else + -DLLVM_INCLUDE_TESTS:BOOL=ON \ + -DCLANG_INCLUDE_TESTS:BOOL=ON \ + -DLLVM_BUILD_UTILS:BOOL=ON \ +%endif + -DCLANG_ENABLE_ARCMT:BOOL=ON \ + -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \ + -DCLANG_INCLUDE_DOCS:BOOL=ON \ + -DCLANG_PLUGIN_SUPPORT:BOOL=ON \ + -DENABLE_LINKER_BUILD_ID:BOOL=ON \ + -DLLVM_ENABLE_EH=ON \ + -DCLANG_LINK_CLANG_DYLIB=ON \ + -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ + -DCLANG_REPOSITORY_STRING="%{?dist_vendor} %{version}-%{release}" \ + -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra \ + -DCLANG_CONFIG_FILE_SYSTEM_DIR=%{_sysconfdir}/%{pkg_name_clang}/ \ +%ifarch %{arm} + -DCLANG_DEFAULT_LINKER=lld \ +%endif + -DCLANG_DEFAULT_UNWINDLIB=libgcc \ + \ + \ + \ + \ +%if %{without compat_build} +-DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp" \ +%endif + \ + \ + \ + \ + \ +%if %{without compat_build} + -DCOMPILER_RT_INSTALL_PATH=%{_prefix}/lib/clang/%{maj_ver} \ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \ + -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF \ +%endif + \ + \ + \ + \ + \ +%if %{without compat_build} + -DLIBOMP_HAVE_VERSION_SCRIPT_FLAG:BOOL=ON \ + -DLIBOMP_INSTALL_ALIASES=OFF \ +%if 0%{?__isa_bits} == 64 + -DOPENMP_LIBDIR_SUFFIX=64 \ +%else + -DOPENMP_LIBDIR_SUFFIX= \ +%endif +%endif + \ + \ + \ + \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DLLVM_PARALLEL_LINK_JOBS=1 \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_SKIP_RPATH:BOOL=ON \ +%ifarch s390 %{arm} %ix86 + -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ +%endif +%if %{without compat_build} +%if 0%{?__isa_bits} == 64 + -DLLVM_LIBDIR_SUFFIX=64 \ +%else + -DLLVM_LIBDIR_SUFFIX= \ +%endif +%endif + \ + -DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \ + -DLLVM_ENABLE_LIBCXX:BOOL=OFF \ + -DLLVM_ENABLE_ZLIB:BOOL=ON \ + -DLLVM_ENABLE_FFI:BOOL=ON \ + -DLLVM_ENABLE_RTTI:BOOL=ON \ + -DLLVM_USE_PERF:BOOL=ON \ +%if %{with gold} + -DLLVM_BINUTILS_INCDIR=%{_includedir} \ +%endif + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \ + \ + -DLLVM_BUILD_RUNTIME:BOOL=ON \ + \ + -DLLVM_INCLUDE_TOOLS:BOOL=ON \ + -DLLVM_BUILD_TOOLS:BOOL=ON \ + \ + -DLLVM_BUILD_TESTS:BOOL=ON \ +%if %{with compat_build} + -DLLVM_INSTALL_GTEST:BOOL=OFF \ +%else + -DLLVM_INSTALL_GTEST:BOOL=ON \ +%endif + -DLLVM_LIT_ARGS=-vv \ + \ + -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \ + -DLLVM_BUILD_EXAMPLES:BOOL=OFF \ + \ + -DLLVM_INCLUDE_UTILS:BOOL=ON \ +%if %{with compat_build} + -DLLVM_INSTALL_UTILS:BOOL=OFF \ +%else + -DLLVM_INSTALL_UTILS:BOOL=ON \ + -DLLVM_UTILS_INSTALL_DIR:PATH=%{_bindir} \ + -DLLVM_TOOLS_INSTALL_DIR:PATH=bin \ +%endif + \ + -DLLVM_INCLUDE_DOCS:BOOL=ON \ + -DLLVM_BUILD_DOCS:BOOL=ON \ + -DLLVM_ENABLE_SPHINX:BOOL=ON \ + -DLLVM_ENABLE_DOXYGEN:BOOL=OFF \ + \ +%if %{with snapshot_build} + -DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \ +%else +%if %{without compat_build} + -DLLVM_VERSION_SUFFIX='' \ +%endif +%endif + -DLLVM_UNREACHABLE_OPTIMIZE:BOOL=ON \ + -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ + -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ + -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \ + -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \ + -DLLVM_DEFAULT_TARGET_TRIPLE=%{llvm_triple} \ + -DSPHINX_WARNINGS_AS_ERRORS=OFF \ + -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ + -DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \ + -DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error" \ +%if %{without snapshot_build} + -DLLVM_UNITTEST_LINK_FLAGS="-Wl,-plugin-opt=O0" +%endif + +# Build libLLVM.so first. This ensures that when libLLVM.so is linking, there +# are no other compile jobs running. This will help reduce OOM errors on the +# builders without having to artificially limit the number of concurrent jobs. +%cmake_build --target LLVM + +%cmake_build + +# If we don't build the runtimes target here, we'll have to wait for the %check +# section until these files are available but they need to be installed. +# +# /usr/lib64/libomptarget.devicertl.a +# /usr/lib64/libomptarget-amdgpu-*.bc +# /usr/lib64/libomptarget-nvptx-*.bc + +%cmake_build --target runtimes + +cd .. diff --git a/changelog.spec.inc b/changelog.spec.inc new file mode 100644 index 0000000..2299b19 --- /dev/null +++ b/changelog.spec.inc @@ -0,0 +1,754 @@ +%{?llvm_snapshot_changelog_entry} + +* Tue Aug 01 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-2 +- Enable LLVM_UNREACHABLE_OPTIMIZE temporarily + +* Mon Jul 31 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-1 +- Update to LLVM 17.0.0 RC1 + +* Mon Jul 31 2023 Tulio Magno Quites Machado Filho - 16.0.6-6 +- Fix rhbz #2224885 + +* Thu Jul 20 2023 Fedora Release Engineering - 16.0.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jul 10 2023 Tulio Magno Quites Machado Filho - 16.0.6-4 +- Use LLVM_UNITTEST_LINK_FLAGS to reduce link times for unit tests + +* Mon Jul 03 2023 Tulio Magno Quites Machado Filho - 16.0.6-3 +- Improve error messages for unsupported relocs on s390x (rhbz#2216906) +- Disable LLVM_UNREACHABLE_OPTIMIZE + +* Wed Jun 14 2023 Tulio Magno Quites Machado Filho - 16.0.6-1 +- Update to LLVM 16.0.6 + +* Fri Jun 09 2023 Nikita Popov - 16.0.5-2 +- Split off llvm-cmake-utils package + +* Mon Jun 05 2023 Tulio Magno Quites Machado Filho - 16.0.5-1 +- Update to LLVM 16.0.5 + +* Fri May 19 2023 Yaakov Selkowitz - 16.0.4-2 +- Avoid recommonmark dependency in RHEL builds + +* Thu May 18 2023 Tulio Magno Quites Machado Filho - 16.0.4-1 +- Update to LLVM 16.0.4 + +* Tue May 09 2023 Tulio Magno Quites Machado Filho - 16.0.3-1 +- Update to LLVM 16.0.3 + +* Tue Apr 25 2023 Tulio Magno Quites Machado Filho - 16.0.2-1 +- Update to LLVM 16.0.2 + +* Tue Apr 11 2023 Tulio Magno Quites Machado Filho - 16.0.1-1 +- Update to LLVM 16.0.1 + +* Thu Mar 23 2023 Tulio Magno Quites Machado Filho - 16.0.0-2 +- Distribute libllvm_gtest.a and libllvm_gtest_main.a with llvm-googletest +- Stop distributing /usr/share/llvm/src/utils + +* Mon Mar 20 2023 Tulio Magno Quites Machado Filho - 16.0.0-1 +- Update to LLVM 16.0.0 + +* Thu Mar 16 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-2 +- Fix the ppc64le triple + +* Tue Mar 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-1 +- Update to LLVM 16.0.0 RC4 + +* Fri Mar 10 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-2 +- Fix llvm-exegesis failures on s390x + +* Wed Feb 22 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-1 +- Update to LLVM 16.0.0 RC3 + +* Wed Feb 01 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc1-1 +- Update to LLVM 16.0.0 RC1 + +* Thu Jan 19 2023 Tulio Magno Quites Machado Filho - 15.0.7-3 +- Update license to SPDX identifiers. +- Include the Apache license adopted in 2019. + +* Thu Jan 19 2023 Fedora Release Engineering - 15.0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jan 12 2023 Nikita Popov - 15.0.7-1 +- Update to LLVM 15.0.7 + +* Mon Jan 09 2023 Tom Stellard - 15.0.6-3 +- Omit frame pointers when building + +* Mon Dec 19 2022 Nikita Popov - 15.0.6-2 +- Remove workaround for rbhz#2048440 + +* Mon Dec 05 2022 Nikita Popov - 15.0.6-1 +- Update to LLVM 15.0.6 + +* Fri Nov 11 2022 Nikita Popov - 15.0.4-2 +- Copy CFLAGS to ASMFLAGs to enable CET in asm files + +* Wed Nov 02 2022 Nikita Popov - 15.0.4-1 +- Update to LLVM 15.0.4 + +* Tue Sep 27 2022 Nikita Popov - 15.0.0-2 +- Export GetHostTriple.cmake + +* Tue Sep 06 2022 Nikita Popov - 15.0.0-1 +- Update to LLVM 15.0.0 + +* Thu Jul 21 2022 Fedora Release Engineering - 14.0.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jun 17 2022 Timm Bäder - 14.0.5-2 +- Release bump for new redhat-rpm-config + +* Mon Jun 13 2022 Timm Bäder - 14.0.5-1 +- 14.0.5 Release + +* Wed May 18 2022 Tom Stellard - 14.0.3-1 +- 14.0.3 Release + +* Fri Apr 29 2022 Timm Bäder - 14.0.0-2 +- Remove llvm-cmake-devel package + +* Wed Mar 23 2022 Timm Bäder - 14.0.0-1 +- Update to LLVM 14.0.0 + +* Wed Feb 02 2022 Nikita Popov - 13.0.1-1 +- Update to LLVM 13.0.1 final + +* Tue Jan 25 2022 Nikita Popov - 13.0.1~rc3-1 +- Update to LLVM 13.0.1rc3 + +* Thu Jan 20 2022 Fedora Release Engineering - 13.0.1~rc2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jan 13 2022 Nikita Popov - 13.0.1~rc2-1 +- Update to LLVM 13.0.1rc2 + +* Mon Jan 10 2022 Nikita Popov - 13.0.1~rc1-1 +- Upstream 13.0.1 rc1 release + +* Sat Jan 08 2022 Miro Hrončok - 13.0.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34 + +* Thu Nov 11 2021 Tom Stellard - 13.0.0-7 +- Enable lto on s390x and arm + +* Mon Oct 25 2021 Tom Stellard - 13.0.0-6 +- Build with Thin LTO + +* Mon Oct 18 2021 Tom Stellard - 13.0.0-5 +- Build with clang + +* Fri Oct 08 2021 Tom Stellard - 13.0.0-4 +- Fix default triple on arm + +* Wed Oct 06 2021 Tom Stellard - 13.0.0-3 +- Set default triple + +* Mon Oct 04 2021 Tom Stellard - 13.0.0-2 +- Drop abi_revision from soname + +* Thu Sep 30 2021 Tom Stellard - 13.0.0-1 +- 13.0.0 Release + +* Thu Sep 30 2021 Tom Stellard - 13.0.0~rc4-2 +- Restore config.guess for host triple detection + +* Fri Sep 24 2021 Tom Stellard - 13.0.0~rc4-1 +- 13.0.0-rc4 Release + +* Fri Sep 17 2021 Tom Stellard - 13.0.0~rc3-1 +- 13.0.0-rc3 Release + +* Mon Sep 13 2021 Tom Stellard - 13.0.0~rc1-3 +- Pass LLVM_DEFAULT_TARGET_TRIPLE to cmake + +* Mon Sep 13 2021 Konrad Kleine - 13.0.0~rc1-2 +- Add --without=check option + +* Wed Aug 04 2021 Tom Stellard - 13.0.0~rc1-1 +- 13.0.0-rc1 Release + +* Thu Jul 22 2021 sguelton@redhat.com - 12.0.1-3 +- Maintain versionned link to llvm-config + +* Thu Jul 22 2021 Fedora Release Engineering - 12.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jul 12 2021 Tom Stellard - 12.0.1-1 +- 12.0.1 Release + +* Wed Jun 30 2021 Tom Stellard - llvm-12.0.1~rc3-1 +- 12.0.1-rc3 Release + +* Fri May 28 2021 Tom Stellard - 12.0.1~rc1-2 +- Stop installing lit tests + +* Wed May 26 2021 Tom Stellard - llvm-12.0.1~rc1-1 +- 12.0.1-rc1 Release + +* Mon May 17 2021 sguelton@redhat.com - 12.0.0-7 +- Fix handling of llvm-config + +* Mon May 03 2021 kkleine@redhat.com - 12.0.0-6 +- More verbose builds thanks to python3-psutil + +* Sat May 01 2021 sguelton@redhat.com - 12.0.0-5 +- Fix llvm-config install + +* Tue Apr 27 2021 sguelton@redhat.com - 12.0.0-4 +- Provide default empty value for exec_suffix when not in compat mode + +* Tue Apr 27 2021 sguelton@redhat.com - 12.0.0-3 +- Fix llvm-config install + +* Tue Apr 20 2021 sguelton@redhat.com - 12.0.0-2 +- Backport compat package fix + +* Thu Apr 15 2021 Tom Stellard - 12.0.0-1 +- 12.0.0 Release + +* Thu Apr 08 2021 sguelton@redhat.com - 12.0.0-0.11.rc5 +- New upstream release candidate + +* Tue Apr 06 2021 sguelton@redhat.com - 12.0.0-0.10.rc4 +- Patch test case for compatibility with llvm-test latout + +* Fri Apr 02 2021 sguelton@redhat.com - 12.0.0-0.9.rc4 +- New upstream release candidate + +* Wed Mar 31 2021 Jonathan Wakely - 12.0.0-0.8.rc3 +- Rebuilt for removed libstdc++ symbols (#1937698) + +* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-0.7.rc3 +- LLVM 12.0.0 rc3 + +* Wed Mar 10 2021 Kalev Lember - 12.0.0-0.6.rc2 +- Add llvm-static(major) provides to the -static subpackage + +* Tue Mar 09 2021 sguelton@redhat.com - 12.0.0-0.5.rc2 +- rebuilt + +* Tue Mar 02 2021 sguelton@redhat.com - 12.0.0-0.4.rc2 +- Change CI working dir + +* Wed Feb 24 2021 sguelton@redhat.com - 12.0.0-0.3.rc2 +- 12.0.0-rc2 release + +* Tue Feb 16 2021 Dave Airlie - 12.0.0-0.2.rc1 +- Enable LLVM_USE_PERF to allow perf integration + +* Tue Feb 2 2021 Serge Guelton - 12.0.0-0.1.rc1 +- 12.0.0-rc1 release + +* Tue Jan 26 2021 Fedora Release Engineering - 11.1.0-0.3.rc2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 22 2021 Serge Guelton - 11.1.0-0.2.rc2 +- 11.1.0-rc2 release + +* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1 +- 11.1.0-rc1 release + +* Tue Jan 05 2021 Serge Guelton - 11.0.1-3.rc2 +- Waive extra test case + +* Sun Dec 20 2020 sguelton@redhat.com - 11.0.1-2.rc2 +- 11.0.1-rc2 release + +* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1 +- 11.0.1-rc1 release + +* Sat Oct 31 2020 Jeff Law - 11.0.0-2 +- Fix missing #include for gcc-11 + +* Wed Oct 14 2020 Josh Stone - 11.0.0-1 +- Fix coreos-installer test crash on s390x (rhbz#1883457) + +* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.11 +- llvm 11.0.0 - final release + +* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.10.rc6 +- 11.0.0-rc6 + +* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.9.rc5 +- 11.0.0-rc5 Release + +* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.8.rc3 +- Fix NVR + +* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.2.rc3 +- Obsolete patch for rhbz#1862012 + +* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3 +- 11.0.0-rc3 Release + +* Wed Sep 02 2020 sguelton@redhat.com - 11.0.0-0.7.rc2 +- Apply upstream patch for rhbz#1862012 + +* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.6.rc2 +- Fix source location + +* Fri Aug 21 2020 Tom Stellard - 11.0.0-0.5.rc2 +- 11.0.0-rc2 Release + +* Wed Aug 19 2020 Tom Stellard - 11.0.0-0.4.rc1 +- Fix regression-tests CI tests + +* Tue Aug 18 2020 Tom Stellard - 11.0.0-0.3.rc1 +- Fix rust crash on ppc64le compiling firefox +- rhbz#1862012 + +* Tue Aug 11 2020 Tom Stellard - 11.0.0-0.2.rc1 +- Install update_cc_test_checks.py script + +* Thu Aug 06 2020 Tom Stellard - 11.0.0-0.1-rc1 +- LLVM 11.0.0-rc1 Release +- Make llvm-devel require llvm-static and llvm-test + +* Tue Aug 04 2020 Tom Stellard - 10.0.0-10 +- Backport upstream patch to fix build with -flto. +- Disable LTO on s390x to work-around unit test failures. + +* Sat Aug 01 2020 sguelton@redhat.com - 10.0.0-9 +- Fix update-alternative uninstall script + +* Sat Aug 01 2020 sguelton@redhat.com - 10.0.0-8 +- Fix gpg verification and update macro usage. + +* Sat Aug 01 2020 Fedora Release Engineering - 10.0.0-7 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 10.0.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild +* Thu Jun 11 2020 sguelton@redhat.com - 10.0.0-5 +- Make llvm-test.tar.gz creation reproducible. + +* Tue Jun 02 2020 sguelton@redhat.com - 10.0.0-4 +- Instruct cmake not to generate RPATH + +* Thu Apr 30 2020 Tom Stellard - 10.0.0-3 +- Install LLVMgold.so symlink in bfd-plugins directory + +* Tue Apr 07 2020 sguelton@redhat.com - 10.0.0-2 +- Do not package UpdateTestChecks tests in llvm-tests +- Apply upstream patch bab5908df to pass gating tests + +* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-1 +- 10.0.0 final + +* Mon Mar 23 2020 sguelton@redhat.com - 10.0.0-0.6.rc6 +- 10.0.0 rc6 + +* Thu Mar 19 2020 sguelton@redhat.com - 10.0.0-0.5.rc5 +- 10.0.0 rc5 + +* Sat Mar 14 2020 sguelton@redhat.com - 10.0.0-0.4.rc4 +- 10.0.0 rc4 + +* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.3.rc3 +- 10.0.0 rc3 + +* Fri Feb 28 2020 sguelton@redhat.com - 10.0.0-0.2.rc2 +- Remove *_finite support, see rhbz#1803203 + +* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.1.rc2 +- 10.0.0 rc2 + +* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1 +- 10.0.0 rc1 + +* Wed Jan 29 2020 Fedora Release Engineering - 9.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 21 2020 Tom Stellard - 9.0.1-4 +- Rebuild after previous build failed to strip binaries + +* Fri Jan 17 2020 Tom Stellard - 9.0.1-3 +- Add explicit Requires from sub-packages to llvm-libs + +* Fri Jan 10 2020 Tom Stellard - 9.0.1-2 +- Fix crash with kernel bpf self-tests + +* Thu Dec 19 2019 tstellar@redhat.com - 9.0.1-1 +- 9.0.1 Release + +* Mon Nov 25 2019 sguelton@redhat.com - 9.0.0-4 +- Activate AVR on all architectures + +* Mon Sep 30 2019 Tom Stellard - 9.0.0-3 +- Build libLLVM.so first to avoid OOM errors + +* Fri Sep 27 2019 Tom Stellard - 9.0.0-2 +- Remove unneeded BuildRequires: libstdc++-static + +* Thu Sep 19 2019 sguelton@redhat.com - 9.0.0-1 +- 9.0.0 Release + +* Wed Sep 18 2019 sguelton@redhat.com - 9.0.0-0.5.rc3 +- Support avr target, see rhbz#1718492 + +* Tue Sep 10 2019 Tom Stellard - 9.0.0-0.4.rc3 +- Split out test executables into their own export file + +* Fri Sep 06 2019 Tom Stellard - 9.0.0-0.3.rc3 +- Fix patch for splitting out static library exports + +* Fri Aug 30 2019 Tom Stellard - 9.0.0-0.2.rc3 +- 9.0.0-rc3 Release + +* Thu Aug 01 2019 Tom Stellard - 9.0.0-0.1.rc2 +- 9.0.0-rc2 Release + +* Tue Jul 30 2019 Tom Stellard - 8.0.0-9 +- Sync with llvm8.0 spec file + +* Thu Jul 25 2019 Fedora Release Engineering - 8.0.0-8.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Jul 17 2019 Tom Stellard - 8.0.0-8 +- Add provides for the major version of sub-packages + +* Fri May 17 2019 sguelton@redhat.com - 8.0.0-7 +- Fix conflicts between llvm-static = 8 and llvm-dev < 8 around LLVMStaticExports.cmake + +* Wed Apr 24 2019 Tom Stellard - 8.0.0-6 +- Make sure we aren't passing -g on s390x + +* Sat Mar 30 2019 Tom Stellard - 8.0.0-5 +- Enable build rpath while keeping install rpath disabled + +* Wed Mar 27 2019 Tom Stellard - 8.0.0-4 +- Backport r351577 from trunk to fix ninja check failures + +* Tue Mar 26 2019 Tom Stellard - 8.0.0-3 +- Fix ninja check + +* Fri Mar 22 2019 Tom Stellard - 8.0.0-2 +- llvm-test fixes + +* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1 +- 8.0.0 final + +* Fri Mar 15 2019 sguelton@redhat.com - 8.0.0-0.6.rc4 +- Activate all backends (rhbz#1689031) + +* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.5.rc4 +- 8.0.0 Release candidate 4 + +* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.4.rc3 +- Move some binaries to -test package, cleanup specfile + +* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3 +- 8.0.0 Release candidate 3 + +* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2 +- 8.0.0 Release candidate 2 + +* Sat Feb 9 2019 sguelton@redhat.com - 8.0.0-0.1.rc1 +- 8.0.0 Release candidate 1 + +* Fri Feb 01 2019 Fedora Release Engineering - 7.0.1-2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 21 2019 Josh Stone - 7.0.1-2 +- Fix discriminators in metadata, rhbz#1668033 + +* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1 +- 7.0.1 release + +* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-5 +- Ensure rpmlint passes on specfile + +* Sat Nov 17 2018 Tom Stellard - 7.0.0-4 +- Install testing libraries for unittests + +* Sat Oct 27 2018 Tom Stellard - 7.0.0-3 +- Fix running unittests as not-root user + +* Thu Sep 27 2018 Tom Stellard - 7.0.0-2 +- Fixes for llvm-test package: +- Add some missing Requires +- Add --threads option to run-lit-tests script +- Set PATH so lit can find tools like count, not, etc. +- Don't hardcode tools directory to /usr/lib64/llvm +- Fix typo in yaml-bench define +- Only print information about failing tests + +* Fri Sep 21 2018 Tom Stellard - 7.0.0-1 +- 7.0.0 Release + +* Thu Sep 13 2018 Tom Stellard - 7.0.0-0.15.rc3 +- Disable rpath on install LLVM and related sub-projects + +* Wed Sep 12 2018 Tom Stellard - 7.0.0-0.14.rc3 +- Remove rpath from executables and libraries + +* Tue Sep 11 2018 Tom Stellard - 7.0.0-0.13.rc3 +- Re-enable arm and aarch64 targets on x86_64 + +* Mon Sep 10 2018 Tom Stellard - 7.0.0-0.12.rc3 +- 7.0.0-rc3 Release + +* Fri Sep 07 2018 Tom Stellard - 7.0.0-0.11.rc2 +- Use python3 shebang for opt-viewewr scripts + +* Thu Aug 30 2018 Tom Stellard - 7.0.0-0.10.rc2 +- Drop all uses of python2 from lit tests + +* Thu Aug 30 2018 Tom Stellard - 7.0.0-0.9.rc2 +- Build the gold plugin on all supported architectures + +* Wed Aug 29 2018 Kevin Fenzi - 7.0.0-0.8.rc2 +- Re-enable debuginfo to avoid 25x size increase. + +* Tue Aug 28 2018 Tom Stellard - 7.0.0-0.7.rc2 +- 7.0.0-rc2 Release + +* Tue Aug 28 2018 Tom Stellard - 7.0.0-0.6.rc1 +- Guard valgrind usage with valgrind_arches macro + +* Thu Aug 23 2018 Tom Stellard - 7.0.0-0.5.rc1 +- Package lit tests and googletest sources. + +* Mon Aug 20 2018 Tom Stellard - 7.0.0-0.4.rc1 +- Re-enable AMDGPU target on ARM rhbz#1618922 + +* Mon Aug 13 2018 Tom Stellard - 7.0.0-0.3.rc1 +- Drop references to TestPlugin.so from cmake files + +* Fri Aug 10 2018 Tom Stellard - 7.0.0-0.2.rc1 +- Fixes for lit tests + +* Fri Aug 10 2018 Tom Stellard - 7.0.0-0.1.rc1 +- 7.0.0-rc1 Release +- Reduce number of enabled targets on all arches. +- Drop s390 detection patch, LLVM does not support s390 codegen. + +* Mon Aug 06 2018 Tom Stellard - 6.0.1-6 +- Backport some fixes needed by mesa and rust + +* Thu Jul 26 2018 Tom Stellard - 6.0.1-5 +- Move libLLVM-6.0.so to llvm6.0-libs. + +* Mon Jul 23 2018 Tom Stellard - 6.0.1-4 +- Rebuild because debuginfo stripping failed with the previous build + +* Fri Jul 13 2018 Tom Stellard - 6.0.1-3 +- Sync specfile with llvm6.0 package + +* Fri Jul 13 2018 Fedora Release Engineering - 6.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 25 2018 Tom Stellard - 6.0.1-1 +- 6.0.1 Release + +* Thu Jun 07 2018 Tom Stellard - 6.0.1-0.4.rc2 +- 6.0.1-rc2 + +* Wed Jun 06 2018 Tom Stellard - 6.0.1-0.3.rc1 +- Re-enable all targets to avoid breaking the ABI. + +* Mon Jun 04 2018 Tom Stellard - 6.0.1-0.2.rc1 +- Reduce the number of enabled targets based on the architecture + +* Thu May 10 2018 Tom Stellard - 6.0.1-0.1.rc1 +- 6.0.1 rc1 + +* Tue Mar 27 2018 Tom Stellard - 6.0.0-11 +- Re-enable arm tests that used to hang + +* Thu Mar 22 2018 Tom Stellard - 6.0.0-10 +- Fix testcase in backported patch + +* Tue Mar 20 2018 Tom Stellard - 6.0.0-9 +- Prevent external projects from linking against both static and shared + libraries. rhbz#1558657 + +* Mon Mar 19 2018 Tom Stellard - 6.0.0-8 +- Backport r327651 from trunk rhbz#1554349 + +* Fri Mar 16 2018 Tom Stellard - 6.0.0-7 +- Filter out cxxflags and cflags from llvm-config that aren't supported by clang +- rhbz#1556980 + +* Wed Mar 14 2018 Tom Stellard - 6.0.0-6 +- Enable symbol versioning in libLLVM.so + +* Wed Mar 14 2018 Tom Stellard - 6.0.0-5 +- Stop statically linking libstdc++. This is no longer required by Steam + client, but the steam installer still needs a work-around which should + be handled in the steam package. +* Wed Mar 14 2018 Tom Stellard - 6.0.0-4 +- s/make check/ninja check/ + +* Fri Mar 09 2018 Tom Stellard - 6.0.0-3 +- Backport fix for compile time regression on rust rhbz#1552915 + +* Thu Mar 08 2018 Tom Stellard - 6.0.0-2 +- Build with Ninja: This reduces RPM build time on a 6-core x86_64 builder + from 82 min to 52 min. + +* Thu Mar 08 2018 Tom Stellard - 6.0.0-1 +- 6.0.0 Release + +* Thu Mar 08 2018 Tom Stellard - 6.0.0-0.5.rc2 +- Reduce debuginfo size on i686 to avoid OOM errors during linking + +* Fri Feb 09 2018 Tom Stellard - 6.0.0-0.4.rc2 +- 6.0.1 rc2 + +* Fri Feb 09 2018 Igor Gnatenko - 6.0.0-0.3.rc1 +- Escape macros in %%changelog + +* Thu Feb 08 2018 Fedora Release Engineering - 6.0.0-0.2.rc1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Jan 19 2018 Tom Stellard - 6.0.0-0.1.rc1 +- 6.0.1 rc1 + +* Tue Dec 19 2017 Tom Stellard - 5.0.1-1 +- 5.0.1 Release + +* Mon Nov 20 2017 Tom Stellard - 5.0.0-5 +- Backport debuginfo fix for rust + +* Fri Nov 03 2017 Tom Stellard - 5.0.0-4 +- Reduce debuginfo size for ARM + +* Tue Oct 10 2017 Tom Stellard - 5.0.0-2 +- Reduce memory usage on ARM by disabling debuginfo and some non-ARM targets. + +* Mon Sep 25 2017 Tom Stellard - 5.0.0-1 +- 5.0.0 Release + +* Mon Sep 18 2017 Tom Stellard - 4.0.1-6 +- Add Requires: libedit-devel for llvm-devel + +* Fri Sep 08 2017 Tom Stellard - 4.0.1-5 +- Enable libedit backend for LineEditor API + +* Fri Aug 25 2017 Tom Stellard - 4.0.1-4 +- Enable extra functionality when run the LLVM JIT under valgrind. + +* Thu Aug 03 2017 Fedora Release Engineering - 4.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 4.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jun 21 2017 Tom Stellard - 4.0.1-1 +- 4.0.1 Release + +* Thu Jun 15 2017 Tom Stellard - 4.0.0-6 +- Install llvm utils + +* Thu Jun 08 2017 Tom Stellard - 4.0.0-5 +- Fix docs-llvm-man target + +* Mon May 01 2017 Tom Stellard - 4.0.0-4 +- Make cmake files no longer depend on static libs (rhbz 1388200) + +* Tue Apr 18 2017 Josh Stone - 4.0.0-3 +- Fix computeKnownBits for ARMISD::CMOV (rust-lang/llvm#67) + +* Mon Apr 03 2017 Tom Stellard - 4.0.0-2 +- Simplify spec with rpm macros. + +* Thu Mar 23 2017 Tom Stellard - 4.0.0-1 +- LLVM 4.0.0 Final Release + +* Wed Mar 22 2017 tstellar@redhat.com - 3.9.1-6 +- Fix %%postun sep for -devel package. + +* Mon Mar 13 2017 Tom Stellard - 3.9.1-5 +- Disable failing tests on ARM. + +* Sun Mar 12 2017 Peter Robinson 3.9.1-4 +- Fix missing mask on relocation for aarch64 (rhbz 1429050) + +* Wed Mar 01 2017 Dave Airlie - 3.9.1-3 +- revert upstream radeonsi breaking change. + +* Thu Feb 23 2017 Josh Stone - 3.9.1-2 +- disable sphinx warnings-as-errors + +* Fri Feb 10 2017 Orion Poplawski - 3.9.1-1 +- llvm 3.9.1 + +* Fri Feb 10 2017 Fedora Release Engineering - 3.9.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Nov 29 2016 Josh Stone - 3.9.0-7 +- Apply backports from rust-lang/llvm#55, #57 + +* Tue Nov 01 2016 Dave Airlie - 3.9.0-5 +- apply the patch from -4 + +* Wed Oct 26 2016 Dave Airlie - 3.9.0-4 +- add fix for lldb out-of-tree build + +* Mon Oct 17 2016 Josh Stone - 3.9.0-3 +- Apply backports from rust-lang/llvm#47, #48, #53, #54 + +* Sat Oct 15 2016 Josh Stone - 3.9.0-2 +- Apply an InstCombine backport via rust-lang/llvm#51 + +* Wed Sep 07 2016 Dave Airlie - 3.9.0-1 +- llvm 3.9.0 +- upstream moved where cmake files are packaged. +- upstream dropped CppBackend + +* Wed Jul 13 2016 Adam Jackson - 3.8.1-1 +- llvm 3.8.1 +- Add mips target +- Fix some shared library mispackaging + +* Tue Jun 07 2016 Jan Vcelak - 3.8.0-2 +- fix color support detection on terminal + +* Thu Mar 10 2016 Dave Airlie 3.8.0-1 +- llvm 3.8.0 release + +* Wed Mar 09 2016 Dan Horák 3.8.0-0.3 +- install back memory consumption workaround for s390 + +* Thu Mar 03 2016 Dave Airlie 3.8.0-0.2 +- llvm 3.8.0 rc3 release + +* Fri Feb 19 2016 Dave Airlie 3.8.0-0.1 +- llvm 3.8.0 rc2 release + +* Tue Feb 16 2016 Dan Horák 3.7.1-7 +- recognize s390 as SystemZ when configuring build + +* Sat Feb 13 2016 Dave Airlie 3.7.1-6 +- export C++ API for mesa. + +* Sat Feb 13 2016 Dave Airlie 3.7.1-5 +- reintroduce llvm-static, clang needs it currently. + +* Fri Feb 12 2016 Dave Airlie 3.7.1-4 +- jump back to single llvm library, the split libs aren't working very well. + +* Fri Feb 05 2016 Dave Airlie 3.7.1-3 +- add missing obsoletes (#1303497) + +* Thu Feb 04 2016 Fedora Release Engineering - 3.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jan 07 2016 Jan Vcelak 3.7.1-1 +- new upstream release +- enable gold linker + +* Wed Nov 04 2015 Jan Vcelak 3.7.0-100 +- fix Requires for subpackages on the main package + +* Tue Oct 06 2015 Jan Vcelak 3.7.0-100 +- initial version using cmake build system diff --git a/check.spec.inc b/check.spec.inc new file mode 100644 index 0000000..d231443 --- /dev/null +++ b/check.spec.inc @@ -0,0 +1,205 @@ +# TODO(kkleine): Instead of deleting test files we should mark them as expected +# to fail. See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-xfail + +# Disable check section on arm due to some kind of memory related failure. +# Possibly related to https://bugzilla.redhat.com/show_bug.cgi?id=1920183 +%ifnarch %{arm} + +# TODO: Fix the failures below +%ifarch %{arm} +rm llvm/test/tools/llvm-readobj/ELF/dependent-libraries.test +%endif +%ifarch ppc64le +# TODO: Re-enable when ld.gold fixed its internal error. +rm llvm/test/tools/gold/PowerPC/mtriple.ll +%endif + +# non reproducible errors +# TODO(kkleine): Add this to XFAIL instead? +rm llvm/test/tools/dsymutil/X86/swift-interface.test + +%if %{with check} + +# See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-xfail +export LIT_XFAIL="" + +# See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-filter-out +# Unfortunately LIT_FILTER_OUT is not accepting a list but a regular expression. +# To make this easily maintainable, we'll create an associate array in bash, +# to which you can append and later we'll join that array and escpate dots (".") +# in your test paths. +declare -a filter_out_tests + +#region LLVM xfail tests + +# Xfail testing of update utility tools +# LLVM :: +export LIT_XFAIL="$LIT_XFAIL;tools/UpdateTestChecks" + +#endregion + +#region CLANG xfail tests + +# Clang :: +export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c" + +#endregion + +#region OPENMP xfail tests + +# TODO(kkleine): OpenMP tests are currently not run on rawhide (see https://bugzilla.redhat.com/show_bug.cgi?id=2252966): +# +# + /usr/bin/cmake --build redhat-linux-build -j6 --verbose --target check-openmp +# Change Dir: '/builddir/build/BUILD/openmp-17.0.6.src/redhat-linux-build' +# Run Build Command(s): /usr/bin/ninja-build -v -j 6 check-openmp +# [1/1] cd /builddir/build/BUILD/openmp-17.0.6.src/redhat-linux-build && /usr/bin/cmake -E echo check-openmp\ does\ nothing,\ dependencies\ not\ found. +# +# We're marking the tests that are failing with the follwing error as expected to fail (XFAIL): +# +# gdb.error: No symbol "ompd_sizeof____kmp_gtid" in current context +# +# NOTE: It could be a different symbol in some tests. +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_curr_task_handle.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_enclosing_parallel_handle.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_generating_task_handle.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_icv_from_scope.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_scheduling_task_handle.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_state.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_task_frame.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_task_function.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_task_in_parallel.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_task_parallel_handle.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_id.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_in_parallel.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_parallel_handle_compare.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_rel_parallel_handle.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_rel_task_handle.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_rel_thread_handle.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_task_handle_compare.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_thread_handle_compare.c" +export LIT_XFAIL="$LIT_XFAIL;openmp_examples/ompd_icvs.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_curr_parallel_handle.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_display_control_vars.c" +export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_handle.c" + +# The following test is flaky and we'll filter it out +filter_out_tests+=("libomp :: ompt/teams/distribute_dispatch.c") + +# The following tests seem pass on ppc64le and x86_64 only: +%ifnarch ppc64le x86_64 +# Passes on ppc64le: +# libomptarget :: powerpc64le-ibm-linux-gnu :: mapping/target_derefence_array_pointrs.cpp +# libomptarget :: powerpc64le-ibm-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp +# Passes on x86_64: +# libomptarget :: x86_64-pc-linux-gnu :: mapping/target_derefence_array_pointrs.cpp +# libomptarget :: x86_64-pc-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp +export LIT_XFAIL="$LIT_XFAIL;mapping/target_derefence_array_pointrs.cpp" +%endif + +%ifnarch x86_64 +# Passes on x86_64: +# libomptarget :: x86_64-pc-linux-gnu :: api/ompx_3d.c +# libomptarget :: x86_64-pc-linux-gnu :: api/ompx_3d.cpp +# libomptarget :: x86_64-pc-linux-gnu-LTO :: api/ompx_3d.c +# libomptarget :: x86_64-pc-linux-gnu-LTO :: api/ompx_3d.cpp +# libomptarget :: aarch64-unknown-linux-gnu :: +export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.c" +export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.cpp" +%endif + +%ifarch %ix86 +# Clang Tools :: clang-tidy/checkers/altera/struct-pack-align.cpp +export LIT_XFAIL="$LIT_XFAIL;clang-tidy/checkers/altera/struct-pack-align.cpp" +%endif + +%ifarch ppc64le +export LIT_XFAIL="$LIT_XFAIL;barrier/barrier.c" +export LIT_XFAIL="$LIT_XFAIL;critical/critical.c" +export LIT_XFAIL="$LIT_XFAIL;critical/lock-nested.c" +export LIT_XFAIL="$LIT_XFAIL;critical/lock.c" +export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-firstprivate.c" +export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-nosuppression.c" +export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-simple.c" +export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-simple2.c" +export LIT_XFAIL="$LIT_XFAIL;races/critical-unrelated.c" +export LIT_XFAIL="$LIT_XFAIL;races/lock-nested-unrelated.c" +export LIT_XFAIL="$LIT_XFAIL;races/lock-unrelated.c" +export LIT_XFAIL="$LIT_XFAIL;races/parallel-simple.c" +export LIT_XFAIL="$LIT_XFAIL;races/task-dependency.c" +export LIT_XFAIL="$LIT_XFAIL;races/task-taskgroup-unrelated.c" +export LIT_XFAIL="$LIT_XFAIL;races/task-taskwait-nested.c" +export LIT_XFAIL="$LIT_XFAIL;races/task-two.c" +export LIT_XFAIL="$LIT_XFAIL;races/taskwait-depend.c" +export LIT_XFAIL="$LIT_XFAIL;reduction/parallel-reduction-nowait.c" +export LIT_XFAIL="$LIT_XFAIL;reduction/parallel-reduction.c" +export LIT_XFAIL="$LIT_XFAIL;task/omp_task_depend_all.c" +export LIT_XFAIL="$LIT_XFAIL;task/task-barrier.c" +export LIT_XFAIL="$LIT_XFAIL;task/task-create.c" +export LIT_XFAIL="$LIT_XFAIL;task/task-dependency.c" +export LIT_XFAIL="$LIT_XFAIL;task/task-taskgroup-nested.c" +export LIT_XFAIL="$LIT_XFAIL;task/task-taskgroup.c" +export LIT_XFAIL="$LIT_XFAIL;task/task-taskwait-nested.c" +export LIT_XFAIL="$LIT_XFAIL;task/task-taskwait.c" +export LIT_XFAIL="$LIT_XFAIL;task/task_early_fulfill.c" +export LIT_XFAIL="$LIT_XFAIL;task/task_late_fulfill.c" +export LIT_XFAIL="$LIT_XFAIL;task/taskwait-depend.c" +export LIT_XFAIL="$LIT_XFAIL;worksharing/ordered.c" +export LIT_XFAIL="$LIT_XFAIL;api/omp_dynamic_shared_memory.c" +export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl1.c" +export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl2.c" +export LIT_XFAIL="$LIT_XFAIL;jit/type_punning.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/barrier_fence.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/bug49334.cpp" +export LIT_XFAIL="$LIT_XFAIL;offloading/default_thread_limit.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_bare.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_coords.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_saxpy_mixed.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count_thread_limit.cpp" +export LIT_XFAIL="$LIT_XFAIL;offloading/spmdization.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/target_critical_region.cpp" +export LIT_XFAIL="$LIT_XFAIL;offloading/thread_limit.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c" +export LIT_XFAIL="$LIT_XFAIL;api/omp_dynamic_shared_memory.c" +export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl1.c" +export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl2.c" +export LIT_XFAIL="$LIT_XFAIL;jit/type_punning.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/barrier_fence.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/bug49334.cpp" +export LIT_XFAIL="$LIT_XFAIL;offloading/default_thread_limit.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_bare.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_coords.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_saxpy_mixed.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count_thread_limit.cpp" +export LIT_XFAIL="$LIT_XFAIL;offloading/spmdization.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/target_critical_region.cpp" +export LIT_XFAIL="$LIT_XFAIL;offloading/thread_limit.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c" +%endif + +#endregion + +# Prepare LIT_FILTER_OUT regex from index bash array +# Join each element with a pipe symbol (regex for "or") +filter_out_tests=$(printf "|%s" "${filter_out_tests[@]}") +# Remove the initial pipe symbol +filter_out_tests=${filter_out_tests:1} +# Properly escape path dots (".") for use in regular expression +filter_out_tests=$(echo $filter_out_tests | sed 's/\./\\./') +# Add enclosing parenthesis +export LIT_FILTER_OUT="($filter_out_tests)" + + +export LIT_OPTS="-vv" + +export LD_LIBRARY_PATH="%{buildroot}/%{install_libdir}:%{buildroot}/%{_libdir}"; + +cd llvm +%cmake_build --target check-all + +%endif + +%endif diff --git a/files.spec.inc b/files.spec.inc new file mode 100644 index 0000000..e8509e2 --- /dev/null +++ b/files.spec.inc @@ -0,0 +1,295 @@ +#region LLVM files + +%files -n %{pkg_name_llvm} +%license llvm/LICENSE.TXT +%exclude %{_mandir}/man1/llvm-config* +%{_mandir}/man1/* +%{_bindir}/* + +%exclude %{_bindir}/llvm-config%{exec_suffix} +%exclude %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} + +%if %{without compat_build} +%exclude %{_bindir}/llvm-config-%{maj_ver} +%exclude %{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} +%exclude %{_bindir}/not +%exclude %{_bindir}/count +%exclude %{_bindir}/yaml-bench +%exclude %{_bindir}/lli-child-target +%exclude %{_bindir}/llvm-isel-fuzzer +%exclude %{_bindir}/llvm-opt-fuzzer +%{_datadir}/opt-viewer +%else +%{install_bindir} +%endif + +%files -n %{pkg_name_llvm}-libs +%license llvm/LICENSE.TXT +%{install_libdir}/libLLVM-%{maj_ver}%{?llvm_snapshot_version_suffix:%{llvm_snapshot_version_suffix}}.so +%if %{without compat_build} +%if %{with gold} +%{_libdir}/LLVMgold.so +%{_libdir}/bfd-plugins/LLVMgold.so +%endif +%{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so +%{_libdir}/libLTO.so* +%else +%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{pkg_name_llvm}-%{_arch}.conf +%if %{with gold} +%{_libdir}/%{pkg_name_clang}/lib/LLVMgold.so +%endif +%{install_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so +%{install_libdir}/libLTO.so* +%exclude %{install_libdir}/libLTO.so +%endif +%{install_libdir}/libRemarks.so* + +%files -n %{pkg_name_llvm}-devel +%license llvm/LICENSE.TXT + +%ghost %{_bindir}/llvm-config%{exec_suffix} +%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} +%{_mandir}/man1/llvm-config* + +%{install_includedir}/llvm +%{install_includedir}/llvm-c +%{install_libdir}/libLLVM.so +%{install_libdir}/cmake/llvm +%if %{without compat_build} +%{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} +%ghost %{_bindir}/llvm-config-%{maj_ver} +%else +%{pkg_includedir}/llvm +%{pkg_includedir}/llvm-c +%{install_libdir}/libLTO.so +%endif + +%files -n %{pkg_name_llvm}-doc +%license llvm/LICENSE.TXT +%doc %{_pkgdocdir}/html + +%files -n %{pkg_name_llvm}-static +%license llvm/LICENSE.TXT +%{install_libdir}/*.a +%if %{without compat_build} +%exclude %{install_libdir}/libLLVMTestingSupport.a +%exclude %{install_libdir}/libLLVMTestingAnnotations.a +%exclude %{install_libdir}/libllvm_gtest.a +%exclude %{install_libdir}/libllvm_gtest_main.a +%endif + +%files -n %{pkg_name_llvm}-cmake-utils +%license llvm/LICENSE.TXT +%{pkg_datadir}/llvm/cmake + +%if %{without compat_build} + +%files -n %{pkg_name_llvm}-test +%license llvm/LICENSE.TXT +%{_bindir}/not +%{_bindir}/count +%{_bindir}/yaml-bench +%{_bindir}/lli-child-target +%{_bindir}/llvm-isel-fuzzer +%{_bindir}/llvm-opt-fuzzer + +%files -n %{pkg_name_llvm}-googletest +%license llvm/LICENSE.TXT +%{install_libdir}/libLLVMTestingSupport.a +%{install_libdir}/libLLVMTestingAnnotations.a +%{install_libdir}/libllvm_gtest.a +%{install_libdir}/libllvm_gtest_main.a +%{install_includedir}/llvm-gtest +%{install_includedir}/llvm-gmock + +%endif + +#endregion + +#region CLANG files + +%if %{without compat_build} +%files -n %{pkg_name_clang} +%license clang/LICENSE.TXT +%{_bindir}/clang +%{_bindir}/clang++ +%{_bindir}/clang-%{maj_ver} +%{_bindir}/clang++-%{maj_ver} +%{_bindir}/clang-cl +%{_bindir}/clang-cpp +%{_mandir}/man1/clang.1.gz +%{_mandir}/man1/clang++.1.gz +%{_mandir}/man1/clang-%{maj_ver}.1.gz +%{_mandir}/man1/clang++-%{maj_ver}.1.gz +%endif + +%files -n %{pkg_name_clang}-libs +%{install_prefix}/lib/clang/%{maj_ver}/include/* +%{install_libdir}/*.so.* + +%files -n %{pkg_name_clang}-devel +%if %{without compat_build} +%{_libdir}/*.so +%{_includedir}/clang/ +%{_includedir}/clang-c/ +%{_libdir}/cmake/* +%{_bindir}/clang-tblgen +%dir %{_datadir}/clang/ +%{_rpmmacrodir}/macros.%{pkg_name_clang} +%else +%{install_libdir}/*.so +%{pkg_includedir}/clang/ +%{pkg_includedir}/clang-c/ +%{install_libdir}/cmake/ +%endif + +%files -n %{pkg_name_clang}-resource-filesystem +%dir %{install_libdir}/clang/ +%dir %{install_libdir}/clang/%{maj_ver}/ +%dir %{install_libdir}/clang/%{maj_ver}/include/ +%dir %{install_libdir}/clang/%{maj_ver}/lib/ +%dir %{install_libdir}/clang/%{maj_ver}/share/ + +%if %{without compat_build} +%files -n %{pkg_name_clang}-analyzer +%{_bindir}/scan-view +%{_bindir}/scan-build +%{_bindir}/analyze-build +%{_bindir}/intercept-build +%{_bindir}/scan-build-py +%{_libexecdir}/ccc-analyzer +%{_libexecdir}/c++-analyzer +%{_libexecdir}/analyze-c++ +%{_libexecdir}/analyze-cc +%{_libexecdir}/intercept-c++ +%{_libexecdir}/intercept-cc +%{_datadir}/scan-view/ +%{_datadir}/scan-build/ +%{_mandir}/man1/scan-build.1.* +%{python3_sitelib}/libear +%{python3_sitelib}/libscanbuild + + +%files -n %{pkg_name_clang}-tools-extra +%{_bindir}/amdgpu-arch +%{_bindir}/clang-apply-replacements +%{_bindir}/clang-change-namespace +%{_bindir}/clang-check +%{_bindir}/clang-doc +%{_bindir}/clang-extdef-mapping +%{_bindir}/clang-format +%{_bindir}/clang-include-cleaner +%{_bindir}/clang-include-fixer +%{_bindir}/clang-move +%{_bindir}/clang-offload-bundler +%{_bindir}/clang-offload-packager +%{_bindir}/clang-linker-wrapper +%{_bindir}/clang-pseudo +%{_bindir}/clang-query +%{_bindir}/clang-refactor +%{_bindir}/clang-rename +%{_bindir}/clang-reorder-fields +%{_bindir}/clang-repl +%{_bindir}/clang-scan-deps +%{_bindir}/clang-tidy +%{_bindir}/clangd +%{_bindir}/diagtool +%{_bindir}/hmaptool +%{_bindir}/nvptx-arch +%{_bindir}/pp-trace +%{_bindir}/c-index-test +%{_bindir}/find-all-symbols +%{_bindir}/modularize +%{_bindir}/clang-format-diff +%{_mandir}/man1/diagtool.1.gz +%{_emacs_sitestartdir}/clang-format.el +%{_emacs_sitestartdir}/clang-rename.el +%{_emacs_sitestartdir}/clang-include-fixer.el +%{_datadir}/clang/clang-format.py* +%{_datadir}/clang/clang-format-diff.py* +%{_datadir}/clang/clang-include-fixer.py* +%{_datadir}/clang/clang-tidy-diff.py* +%{_bindir}/run-clang-tidy +%{_datadir}/clang/run-find-all-symbols.py* +%{_datadir}/clang/clang-rename.py* + +%files -n %{pkg_name_clang}-tools-extra-devel +%{_includedir}/clang-tidy/ + +%files -n git-clang-format +%{_bindir}/git-clang-format + +%files -n python3-clang +%{python3_sitelib}/clang/ +%endif + +#endregion + +#region COMPILER-RT files + +%if %{without compat_build} + +%files -n %{pkg_name_compiler_rt} +%license compiler-rt/LICENSE.TXT +%ifarch x86_64 aarch64 +%{_prefix}/lib/clang/%{maj_ver}/bin/* +%endif +%{_prefix}/lib/clang/%{maj_ver}/include/* +%{_prefix}/lib/clang/%{maj_ver}/lib/* +%{_prefix}/lib/clang/%{maj_ver}/share/* +#%ifarch x86_64 aarch64 +#{_bindir}/hwasan_symbolize +#%endif + +%endif + +#endregion + +#region OPENMP files + +%if %{without compat_build} + +%files -n %{pkg_name_libomp} +%license openmp/LICENSE.TXT +%{_libdir}/libomp.so +%{_libdir}/libompd.so +%ifnarch %{arm} +%{_libdir}/libarcher.so +%endif +%ifnarch %{ix86} %{arm} +# libomptarget is not supported on 32-bit systems. +# s390x does not support the offloading plugins. +%ifnarch s390x +%{_libdir}/libomptarget.rtl.amdgpu.so.%{so_suffix} +%{_libdir}/libomptarget.rtl.cuda.so.%{so_suffix} +%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{so_suffix} +%endif +%{_libdir}/libomptarget.so.%{so_suffix} +%endif + +%files -n %{pkg_name_libomp}-devel +%{_prefix}/lib/clang/%{maj_ver}/include/omp.h +%{_prefix}/lib/clang/%{maj_ver}/include/ompx.h +%ifnarch %{arm} +%{_prefix}/lib/clang/%{maj_ver}/include/omp-tools.h +%{_prefix}/lib/clang/%{maj_ver}/include/ompt.h +%{_prefix}/lib/clang/%{maj_ver}/include/ompt-multiplex.h +%endif +%{_libdir}/cmake/openmp/FindOpenMPTarget.cmake +%ifnarch %{ix86} %{arm} +# libomptarget is not supported on 32-bit systems. +# s390x does not support the offloading plugins. +%ifnarch s390x +%{_libdir}/libomptarget.rtl.amdgpu.so +%{_libdir}/libomptarget.rtl.cuda.so +%{_libdir}/libomptarget.rtl.%{libomp_arch}.so +%endif +%{_libdir}/libomptarget.devicertl.a +%{_libdir}/libomptarget-amdgpu-*.bc +%{_libdir}/libomptarget-nvptx-*.bc +%{_libdir}/libomptarget.so +%endif + +%endif + +#endregion diff --git a/globals.spec.inc b/globals.spec.inc new file mode 100644 index 0000000..4e4e2b0 --- /dev/null +++ b/globals.spec.inc @@ -0,0 +1,136 @@ +%bcond_without snapshot_build +# Components enabled if supported by target architecture: +%define gold_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x +%ifarch %{gold_arches} + %bcond_without gold +%else + %bcond_with gold +%endif +%bcond_with compat_build +%bcond_without check + +# We are building with clang for faster/lower memory LTO builds. +# See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros +%global toolchain clang + +# Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer +# https://bugzilla.redhat.com/show_bug.cgi?id=2158587 +%undefine _include_frame_pointers + +# Suffixless tarball name (essentially: basename -s .tar.xz llvm-project-17.0.6.src.tar.xz) +%global src_tarball_dir llvm-project-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src + +%global _lto_cflags -flto=thin + +#region LLVM globals + +%if %{with compat_build} +%global pkg_name_llvm llvm%{maj_ver} +%global exec_suffix -%{maj_ver} +%global install_prefix %{_libdir}/%{pkg_name_llvm} +%global install_bindir %{install_prefix}/bin +%global install_includedir %{install_prefix}/include +%global install_libdir %{install_prefix}/lib + +%global pkg_includedir %{_includedir}/%{pkg_name_llvm} +%global pkg_datadir %{install_prefix}/share +%else +%global pkg_name_llvm llvm +%global install_prefix /usr +%global install_bindir %{_bindir} +%global install_libdir %{_libdir} +%global install_includedir %{_includedir} +%global pkg_datadir %{_datadir} +%global exec_suffix %{nil} +%endif + +%if 0%{?rhel} +%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly" +%global experimental_targets_to_build "" +%else +%global targets_to_build "all" +%global experimental_targets_to_build "AVR" +%endif + +%global build_install_prefix %{buildroot}%{install_prefix} + +# Lower memory usage of dwz on s390x +%global _dwz_low_mem_die_limit_s390x 1 +%global _dwz_max_die_limit_s390x 1000000 + +%ifarch %{arm} +# koji overrides the _gnu variable to be gnu, which is not correct for clang, so +# we need to hard-code the correct triple here. +%global llvm_triple armv7l-redhat-linux-gnueabihf +%else +%global llvm_triple %{_target_platform} +%endif + +# https://fedoraproject.org/wiki/Changes/PythonSafePath#Opting_out +# Don't add -P to Python shebangs +# The executable Python scripts in /usr/share/opt-viewer/ import each other +%undefine _py3_shebang_P + +#endregion + +#region CLANG globals + +%global pkg_name_clang clang + +%if %{with compat_build} +%global pkg_name_clang clang%{maj_ver} +# Install clang to same prefix as llvm, so that apps that use llvm-config +# will also be able to find clang libs. +%global pkg_includedir %{install_prefix}/include +%endif + +%ifarch ppc64le +# Too many threads on ppc64 systems causes OOM errors. +# TODO(kkleine): Is this really needed when building together with llvm? +%global _smp_mflags -j8 +%endif + +#endregion + +#region COMPILER-RT globals + +%if %{without compat_build} + +%global pkg_name_compiler_rt compiler-rt + +# TODO(kkleine): do these optflags hurt llvm and/or clang? + +# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271 +%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE) + +# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93615 +%global optflags %(echo %{optflags} -Dasm=__asm__) + +# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files. +# export ASMFLAGS=$CFLAGS + +%endif + +#endregion + +#region OPENMP globals + +%if %{without compat_build} + +%global pkg_name_libomp libomp + +%global so_suffix %{maj_ver} + +%if %{with snapshot_build} +%global so_suffix %{maj_ver}%{llvm_snapshot_version_suffix} +%endif + +%ifarch ppc64le +%global libomp_arch ppc64 +%else +%global libomp_arch %{_arch} +%endif + +%endif + +#endregion diff --git a/install.spec.inc b/install.spec.inc new file mode 100644 index 0000000..7a96b0e --- /dev/null +++ b/install.spec.inc @@ -0,0 +1,226 @@ +#region LLVM installation + +cd llvm + +%cmake_install + +cd - + +mkdir -p %{buildroot}/%{_bindir} + +%if %{without compat_build} + +# Fix some man pages +ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config%{exec_suffix}-%{__isa_bits}.1 + +# Install binaries needed for lit tests +%global test_binaries llvm-isel-fuzzer llvm-opt-fuzzer + +for f in %{test_binaries} +do + install -m 0755 llvm/%{_vpath_builddir}/bin/$f %{buildroot}%{_bindir} +done + +%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h + +# Install libraries needed for unittests +%global build_libdir llvm/%{_vpath_builddir}/%{_lib} + +install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir} +install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{_libdir} + +%if %{with gold} +# Add symlink to lto plugin in the binutils plugin directory. +%{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/ +ln -s -t %{buildroot}%{_libdir}/bfd-plugins/ ../LLVMgold.so +%endif + +%else + +# Add version suffix to binaries +for f in %{buildroot}/%{install_bindir}/*; do + filename=`basename $f` + ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} +done + +# Move header files +mkdir -p %{buildroot}/%{pkg_includedir} +ln -s ../../../%{install_includedir}/llvm %{buildroot}/%{pkg_includedir}/llvm +ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{pkg_includedir}/llvm-c + +# Fix multi-lib +%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h + +# Create ld.so.conf.d entry +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d +cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{pkg_name_llvm}-%{_arch}.conf << EOF +%{install_libdir} +EOF + +# Add version suffix to man pages and move them to mandir. +mkdir -p %{buildroot}/%{_mandir}/man1 +for f in %{build_install_prefix}/share/man/man1/*; do + filename=`basename $f | cut -f 1 -d '.'` + mv $f %{buildroot}%{_mandir}/man1/$filename%{exec_suffix}.1 +done + +# Remove opt-viewer, since this is just a compatibility package. +rm -Rf %{build_install_prefix}/share/opt-viewer + +%endif + +# llvm-config special casing. llvm-config is managed by update-alternatives. +# the original file must remain available for compatibility with the CMake +# infrastructure. Without compat, cmake points to the symlink, with compat it +# points to the original file. + +%if %{without compat_build} + +mv %{buildroot}/%{install_bindir}/llvm-config %{buildroot}/%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} +# We still maintain a versionned symlink for consistency across llvm versions. +# This is specific to the non-compat build and matches the exec prefix for +# compat builds. An isa-agnostic versionned symlink is also maintained in the (un)install +# steps. +(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config%{exec_suffix}-%{__isa_bits} llvm-config-%{maj_ver}-%{__isa_bits} ) +# ghost presence +touch %{buildroot}%{_bindir}/llvm-config-%{maj_ver} + +%else + +rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix} +(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config llvm-config%{exec_suffix}-%{__isa_bits} ) + +%endif + +# ghost presence +touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix} + +mkdir -p %{buildroot}%{pkg_datadir}/llvm/cmake +cp -Rv cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake + +cd .. + +#endregion + +#region CLANG installation + +%if %{with compat_build} + +# Remove binaries/other files +rm -Rf %{buildroot}%{install_bindir} +rm -Rf %{buildroot}%{install_prefix}/share +rm -Rf %{buildroot}%{install_prefix}/libexec +# Remove scanview-py helper libs +rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild} + +%else + +# File in the macros file for other packages to use. We are not doing this +# in the compat package, because the version macros would # conflict with +# eachother if both clang and the clang compat package were installed together. +install -p -m0644 -D %{SOURCE2005} %{buildroot}%{_rpmmacrodir}/macros.%{pkg_name_clang} +sed -i -e "s|@@CLANG_MAJOR_VERSION@@|%{maj_ver}|" \ + -e "s|@@CLANG_MINOR_VERSION@@|%{min_ver}|" \ + -e "s|@@CLANG_PATCH_VERSION@@|%{patch_ver}|" \ + %{buildroot}%{_rpmmacrodir}/macros.%{pkg_name_clang} + +# install clang python bindings +mkdir -p %{buildroot}%{python3_sitelib}/clang/ +# If we don't default to true here, we'll see this error: +# install: omitting directory 'bindings/python/clang/__pycache__' +# NOTE: this only happens if we include the gdb plugin of libomp. +# Remove the plugin with command and we're good: rm -rf %{buildroot}/%{_datarootdir}/gdb +install -p -m644 clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/ || true +%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/clang + +# install scanbuild-py to python sitelib. +mv %{buildroot}%{_prefix}/%{_lib}/{libear,libscanbuild} %{buildroot}%{python3_sitelib} +%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/{libear,libscanbuild} + +# Fix permissions of scan-view scripts +chmod a+x %{buildroot}%{_datadir}/scan-view/{Reporter.py,startfile.py} + +# multilib fix +%multilib_fix_c_header --file %{_includedir}/clang/Config/config.h + +# Move emacs integration files to the correct directory +mkdir -p %{buildroot}%{_emacs_sitestartdir} +for f in clang-format.el clang-rename.el clang-include-fixer.el; do +mv %{buildroot}{%{_datadir}/clang,%{_emacs_sitestartdir}}/$f +done + +# remove editor integrations (bbedit, sublime, emacs, vim) +rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript +rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py* + +# TODO: Package html docs +rm -Rvf %{buildroot}%{_docdir}/LLVM/clang/html +rm -Rvf %{buildroot}%{_docdir}/LLVM/clang-tools/html +rm -Rvf %{buildroot}%{_datadir}/clang/clang-doc-default-stylesheet.css +rm -Rvf %{buildroot}%{_datadir}/clang/index.js + +# TODO: What are the Fedora guidelines for packaging bash autocomplete files? +rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh + +# Create Manpage symlinks +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++.1.gz +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz + +# Add clang++-{version} symlink +ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver} + + +# Fix permission +chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* + +%endif + +# Create sub-directories in the clang resource directory that will be +# populated by other packages +mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{include,lib,share}/ + + +%if %{without compat_build} +# Add a symlink in /usr/bin to clang-format-diff +ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff +%endif + +# Install config file for clang +%if %{maj_ver} >=18 +mkdir -p %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/ +echo "--gcc-triple=%{_arch}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/clang.cfg +%endif + +#endregion + +#region COMPILER-RT installation + +%if %{without compat_build} + +%ifarch ppc64le +# Fix install path on ppc64le so that the directory name matches the triple used +# by clang. +mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/ppc64le-redhat-linux-gnu +%endif + +%endif + +#endregion + +#region OPENMP installation + +%if %{without compat_build} + +# Remove static libraries with equivalent shared libraries +rm -rf %{buildroot}%{_libdir}/libarcher_static.a + +# Remove the openmp gdb plugin for now +rm -rf %{buildroot}/%{_datarootdir}/gdb +# # TODO(kkleine): These was added to avoid a permission issue +# chmod go+w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so +# chmod +w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so + +%endif + +#endregion diff --git a/llvm.rpmlintrc b/llvm.rpmlintrc index 7ae23e2..5f98c56 100644 --- a/llvm.rpmlintrc +++ b/llvm.rpmlintrc @@ -1,3 +1,5 @@ +## LLVM ############################################################# + # This library has no dependencies. addFilter("llvm-libs.x86_64: E: shared-lib-without-dependency-information /usr/lib64/libRemarks.so.[0-9]+") addFilter("llvm-googletest.x86_64: W: devel-file-in-non-devel-package") @@ -16,3 +18,32 @@ addFilter("llvm-googletest.x86_64: W: no-documentation") addFilter("llvm-libs.x86_64: W: no-documentation") addFilter("llvm-static.x86_64: W: no-documentation") addFilter("llvm-test.x86_64: W: no-documentation") + +## COMPILER-RT ###################################################### + +# This is a devel package +addFilter("W: devel-file-in-non-devel-package") + +# These symlinks are dangling on x64_64 +addFilter("compiler-rt.x86_64: W: dangling-relative-symlink /usr/lib64/clang/[0-9]+.[0-9]+.[0-9]+/") + +addFilter("E: hardcoded-library-path in ../../lib/clang/") + + +## LIBOMP ########################################################### + + + +## CLANG ############################################################ + +clang needs libstdc++-devel installed in order to compile c++ programs. + +addFilter("E: devel-dependency libstdc\+\+-devel") + +addFilter("E: explicit-lib-dependency libstdc\+\+-devel") + +# clang installs libear to /usr/lib on all arches, so we have to use + +# a hard-coded /usr/lib path in order to move it to the python3 sitelib. + +addFilter("E: hardcoded-library-path in %{_prefix}/lib/{libear") \ No newline at end of file diff --git a/llvm.spec b/llvm.spec index 9dbe5eb..cbd3fae 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,9 +1,6 @@ %bcond_with snapshot_build -%if %{with snapshot_build} -# Unlock LLVM Snapshot LUA functions -%{llvm_sb} -%endif +%include %{_sourcedir}/globals.spec.inc # We are building with clang for faster/lower memory LTO builds. # See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros @@ -110,24 +107,14 @@ Summary: The Low Level Virtual Machine License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://llvm.org -%if %{with snapshot_build} -Source0: %{llvm_snapshot_source_prefix}llvm-%{llvm_snapshot_yyyymmdd}.src.tar.xz -Source2: %{llvm_snapshot_source_prefix}cmake-%{llvm_snapshot_yyyymmdd}.src.tar.xz -Source4: %{llvm_snapshot_source_prefix}third-party-%{llvm_snapshot_yyyymmdd}.src.tar.xz -%{llvm_snapshot_extra_source_tags} -%else -Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz -Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz.sig -Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz -Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig -Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{third_party_srcdir}.tar.xz -Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{third_party_srcdir}.tar.xz.sig -Source6: release-keys.asc + +%include %{_sourcedir}/sources.spec.inc + +%include %{_sourcedir}/patches.spec.inc + +%if %{undefined rhel} +BuildRequires: moreutils %endif - -# RHEL-specific patch to avoid unwanted python3-myst-parser dep -Patch101: 0101-Deactivate-markdown-doc.patch - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang @@ -141,6 +128,7 @@ BuildRequires: python3-sphinx %if %{undefined rhel} BuildRequires: python3-myst-parser %endif +# Needed for %%multilib_fix_c_header BuildRequires: multilib-rpm-config %if %{with gold} BuildRequires: binutils-devel @@ -158,8 +146,7 @@ BuildRequires: python3-setuptools # For origin certification BuildRequires: gnupg2 - -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: %{pkg_name_llvm}-libs%{?_isa} = %{version}-%{release} Provides: llvm(major) = %{maj_ver} @@ -486,6 +473,7 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C %{_vpath %post -p /sbin/ldconfig libs %postun -p /sbin/ldconfig libs %endif +%include %{_sourcedir}/check.spec.inc %post devel /usr/sbin/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} @@ -502,6 +490,7 @@ for v in 14 15 16; do fi done %endif +%include %{_sourcedir}/post_devel.spec.inc %postun devel diff --git a/macros.clang b/macros.clang new file mode 100644 index 0000000..88f259d --- /dev/null +++ b/macros.clang @@ -0,0 +1,11 @@ +%clang_major_version @@CLANG_MAJOR_VERSION@@ +%clang_minor_version @@CLANG_MINOR_VERSION@@ +%clang_patch_version @@CLANG_PATCH_VERSION@@ + +%clang_version %{clang_major_version}.%{clang_minor_version}.%{clang_patch_version} + +# This is the path to the clang resource directory that has clang's internal +# headers and libraries. This path should be used by packages that need to +# install files into this directory. This macro's value changes every time +# clang's version changes. +%clang_resource_dir %{_prefix}/lib/clang/%{clang_major_version} diff --git a/packages.spec.inc b/packages.spec.inc new file mode 100644 index 0000000..1945015 --- /dev/null +++ b/packages.spec.inc @@ -0,0 +1,296 @@ +#region LLVM packages + +%package -n %{pkg_name_llvm}-devel +Summary: Libraries and header files for LLVM +Requires: %{pkg_name_llvm}%{?_isa} = %{version}-%{release} +Requires: %{pkg_name_llvm}-libs%{?_isa} = %{version}-%{release} +# The installed LLVM cmake files will add -ledit to the linker flags for any +# app that requires the libLLVMLineEditor, so we need to make sure +# libedit-devel is available. +Requires: libedit-devel +# The installed cmake files reference binaries from llvm-test, llvm-static, and +# llvm-gtest. We tried in the past to split the cmake exports for these binaries +# out into separate files, so that llvm-devel would not need to Require these packages, +# but this caused bugs (rhbz#1773678) and forced us to carry two non-upstream +# patches. +Requires: %{pkg_name_llvm}-static%{?_isa} = %{version}-%{release} +%if %{without compat_build} +Requires: %{pkg_name_llvm}-test%{?_isa} = %{version}-%{release} +Requires: %{pkg_name_llvm}-googletest%{?_isa} = %{version}-%{release} +%endif + + +Requires(post): %{_sbindir}/alternatives +Requires(postun): %{_sbindir}/alternatives + +Provides: llvm-devel(major) = %{maj_ver} + +%description -n %{pkg_name_llvm}-devel +This package contains library and header files needed to develop new native +programs that use the LLVM infrastructure. + +%package -n %{pkg_name_llvm}-doc +Summary: Documentation for LLVM +BuildArch: noarch +BuildRequires: graphviz +Requires: %{pkg_name_llvm} = %{version}-%{release} + +%description -n %{pkg_name_llvm}-doc +Documentation for the LLVM compiler infrastructure. + +%package -n %{pkg_name_llvm}-libs +Summary: LLVM shared libraries + +%description -n %{pkg_name_llvm}-libs +Shared libraries for the LLVM compiler infrastructure. + +%package -n %{pkg_name_llvm}-static +Summary: LLVM static libraries +Conflicts: %{pkg_name_llvm}-devel < 8 + +Provides: llvm-static(major) = %{maj_ver} + +%description -n %{pkg_name_llvm}-static +Static libraries for the LLVM compiler infrastructure. + +%package -n %{pkg_name_llvm}-cmake-utils +Summary: CMake utilities shared across LLVM subprojects + +%description -n %{pkg_name_llvm}-cmake-utils +CMake utilities shared across LLVM subprojects. +This is for internal use by LLVM packages only. + +%if %{without compat_build} + +%package -n %{pkg_name_llvm}-test +Summary: LLVM regression tests +Requires: %{pkg_name_llvm}%{?_isa} = %{version}-%{release} +Requires: %{pkg_name_llvm}-libs%{?_isa} = %{version}-%{release} + +Provides: llvm-test(major) = %{maj_ver} + +%description -n %{pkg_name_llvm}-test +LLVM regression tests. + +%package -n %{pkg_name_llvm}-googletest +Summary: LLVM's modified googletest sources + +%description -n %{pkg_name_llvm}-googletest +LLVM's modified googletest sources. + +%endif + +#endregion + +#region CLANG packages + +%package -n %{pkg_name_clang} +Summary: A C language family front-end for LLVM + +License: Apache-2.0 WITH LLVM-exception OR NCSA +URL: http://llvm.org + +BuildRequires: libxml2-devel +BuildRequires: perl-generators + +# According to https://fedoraproject.org/wiki/Packaging:Emacs a package +# should BuildRequires: emacs if it packages emacs integration files. +BuildRequires: emacs + +BuildRequires: libatomic + +%if %{without compat_build} +# For reproducible pyc file generation +# See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility +BuildRequires: /usr/bin/marshalparser +%global py_reproducible_pyc_path %{buildroot}%{python3_sitelib} +%endif + +# scan-build uses these perl modules so they need to be installed in order +# to run the tests. +BuildRequires: perl(Digest::MD5) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Temp) +BuildRequires: perl(FindBin) +BuildRequires: perl(Hash::Util) +BuildRequires: perl(lib) +BuildRequires: perl(Term::ANSIColor) +BuildRequires: perl(Text::ParseWords) +BuildRequires: perl(Sys::Hostname) + +Requires: %{pkg_name_clang}-libs%{?_isa} = %{version}-%{release} + +# clang requires gcc, clang++ requires libstdc++-devel +# - https://bugzilla.redhat.com/show_bug.cgi?id=1021645 +# - https://bugzilla.redhat.com/show_bug.cgi?id=1158594 +Requires: libstdc++-devel +Requires: gcc-c++ + +Provides: clang(major) = %{maj_ver} + +Conflicts: compiler-rt < 11.0.0 + +%description -n %{pkg_name_clang} +clang: noun + 1. A loud, resonant, metallic sound. + 2. The strident call of a crane or goose. + 3. C-language family front-end toolkit. + +The goal of the Clang project is to create a new C, C++, Objective C +and Objective C++ front-end for the LLVM compiler. Its tools are built +as libraries and designed to be loosely-coupled and extensible. + +Install compiler-rt if you want the Blocks C language extension or to +enable sanitization and profiling options when building, and +libomp-devel to enable -fopenmp. + +%package -n %{pkg_name_clang}-libs +Summary: Runtime library for clang +Requires: %{pkg_name_clang}-resource-filesystem%{?_isa} = %{version} +Recommends: compiler-rt%{?_isa} = %{version} +# atomic support is not part of compiler-rt +Recommends: libatomic%{?_isa} +# libomp-devel is required, so clang can find the omp.h header when compiling +# with -fopenmp. +Recommends: libomp-devel%{_isa} = %{version} +Recommends: libomp%{_isa} = %{version} + +# Use lld as the default linker on ARM due to rhbz#1918924 +%ifarch %{arm} +Requires: lld +%endif + +%description -n %{pkg_name_clang}-libs +Runtime library for clang. + +%package -n %{pkg_name_clang}-devel +Summary: Development header files for clang +Requires: %{pkg_name_clang}-libs = %{version}-%{release} +%if %{without compat_build} +Requires: %{pkg_name_clang}%{?_isa} = %{version}-%{release} +# The clang CMake files reference tools from clang-tools-extra. +Requires: %{pkg_name_clang}-tools-extra%{?_isa} = %{version}-%{release} +%endif + +%description -n %{pkg_name_clang}-devel +Development header files for clang. + +%package -n %{pkg_name_clang}-resource-filesystem +Summary: Filesystem package that owns the clang resource directory +Provides: %{pkg_name_clang}-resource-filesystem(major) = %{maj_ver} + +%description -n %{pkg_name_clang}-resource-filesystem +This package owns the clang resouce directory: $libdir/clang/$version/ + +%if %{without compat_build} +%package -n %{pkg_name_clang}-analyzer +Summary: A source code analysis framework +License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT +BuildArch: noarch +Requires: %{pkg_name_clang} = %{version}-%{release} + +%description -n %{pkg_name_clang}-analyzer +The Clang Static Analyzer consists of both a source code analysis +framework and a standalone tool that finds bugs in C and Objective-C +programs. The standalone tool is invoked from the command-line, and is +intended to run in tandem with a build of a project or code base. + +%package -n %{pkg_name_clang}-tools-extra +Summary: Extra tools for clang +Requires: %{pkg_name_clang}-libs%{?_isa} = %{version}-%{release} +Requires: emacs-filesystem + +%description -n %{pkg_name_clang}-tools-extra +A set of extra tools built using Clang's tooling API. + +%package -n %{pkg_name_clang}-tools-extra-devel +Summary: Development header files for clang tools +Requires: %{pkg_name_clang}-tools-extra = %{version}-%{release} + +%description -n %{pkg_name_clang}-tools-extra-devel +Development header files for clang tools. + +# Put git-clang-format in its own package, because it Requires git +# and we don't want to force users to install all those dependenices if they +# just want clang. +%package -n git-clang-format +Summary: Integration of clang-format for git +Requires: %{pkg_name_clang}-tools-extra = %{version}-%{release} +Requires: git +Requires: python3 + +%description -n git-clang-format +clang-format integration for git. + + +%package -n python3-clang +Summary: Python3 bindings for clang +Requires: %{pkg_name_clang}-devel%{?_isa} = %{version}-%{release} +Requires: python3 +%description -n python3-clang +%{summary}. + + +%endif + +#endregion + +#region COMPILER-RT packages + +%if %{without compat_build} + +%package -n %{pkg_name_compiler_rt} +Summary: LLVM "compiler-rt" runtime libraries + +License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT +URL: http://llvm.org + +BuildRequires: python3 + +Requires: clang-resource-filesystem%{?isa} = %{version} + +%description -n %{pkg_name_compiler_rt} +The compiler-rt project is a part of the LLVM project. It provides +implementation of the low-level target-specific hooks required by +code generation, sanitizer runtimes and profiling library for code +instrumentation, and Blocks C language extension. + +%endif + +#endregion + +#region OPENMP packages + +%if %{without compat_build} + +%package -n %{pkg_name_libomp} +Summary: OpenMP runtime for clang + +License: Apache-2.0 WITH LLVM-exception OR NCSA +URL: http://openmp.llvm.org + +# For clang-offload-packager +BuildRequires: elfutils-libelf-devel +BuildRequires: perl +BuildRequires: perl-Data-Dumper +BuildRequires: perl-Encode +BuildRequires: libffi-devel + +Requires: elfutils-libelf%{?isa} + +%description -n %{pkg_name_libomp} +OpenMP runtime for clang. + +%package -n %{pkg_name_libomp}-devel +Summary: OpenMP header files +Requires: %{name}%{?isa} = %{version}-%{release} +Requires: clang-resource-filesystem%{?isa} = %{version} + +%description -n %{pkg_name_libomp}-devel +OpenMP header files. + +%endif + +#endregion diff --git a/patches.spec.inc b/patches.spec.inc new file mode 100644 index 0000000..5845d19 --- /dev/null +++ b/patches.spec.inc @@ -0,0 +1,32 @@ +# RHEL-specific patch to avoid unwanted python3-myst-parser dep +Patch1000: 0101-Deactivate-markdown-doc.patch + +#region CLANG patches +Patch2001: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch +Patch2002: 0003-PATCH-clang-Don-t-install-static-libraries.patch +#endregion + +# Workaround a bug in ORC on ppc64le. +# More info is available here: https://reviews.llvm.org/D159115#4641826 +Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch + +# # Drop the following patch after debugedit adds support to DWARF-5: +# # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 +# Source2006: 0001-Produce-DWARF4-by-default.patch + +%if %{with snapshot_build} +# Temporary patch to add back -fno-openmp-implicit-rpath until we no longer +# support Fedora 38 or older, which pass -fno-openmp-implicit-rpath in +# redhat-rpm-config. +Patch2009: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch +%endif + +# RHEL specific patches +# Avoid unwanted dependency on python-myst-parser +Patch2100: 0009-disable-myst-parser.patch + +%if %{without compat_build} +# Patches for clang-tools-extra +# See https://reviews.llvm.org/D120301 +Patch2500: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch +%endif diff --git a/post_devel.spec.inc b/post_devel.spec.inc new file mode 100644 index 0000000..ccfcbed --- /dev/null +++ b/post_devel.spec.inc @@ -0,0 +1,4 @@ +%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} +%if %{without compat_build} +%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} +%endif diff --git a/postun_devel.spec.inc b/postun_devel.spec.inc new file mode 100644 index 0000000..6ce6c4c --- /dev/null +++ b/postun_devel.spec.inc @@ -0,0 +1,6 @@ +if [ $1 -eq 0 ]; then + %{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} +%if %{without compat_build} + %{_sbindir}/update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} +%endif +fi \ No newline at end of file diff --git a/prep.spec.inc b/prep.spec.inc new file mode 100644 index 0000000..0604429 --- /dev/null +++ b/prep.spec.inc @@ -0,0 +1,50 @@ +%if %{without snapshot_build} +# llvm +%{gpgverify} --keyring='%{SOURCE1006}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%endif + +# -T : Do Not Perform Default Archive Unpacking (without this, the th source would be unpacked twice) +# -b : Unpack The nth Sources Before Changing Directory +# -n : Set Name of Build Directory +# +# see http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html +%autosetup -T -b 0 -p1 -n %{src_tarball_dir} + +#region LLVM preparation + +%py3_shebang_fix \ + llvm/test/BugPoint/compile-custom.ll.py \ + llvm/tools/opt-viewer/*.py \ + llvm/utils/update_cc_test_checks.py + +#endregion + +#region CLANG preparation + +%if %{without compat_build} + +%py3_shebang_fix \ + clang-tools-extra/clang-tidy/tool/ \ + clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py + +%py3_shebang_fix \ + clang/tools/clang-format/ \ + clang/tools/clang-format/git-clang-format \ + clang/utils/hmaptool/hmaptool \ + clang/tools/scan-view/bin/scan-view \ + clang/tools/scan-view/share/Reporter.py \ + clang/tools/scan-view/share/startfile.py \ + clang/tools/scan-build-py/bin/* \ + clang/tools/scan-build-py/libexec/* + +%endif + +#endregion + +#region COMPILER-RT preparation + +%if %{without compat_build} +%py3_shebang_fix compiler-rt/lib/hwasan/scripts/hwasan_symbolize +%endif + +#endregion diff --git a/sources.spec.inc b/sources.spec.inc new file mode 100644 index 0000000..1c3a962 --- /dev/null +++ b/sources.spec.inc @@ -0,0 +1,27 @@ +%if %{with snapshot_build} +Source0: %{llvm_snapshot_source_prefix}llvm-project-%{llvm_snapshot_yyyymmdd}.src.tar.xz +%else +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz +Source1001: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz.sig +Source1006: release-keys.asc +%endif + +%if %{without compat_build} +Source2005: macros.%{pkg_name_clang} +%endif + +# Sources we use to split up the main spec file in sections so that we can more +# easily see what specfile sections are touched by a patch. +Source1000: version.spec.inc +Source1001: build.spec.inc +Source1002: changelog.spec.inc +Source1003: check.spec.inc +Source1004: files.spec.inc +Source1005: globals.spec.inc +Source1006: install.spec.inc +Source1008: patches.spec.inc +Source1009: prep.spec.inc +Source1010: post_devel.spec.inc +Source1011: postun_devel.spec.inc +Source1012: sources.spec.inc +Source1013: packages.spec.inc diff --git a/version.spec.inc b/version.spec.inc new file mode 100644 index 0000000..7f42ac7 --- /dev/null +++ b/version.spec.inc @@ -0,0 +1,16 @@ +%global maj_ver 18 +%global min_ver 0 +%global patch_ver 0 +%undefine rc_ver + +%global llvm_snapshot_version 18.0.0 +%global llvm_snapshot_version_tag 18.0.0~pre20231225.ga041da31093303 +%global llvm_snapshot_version_major 18 +%global llvm_snapshot_version_minor 0 +%global llvm_snapshot_version_patch 0 +%global llvm_snapshot_yyyymmdd 20231225 +%global llvm_snapshot_git_revision a041da31093303b02b6da5fe919a0a3c234eb466 +%global llvm_snapshot_git_revision_short a041da31093303 +%global llvm_snapshot_version_suffix pre20231225.ga041da31093303 +%global llvm_snapshot_changelog_entry * Mon Dec 25 2023 LLVM snapshot - 18.0.0~pre20231225.ga041da31093303 +%global llvm_snapshot_source_prefix https://github.com/kwk/llvm-daily-fedora-rpms/releases/download/source-snapshot/ From 32c3bcc36f754b67c9aa551bd43fa133210200e1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Jan 2024 09:36:17 +0100 Subject: [PATCH 033/205] Only use cet-report=error on x86_64 i386 CET support has been removed from glibc. Only check it for x86_64. This is a cherry-pick of https://src.fedoraproject.org/rpms/llvm/c/fefb87d583aeab76b11475cc2a8e69574b0a09bc?branch=upstream-snapshot --- build.spec.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.spec.inc b/build.spec.inc index b56c13a..ec7970b 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -189,7 +189,9 @@ cd llvm -DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \ -DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \ -DLLVM_INCLUDE_BENCHMARKS=OFF \ +%ifarch x86_64 -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error" \ +%endif %if %{without snapshot_build} -DLLVM_UNITTEST_LINK_FLAGS="-Wl,-plugin-opt=O0" %endif From d0e5867bd71070f1cafca53177982049a46122ab Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 22 Jan 2024 14:03:22 +0000 Subject: [PATCH 034/205] Restore DWARF 4 config file for Fedora 38 This is a port of https://src.fedoraproject.org/rpms/clang/c/74b8bb039743c8c2f9d9906fac251a3873d42e57?branch=upstream-snapshot --- clang.cfg | 3 +++ files.spec.inc | 3 +++ sources.spec.inc | 2 ++ 3 files changed, 8 insertions(+) create mode 100644 clang.cfg diff --git a/clang.cfg b/clang.cfg new file mode 100644 index 0000000..bee5a7a --- /dev/null +++ b/clang.cfg @@ -0,0 +1,3 @@ +# Drop the following option after debugedit adds support to DWARF-5: +# https://sourceware.org/bugzilla/show_bug.cgi?id=28728 +-gdwarf-4 diff --git a/files.spec.inc b/files.spec.inc index e8509e2..228a5bc 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -126,6 +126,9 @@ %files -n %{pkg_name_clang}-libs %{install_prefix}/lib/clang/%{maj_ver}/include/* %{install_libdir}/*.so.* +%if 0%{?fedora} == 38 +%{_sysconfdir}/%{name}/%{_target_platform}.cfg +%endif %files -n %{pkg_name_clang}-devel %if %{without compat_build} diff --git a/sources.spec.inc b/sources.spec.inc index 1c3a962..b409398 100644 --- a/sources.spec.inc +++ b/sources.spec.inc @@ -10,6 +10,8 @@ Source1006: release-keys.asc Source2005: macros.%{pkg_name_clang} %endif +Source2006: clang.cfg + # Sources we use to split up the main spec file in sections so that we can more # easily see what specfile sections are touched by a patch. Source1000: version.spec.inc From 50c0f354031dd9e2e95652fd59ea6376e941c9ce Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 5 Feb 2024 20:00:07 +0000 Subject: [PATCH 035/205] Remove DWARF4 patch --- 0001-Produce-DWARF4-by-default.patch | 113 --------------------------- 1 file changed, 113 deletions(-) delete mode 100644 0001-Produce-DWARF4-by-default.patch diff --git a/0001-Produce-DWARF4-by-default.patch b/0001-Produce-DWARF4-by-default.patch deleted file mode 100644 index 195a982..0000000 --- a/0001-Produce-DWARF4-by-default.patch +++ /dev/null @@ -1,113 +0,0 @@ -From c51e7e9bcc3c5a0be34040c1f12a2bb50335cd6b Mon Sep 17 00:00:00 2001 -From: Konrad Kleine -Date: Thu, 24 Mar 2022 09:44:21 +0100 -Subject: [PATCH] Produce DWARF4 by default - -Have a look at the following commit to see when the move from DWARF 4 to 5 first happened upstream: - -https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4?diff=unified ---- - clang/test/CodeGen/dwarf-version.c | 8 ++++---- - clang/test/Driver/as-options.s | 4 ++-- - clang/test/Driver/cl-options.c | 2 +- - clang/test/Driver/clang-g-opts.c | 2 +- - clang/test/Driver/ve-toolchain.c | 2 +- - clang/test/Driver/ve-toolchain.cpp | 2 +- - 6 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c -index e63316ace69c..3d68b06c58ff 100644 ---- a/clang/test/CodeGen/dwarf-version.c -+++ b/clang/test/CodeGen/dwarf-version.c -@@ -2,10 +2,10 @@ - // RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3 - // RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 - // RUN: %clang -target x86_64-linux-gnu -gdwarf-5 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang --target=i386-pc-solaris -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang --target=i386-pc-solaris -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 -+// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 -+// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 -+// RUN: %clang --target=i386-pc-solaris -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 -+// RUN: %clang --target=i386-pc-solaris -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 - - // The -isysroot is used as a hack to avoid LIT messing with the SDKROOT - // environment variable which indirecty overrides the version in the target -diff --git a/clang/test/Driver/as-options.s b/clang/test/Driver/as-options.s -index 73d002c7ef7e..71d55f7fd537 100644 ---- a/clang/test/Driver/as-options.s -+++ b/clang/test/Driver/as-options.s -@@ -122,7 +122,7 @@ - // RUN: FileCheck --check-prefix=DEBUG %s - // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g0 -g %s -### 2>&1 | \ - // RUN: FileCheck --check-prefix=DEBUG %s --// DEBUG: "-g" "-gdwarf-5" -+// DEBUG: "-g" "-gdwarf-4" - // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g -g0 %s -### 2>&1 | \ - // RUN: FileCheck --check-prefix=NODEBUG %s - // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 -g0 %s -### 2>&1 | \ -@@ -141,7 +141,7 @@ - // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-2 %s -### 2>&1 | \ - // RUN: FileCheck --check-prefix=GDWARF2 %s - // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf %s -### 2>&1 | \ --// RUN: FileCheck --check-prefix=GDWARF5 %s -+// RUN: FileCheck --check-prefix=GDWARF4 %s - - // RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 %s -### 2>&1 | \ - // RUN: FileCheck --check-prefix=GDWARF5 %s -diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c -index 6d929b19e7e2..373905c2e0fc 100644 ---- a/clang/test/Driver/cl-options.c -+++ b/clang/test/Driver/cl-options.c -@@ -569,7 +569,7 @@ - // RUN: %clang_cl -gdwarf /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s - // Z7_gdwarf-NOT: "-gcodeview" - // Z7_gdwarf: "-debug-info-kind=constructor" --// Z7_gdwarf: "-dwarf-version= -+// Z7_gdwarf: "-dwarf-version=4 - - // RUN: %clang_cl /ZH:MD5 /c -### -- %s 2>&1 | FileCheck -check-prefix=ZH_MD5 %s - // ZH_MD5: "-gsrc-hash=md5" -diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c -index b1cdf411925a..082162f2cc30 100644 ---- a/clang/test/Driver/clang-g-opts.c -+++ b/clang/test/Driver/clang-g-opts.c -@@ -36,7 +36,7 @@ - - // CHECK-WITHOUT-G-NOT: -debug-info-kind - // CHECK-WITH-G: "-debug-info-kind=constructor" --// CHECK-WITH-G: "-dwarf-version=5" -+// CHECK-WITH-G: "-dwarf-version=4" - // CHECK-WITH-G-DWARF4: "-dwarf-version=4" - // CHECK-WITH-G-DWARF2: "-dwarf-version=2" - -diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c -index 078341eb1202..6ccbef6a0c36 100644 ---- a/clang/test/Driver/ve-toolchain.c -+++ b/clang/test/Driver/ve-toolchain.c -@@ -6,7 +6,7 @@ - /// Checking dwarf-version - - // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path -diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp -index cd48dd792f85..f77781d4c6fa 100644 ---- a/clang/test/Driver/ve-toolchain.cpp -+++ b/clang/test/Driver/ve-toolchain.cpp -@@ -7,7 +7,7 @@ - - // RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \ - // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path --- -2.41.0 - From 2b0d1d8ae7091b8e3617c127a62fa4a1054cef56 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 14 Mar 2024 23:28:19 +0000 Subject: [PATCH 036/205] Drop myst_parser patches These were obsoleted by 7d55a3ba92368be55b392c20d623fde6ac82d86d. --- 0009-disable-myst-parser.patch | 26 -------------------------- 0101-Deactivate-markdown-doc.patch | 22 ---------------------- patches.spec.inc | 7 ------- 3 files changed, 55 deletions(-) delete mode 100644 0009-disable-myst-parser.patch delete mode 100644 0101-Deactivate-markdown-doc.patch diff --git a/0009-disable-myst-parser.patch b/0009-disable-myst-parser.patch deleted file mode 100644 index 12a5154..0000000 --- a/0009-disable-myst-parser.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 988dd3f3363d8ab4ee53f61e0eb5afc6646c9d4f Mon Sep 17 00:00:00 2001 -From: Nikita Popov -Date: Tue, 26 Sep 2023 13:06:29 +0200 -Subject: [PATCH] disable myst parser - ---- - clang/docs/conf.py | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/clang/docs/conf.py b/clang/docs/conf.py -index ca310026f53e..dfb74273b5b2 100644 ---- a/clang/docs/conf.py -+++ b/clang/docs/conf.py -@@ -35,9 +35,6 @@ templates_path = ["_templates"] - - import sphinx - --if sphinx.version_info >= (3, 0): -- extensions.append("myst_parser") -- - # The encoding of source files. - # source_encoding = 'utf-8-sig' - --- -2.41.0 - diff --git a/0101-Deactivate-markdown-doc.patch b/0101-Deactivate-markdown-doc.patch deleted file mode 100644 index 693a69f..0000000 --- a/0101-Deactivate-markdown-doc.patch +++ /dev/null @@ -1,22 +0,0 @@ -From a9fb2cb9a29e50bf4ba3c2e470e52ea091a807e5 Mon Sep 17 00:00:00 2001 -From: Konrad Kleine -Date: Fri, 3 Nov 2023 20:55:14 +0000 -Subject: [PATCH] Deactivate-markdown-doc - ---- - llvm/docs/conf.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py -index 0a3905201c85..81326257856a 100644 ---- a/llvm/docs/conf.py -+++ b/llvm/docs/conf.py -@@ -26,7 +26,7 @@ sys.path.insert(0, os.path.abspath(".")) - - # Add any Sphinx extension module names here, as strings. They can be extensions - # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. --extensions = ["myst_parser", "sphinx.ext.intersphinx", "sphinx.ext.todo"] -+extensions = ["sphinx.ext.intersphinx", "sphinx.ext.todo"] - - # Automatic anchors for markdown titles - from llvm_slug import make_slug diff --git a/patches.spec.inc b/patches.spec.inc index 5845d19..4345f3f 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -1,6 +1,3 @@ -# RHEL-specific patch to avoid unwanted python3-myst-parser dep -Patch1000: 0101-Deactivate-markdown-doc.patch - #region CLANG patches Patch2001: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch Patch2002: 0003-PATCH-clang-Don-t-install-static-libraries.patch @@ -21,10 +18,6 @@ Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch Patch2009: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch %endif -# RHEL specific patches -# Avoid unwanted dependency on python-myst-parser -Patch2100: 0009-disable-myst-parser.patch - %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 From 6d22898f3335ed506d3e26dd07761db2c48d48a3 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 15 Mar 2024 21:00:59 +0000 Subject: [PATCH 037/205] Sync with llvm upstream-snapshot branch --- files.spec.inc | 65 +++++++++++++++++++------------------------------- 1 file changed, 24 insertions(+), 41 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 228a5bc..ad5b044 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -4,45 +4,40 @@ %license llvm/LICENSE.TXT %exclude %{_mandir}/man1/llvm-config* %{_mandir}/man1/* -%{_bindir}/* +%{install_bindir}/* +%if %{with compat_build} +# This is for all the binaries with the version suffix. +%{_bindir}/*%{exec_suffix} +%endif %exclude %{_bindir}/llvm-config%{exec_suffix} %exclude %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} -%if %{without compat_build} %exclude %{_bindir}/llvm-config-%{maj_ver} %exclude %{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} -%exclude %{_bindir}/not -%exclude %{_bindir}/count -%exclude %{_bindir}/yaml-bench -%exclude %{_bindir}/lli-child-target -%exclude %{_bindir}/llvm-isel-fuzzer -%exclude %{_bindir}/llvm-opt-fuzzer -%{_datadir}/opt-viewer -%else -%{install_bindir} -%endif +%exclude %{install_bindir}/not +%exclude %{install_bindir}/count +%exclude %{install_bindir}/yaml-bench +%exclude %{install_bindir}/lli-child-target +%exclude %{install_bindir}/llvm-isel-fuzzer +%exclude %{install_bindir}/llvm-opt-fuzzer +%{pkg_datadir}/opt-viewer %files -n %{pkg_name_llvm}-libs %license llvm/LICENSE.TXT %{install_libdir}/libLLVM-%{maj_ver}%{?llvm_snapshot_version_suffix:%{llvm_snapshot_version_suffix}}.so -%if %{without compat_build} %if %{with gold} -%{_libdir}/LLVMgold.so +%{install_libdir}/LLVMgold.so +%if %{without compat_build} %{_libdir}/bfd-plugins/LLVMgold.so %endif -%{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so -%{_libdir}/libLTO.so* -%else -%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{pkg_name_llvm}-%{_arch}.conf -%if %{with gold} -%{_libdir}/%{pkg_name_clang}/lib/LLVMgold.so %endif -%{install_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so +%{install_libdir}/libLLVM.so.%{maj_ver}.%{min_ver}%{?llvm_snapshot_version_suffix:%{llvm_snapshot_version_suffix}} %{install_libdir}/libLTO.so* -%exclude %{install_libdir}/libLTO.so -%endif %{install_libdir}/libRemarks.so* +%if %{with compat_build} +%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf +%endif %files -n %{pkg_name_llvm}-devel %license llvm/LICENSE.TXT @@ -55,14 +50,8 @@ %{install_includedir}/llvm-c %{install_libdir}/libLLVM.so %{install_libdir}/cmake/llvm -%if %{without compat_build} %{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} %ghost %{_bindir}/llvm-config-%{maj_ver} -%else -%{pkg_includedir}/llvm -%{pkg_includedir}/llvm-c -%{install_libdir}/libLTO.so -%endif %files -n %{pkg_name_llvm}-doc %license llvm/LICENSE.TXT @@ -71,27 +60,23 @@ %files -n %{pkg_name_llvm}-static %license llvm/LICENSE.TXT %{install_libdir}/*.a -%if %{without compat_build} %exclude %{install_libdir}/libLLVMTestingSupport.a %exclude %{install_libdir}/libLLVMTestingAnnotations.a %exclude %{install_libdir}/libllvm_gtest.a %exclude %{install_libdir}/libllvm_gtest_main.a -%endif %files -n %{pkg_name_llvm}-cmake-utils %license llvm/LICENSE.TXT %{pkg_datadir}/llvm/cmake -%if %{without compat_build} - %files -n %{pkg_name_llvm}-test %license llvm/LICENSE.TXT -%{_bindir}/not -%{_bindir}/count -%{_bindir}/yaml-bench -%{_bindir}/lli-child-target -%{_bindir}/llvm-isel-fuzzer -%{_bindir}/llvm-opt-fuzzer +%{install_bindir}/not +%{install_bindir}/count +%{install_bindir}/yaml-bench +%{install_bindir}/lli-child-target +%{install_bindir}/llvm-isel-fuzzer +%{install_bindir}/llvm-opt-fuzzer %files -n %{pkg_name_llvm}-googletest %license llvm/LICENSE.TXT @@ -102,8 +87,6 @@ %{install_includedir}/llvm-gtest %{install_includedir}/llvm-gmock -%endif - #endregion #region CLANG files From e30affbe864634d404b35ecb15f94e3c66024e5c Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 16 Mar 2024 20:09:57 +0000 Subject: [PATCH 038/205] Sync with openmp upstream-snapshot branch --- build.spec.inc | 3 +++ globals.spec.inc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index ec7970b..ef9d45d 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -45,6 +45,8 @@ cd llvm # force off shared libs as cmake macros turns it on. # TODO: Disable LLVM_UNREACHABLE_OPTIMIZE. # TODO: LIBOMP_HAVE_VERSION_SCRIPT_FLAG should be set automatically. +# TODO: Override LIBOMP_INSTALL_LIBDIR, because otherwise the libraries +# are installed to /usr/lib64/$TRIPLE and clang can't find them. %cmake -G Ninja \ -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \ \ @@ -110,6 +112,7 @@ cd llvm -DOPENMP_LIBDIR_SUFFIX= \ %endif %endif + -DOPENMP_INSTALL_LIBDIR=%{_lib} \ \ \ \ diff --git a/globals.spec.inc b/globals.spec.inc index 4e4e2b0..36aa366 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -119,10 +119,10 @@ %global pkg_name_libomp libomp -%global so_suffix %{maj_ver} +%global so_suffix %{maj_ver}.%{min_ver} %if %{with snapshot_build} -%global so_suffix %{maj_ver}%{llvm_snapshot_version_suffix} +%global so_suffix %{maj_ver}.%{min_ver}%{llvm_snapshot_version_suffix} %endif %ifarch ppc64le From 97ee1828d784399fcb9ced05997432af4356bf04 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 16 Mar 2024 21:14:57 +0000 Subject: [PATCH 039/205] Sync with clang upstream-snapshot branch --- files.spec.inc | 208 +++++++++++++++++++++++++++++------------------ globals.spec.inc | 6 ++ 2 files changed, 137 insertions(+), 77 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index ad5b044..898e623 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -91,19 +91,25 @@ #region CLANG files -%if %{without compat_build} %files -n %{pkg_name_clang} %license clang/LICENSE.TXT -%{_bindir}/clang -%{_bindir}/clang++ -%{_bindir}/clang-%{maj_ver} -%{_bindir}/clang++-%{maj_ver} -%{_bindir}/clang-cl -%{_bindir}/clang-cpp +%{install_bindir}/clang +%{install_bindir}/clang++ +%{install_bindir}/clang-%{maj_ver} +%{install_bindir}/clang++-%{maj_ver} +%{install_bindir}/clang-cl +%{install_bindir}/clang-cpp +%{_sysconfdir}/%{pkg_name_clang}/clang.cfg +%if %{without compat_build} %{_mandir}/man1/clang.1.gz %{_mandir}/man1/clang++.1.gz %{_mandir}/man1/clang-%{maj_ver}.1.gz %{_mandir}/man1/clang++-%{maj_ver}.1.gz +%else +%{_bindir}/clang-%{maj_ver} +%{_bindir}/clang++-%{maj_ver} +%{_bindir}/clang-cl-%{maj_ver} +%{_bindir}/clang-cpp-%{maj_ver} %endif %files -n %{pkg_name_clang}-libs @@ -114,97 +120,145 @@ %endif %files -n %{pkg_name_clang}-devel -%if %{without compat_build} -%{_libdir}/*.so -%{_includedir}/clang/ -%{_includedir}/clang-c/ -%{_libdir}/cmake/* -%{_bindir}/clang-tblgen -%dir %{_datadir}/clang/ -%{_rpmmacrodir}/macros.%{pkg_name_clang} -%else %{install_libdir}/*.so -%{pkg_includedir}/clang/ -%{pkg_includedir}/clang-c/ -%{install_libdir}/cmake/ +%{install_includedir}/clang/ +%{install_includedir}/clang-c/ +%{install_libdir}/cmake/* +%{install_bindir}/clang-tblgen +%if %{with compat_build} +%{_bindir}/clang-tblgen-%{maj_ver} %endif +%dir %{install_datadir}/clang/ %files -n %{pkg_name_clang}-resource-filesystem -%dir %{install_libdir}/clang/ -%dir %{install_libdir}/clang/%{maj_ver}/ -%dir %{install_libdir}/clang/%{maj_ver}/include/ -%dir %{install_libdir}/clang/%{maj_ver}/lib/ -%dir %{install_libdir}/clang/%{maj_ver}/share/ - +%dir %{install_prefix}/lib/clang/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/bin/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/include/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/lib/ +%dir %{install_prefix}/lib/clang/%{maj_ver}/share/ %if %{without compat_build} +%{_rpmmacrodir}/macros.%{pkg_name_clang} +%endif + %files -n %{pkg_name_clang}-analyzer -%{_bindir}/scan-view -%{_bindir}/scan-build -%{_bindir}/analyze-build -%{_bindir}/intercept-build -%{_bindir}/scan-build-py -%{_libexecdir}/ccc-analyzer -%{_libexecdir}/c++-analyzer -%{_libexecdir}/analyze-c++ -%{_libexecdir}/analyze-cc -%{_libexecdir}/intercept-c++ -%{_libexecdir}/intercept-cc -%{_datadir}/scan-view/ -%{_datadir}/scan-build/ +%{install_bindir}/scan-view +%{install_bindir}/scan-build +%{install_bindir}/analyze-build +%{install_bindir}/intercept-build +%{install_bindir}/scan-build-py +%if %{with compat_build} +%{_bindir}/scan-view-%{maj_ver} +%{_bindir}/scan-build-%{maj_ver} +%{_bindir}/analyze-build-%{maj_ver} +%{_bindir}/intercept-build-%{maj_ver} +%{_bindir}/scan-build-py-%{maj_ver} +%endif +%{install_libexecdir}/ccc-analyzer +%{install_libexecdir}/c++-analyzer +%{install_libexecdir}/analyze-c++ +%{install_libexecdir}/analyze-cc +%{install_libexecdir}/intercept-c++ +%{install_libexecdir}/intercept-cc +%{install_datadir}/scan-view/ +%{install_datadir}/scan-build/ +%if %{without compat_build} %{_mandir}/man1/scan-build.1.* %{python3_sitelib}/libear %{python3_sitelib}/libscanbuild +%endif %files -n %{pkg_name_clang}-tools-extra -%{_bindir}/amdgpu-arch -%{_bindir}/clang-apply-replacements -%{_bindir}/clang-change-namespace -%{_bindir}/clang-check -%{_bindir}/clang-doc -%{_bindir}/clang-extdef-mapping -%{_bindir}/clang-format -%{_bindir}/clang-include-cleaner -%{_bindir}/clang-include-fixer -%{_bindir}/clang-move -%{_bindir}/clang-offload-bundler -%{_bindir}/clang-offload-packager -%{_bindir}/clang-linker-wrapper -%{_bindir}/clang-pseudo -%{_bindir}/clang-query -%{_bindir}/clang-refactor -%{_bindir}/clang-rename -%{_bindir}/clang-reorder-fields -%{_bindir}/clang-repl -%{_bindir}/clang-scan-deps -%{_bindir}/clang-tidy -%{_bindir}/clangd -%{_bindir}/diagtool -%{_bindir}/hmaptool -%{_bindir}/nvptx-arch -%{_bindir}/pp-trace -%{_bindir}/c-index-test -%{_bindir}/find-all-symbols -%{_bindir}/modularize -%{_bindir}/clang-format-diff +%{install_bindir}/amdgpu-arch +%{install_bindir}/clang-apply-replacements +%{install_bindir}/clang-change-namespace +%{install_bindir}/clang-check +%{install_bindir}/clang-doc +%{install_bindir}/clang-extdef-mapping +%{install_bindir}/clang-format +%{install_bindir}/clang-include-cleaner +%{install_bindir}/clang-include-fixer +%{install_bindir}/clang-installapi +%{install_bindir}/clang-move +%{install_bindir}/clang-offload-bundler +%{install_bindir}/clang-offload-packager +%{install_bindir}/clang-linker-wrapper +%{install_bindir}/clang-pseudo +%{install_bindir}/clang-query +%{install_bindir}/clang-refactor +%{install_bindir}/clang-rename +%{install_bindir}/clang-reorder-fields +%{install_bindir}/clang-repl +%{install_bindir}/clang-scan-deps +%{install_bindir}/clang-tidy +%{install_bindir}/clangd +%{install_bindir}/diagtool +%{install_bindir}/hmaptool +%{install_bindir}/nvptx-arch +%{install_bindir}/pp-trace +%{install_bindir}/c-index-test +%{install_bindir}/find-all-symbols +%{install_bindir}/modularize +%{install_bindir}/clang-format-diff +%{install_bindir}/run-clang-tidy +%if %{with compat_build} +%{_bindir}/amdgpu-arch-%{maj_ver} +%{_bindir}/clang-apply-replacements-%{maj_ver} +%{_bindir}/clang-change-namespace-%{maj_ver} +%{_bindir}/clang-check-%{maj_ver} +%{_bindir}/clang-doc-%{maj_ver} +%{_bindir}/clang-extdef-mapping-%{maj_ver} +%{_bindir}/clang-format-%{maj_ver} +%{_bindir}/clang-include-cleaner-%{maj_ver} +%{_bindir}/clang-include-fixer-%{maj_ver} +%{_bindir}/clang-installapi-%{maj_ver} +%{_bindir}/clang-move-%{maj_ver} +%{_bindir}/clang-offload-bundler-%{maj_ver} +%{_bindir}/clang-offload-packager-%{maj_ver} +%{_bindir}/clang-linker-wrapper-%{maj_ver} +%{_bindir}/clang-pseudo-%{maj_ver} +%{_bindir}/clang-query-%{maj_ver} +%{_bindir}/clang-refactor-%{maj_ver} +%{_bindir}/clang-rename-%{maj_ver} +%{_bindir}/clang-reorder-fields-%{maj_ver} +%{_bindir}/clang-repl-%{maj_ver} +%{_bindir}/clang-scan-deps-%{maj_ver} +%{_bindir}/clang-tidy-%{maj_ver} +%{_bindir}/clangd-%{maj_ver} +%{_bindir}/diagtool-%{maj_ver} +%{_bindir}/hmaptool-%{maj_ver} +%{_bindir}/nvptx-arch-%{maj_ver} +%{_bindir}/pp-trace-%{maj_ver} +%{_bindir}/c-index-test-%{maj_ver} +%{_bindir}/find-all-symbols-%{maj_ver} +%{_bindir}/modularize-%{maj_ver} +%{_bindir}/clang-format-diff-%{maj_ver} +%{_bindir}/run-clang-tidy-%{maj_ver} +%else %{_mandir}/man1/diagtool.1.gz %{_emacs_sitestartdir}/clang-format.el %{_emacs_sitestartdir}/clang-rename.el %{_emacs_sitestartdir}/clang-include-fixer.el -%{_datadir}/clang/clang-format.py* -%{_datadir}/clang/clang-format-diff.py* -%{_datadir}/clang/clang-include-fixer.py* -%{_datadir}/clang/clang-tidy-diff.py* -%{_bindir}/run-clang-tidy -%{_datadir}/clang/run-find-all-symbols.py* -%{_datadir}/clang/clang-rename.py* +%endif +%{install_datadir}/clang/clang-format.py* +%{install_datadir}/clang/clang-format-diff.py* +%{install_datadir}/clang/clang-include-fixer.py* +%{install_datadir}/clang/clang-tidy-diff.py* +%{install_datadir}/clang/run-find-all-symbols.py* +%{install_datadir}/clang/clang-rename.py* + %files -n %{pkg_name_clang}-tools-extra-devel -%{_includedir}/clang-tidy/ +%{install_includedir}/clang-tidy/ %files -n git-clang-format -%{_bindir}/git-clang-format +%{install_bindir}/git-clang-format +%if %{with compat_build} +%{_bindir}/git-clang-format-%{maj_ver} +%endif +%if %{without compat_build} %files -n python3-clang %{python3_sitelib}/clang/ %endif diff --git a/globals.spec.inc b/globals.spec.inc index 36aa366..1fa667a 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -31,6 +31,9 @@ %global install_bindir %{install_prefix}/bin %global install_includedir %{install_prefix}/include %global install_libdir %{install_prefix}/lib +%global install_datadir %{install_prefix}/share +%global install_libexecdir %{install_prefix}/libexec +%global install_docdir %{install_datadir}/doc %global pkg_includedir %{_includedir}/%{pkg_name_llvm} %global pkg_datadir %{install_prefix}/share @@ -38,8 +41,11 @@ %global pkg_name_llvm llvm %global install_prefix /usr %global install_bindir %{_bindir} +%global install_datadir %{_datadir} %global install_libdir %{_libdir} %global install_includedir %{_includedir} +%global install_libexecdir %{_libexecdir} +%global install_docdir %{_docdir} %global pkg_datadir %{_datadir} %global exec_suffix %{nil} %endif From b3de0f3616ac19c4f4e4bff718d2bc015d492166 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 15 Mar 2024 04:19:32 +0000 Subject: [PATCH 040/205] Fix OpenMP patch --- ...mp-implicit-rpath-disabled-by-default.patch | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch b/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch index 3269365..f8448c1 100644 --- a/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch +++ b/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch @@ -33,26 +33,10 @@ diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolC index faceee85a2f8..c058df97160b 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1124,6 +1124,39 @@ static void addOpenMPDeviceLibC(const ToolChain &TC, const ArgList &Args, +@@ -1124,6 +1124,23 @@ static void addOpenMPDeviceLibC(const ToolChain &TC, const ArgList &Args, llvm::append_range(CmdArgs, Libraries); } -+void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC, -+ const ArgList &Args, -+ ArgStringList &CmdArgs) { -+ -+ if (Args.hasFlag(options::OPT_fopenmp_implicit_rpath, -+ options::OPT_fno_openmp_implicit_rpath, false)) { -+ // Default to clang lib / lib64 folder, i.e. the same location as device -+ // runtime -+ SmallString<256> DefaultLibPath = -+ llvm::sys::path::parent_path(TC.getDriver().Dir); -+ llvm::sys::path::append(DefaultLibPath, CLANG_INSTALL_LIBDIR_BASENAME); -+ CmdArgs.push_back("-rpath"); -+ CmdArgs.push_back(Args.MakeArgString(DefaultLibPath)); -+ } -+} -+ + +void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC, + const ArgList &Args, From 3ab7b31fc788cb0d0c4bab3e116d4c55ef957a70 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 2 Apr 2024 00:31:38 +0000 Subject: [PATCH 041/205] Install clang config file on f38 --- clang.cfg | 2 +- install.spec.inc | 5 +++++ sources.spec.inc | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/clang.cfg b/clang.cfg index bee5a7a..08bf8e0 100644 --- a/clang.cfg +++ b/clang.cfg @@ -1,3 +1,3 @@ # Drop the following option after debugedit adds support to DWARF-5: # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 --gdwarf-4 +-gdwarf-4 -g0 diff --git a/install.spec.inc b/install.spec.inc index 7a96b0e..2ac3d00 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -180,6 +180,11 @@ chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* # populated by other packages mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{include,lib,share}/ +%if 0%{?fedora} == 38 +# Install config file +mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ +mv %{SOURCE2006} %{buildroot}%{_sysconfdir}/%{name}/%{_target_platform}.cfg +%endif %if %{without compat_build} # Add a symlink in /usr/bin to clang-format-diff diff --git a/sources.spec.inc b/sources.spec.inc index b409398..8354718 100644 --- a/sources.spec.inc +++ b/sources.spec.inc @@ -9,6 +9,7 @@ Source1006: release-keys.asc %if %{without compat_build} Source2005: macros.%{pkg_name_clang} %endif +Source2006: clang.cfg Source2006: clang.cfg From 78e75c3e5ae02acf93d055016bd901dc45dd962f Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 9 Apr 2024 13:39:29 +0000 Subject: [PATCH 042/205] Rebase 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch And only apply it on f38, it's not needed on newer Fedoras. --- ...p-implicit-rpath-disabled-by-default.patch | 30 +++++++++---------- patches.spec.inc | 2 +- prep.spec.inc | 8 ++++- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch b/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch index f8448c1..2831c90 100644 --- a/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch +++ b/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch @@ -1,22 +1,22 @@ -From e3a1070bbd5f29190cb7b12d02cd8a63b03bbe79 Mon Sep 17 00:00:00 2001 +From 5c209e4632cb6acdda3be01ae7d83c31ba956979 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 9 Mar 2023 21:52:41 -0800 -Subject: Restore -fopenmp-implicit-rpath, disabled by default +Subject: [PATCH] Restore -fopenmp-implicit-rpath, disabled by default Used by redhat-rpm-config on older Fedora versions. --- - clang/include/clang/Driver/Options.td | 6 ++++ - clang/lib/Driver/ToolChains/CommonArgs.cpp | 35 ++++++++++++++++++++++ - clang/lib/Driver/ToolChains/CommonArgs.h | 3 ++ + clang/include/clang/Driver/Options.td | 6 ++++++ + clang/lib/Driver/ToolChains/CommonArgs.cpp | 19 +++++++++++++++++++ + clang/lib/Driver/ToolChains/CommonArgs.h | 3 +++ clang/test/OpenMP/Inputs/libomp.a | 1 + - 4 files changed, 45 insertions(+) + 4 files changed, 29 insertions(+) create mode 100644 clang/test/OpenMP/Inputs/libomp.a diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td -index 3a028fadb25b..6a3ac3f61e1b 100644 +index f745e573eb26..6289c1af9ada 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td -@@ -5415,6 +5415,12 @@ def offload_add_rpath: Flag<["--"], "offload-add-rpath">, +@@ -5484,6 +5484,12 @@ def offload_add_rpath: Flag<["--"], "offload-add-rpath">, def no_offload_add_rpath: Flag<["--"], "no-offload-add-rpath">, Flags<[NoArgumentUnused]>, Alias; @@ -30,11 +30,11 @@ index 3a028fadb25b..6a3ac3f61e1b 100644 Group; def regcall4 : Flag<["-"], "regcall4">, Group, diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp -index faceee85a2f8..c058df97160b 100644 +index 62a53b85ce09..c51766250983 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1124,6 +1124,23 @@ static void addOpenMPDeviceLibC(const ToolChain &TC, const ArgList &Args, - llvm::append_range(CmdArgs, Libraries); +@@ -1109,6 +1109,23 @@ static void addOpenMPDeviceLibC(const Compilation &C, const ArgList &Args, + } } + @@ -57,8 +57,8 @@ index faceee85a2f8..c058df97160b 100644 void tools::addOpenMPRuntimeLibraryPath(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) { -@@ -1195,6 +1228,8 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, - addOpenMPDeviceLibC(TC, Args, CmdArgs); +@@ -1185,6 +1202,8 @@ bool tools::addOpenMPRuntime(const Compilation &C, ArgStringList &CmdArgs, + addOpenMPDeviceLibC(C, Args, CmdArgs); addArchSpecificRPath(TC, Args, CmdArgs); + if (RTKind == Driver::OMPRT_OMP) @@ -67,7 +67,7 @@ index faceee85a2f8..c058df97160b 100644 return true; diff --git a/clang/lib/Driver/ToolChains/CommonArgs.h b/clang/lib/Driver/ToolChains/CommonArgs.h -index 2db0f889ca82..ab756a181970 100644 +index 5581905db311..3360eb0c6a37 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.h +++ b/clang/lib/Driver/ToolChains/CommonArgs.h @@ -105,6 +105,9 @@ void AddAssemblerKPIC(const ToolChain &ToolChain, @@ -88,5 +88,5 @@ index 000000000000..8b277f0dd5dc @@ -0,0 +1 @@ +! -- -2.43.0 +2.42.0 diff --git a/patches.spec.inc b/patches.spec.inc index 4345f3f..1299766 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -15,7 +15,7 @@ Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch # Temporary patch to add back -fno-openmp-implicit-rpath until we no longer # support Fedora 38 or older, which pass -fno-openmp-implicit-rpath in # redhat-rpm-config. -Patch2009: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch +Patch3001: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch %endif %if %{without compat_build} diff --git a/prep.spec.inc b/prep.spec.inc index 0604429..cd90ea9 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -8,7 +8,13 @@ # -n : Set Name of Build Directory # # see http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html -%autosetup -T -b 0 -p1 -n %{src_tarball_dir} +%autosetup -N -T -b 0 -n %{src_tarball_dir} + +%autopatch -M3000 -p1 + +%if 0%{?fedora} == 38 +%patch -p1 3001 +%endif #region LLVM preparation From b35f3edeaf5b7bf644ec3b789bce1d9def983f97 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 23 Apr 2024 16:29:54 +0000 Subject: [PATCH 043/205] Update libomp xfails on s390x --- check.spec.inc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/check.spec.inc b/check.spec.inc index d231443..1ecf4c5 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -86,13 +86,16 @@ export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_handle.c" filter_out_tests+=("libomp :: ompt/teams/distribute_dispatch.c") # The following tests seem pass on ppc64le and x86_64 only: -%ifnarch ppc64le x86_64 +%ifnarch ppc64le x86_64 s390x # Passes on ppc64le: # libomptarget :: powerpc64le-ibm-linux-gnu :: mapping/target_derefence_array_pointrs.cpp # libomptarget :: powerpc64le-ibm-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp # Passes on x86_64: # libomptarget :: x86_64-pc-linux-gnu :: mapping/target_derefence_array_pointrs.cpp # libomptarget :: x86_64-pc-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp +# Passes on s390x: +# libomptarget :: s390x-ibm-linux-gnu :: mapping/target_derefence_array_pointrs.cpp +# libomptarget :: s390x-ibm-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp export LIT_XFAIL="$LIT_XFAIL;mapping/target_derefence_array_pointrs.cpp" %endif @@ -180,6 +183,15 @@ export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c" export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c" %endif +%ifarch s390x +export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c" +export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c" +export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_GELTGT_int.c" +export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_GTGEGT_int.c" +export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_LTLEGE_int.c" +export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_one_int.c" +%endif + #endregion # Prepare LIT_FILTER_OUT regex from index bash array From 0ef81ed40208a7a7c8c61747de9d2d9f15069afc Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 23 Apr 2024 16:30:49 +0000 Subject: [PATCH 044/205] Fix missing file on i686 --- files.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index 898e623..1a3af40 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -271,7 +271,7 @@ %files -n %{pkg_name_compiler_rt} %license compiler-rt/LICENSE.TXT -%ifarch x86_64 aarch64 +%ifarch x86_64 aarch64 %{ix86} %{_prefix}/lib/clang/%{maj_ver}/bin/* %endif %{_prefix}/lib/clang/%{maj_ver}/include/* From ff4a7f3bedbb24e74c8d09ec9c92ad88a5764958 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 23 Apr 2024 18:36:01 +0000 Subject: [PATCH 045/205] Update libomp xfails on ppc64le --- check.spec.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index 1ecf4c5..0e8cd8b 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -179,11 +179,14 @@ export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count_thread_limit.cpp" export LIT_XFAIL="$LIT_XFAIL;offloading/spmdization.c" export LIT_XFAIL="$LIT_XFAIL;offloading/target_critical_region.cpp" export LIT_XFAIL="$LIT_XFAIL;offloading/thread_limit.c" -export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c" -export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c" +export LIT_XFAIL="$LIT_XFAIL;mapping/auto_zero_copy.cpp" +export LIT_XFAIL="$LIT_XFAIL;mapping/auto_zero_copy_globals.cpp" +export LIT_XFAIL="$LIT_XFAIL;offloading/workshare_chunk.c" +export LIT_XFAIL="$LIT_XFAIL;ompt/target_memcpy.c" +export LIT_XFAIL="$LIT_XFAIL;ompt/target_memcpy_emi.c" %endif -%ifarch s390x +%ifarch s390x ppc64le export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c" export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c" export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_GELTGT_int.c" From 271e096f43db1c3dc4358fe1216908cdae7151e2 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 24 Apr 2024 13:11:16 +0000 Subject: [PATCH 046/205] Fix file path on all arches --- files.spec.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 1a3af40..0f268ac 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -271,9 +271,7 @@ %files -n %{pkg_name_compiler_rt} %license compiler-rt/LICENSE.TXT -%ifarch x86_64 aarch64 %{ix86} %{_prefix}/lib/clang/%{maj_ver}/bin/* -%endif %{_prefix}/lib/clang/%{maj_ver}/include/* %{_prefix}/lib/clang/%{maj_ver}/lib/* %{_prefix}/lib/clang/%{maj_ver}/share/* From 7eb753fbfa66476679d2a846db8ae9a162ab8d1a Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 24 Apr 2024 13:46:54 +0000 Subject: [PATCH 047/205] Add new offload runtime --- build.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.spec.inc b/build.spec.inc index ef9d45d..758c590 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -86,7 +86,7 @@ cd llvm \ \ %if %{without compat_build} --DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp" \ +-DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp;offload" \ %endif \ \ From f447620e04a461288d7b2d86db43f2430ec2571a Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 25 Apr 2024 17:12:17 +0000 Subject: [PATCH 048/205] Run test on aarch64 that passes now --- check.spec.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index 0e8cd8b..aa75bc0 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -85,8 +85,8 @@ export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_handle.c" # The following test is flaky and we'll filter it out filter_out_tests+=("libomp :: ompt/teams/distribute_dispatch.c") -# The following tests seem pass on ppc64le and x86_64 only: -%ifnarch ppc64le x86_64 s390x +# The following tests seem pass on ppc64le and x86_64 and aarch64 only: +%ifnarch ppc64le x86_64 s390x aarch64 # Passes on ppc64le: # libomptarget :: powerpc64le-ibm-linux-gnu :: mapping/target_derefence_array_pointrs.cpp # libomptarget :: powerpc64le-ibm-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp From 824de2ec6925b521fe09637e15f26f53c3caef62 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 26 Apr 2024 03:21:54 +0000 Subject: [PATCH 049/205] Disable openmp tests --- check.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check.spec.inc b/check.spec.inc index aa75bc0..32c753b 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -213,7 +213,7 @@ export LIT_OPTS="-vv" export LD_LIBRARY_PATH="%{buildroot}/%{install_libdir}:%{buildroot}/%{_libdir}"; cd llvm -%cmake_build --target check-all +%cmake_build --target check-llvm check-clang %endif From 39d366a109fec77dc7733c7245ac26683458ee65 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 26 Apr 2024 20:28:49 +0000 Subject: [PATCH 050/205] Fix offload install dir --- build.spec.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/build.spec.inc b/build.spec.inc index 758c590..802a020 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -113,6 +113,7 @@ cd llvm %endif %endif -DOPENMP_INSTALL_LIBDIR=%{_lib} \ + -DOFFLOAD_INSTALL_LIBDIR=%{_lib} \ \ \ \ From 360173b9d6811db6ec21d6ca85f0ab351b2e1fba Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 27 Apr 2024 04:43:06 +0000 Subject: [PATCH 051/205] Revert "Fix file path on all arches" This reverts commit 0d6602437c40f2a0d2714fbaeebf3d851017c627. --- files.spec.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index 0f268ac..1a3af40 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -271,7 +271,9 @@ %files -n %{pkg_name_compiler_rt} %license compiler-rt/LICENSE.TXT +%ifarch x86_64 aarch64 %{ix86} %{_prefix}/lib/clang/%{maj_ver}/bin/* +%endif %{_prefix}/lib/clang/%{maj_ver}/include/* %{_prefix}/lib/clang/%{maj_ver}/lib/* %{_prefix}/lib/clang/%{maj_ver}/share/* From eecdbeec91dccdd6e1fe336edc82dba04d457952 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 29 Apr 2024 22:59:00 +0000 Subject: [PATCH 052/205] Fix libomptarget.rtl name after 72b0c11cfd267b754076dfc2908ba921c4f69ee3 --- files.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index 1a3af40..050065d 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -302,7 +302,7 @@ %ifnarch s390x %{_libdir}/libomptarget.rtl.amdgpu.so.%{so_suffix} %{_libdir}/libomptarget.rtl.cuda.so.%{so_suffix} -%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{so_suffix} +%{_libdir}/libomptarget.rtl.host.so.%{so_suffix} %endif %{_libdir}/libomptarget.so.%{so_suffix} %endif From 05c4d674210651bde13419d57b2c134b2a43a06b Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 29 Apr 2024 22:59:00 +0000 Subject: [PATCH 053/205] Fix libomptarget.rtl name after 72b0c11cfd267b754076dfc2908ba921c4f69ee3 --- files.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index 050065d..f0d7b50 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -322,7 +322,7 @@ %ifnarch s390x %{_libdir}/libomptarget.rtl.amdgpu.so %{_libdir}/libomptarget.rtl.cuda.so -%{_libdir}/libomptarget.rtl.%{libomp_arch}.so +%{_libdir}/libomptarget.rtl.host.so %endif %{_libdir}/libomptarget.devicertl.a %{_libdir}/libomptarget-amdgpu-*.bc From e35aa0635321cb21581261f552a321b4efc2e40a Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 30 Apr 2024 20:30:17 +0000 Subject: [PATCH 054/205] Fix missing directory on ppc64le --- files.spec.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index f0d7b50..9576722 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -133,7 +133,9 @@ %files -n %{pkg_name_clang}-resource-filesystem %dir %{install_prefix}/lib/clang/ %dir %{install_prefix}/lib/clang/%{maj_ver}/ +%ifarch x86_64 aarch64 %{ix86} %dir %{install_prefix}/lib/clang/%{maj_ver}/bin/ +%endif %dir %{install_prefix}/lib/clang/%{maj_ver}/include/ %dir %{install_prefix}/lib/clang/%{maj_ver}/lib/ %dir %{install_prefix}/lib/clang/%{maj_ver}/share/ From 2884c8fb40ba4a80cd98f86d2ee85a8d3989ef82 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 3 May 2024 12:12:19 +0000 Subject: [PATCH 055/205] Remove patch only needed for standalone builds This patch was only needed for standalone builds which we no longer do: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch --- ...a-Make-test-dependency-on-LLVMHello-.patch | 84 ------------------- patches.spec.inc | 8 +- 2 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch diff --git a/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch b/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch deleted file mode 100644 index 37284a2..0000000 --- a/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 22d62b32cd3be5fb0ae10723b35a781e0f862b71 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Tue, 24 Jan 2023 22:46:25 +0000 -Subject: [PATCH] clang-tools-extra: Make test dependency on LLVMHello optional - -This fixes clang + clang-tools-extra standalone build after ---- - clang-tools-extra/test/CMakeLists.txt | 10 +++++++++- - clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp | 2 +- - clang-tools-extra/test/lit.cfg.py | 3 +++ - clang-tools-extra/test/lit.site.cfg.py.in | 1 + - 4 files changed, 14 insertions(+), 2 deletions(-) - -diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt -index f4c529ee8af2..1cfb4dd529aa 100644 ---- a/clang-tools-extra/test/CMakeLists.txt -+++ b/clang-tools-extra/test/CMakeLists.txt -@@ -7,10 +7,15 @@ - set(CLANG_TOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") - set(CLANG_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..") - -+if (TARGET LLVMHello) -+ set (LLVM_HAS_LLVM_HELLO 1) -+endif() -+ - llvm_canonicalize_cmake_booleans( - CLANG_TIDY_ENABLE_STATIC_ANALYZER - CLANG_PLUGIN_SUPPORT - LLVM_INSTALL_TOOLCHAIN_ONLY -+ LLVM_HAS_LLVM_HELLO - ) - - configure_lit_site_cfg( -@@ -86,7 +91,10 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - endif() - - if(TARGET CTTestTidyModule) -- list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello) -+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) -+ if (TARGET LLVMHello) -+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) -+ endif() - target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}") - if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN)) - set(LLVM_LINK_COMPONENTS -diff --git a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp -index c66a94f458cf..b4e7a5d691e5 100644 ---- a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp -+++ b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp -@@ -1,4 +1,4 @@ --// REQUIRES: plugins -+// REQUIRES: plugins, llvm-hello - // RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s - // CHECK-LIST: Enabled checks: - // CHECK-LIST-NEXT: mytest1 -diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py -index 9f64fd3d2ffa..1b258a00ddf9 100644 ---- a/clang-tools-extra/test/lit.cfg.py -+++ b/clang-tools-extra/test/lit.cfg.py -@@ -75,6 +75,9 @@ config.substitutions.append(("%clang_tidy_headers", clang_tidy_headers)) - if config.has_plugins and config.llvm_plugin_ext: - config.available_features.add("plugins") - -+if config.has_llvm_hello: -+ config.available_features.add("llvm-hello") -+ - # It is not realistically possible to account for all options that could - # possibly be present in system and user configuration files, so disable - # default configs for the test runs. -diff --git a/clang-tools-extra/test/lit.site.cfg.py.in b/clang-tools-extra/test/lit.site.cfg.py.in -index 4eb830a1baf1..6e5559348454 100644 ---- a/clang-tools-extra/test/lit.site.cfg.py.in -+++ b/clang-tools-extra/test/lit.site.cfg.py.in -@@ -11,6 +11,7 @@ config.target_triple = "@LLVM_TARGET_TRIPLE@" - config.host_triple = "@LLVM_HOST_TRIPLE@" - config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@ - config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@ -+config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@ - # Support substitution of the tools and libs dirs with user parameters. This is - # used when we can't determine the tool dir at configuration time. - config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@") --- -2.40.1 - diff --git a/patches.spec.inc b/patches.spec.inc index 1299766..8e9df1e 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -16,10 +16,4 @@ Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch # support Fedora 38 or older, which pass -fno-openmp-implicit-rpath in # redhat-rpm-config. Patch3001: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch -%endif - -%if %{without compat_build} -# Patches for clang-tools-extra -# See https://reviews.llvm.org/D120301 -Patch2500: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch -%endif +%endif \ No newline at end of file From 627f764c2e8a77e4d0d380af764eb733893329e9 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 3 May 2024 11:36:31 +0200 Subject: [PATCH 056/205] Add lld.spec and patch file --- ...-compact_unwind_encoding.h-from-libu.patch | 497 +++++++++++++ lld.spec | 656 ++++++++++++++++++ 2 files changed, 1153 insertions(+) create mode 100644 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch create mode 100644 lld.spec diff --git a/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch b/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch new file mode 100644 index 0000000..8d31209 --- /dev/null +++ b/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch @@ -0,0 +1,497 @@ +From 9df81767571465ef1f2e7370299e21c64fe34f40 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Thu, 25 Feb 2021 14:24:14 +0100 +Subject: [PATCH][lld] Import compact_unwind_encoding.h from libunwind + +This avoids an implicit cross package dependency +--- + lld/include/mach-o/compact_unwind_encoding.h | 477 +++++++++++++++++++ + 1 file changed, 477 insertions(+) + create mode 100644 lld/include/mach-o/compact_unwind_encoding.h + +diff --git a/lld/include/mach-o/compact_unwind_encoding.h b/lld/include/mach-o/compact_unwind_encoding.h +new file mode 100644 +index 000000000000..5301b1055ef9 +--- /dev/null ++++ b/lld/include/mach-o/compact_unwind_encoding.h +@@ -0,0 +1,477 @@ ++//===------------------ mach-o/compact_unwind_encoding.h ------------------===// ++// ++// 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 ++ +-- +2.30.2 + diff --git a/lld.spec b/lld.spec new file mode 100644 index 0000000..2776081 --- /dev/null +++ b/lld.spec @@ -0,0 +1,656 @@ +%bcond_without snapshot_build + +%if %{with snapshot_build} +# Unlock LLVM Snapshot LUA functions +%{llvm_sb_verbose} +%{llvm_sb} +%endif + +%global toolchain clang + +# Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer +# https://bugzilla.redhat.com/show_bug.cgi?id=2158587 +%undefine _include_frame_pointers + +%bcond_without check +%bcond_with compat_build + +%global maj_ver 18 +%global min_ver 1 +%global patch_ver 0 +%global rc_ver 4 + +%if %{with snapshot_build} +%undefine rc_ver +%global maj_ver %{llvm_snapshot_version_major} +%global min_ver %{llvm_snapshot_version_minor} +%global patch_ver %{llvm_snapshot_version_patch} +%endif + +%global lld_version %{maj_ver}.%{min_ver}.%{patch_ver} + +%global lld_srcdir lld-%{lld_version}%{?rc_ver:rc%{rc_ver}}.src + +%if %{with compat_build} +%global pkg_name lld%{maj_ver} +%global install_prefix %{_libdir}/llvm%{maj_ver} +%global install_includedir %{install_prefix}/include +%global install_libdir %{install_prefix}/lib +%global install_datadir %{install_prefix}/share +%global install_bindir %{install_prefix}/bin +%else +%global pkg_name lld +%global install_prefix /usr +%global install_includedir %{_includedir} +%global install_libdir %{_libdir} +%global install_datadir %{_datadir} +%global install_bindir %{_bindir} +%endif + +Name: %{pkg_name} +Version: %{lld_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} +Release: 2%{?dist} +Summary: The LLVM Linker + +License: Apache-2.0 WITH LLVM-exception OR NCSA +URL: http://llvm.org +%if %{with snapshot_build} +Source0: %{llvm_snapshot_source_prefix}lld-%{llvm_snapshot_yyyymmdd}.src.tar.xz +%{llvm_snapshot_extra_source_tags} +%else +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz +Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz.sig +Source2: release-keys.asc +%endif + +# Bundle libunwind header need during build for MachO support +Patch1: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch + +BuildRequires: clang +BuildRequires: cmake +BuildRequires: ninja-build +%if %{with compat_build} +BuildRequires: llvm%{maj_ver}-devel = %{version} +BuildRequires: llvm%{maj_ver}-cmake-utils = %{version} +%else +BuildRequires: llvm-devel = %{version} +BuildRequires: llvm-cmake-utils = %{version} +BuildRequires: llvm-test = %{version} +BuildRequires: llvm-googletest = %{version} +%endif +BuildRequires: ncurses-devel +BuildRequires: zlib-devel + +# For make check: +BuildRequires: python3-rpm-macros +BuildRequires: python3-lit + +# For gpg source verification +BuildRequires: gnupg2 + +Requires(post): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives + +Requires: %{name}-libs = %{version}-%{release} + +%description +The LLVM project linker. + +%package devel +Summary: Libraries and header files for LLD +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%if %{without compat_build} +# lld tools are referenced in the cmake files, so we need to add lld as a +# dependency. +Requires: %{name}%{?_isa} = %{version}-%{release} +%endif +Provides: %{name}-devel(major) = %{maj_ver} + +%description devel +This package contains library and header files needed to develop new native +programs that use the LLD infrastructure. + +%package libs +Summary: LLD shared libraries + +%description libs +Shared libraries for LLD. + +%prep +%if %{without snapshot_build} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%endif + +%autosetup -n %{lld_srcdir} -p2 + +%build + +%cmake \ + -GNinja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ + -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ + -DLLVM_DYLIB_COMPONENTS="all" \ + -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \ + -DCMAKE_SKIP_RPATH:BOOL=ON \ + -DPYTHON_EXECUTABLE=%{__python3} \ +%if %{with snapshot_build} + -DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \ +%endif + -DLLVM_INCLUDE_TESTS=ON \ + -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ + -DLLVM_LIT_ARGS="-sv \ + --path %{_libdir}/llvm" \ +%if %{with compat_build} + -DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \ +%else +%if 0%{?__isa_bits} == 64 + -DLLVM_LIBDIR_SUFFIX=64 \ +%else + -DLLVM_LIBDIR_SUFFIX= \ +%endif +%endif + -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src + +%cmake_build + +%install + +# Install libraries and binaries +%cmake_install + +# This is generated by Patch1 during build and (probably) must be removed afterward +rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h + +%if %{with compat_build} +# Add version suffix to binaries +mkdir -p %{buildroot}%{_bindir} +for f in %{buildroot}/%{install_bindir}/*; do + filename=`basename $f` + ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename-%{maj_ver} +done +%else +# Required when using update-alternatives: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ +touch %{buildroot}%{_bindir}/ld + +install -D -m 644 -t %{buildroot}%{_mandir}/man1/ docs/ld.lld.1 + + +%post +%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 + +%postun +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld +fi +%endif + +%check + +%if %{with check} +export LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} +%cmake_build --target check-lld +%endif + +%if %{without compat_build} +%ldconfig_scriptlets libs +%endif + +%files +%license LICENSE.TXT +%ghost %{_bindir}/ld +%{install_bindir}/lld* +%{install_bindir}/ld.lld +%{install_bindir}/ld64.lld +%{install_bindir}/wasm-ld +%if %{without compat_build} +%{_mandir}/man1/ld.lld.1* +%else +%{_bindir}/*-%{maj_ver} +%endif + +%files devel +%{install_includedir}/lld +%{install_libdir}/liblld*.so +%{install_libdir}/cmake/lld/ + +%files libs +%{install_libdir}/liblld*.so.* + +%changelog +* Sat Mar 02 2024 Tom Stellard - 18.1.0~rc4-2 +- Enable s390x arch + +* Wed Feb 28 2024 Tom Stellard - 18.1.0~rc4-1 +- 18.1.0-rc4 Release + +* Thu Jan 25 2024 Fedora Release Engineering - 17.0.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 17.0.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +%{?llvm_snapshot_changelog_entry} + +* Mon Dec 18 2023 Jeremy Newton - 17.0.6-2 +- Add lld-devel(major) provides + +* Wed Nov 29 2023 Tulio Magno Quites Machado Filho - 17.0.6-1 +- Update to LLVM 17.0.6 + +* Wed Nov 22 2023 Tulio Magno Quites Machado Filho - 17.0.5-1 +- Update to LLVM 17.0.5 + +* Wed Nov 01 2023 Tulio Magno Quites Machado Filho - 17.0.4-1 +- Update to LLVM 17.0.4 + +* Wed Oct 18 2023 Tulio Magno Quites Machado Filho - 17.0.3-1 +- Update to LLVM 17.0.3 + +* Wed Oct 04 2023 Tulio Magno Quites Machado Filho - 17.0.2-1 +- Update to LLVM 17.0.2 + +* Mon Sep 25 2023 Tulio Magno Quites Machado Filho - 17.0.1-1 +- Update to LLVM 17.0.1 + +* Mon Sep 11 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-1 +- Update to LLVM 17.0.0 RC4 + +* Fri Aug 25 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc3-1 +- Update to LLVM 17.0.0 RC3 + +* Wed Aug 23 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc2-1 +- Update to LLVM 17.0.0 RC2 + +* Wed Aug 02 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-1 +- Update to LLVM 17.0.0 RC1 + +* Thu Jul 20 2023 Fedora Release Engineering - 16.0.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jul 10 2023 Tulio Magno Quites Machado Filho - 16.0.6-1 +- Update to LLVM 16.0.6 + +* Tue Jun 13 2023 Nikita Popov - 16.0.5-2 +- Use llvm-cmake-utils package + +* Tue Jun 06 2023 Tulio Magno Quites Machado Filho - 16.0.5-1 +- Update to LLVM 16.0.5 + +* Fri May 19 2023 Tulio Magno Quites Machado Filho - 16.0.4-1 +- Update to LLVM 16.0.4 + +* Thu May 11 2023 Tulio Magno Quites Machado Filho - 16.0.3-2 +- Distribute the manpage. Fix rhbz#2203231 + +* Wed May 10 2023 Tulio Magno Quites Machado Filho - 16.0.3-1 +- Update to LLVM 16.0.3 + +* Wed Apr 26 2023 Tulio Magno Quites Machado Filho - 16.0.2-1 +- Update to LLVM 16.0.2 + +* Thu Apr 13 2023 Tulio Magno Quites Machado Filho - 16.0.1-1 +- Update to LLVM 16.0.1 + +* Fri Mar 24 2023 Tulio Magno Quites Machado Filho - 16.0.0-2 +- Use installed llvm_gtest + +* Tue Mar 21 2023 Tulio Magno Quites Machado Filho - 16.0.0-1 +- Update to LLVM 16.0.0 + +* Wed Mar 15 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-1 +- Update to LLVM 16.0.0 RC4 + +* Thu Feb 23 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-1 +- Update to LLVM 16.0.0 RC3 + +* Tue Feb 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc1-1 +- Update to LLVM 16.0.0 RC1 + +* Thu Jan 19 2023 Tulio Magno Quites Machado Filho - 15.0.7-3 +- Update license to SPDX identifiers. +- Include the Apache license adopted in 2019. + +* Thu Jan 19 2023 Fedora Release Engineering - 15.0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jan 13 2023 Nikita Popov - 15.0.7-1 +- Update to LLVM 15.0.7 + +* Mon Jan 09 2023 Tom Stellard - 15.0.6-2 +- Omit frame pointers when building + +* Tue Dec 06 2022 Nikita Popov - 15.0.6-1 +- Update to LLVM 15.0.6 + +* Mon Nov 14 2022 Tulio Magno Quites Machado Filho - 15.0.4-2 +- Enable LTO. + +* Mon Nov 07 2022 Nikita Popov - 15.0.4-1 +- Update to LLVM 15.0.4 + +* Tue Oct 11 2022 Nikita Popov - 15.0.0-2 +- Remove lld-test package + +* Tue Sep 06 2022 Nikita Popov - 15.0.0-1 +- Update to LLVM 15.0.0 + +* Tue Aug 09 2022 Nikita Popov - 14.0.5-4 +- Backport --package-metadata flag + +* Thu Jul 21 2022 Fedora Release Engineering - 14.0.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jul 11 2022 Konrad Kleine - 14.0.5-2 +- Set build type to RelWithDebInfo + +* Fri Jun 17 2022 Timm Bäder - 14.0.5-1 +- Update to 14.0.5 + +* Thu Mar 31 2022 Tom Stellard - 14.0.0-2 +- Fix CI test failure: gcc-compat-basic + +* Mon Feb 28 2022 Timm Bäder - 14.0.0~rc1-1 +- Update to 14.0.0rc1 + +* Thu Feb 03 2022 Nikita Popov - 13.0.1-1 +- Update to LLVM 13.0.1 final + +* Tue Feb 01 2022 Nikita Popov - 13.0.1~rc3-1 +- Update to LLVM 13.0.1 rc3 + +* Thu Jan 20 2022 Fedora Release Engineering - 13.0.1~rc2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jan 14 2022 Nikita Popov - 13.0.1~rc2-1 +- Update to LLVM 13.0.1rc2 + +* Wed Jan 12 2022 Nikita Popov - 13.0.1~rc1-1 +- Update to LLVM 13.0.1rc1 + +* Wed Oct 06 2021 Tom Stellard - 13.0.0-2 +- Rebuild for llvm soname bump + +* Fri Oct 01 2021 Tom Stellard - 13.0.0-1 +- 13.0.0 Release + +* Thu Sep 30 2021 Tom Stellard - 13.0.0~rc4-1 +- 13.0.0-rc4 Release + +* Mon Sep 20 2021 Tom Stellard - 13.0.0~rc1-3 +- 13.0.0-rc3 Release + +* Tue Sep 14 2021 Konrad Kleine - 13.0.0~rc1-2 +- Add --without=check option + +* Fri Aug 06 2021 Tom Stellard - 13.0.0~rc1-1 +- 13.0.0-rc1 Release + +* Thu Jul 22 2021 Fedora Release Engineering - 12.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jul 13 2021 Tom Stellard - 12.0.1-1 +- 12.0.1 Release + +* Wed Jun 30 2021 Tom Stellard - 12.0.1~rc3-1 +- 12.0.1-rc3 Release + +* Tue Jun 01 2021 Tom Stellard - 12.0.1~rc1-1 +- 12.0.1-rc1 Release + +* Fri Apr 16 2021 Tom Stellard - 12.0.0-1 +- 12.0.0 Release + +* Thu Apr 08 2021 sguelton@redhat.com - 12.0.0-0.8.rc5 +- New upstream release candidate + +* Wed Apr 07 2021 Tom Stellard - 12.0.0-0.7.rc4 +- Set executable permissions on run-lit-tests + +* Fri Apr 02 2021 sguelton@redhat.com - 12.0.0-0.6.rc4 +- New upstream release candidate + +* Wed Mar 31 2021 Jonathan Wakely - 12.0.0-0.5.rc3 +- Rebuilt for removed libstdc++ symbols (#1937698) + +* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-0.4.rc3 +- LLVM 12.0.0 rc3 + +* Wed Mar 10 2021 sguelton@redhat.com - 12.0.0-0.3.rc2 +- rebuilt + +* Wed Feb 24 2021 sguelton@redhat.com - 12.0.0-0.2.rc2 +- llvm 12.0.0-rc2 release + +* Tue Feb 16 2021 sguelton@redhat.com - 12.0.0-0.1.rc1 +- llvm 12.0.0-rc1 release + +* Tue Jan 26 2021 Fedora Release Engineering - 11.1.0-0.3.rc2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 22 2021 Serge Guelton - 11.1.0-0.2.rc2 +- llvm 11.1.0-rc2 release + +* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1 +- 11.1.0-rc1 release + +* Wed Jan 06 2021 Serge Guelton - 11.0.1-3 +- LLVM 11.0.1 final + +* Tue Dec 22 2020 sguelton@redhat.com - 11.0.1-2.rc2 +- llvm 11.0.1-rc2 + +* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1 +- llvm 11.0.1-rc1 + +* Thu Nov 12 2020 sguelton@redhat.com - 11.0.0-3 +- Exclude s390x, unsupported upstream + +* Mon Oct 19 2020 sguelton@redhat.com - 11.0.0-2 +- Rebuilt with all gating tests on + +* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1 +- Fix NVR + +* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.6 +- llvm 11.0.0 - final release + +* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.5.rc6 +- 11.0.0-rc6 + +* Wed Oct 07 2020 sguelton@redhat.com - 11.0.0-0.4.rc5 +- Update CI tests + +* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.3.rc5 +- 11.0.0-rc5 Release + +* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.2.rc3 +- Fix NVR + +* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3 +- 11.0.0-rc3 Release + +* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.1.rc2 +- 11.0.0-rc2 Release + +* Mon Aug 10 2020 Tom Stellard - 11.0.0-0.1.rc1 +- 11.0.0-rc1 Release + +* Mon Aug 10 2020 sguelton@redhat.com - 10.0.0-7 +- use %%license macro + +* Mon Aug 10 2020 Tom Stellard - 10.0.0-6 +- Disable LTO + +* Sat Aug 01 2020 Fedora Release Engineering - 10.0.0-5 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 10.0.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 20 2020 sguelton@redhat.com - 10.0.0-3 +- Use generic cmake macros +- Use Ninja as build system +- Remove chrpath dependency + +* Fri Jul 17 2020 sguelton@redhat.com - 10.0.0-2 +- Make test archive arch-independent + +* Mon Mar 30 2020 sguelton@redhat.com - 10.0.0-1 +- 10.0.0 final + +* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-0.6.rc6 +- 10.0.0 rc6 + +* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.5.rc5 +- 10.0.0 rc5 + +* Sun Mar 15 2020 sguelton@redhat.com - 10.0.0-0.4.rc4 +- 10.0.0 rc4 + +* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.3.rc3 +- 10.0.0 rc3 + +* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.2.rc2 +- 10.0.0 rc2 + +* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1 +- 10.0.0 rc1 + +* Wed Jan 29 2020 Fedora Release Engineering - 9.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Dec 19 2019 Tom Stellard -9.0.1-1 +- 9.0.1 Release + +* Sat Dec 14 2019 Tom Stellard - 9.0.0-6 +- Fix some rpmdiff errors + +* Fri Dec 13 2019 Tom Stellard - 9.0.0-5 +- Remove build artifacts installed with unittests + +* Thu Dec 05 2019 Tom Stellard - 9.0.0-4 +- Enable GPG-based source file verification + +* Thu Dec 05 2019 Tom Stellard - 9.0.0-3 +- Add lld-test package + +* Thu Nov 14 2019 Tom Stellard - 9.0.0-2 +- Add explicit lld-libs requires to fix rpmdiff errors + +* Thu Sep 19 2019 Tom Stellard -9.0.0-1 +- 9.0.0 Release + +* Thu Aug 22 2019 Tom Stellard - 9.0.0-0.1.rc3 +- 9.0.0-rc3 Release + +* Tue Aug 20 2019 Tom Stellard - 8.0.0-3 +- touch /usr/bin/ld as required by the packaging guidelines for + update-alternatives + +* Tue Aug 13 2019 Tom Stellard - 8.0.0-2 +- Add update-alternative for ld + +* Thu Jul 25 2019 Fedora Release Engineering - 8.0.0-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1 +- 8.0.0 final + +* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.4.rc4 +- 8.0.0 Release candidate 4 + +* Tue Mar 5 2019 sguelton@redhat.com - 8.0.0-0.4.rc3 +- Cleanup specfile after llvm specfile update + +* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3 +- 8.0.0 Release candidate 3 + +* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2 +- 8.0.0 Release candidate 2 + +* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-0.1.rc1 +- 8.0.0 Release candidate 1 + +* Fri Feb 01 2019 Fedora Release Engineering - 7.0.1-3.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 14 2019 sguelton@redhat.com - 7.0.1-3 +- Fix lld + annobin integration & Setup basic CI tests + +* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-2 +- Update lit dependency + +* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1 +- 7.0.1 Release + +* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-2 +- Ensure rpmlint passes on specfile + +* Mon Sep 24 2018 Tom Stellard - 7.0.0-1 +- 7.0.1 Release + +* Tue Sep 11 2018 Tom Stellard - 7.0.0-0.4.rc3 +- 7.0.0-rc3 Release + +* Fri Aug 31 2018 Tom Stellard - 7.0.0-0.3.rc2 +- 7.0.0-rc2 Release + +* Thu Aug 30 2018 Tom Stellard - 7.0.0-0.2.rc1 +- Enable make check + +* Mon Aug 13 2018 Tom Stellard - 7.0.0-0.1.rc1 +- 7.0.0-rc1 Release + +* Fri Jul 13 2018 Fedora Release Engineering - 6.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jun 27 2018 Tom Stellard - 6.0.1-1 +- 6.0.1 Release + +* Fri May 11 2018 Tom Stellard - 6.0.1-0.1.rc1 +- 6.0.1-rc1 Release + +* Thu Mar 08 2018 Tom Stellard - 6.0.0-1 +- 6.0.0 Release + +* Tue Feb 13 2018 Tom Stellard - 6.0.0-0.3.rc2 +- 6.0.0-rc2 Release + +* Thu Feb 08 2018 Fedora Release Engineering - 6.0.0-0.2.rc1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 25 2018 Tom Stellard - 6.0.0-0.1.rc1 +- 6.0.0-rc1 Release + +* Thu Dec 21 2017 Tom Stellard - 5.0.1-1 +- 5.0.1 Release + +* Mon Sep 11 2017 Tom Stellard - 5.0.0-1 +- 5.0.0 Release + +* Thu Aug 03 2017 Fedora Release Engineering - 4.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 4.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jul 06 2017 Tom Stellard - 4.0.1-2 +- Backport r307092 + +* Tue Jul 04 2017 Tom Stellard - 4.0.1-1 +- 4.0.1 Release + +* Tue Jul 04 2017 Tom Stellard - 4.0.0-4 +- Fix build without llvm-static + +* Wed May 31 2017 Tom Stellard - 4.0.0-3 +- Remove llvm-static dependency + +* Mon May 15 2017 Fedora Release Engineering - 4.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild + +* Tue Mar 14 2017 Tom Stellard - 4.0.0-1 +- lld 4.0.0 Final Release From 316c5488a7cf7153be77cb37dd855e5a69a0fddd Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 3 May 2024 13:12:47 +0200 Subject: [PATCH 057/205] Integrate lld.spec into spec files --- build.spec.inc | 13 +- check.spec.inc | 10 +- files.spec.inc | 25 ++ globals.spec.inc | 7 + install.spec.inc | 30 +++ lld.spec | 656 ---------------------------------------------- packages.spec.inc | 51 ++++ patches.spec.inc | 4 + sources.spec.inc | 2 - 9 files changed, 138 insertions(+), 660 deletions(-) delete mode 100644 lld.spec diff --git a/build.spec.inc b/build.spec.inc index 802a020..5de6ae1 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -156,7 +156,7 @@ cd llvm %else -DLLVM_INSTALL_GTEST:BOOL=ON \ %endif - -DLLVM_LIT_ARGS=-vv \ + -DLLVM_LIT_ARGS="-vv --path %{_libdir}/llvm" \ \ -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \ -DLLVM_BUILD_EXAMPLES:BOOL=OFF \ @@ -193,6 +193,17 @@ cd llvm -DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \ -DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \ -DLLVM_INCLUDE_BENCHMARKS=OFF \ + \ + \ + -DLLVM_DYLIB_COMPONENTS="all" \ + -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \ + -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ +%if %{with compat_build} + -DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \ +%endif + -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \ + \ + \ %ifarch x86_64 -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error" \ %endif diff --git a/check.spec.inc b/check.spec.inc index 32c753b..7e5c8ba 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -213,8 +213,16 @@ export LIT_OPTS="-vv" export LD_LIBRARY_PATH="%{buildroot}/%{install_libdir}:%{buildroot}/%{_libdir}"; cd llvm -%cmake_build --target check-llvm check-clang +%cmake_build --target check-llvm check-clang check-lld %endif +#region LLD + +%if %{without compat_build} +%ldconfig_scriptlets libs +%endif + +#endregion + %endif diff --git a/files.spec.inc b/files.spec.inc index 9576722..e0e5b05 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -335,3 +335,28 @@ %endif #endregion + +#region LLD files + +%files -n %{pkg_name_lld} +%license LICENSE.TXT +%ghost %{_bindir}/ld +%{install_bindir}/lld* +%{install_bindir}/ld.lld +%{install_bindir}/ld64.lld +%{install_bindir}/wasm-ld +%if %{without compat_build} +%{_mandir}/man1/ld.lld.1* +%else +%{_bindir}/*-%{maj_ver} +%endif + +%files -n %{pkg_name_lld}-devel +%{install_includedir}/lld +%{install_libdir}/liblld*.so +%{install_libdir}/cmake/lld/ + +%files -n %{pkg_name_lld}-libs +%{install_libdir}/liblld*.so.* + +#endregion diff --git a/globals.spec.inc b/globals.spec.inc index 1fa667a..c67a273 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -140,3 +140,10 @@ %endif #endregion +#region LLD globals +%if %{with compat_build} +%global pkg_name_lld lld%{maj_ver} +%else +%global pkg_name_lld lld +%endif +#endregion \ No newline at end of file diff --git a/install.spec.inc b/install.spec.inc index 2ac3d00..36c1b59 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -229,3 +229,33 @@ rm -rf %{buildroot}/%{_datarootdir}/gdb %endif #endregion + +#region LLD installation + +# This is generated by Patch1 during build and (probably) must be removed afterward +rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h + +%if %{with compat_build} +# Add version suffix to binaries +mkdir -p %{buildroot}%{_bindir} +for f in %{buildroot}/%{install_bindir}/*; do + filename=`basename $f` + ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename-%{maj_ver} +done +%else +# Required when using update-alternatives: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ +touch %{buildroot}%{_bindir}/ld + +install -D -m 644 -t %{buildroot}%{_mandir}/man1/ docs/ld.lld.1 + +%post -n %{pkg_name_lld} +%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 + +%postun -n %{pkg_name_lld} +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld +fi +%endif + +#endregion \ No newline at end of file diff --git a/lld.spec b/lld.spec deleted file mode 100644 index 2776081..0000000 --- a/lld.spec +++ /dev/null @@ -1,656 +0,0 @@ -%bcond_without snapshot_build - -%if %{with snapshot_build} -# Unlock LLVM Snapshot LUA functions -%{llvm_sb_verbose} -%{llvm_sb} -%endif - -%global toolchain clang - -# Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer -# https://bugzilla.redhat.com/show_bug.cgi?id=2158587 -%undefine _include_frame_pointers - -%bcond_without check -%bcond_with compat_build - -%global maj_ver 18 -%global min_ver 1 -%global patch_ver 0 -%global rc_ver 4 - -%if %{with snapshot_build} -%undefine rc_ver -%global maj_ver %{llvm_snapshot_version_major} -%global min_ver %{llvm_snapshot_version_minor} -%global patch_ver %{llvm_snapshot_version_patch} -%endif - -%global lld_version %{maj_ver}.%{min_ver}.%{patch_ver} - -%global lld_srcdir lld-%{lld_version}%{?rc_ver:rc%{rc_ver}}.src - -%if %{with compat_build} -%global pkg_name lld%{maj_ver} -%global install_prefix %{_libdir}/llvm%{maj_ver} -%global install_includedir %{install_prefix}/include -%global install_libdir %{install_prefix}/lib -%global install_datadir %{install_prefix}/share -%global install_bindir %{install_prefix}/bin -%else -%global pkg_name lld -%global install_prefix /usr -%global install_includedir %{_includedir} -%global install_libdir %{_libdir} -%global install_datadir %{_datadir} -%global install_bindir %{_bindir} -%endif - -Name: %{pkg_name} -Version: %{lld_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 2%{?dist} -Summary: The LLVM Linker - -License: Apache-2.0 WITH LLVM-exception OR NCSA -URL: http://llvm.org -%if %{with snapshot_build} -Source0: %{llvm_snapshot_source_prefix}lld-%{llvm_snapshot_yyyymmdd}.src.tar.xz -%{llvm_snapshot_extra_source_tags} -%else -Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz -Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz.sig -Source2: release-keys.asc -%endif - -# Bundle libunwind header need during build for MachO support -Patch1: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch - -BuildRequires: clang -BuildRequires: cmake -BuildRequires: ninja-build -%if %{with compat_build} -BuildRequires: llvm%{maj_ver}-devel = %{version} -BuildRequires: llvm%{maj_ver}-cmake-utils = %{version} -%else -BuildRequires: llvm-devel = %{version} -BuildRequires: llvm-cmake-utils = %{version} -BuildRequires: llvm-test = %{version} -BuildRequires: llvm-googletest = %{version} -%endif -BuildRequires: ncurses-devel -BuildRequires: zlib-devel - -# For make check: -BuildRequires: python3-rpm-macros -BuildRequires: python3-lit - -# For gpg source verification -BuildRequires: gnupg2 - -Requires(post): %{_sbindir}/update-alternatives -Requires(preun): %{_sbindir}/update-alternatives - -Requires: %{name}-libs = %{version}-%{release} - -%description -The LLVM project linker. - -%package devel -Summary: Libraries and header files for LLD -Requires: %{name}-libs%{?_isa} = %{version}-%{release} -%if %{without compat_build} -# lld tools are referenced in the cmake files, so we need to add lld as a -# dependency. -Requires: %{name}%{?_isa} = %{version}-%{release} -%endif -Provides: %{name}-devel(major) = %{maj_ver} - -%description devel -This package contains library and header files needed to develop new native -programs that use the LLD infrastructure. - -%package libs -Summary: LLD shared libraries - -%description libs -Shared libraries for LLD. - -%prep -%if %{without snapshot_build} -%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%endif - -%autosetup -n %{lld_srcdir} -p2 - -%build - -%cmake \ - -GNinja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ - -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ - -DLLVM_DYLIB_COMPONENTS="all" \ - -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \ - -DCMAKE_SKIP_RPATH:BOOL=ON \ - -DPYTHON_EXECUTABLE=%{__python3} \ -%if %{with snapshot_build} - -DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \ -%endif - -DLLVM_INCLUDE_TESTS=ON \ - -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ - -DLLVM_LIT_ARGS="-sv \ - --path %{_libdir}/llvm" \ -%if %{with compat_build} - -DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \ -%else -%if 0%{?__isa_bits} == 64 - -DLLVM_LIBDIR_SUFFIX=64 \ -%else - -DLLVM_LIBDIR_SUFFIX= \ -%endif -%endif - -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src - -%cmake_build - -%install - -# Install libraries and binaries -%cmake_install - -# This is generated by Patch1 during build and (probably) must be removed afterward -rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h - -%if %{with compat_build} -# Add version suffix to binaries -mkdir -p %{buildroot}%{_bindir} -for f in %{buildroot}/%{install_bindir}/*; do - filename=`basename $f` - ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename-%{maj_ver} -done -%else -# Required when using update-alternatives: -# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ -touch %{buildroot}%{_bindir}/ld - -install -D -m 644 -t %{buildroot}%{_mandir}/man1/ docs/ld.lld.1 - - -%post -%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 - -%postun -if [ $1 -eq 0 ] ; then - %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld -fi -%endif - -%check - -%if %{with check} -export LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} -%cmake_build --target check-lld -%endif - -%if %{without compat_build} -%ldconfig_scriptlets libs -%endif - -%files -%license LICENSE.TXT -%ghost %{_bindir}/ld -%{install_bindir}/lld* -%{install_bindir}/ld.lld -%{install_bindir}/ld64.lld -%{install_bindir}/wasm-ld -%if %{without compat_build} -%{_mandir}/man1/ld.lld.1* -%else -%{_bindir}/*-%{maj_ver} -%endif - -%files devel -%{install_includedir}/lld -%{install_libdir}/liblld*.so -%{install_libdir}/cmake/lld/ - -%files libs -%{install_libdir}/liblld*.so.* - -%changelog -* Sat Mar 02 2024 Tom Stellard - 18.1.0~rc4-2 -- Enable s390x arch - -* Wed Feb 28 2024 Tom Stellard - 18.1.0~rc4-1 -- 18.1.0-rc4 Release - -* Thu Jan 25 2024 Fedora Release Engineering - 17.0.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 17.0.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -%{?llvm_snapshot_changelog_entry} - -* Mon Dec 18 2023 Jeremy Newton - 17.0.6-2 -- Add lld-devel(major) provides - -* Wed Nov 29 2023 Tulio Magno Quites Machado Filho - 17.0.6-1 -- Update to LLVM 17.0.6 - -* Wed Nov 22 2023 Tulio Magno Quites Machado Filho - 17.0.5-1 -- Update to LLVM 17.0.5 - -* Wed Nov 01 2023 Tulio Magno Quites Machado Filho - 17.0.4-1 -- Update to LLVM 17.0.4 - -* Wed Oct 18 2023 Tulio Magno Quites Machado Filho - 17.0.3-1 -- Update to LLVM 17.0.3 - -* Wed Oct 04 2023 Tulio Magno Quites Machado Filho - 17.0.2-1 -- Update to LLVM 17.0.2 - -* Mon Sep 25 2023 Tulio Magno Quites Machado Filho - 17.0.1-1 -- Update to LLVM 17.0.1 - -* Mon Sep 11 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-1 -- Update to LLVM 17.0.0 RC4 - -* Fri Aug 25 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc3-1 -- Update to LLVM 17.0.0 RC3 - -* Wed Aug 23 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc2-1 -- Update to LLVM 17.0.0 RC2 - -* Wed Aug 02 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-1 -- Update to LLVM 17.0.0 RC1 - -* Thu Jul 20 2023 Fedora Release Engineering - 16.0.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Mon Jul 10 2023 Tulio Magno Quites Machado Filho - 16.0.6-1 -- Update to LLVM 16.0.6 - -* Tue Jun 13 2023 Nikita Popov - 16.0.5-2 -- Use llvm-cmake-utils package - -* Tue Jun 06 2023 Tulio Magno Quites Machado Filho - 16.0.5-1 -- Update to LLVM 16.0.5 - -* Fri May 19 2023 Tulio Magno Quites Machado Filho - 16.0.4-1 -- Update to LLVM 16.0.4 - -* Thu May 11 2023 Tulio Magno Quites Machado Filho - 16.0.3-2 -- Distribute the manpage. Fix rhbz#2203231 - -* Wed May 10 2023 Tulio Magno Quites Machado Filho - 16.0.3-1 -- Update to LLVM 16.0.3 - -* Wed Apr 26 2023 Tulio Magno Quites Machado Filho - 16.0.2-1 -- Update to LLVM 16.0.2 - -* Thu Apr 13 2023 Tulio Magno Quites Machado Filho - 16.0.1-1 -- Update to LLVM 16.0.1 - -* Fri Mar 24 2023 Tulio Magno Quites Machado Filho - 16.0.0-2 -- Use installed llvm_gtest - -* Tue Mar 21 2023 Tulio Magno Quites Machado Filho - 16.0.0-1 -- Update to LLVM 16.0.0 - -* Wed Mar 15 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-1 -- Update to LLVM 16.0.0 RC4 - -* Thu Feb 23 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-1 -- Update to LLVM 16.0.0 RC3 - -* Tue Feb 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc1-1 -- Update to LLVM 16.0.0 RC1 - -* Thu Jan 19 2023 Tulio Magno Quites Machado Filho - 15.0.7-3 -- Update license to SPDX identifiers. -- Include the Apache license adopted in 2019. - -* Thu Jan 19 2023 Fedora Release Engineering - 15.0.7-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jan 13 2023 Nikita Popov - 15.0.7-1 -- Update to LLVM 15.0.7 - -* Mon Jan 09 2023 Tom Stellard - 15.0.6-2 -- Omit frame pointers when building - -* Tue Dec 06 2022 Nikita Popov - 15.0.6-1 -- Update to LLVM 15.0.6 - -* Mon Nov 14 2022 Tulio Magno Quites Machado Filho - 15.0.4-2 -- Enable LTO. - -* Mon Nov 07 2022 Nikita Popov - 15.0.4-1 -- Update to LLVM 15.0.4 - -* Tue Oct 11 2022 Nikita Popov - 15.0.0-2 -- Remove lld-test package - -* Tue Sep 06 2022 Nikita Popov - 15.0.0-1 -- Update to LLVM 15.0.0 - -* Tue Aug 09 2022 Nikita Popov - 14.0.5-4 -- Backport --package-metadata flag - -* Thu Jul 21 2022 Fedora Release Engineering - 14.0.5-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jul 11 2022 Konrad Kleine - 14.0.5-2 -- Set build type to RelWithDebInfo - -* Fri Jun 17 2022 Timm Bäder - 14.0.5-1 -- Update to 14.0.5 - -* Thu Mar 31 2022 Tom Stellard - 14.0.0-2 -- Fix CI test failure: gcc-compat-basic - -* Mon Feb 28 2022 Timm Bäder - 14.0.0~rc1-1 -- Update to 14.0.0rc1 - -* Thu Feb 03 2022 Nikita Popov - 13.0.1-1 -- Update to LLVM 13.0.1 final - -* Tue Feb 01 2022 Nikita Popov - 13.0.1~rc3-1 -- Update to LLVM 13.0.1 rc3 - -* Thu Jan 20 2022 Fedora Release Engineering - 13.0.1~rc2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jan 14 2022 Nikita Popov - 13.0.1~rc2-1 -- Update to LLVM 13.0.1rc2 - -* Wed Jan 12 2022 Nikita Popov - 13.0.1~rc1-1 -- Update to LLVM 13.0.1rc1 - -* Wed Oct 06 2021 Tom Stellard - 13.0.0-2 -- Rebuild for llvm soname bump - -* Fri Oct 01 2021 Tom Stellard - 13.0.0-1 -- 13.0.0 Release - -* Thu Sep 30 2021 Tom Stellard - 13.0.0~rc4-1 -- 13.0.0-rc4 Release - -* Mon Sep 20 2021 Tom Stellard - 13.0.0~rc1-3 -- 13.0.0-rc3 Release - -* Tue Sep 14 2021 Konrad Kleine - 13.0.0~rc1-2 -- Add --without=check option - -* Fri Aug 06 2021 Tom Stellard - 13.0.0~rc1-1 -- 13.0.0-rc1 Release - -* Thu Jul 22 2021 Fedora Release Engineering - 12.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jul 13 2021 Tom Stellard - 12.0.1-1 -- 12.0.1 Release - -* Wed Jun 30 2021 Tom Stellard - 12.0.1~rc3-1 -- 12.0.1-rc3 Release - -* Tue Jun 01 2021 Tom Stellard - 12.0.1~rc1-1 -- 12.0.1-rc1 Release - -* Fri Apr 16 2021 Tom Stellard - 12.0.0-1 -- 12.0.0 Release - -* Thu Apr 08 2021 sguelton@redhat.com - 12.0.0-0.8.rc5 -- New upstream release candidate - -* Wed Apr 07 2021 Tom Stellard - 12.0.0-0.7.rc4 -- Set executable permissions on run-lit-tests - -* Fri Apr 02 2021 sguelton@redhat.com - 12.0.0-0.6.rc4 -- New upstream release candidate - -* Wed Mar 31 2021 Jonathan Wakely - 12.0.0-0.5.rc3 -- Rebuilt for removed libstdc++ symbols (#1937698) - -* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-0.4.rc3 -- LLVM 12.0.0 rc3 - -* Wed Mar 10 2021 sguelton@redhat.com - 12.0.0-0.3.rc2 -- rebuilt - -* Wed Feb 24 2021 sguelton@redhat.com - 12.0.0-0.2.rc2 -- llvm 12.0.0-rc2 release - -* Tue Feb 16 2021 sguelton@redhat.com - 12.0.0-0.1.rc1 -- llvm 12.0.0-rc1 release - -* Tue Jan 26 2021 Fedora Release Engineering - 11.1.0-0.3.rc2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jan 22 2021 Serge Guelton - 11.1.0-0.2.rc2 -- llvm 11.1.0-rc2 release - -* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1 -- 11.1.0-rc1 release - -* Wed Jan 06 2021 Serge Guelton - 11.0.1-3 -- LLVM 11.0.1 final - -* Tue Dec 22 2020 sguelton@redhat.com - 11.0.1-2.rc2 -- llvm 11.0.1-rc2 - -* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1 -- llvm 11.0.1-rc1 - -* Thu Nov 12 2020 sguelton@redhat.com - 11.0.0-3 -- Exclude s390x, unsupported upstream - -* Mon Oct 19 2020 sguelton@redhat.com - 11.0.0-2 -- Rebuilt with all gating tests on - -* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1 -- Fix NVR - -* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.6 -- llvm 11.0.0 - final release - -* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.5.rc6 -- 11.0.0-rc6 - -* Wed Oct 07 2020 sguelton@redhat.com - 11.0.0-0.4.rc5 -- Update CI tests - -* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.3.rc5 -- 11.0.0-rc5 Release - -* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.2.rc3 -- Fix NVR - -* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3 -- 11.0.0-rc3 Release - -* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.1.rc2 -- 11.0.0-rc2 Release - -* Mon Aug 10 2020 Tom Stellard - 11.0.0-0.1.rc1 -- 11.0.0-rc1 Release - -* Mon Aug 10 2020 sguelton@redhat.com - 10.0.0-7 -- use %%license macro - -* Mon Aug 10 2020 Tom Stellard - 10.0.0-6 -- Disable LTO - -* Sat Aug 01 2020 Fedora Release Engineering - 10.0.0-5 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 10.0.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 20 2020 sguelton@redhat.com - 10.0.0-3 -- Use generic cmake macros -- Use Ninja as build system -- Remove chrpath dependency - -* Fri Jul 17 2020 sguelton@redhat.com - 10.0.0-2 -- Make test archive arch-independent - -* Mon Mar 30 2020 sguelton@redhat.com - 10.0.0-1 -- 10.0.0 final - -* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-0.6.rc6 -- 10.0.0 rc6 - -* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.5.rc5 -- 10.0.0 rc5 - -* Sun Mar 15 2020 sguelton@redhat.com - 10.0.0-0.4.rc4 -- 10.0.0 rc4 - -* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.3.rc3 -- 10.0.0 rc3 - -* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.2.rc2 -- 10.0.0 rc2 - -* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1 -- 10.0.0 rc1 - -* Wed Jan 29 2020 Fedora Release Engineering - 9.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Dec 19 2019 Tom Stellard -9.0.1-1 -- 9.0.1 Release - -* Sat Dec 14 2019 Tom Stellard - 9.0.0-6 -- Fix some rpmdiff errors - -* Fri Dec 13 2019 Tom Stellard - 9.0.0-5 -- Remove build artifacts installed with unittests - -* Thu Dec 05 2019 Tom Stellard - 9.0.0-4 -- Enable GPG-based source file verification - -* Thu Dec 05 2019 Tom Stellard - 9.0.0-3 -- Add lld-test package - -* Thu Nov 14 2019 Tom Stellard - 9.0.0-2 -- Add explicit lld-libs requires to fix rpmdiff errors - -* Thu Sep 19 2019 Tom Stellard -9.0.0-1 -- 9.0.0 Release - -* Thu Aug 22 2019 Tom Stellard - 9.0.0-0.1.rc3 -- 9.0.0-rc3 Release - -* Tue Aug 20 2019 Tom Stellard - 8.0.0-3 -- touch /usr/bin/ld as required by the packaging guidelines for - update-alternatives - -* Tue Aug 13 2019 Tom Stellard - 8.0.0-2 -- Add update-alternative for ld - -* Thu Jul 25 2019 Fedora Release Engineering - 8.0.0-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1 -- 8.0.0 final - -* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.4.rc4 -- 8.0.0 Release candidate 4 - -* Tue Mar 5 2019 sguelton@redhat.com - 8.0.0-0.4.rc3 -- Cleanup specfile after llvm specfile update - -* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3 -- 8.0.0 Release candidate 3 - -* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2 -- 8.0.0 Release candidate 2 - -* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-0.1.rc1 -- 8.0.0 Release candidate 1 - -* Fri Feb 01 2019 Fedora Release Engineering - 7.0.1-3.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 14 2019 sguelton@redhat.com - 7.0.1-3 -- Fix lld + annobin integration & Setup basic CI tests - -* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-2 -- Update lit dependency - -* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1 -- 7.0.1 Release - -* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-2 -- Ensure rpmlint passes on specfile - -* Mon Sep 24 2018 Tom Stellard - 7.0.0-1 -- 7.0.1 Release - -* Tue Sep 11 2018 Tom Stellard - 7.0.0-0.4.rc3 -- 7.0.0-rc3 Release - -* Fri Aug 31 2018 Tom Stellard - 7.0.0-0.3.rc2 -- 7.0.0-rc2 Release - -* Thu Aug 30 2018 Tom Stellard - 7.0.0-0.2.rc1 -- Enable make check - -* Mon Aug 13 2018 Tom Stellard - 7.0.0-0.1.rc1 -- 7.0.0-rc1 Release - -* Fri Jul 13 2018 Fedora Release Engineering - 6.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Jun 27 2018 Tom Stellard - 6.0.1-1 -- 6.0.1 Release - -* Fri May 11 2018 Tom Stellard - 6.0.1-0.1.rc1 -- 6.0.1-rc1 Release - -* Thu Mar 08 2018 Tom Stellard - 6.0.0-1 -- 6.0.0 Release - -* Tue Feb 13 2018 Tom Stellard - 6.0.0-0.3.rc2 -- 6.0.0-rc2 Release - -* Thu Feb 08 2018 Fedora Release Engineering - 6.0.0-0.2.rc1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jan 25 2018 Tom Stellard - 6.0.0-0.1.rc1 -- 6.0.0-rc1 Release - -* Thu Dec 21 2017 Tom Stellard - 5.0.1-1 -- 5.0.1 Release - -* Mon Sep 11 2017 Tom Stellard - 5.0.0-1 -- 5.0.0 Release - -* Thu Aug 03 2017 Fedora Release Engineering - 4.0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 4.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Thu Jul 06 2017 Tom Stellard - 4.0.1-2 -- Backport r307092 - -* Tue Jul 04 2017 Tom Stellard - 4.0.1-1 -- 4.0.1 Release - -* Tue Jul 04 2017 Tom Stellard - 4.0.0-4 -- Fix build without llvm-static - -* Wed May 31 2017 Tom Stellard - 4.0.0-3 -- Remove llvm-static dependency - -* Mon May 15 2017 Fedora Release Engineering - 4.0.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild - -* Tue Mar 14 2017 Tom Stellard - 4.0.0-1 -- lld 4.0.0 Final Release diff --git a/packages.spec.inc b/packages.spec.inc index 1945015..16dc840 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -294,3 +294,54 @@ OpenMP header files. %endif #endregion + +#region LLD packages + +%package -n %{pkg_name_lld} +Summary: The LLVM Linker + +License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT +URL: http://llvm.org + +BuildRequires: clang +BuildRequires: cmake +BuildRequires: ninja-build +BuildRequires: ncurses-devel +BuildRequires: zlib-devel + +# For make check: +BuildRequires: python3-rpm-macros +BuildRequires: python3-lit + +# For gpg source verification +BuildRequires: gnupg2 + +Requires(post): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives + +Requires: %{pkg_name_lld}-libs = %{version}-%{release} + +%description -n %{pkg_name_lld} +The LLVM project linker. + +%package -n %{pkg_name_lld}-devel +Summary: Libraries and header files for LLD +Requires: %{pkg_name_lld}-libs%{?_isa} = %{version}-%{release} +%if %{without compat_build} +# lld tools are referenced in the cmake files, so we need to add lld as a +# dependency. +Requires: %{pkg_name_lld}%{?_isa} = %{version}-%{release} +%endif +Provides: %{pkg_name_lld}-devel(major) = %{maj_ver} + +%description -n %{pkg_name_lld}-devel +This package contains library and header files needed to develop new native +programs that use the LLD infrastructure. + +%package -n %{pkg_name_lld}-libs +Summary: LLD shared libraries + +%description -n %{pkg_name_lld}-libs +Shared libraries for LLD. + +#endregion diff --git a/patches.spec.inc b/patches.spec.inc index 8e9df1e..8a72d09 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -7,6 +7,10 @@ Patch2002: 0003-PATCH-clang-Don-t-install-static-libraries.patch # More info is available here: https://reviews.llvm.org/D159115#4641826 Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch +#region LLD patches +Patch4001: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch +#endregion + # # Drop the following patch after debugedit adds support to DWARF-5: # # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 # Source2006: 0001-Produce-DWARF4-by-default.patch diff --git a/sources.spec.inc b/sources.spec.inc index 8354718..77ebefc 100644 --- a/sources.spec.inc +++ b/sources.spec.inc @@ -11,8 +11,6 @@ Source2005: macros.%{pkg_name_clang} %endif Source2006: clang.cfg -Source2006: clang.cfg - # Sources we use to split up the main spec file in sections so that we can more # easily see what specfile sections are touched by a patch. Source1000: version.spec.inc From a977a8b36bc6e8a1e2f4505b492b1fef2fe31cde Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 6 May 2024 08:59:45 +0000 Subject: [PATCH 058/205] Apply lld patch --- patches.spec.inc | 4 ++-- prep.spec.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/patches.spec.inc b/patches.spec.inc index 8a72d09..d9f8555 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -8,7 +8,7 @@ Patch2002: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch #region LLD patches -Patch4001: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch +Patch3001: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch #endregion # # Drop the following patch after debugedit adds support to DWARF-5: @@ -19,5 +19,5 @@ Patch4001: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch # Temporary patch to add back -fno-openmp-implicit-rpath until we no longer # support Fedora 38 or older, which pass -fno-openmp-implicit-rpath in # redhat-rpm-config. -Patch3001: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch +Patch9001: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch %endif \ No newline at end of file diff --git a/prep.spec.inc b/prep.spec.inc index cd90ea9..8f31109 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -10,10 +10,10 @@ # see http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html %autosetup -N -T -b 0 -n %{src_tarball_dir} -%autopatch -M3000 -p1 +%autopatch -M9000 -p1 %if 0%{?fedora} == 38 -%patch -p1 3001 +%patch -p1 9001 %endif #region LLVM preparation From 31c6b8a3e267c0e4c61d409b84cfc9172c5691d4 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 6 May 2024 09:05:12 +0000 Subject: [PATCH 059/205] Fix lld scriptlet naming --- check.spec.inc | 2 +- globals.spec.inc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index 7e5c8ba..b79aa69 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -220,7 +220,7 @@ cd llvm #region LLD %if %{without compat_build} -%ldconfig_scriptlets libs +%ldconfig_scriptlets -n %{pkg_name_lld}-libs %endif #endregion diff --git a/globals.spec.inc b/globals.spec.inc index c67a273..c00e419 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -140,10 +140,11 @@ %endif #endregion + #region LLD globals %if %{with compat_build} %global pkg_name_lld lld%{maj_ver} %else %global pkg_name_lld lld %endif -#endregion \ No newline at end of file +#endregion From 4836e0c649015e96f490039c8d30789682b0b67c Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 6 May 2024 10:48:11 +0000 Subject: [PATCH 060/205] Adjust download URL for tarballs to new project location --- .copr/snapshot-info.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.copr/snapshot-info.sh b/.copr/snapshot-info.sh index 2d95354..b40c5a5 100755 --- a/.copr/snapshot-info.sh +++ b/.copr/snapshot-info.sh @@ -19,7 +19,7 @@ llvm_snapshot_yyyymmdd=$(date +%Y%m%d) [[ ! -z "${YYYYMMDD}" ]] && llvm_snapshot_yyyymmdd=$YYYYMMDD loginfo "Get the source tarball" -tarball_url=https://github.com/kwk/llvm-daily-fedora-rpms/releases/download/source-snapshot/llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz +tarball_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/source-snapshot/llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz tarball=llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz if [ -e $tarball ]; then loginfo "Source tarball already exists: $tarball" From e7577a312ee3695124e9c3e372f18191de30efbe Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 6 May 2024 13:00:42 +0000 Subject: [PATCH 061/205] enable lld project --- build.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.spec.inc b/build.spec.inc index 5de6ae1..23053a1 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -48,7 +48,7 @@ cd llvm # TODO: Override LIBOMP_INSTALL_LIBDIR, because otherwise the libraries # are installed to /usr/lib64/$TRIPLE and clang can't find them. %cmake -G Ninja \ - -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \ + -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" \ \ \ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ From d8b121f4e04c6e72377f1222c8b5dece27ed3e35 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 6 May 2024 13:01:05 +0000 Subject: [PATCH 062/205] Remove LLVM_CMAKE_DIR and LLVM_MAIN_SRC_DIR cmake config options --- build.spec.inc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 23053a1..43c065b 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -198,10 +198,6 @@ cd llvm -DLLVM_DYLIB_COMPONENTS="all" \ -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \ -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ -%if %{with compat_build} - -DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \ -%endif - -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \ \ \ %ifarch x86_64 From aa3612f18044c5d2a2780f7e111a8c170933847d Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 6 May 2024 14:41:14 +0000 Subject: [PATCH 063/205] Fix path --- install.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.spec.inc b/install.spec.inc index 36c1b59..fce7f47 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -247,7 +247,7 @@ done # https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ touch %{buildroot}%{_bindir}/ld -install -D -m 644 -t %{buildroot}%{_mandir}/man1/ docs/ld.lld.1 +install -D -m 644 -t %{buildroot}%{_mandir}/man1/ %{src_tarball_dir}/lld/docs/ld.lld.1 %post -n %{pkg_name_lld} %{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 From 96e6dc3d90e0cfdd59577f3dffd19a66aa9c0967 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 8 May 2024 12:45:11 +0900 Subject: [PATCH 064/205] Explicitly disable LLVM_APPEND_VC_REV This already happens implicitly because we don't build from a git checkout. However, currently this also breaks the build due to https://github.com/llvm/llvm-project/pull/88164. Avoid this by explicitly disabling the option. --- build.spec.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/build.spec.inc b/build.spec.inc index 43c065b..4215aa6 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -174,6 +174,7 @@ cd llvm -DLLVM_BUILD_DOCS:BOOL=ON \ -DLLVM_ENABLE_SPHINX:BOOL=ON \ -DLLVM_ENABLE_DOXYGEN:BOOL=OFF \ + -DLLVM_APPEND_VC_REV:BOOL=OFF \ \ %if %{with snapshot_build} -DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \ From 3fa5104b03ec32b235947ad35286f091d6acd4be Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 7 May 2024 14:46:16 +0000 Subject: [PATCH 065/205] Remove LLD's HTML documentation files --- install.spec.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.spec.inc b/install.spec.inc index fce7f47..a809ecf 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -232,6 +232,9 @@ rm -rf %{buildroot}/%{_datarootdir}/gdb #region LLD installation +# Remove LLD's HTML documentation files +rm -Rvf %{buildroot}%{_docdir}/LLVM/lld/html + # This is generated by Patch1 during build and (probably) must be removed afterward rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h From c0dde1d23214641bae636cfe02155ffbb070248f Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 8 May 2024 06:06:52 +0000 Subject: [PATCH 066/205] Use lit from in-source --- build.spec.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 4215aa6..026dbdc 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -156,7 +156,7 @@ cd llvm %else -DLLVM_INSTALL_GTEST:BOOL=ON \ %endif - -DLLVM_LIT_ARGS="-vv --path %{_libdir}/llvm" \ + -DLLVM_LIT_ARGS="-vv" \ \ -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \ -DLLVM_BUILD_EXAMPLES:BOOL=OFF \ @@ -198,7 +198,6 @@ cd llvm \ -DLLVM_DYLIB_COMPONENTS="all" \ -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \ - -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ \ \ %ifarch x86_64 From 0656f30e3739d2d371d58f2fad66d634a766e0fe Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 6 May 2024 22:50:03 +0000 Subject: [PATCH 067/205] Always build shared libs for LLD We don't want to enable BUILD_SHARED_LIBS for the whole build, but we do want to build lld libraries. --- 0001-Always-build-shared-libs-for-LLD.patch | 29 +++++++++++++++++++++ patches.spec.inc | 1 + 2 files changed, 30 insertions(+) create mode 100644 0001-Always-build-shared-libs-for-LLD.patch diff --git a/0001-Always-build-shared-libs-for-LLD.patch b/0001-Always-build-shared-libs-for-LLD.patch new file mode 100644 index 0000000..1659800 --- /dev/null +++ b/0001-Always-build-shared-libs-for-LLD.patch @@ -0,0 +1,29 @@ +From b1c60d7fa322a2d208556087df9e7ef94bfbffb8 Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Wed, 8 May 2024 12:30:36 +0900 +Subject: [PATCH] Always build shared libs for LLD + +We don't want to enable BUILD_SHARED_LIBS for the whole build, +but we do want to build lld libraries. +--- + lld/cmake/modules/AddLLD.cmake | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake +index 2ee066b41535..270c03f096ac 100644 +--- a/lld/cmake/modules/AddLLD.cmake ++++ b/lld/cmake/modules/AddLLD.cmake +@@ -7,9 +7,8 @@ macro(add_lld_library name) + "" + "" + ${ARGN}) +- if(ARG_SHARED) +- set(ARG_ENABLE_SHARED SHARED) +- endif() ++ # Always build shared libs for LLD. ++ set(ARG_ENABLE_SHARED SHARED) + llvm_add_library(${name} ${ARG_ENABLE_SHARED} ${ARG_UNPARSED_ARGUMENTS}) + set_target_properties(${name} PROPERTIES FOLDER "lld libraries") + +-- +2.44.0 \ No newline at end of file diff --git a/patches.spec.inc b/patches.spec.inc index d9f8555..1f2793e 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -9,6 +9,7 @@ Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch #region LLD patches Patch3001: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch +Patch3002: 0001-Always-build-shared-libs-for-LLD.patch #endregion # # Drop the following patch after debugedit adds support to DWARF-5: From bada609c4ba01fdb82b2a654acd916787bf5a8a8 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 8 May 2024 11:04:38 +0000 Subject: [PATCH 068/205] Inline %post and %postun code for llvm-devel --- llvm.spec | 5 ++++- post_devel.spec.inc | 4 ---- postun_devel.spec.inc | 6 ------ 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 post_devel.spec.inc delete mode 100644 postun_devel.spec.inc diff --git a/llvm.spec b/llvm.spec index cbd3fae..23f251a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -490,7 +490,10 @@ for v in 14 15 16; do fi done %endif -%include %{_sourcedir}/post_devel.spec.inc +%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} +%if %{without compat_build} +%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} +%endif %postun devel diff --git a/post_devel.spec.inc b/post_devel.spec.inc deleted file mode 100644 index ccfcbed..0000000 --- a/post_devel.spec.inc +++ /dev/null @@ -1,4 +0,0 @@ -%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} -%if %{without compat_build} -%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} -%endif diff --git a/postun_devel.spec.inc b/postun_devel.spec.inc deleted file mode 100644 index 6ce6c4c..0000000 --- a/postun_devel.spec.inc +++ /dev/null @@ -1,6 +0,0 @@ -if [ $1 -eq 0 ]; then - %{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} -%if %{without compat_build} - %{_sbindir}/update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} -%endif -fi \ No newline at end of file From 2ce72cec8186f1766ade9571fff85719ea9dc83d Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 8 May 2024 11:08:59 +0000 Subject: [PATCH 069/205] Use LICENSE.TXT file from lld directory --- files.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index e0e5b05..f8390e2 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -339,7 +339,7 @@ #region LLD files %files -n %{pkg_name_lld} -%license LICENSE.TXT +%license lld/LICENSE.TXT %ghost %{_bindir}/ld %{install_bindir}/lld* %{install_bindir}/ld.lld From f3763ad711f3bf9a08d793d4340f3490909ad1c5 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 8 May 2024 13:26:40 +0000 Subject: [PATCH 070/205] Manually list binaries and manpages files for the llvm package --- files.spec.inc | 226 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 223 insertions(+), 3 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index f8390e2..28a0451 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -3,11 +3,231 @@ %files -n %{pkg_name_llvm} %license llvm/LICENSE.TXT %exclude %{_mandir}/man1/llvm-config* -%{_mandir}/man1/* -%{install_bindir}/* + +%{_mandir}/man1/bugpoint.1.gz +%{_mandir}/man1/clang-tblgen.1.gz +%{_mandir}/man1/dsymutil.1.gz +%{_mandir}/man1/FileCheck.1.gz +%{_mandir}/man1/lit.1.gz +%{_mandir}/man1/llc.1.gz +%{_mandir}/man1/lldb-tblgen.1.gz +%{_mandir}/man1/lli.1.gz +%{_mandir}/man1/llvm-addr2line.1.gz +%{_mandir}/man1/llvm-ar.1.gz +%{_mandir}/man1/llvm-as.1.gz +%{_mandir}/man1/llvm-bcanalyzer.1.gz +%{_mandir}/man1/llvm-cov.1.gz +%{_mandir}/man1/llvm-cxxfilt.1.gz +%{_mandir}/man1/llvm-cxxmap.1.gz +%{_mandir}/man1/llvm-debuginfo-analyzer.1.gz +%{_mandir}/man1/llvm-diff.1.gz +%{_mandir}/man1/llvm-dis.1.gz +%{_mandir}/man1/llvm-dwarfdump.1.gz +%{_mandir}/man1/llvm-dwarfutil.1.gz +%{_mandir}/man1/llvm-exegesis.1.gz +%{_mandir}/man1/llvm-extract.1.gz +%{_mandir}/man1/llvm-ifs.1.gz +%{_mandir}/man1/llvm-install-name-tool.1.gz +%{_mandir}/man1/llvm-lib.1.gz +%{_mandir}/man1/llvm-libtool-darwin.1.gz +%{_mandir}/man1/llvm-link.1.gz +%{_mandir}/man1/llvm-lipo.1.gz +%{_mandir}/man1/llvm-locstats.1.gz +%{_mandir}/man1/llvm-mc.1.gz +%{_mandir}/man1/llvm-mca.1.gz +%{_mandir}/man1/llvm-nm.1.gz +%{_mandir}/man1/llvm-objcopy.1.gz +%{_mandir}/man1/llvm-objdump.1.gz +%{_mandir}/man1/llvm-opt-report.1.gz +%{_mandir}/man1/llvm-otool.1.gz +%{_mandir}/man1/llvm-pdbutil.1.gz +%{_mandir}/man1/llvm-profdata.1.gz +%{_mandir}/man1/llvm-profgen.1.gz +%{_mandir}/man1/llvm-ranlib.1.gz +%{_mandir}/man1/llvm-readelf.1.gz +%{_mandir}/man1/llvm-readobj.1.gz +%{_mandir}/man1/llvm-reduce.1.gz +%{_mandir}/man1/llvm-remarkutil.1.gz +%{_mandir}/man1/llvm-size.1.gz +%{_mandir}/man1/llvm-stress.1.gz +%{_mandir}/man1/llvm-strings.1.gz +%{_mandir}/man1/llvm-strip.1.gz +%{_mandir}/man1/llvm-symbolizer.1.gz +%{_mandir}/man1/llvm-tblgen.1.gz +%{_mandir}/man1/llvm-tli-checker.1.gz +%{_mandir}/man1/mlir-tblgen.1.gz +%{_mandir}/man1/opt.1.gz +%{_mandir}/man1/tblgen.1.gz + +%{install_bindir}/bugpoint +%{install_bindir}/dsymutil +%{install_bindir}/FileCheck +%{install_bindir}/llc +%{install_bindir}/lli +%{install_bindir}/llvm-addr2line +%{install_bindir}/llvm-ar +%{install_bindir}/llvm-as +%{install_bindir}/llvm-bcanalyzer +%{install_bindir}/llvm-bitcode-strip +%{install_bindir}/llvm-c-test +%{install_bindir}/llvm-cat +%{install_bindir}/llvm-cfi-verify +%{install_bindir}/llvm-cov +%{install_bindir}/llvm-cvtres +%{install_bindir}/llvm-cxxdump +%{install_bindir}/llvm-cxxfilt +%{install_bindir}/llvm-cxxmap +%{install_bindir}/llvm-debuginfo-analyzer +%{install_bindir}/llvm-debuginfod +%{install_bindir}/llvm-debuginfod-find +%{install_bindir}/llvm-diff +%{install_bindir}/llvm-dis +%{install_bindir}/llvm-dlltool +%{install_bindir}/llvm-dwarfdump +%{install_bindir}/llvm-dwarfutil +%{install_bindir}/llvm-dwp +%{install_bindir}/llvm-exegesis +%{install_bindir}/llvm-extract +%{install_bindir}/llvm-gsymutil +%{install_bindir}/llvm-ifs +%{install_bindir}/llvm-install-name-tool +%{install_bindir}/llvm-jitlink +%{install_bindir}/llvm-jitlink-executor +%{install_bindir}/llvm-lib +%{install_bindir}/llvm-libtool-darwin +%{install_bindir}/llvm-link +%{install_bindir}/llvm-lipo +%{install_bindir}/llvm-lto +%{install_bindir}/llvm-lto2 +%{install_bindir}/llvm-mc +%{install_bindir}/llvm-mca +%{install_bindir}/llvm-ml +%{install_bindir}/llvm-modextract +%{install_bindir}/llvm-mt +%{install_bindir}/llvm-nm +%{install_bindir}/llvm-objcopy +%{install_bindir}/llvm-objdump +%{install_bindir}/llvm-opt-report +%{install_bindir}/llvm-otool +%{install_bindir}/llvm-pdbutil +%{install_bindir}/llvm-PerfectShuffle +%{install_bindir}/llvm-profdata +%{install_bindir}/llvm-profgen +%{install_bindir}/llvm-ranlib +%{install_bindir}/llvm-rc +%{install_bindir}/llvm-readelf +%{install_bindir}/llvm-readobj +%{install_bindir}/llvm-readtapi +%{install_bindir}/llvm-reduce +%{install_bindir}/llvm-remarkutil +%{install_bindir}/llvm-rtdyld +%{install_bindir}/llvm-sim +%{install_bindir}/llvm-size +%{install_bindir}/llvm-split +%{install_bindir}/llvm-stress +%{install_bindir}/llvm-strings +%{install_bindir}/llvm-strip +%{install_bindir}/llvm-symbolizer +%{install_bindir}/llvm-tblgen +%{install_bindir}/llvm-tli-checker +%{install_bindir}/llvm-undname +%{install_bindir}/llvm-windres +%{install_bindir}/llvm-xray +%{install_bindir}/obj2yaml +%{install_bindir}/opt +%{install_bindir}/sancov +%{install_bindir}/sanstats +%{install_bindir}/split-file +%{install_bindir}/UnicodeNameMappingGenerator +%{install_bindir}/verify-uselistorder +%{install_bindir}/yaml2obj + + %if %{with compat_build} # This is for all the binaries with the version suffix. -%{_bindir}/*%{exec_suffix} +%{_bindir}/bugpoint%{exec_suffix} +%{_bindir}/dsymutil%{exec_suffix} +%{_bindir}/FileCheck%{exec_suffix} +%{_bindir}/llc%{exec_suffix} +%{_bindir}/lli%{exec_suffix} +%{_bindir}/llvm-addr2line%{exec_suffix} +%{_bindir}/llvm-ar%{exec_suffix} +%{_bindir}/llvm-as%{exec_suffix} +%{_bindir}/llvm-bcanalyzer%{exec_suffix} +%{_bindir}/llvm-bitcode-strip%{exec_suffix} +%{_bindir}/llvm-c-test%{exec_suffix} +%{_bindir}/llvm-cat%{exec_suffix} +%{_bindir}/llvm-cfi-verify%{exec_suffix} +%{_bindir}/llvm-cov%{exec_suffix} +%{_bindir}/llvm-cvtres%{exec_suffix} +%{_bindir}/llvm-cxxdump%{exec_suffix} +%{_bindir}/llvm-cxxfilt%{exec_suffix} +%{_bindir}/llvm-cxxmap%{exec_suffix} +%{_bindir}/llvm-debuginfo-analyzer%{exec_suffix} +%{_bindir}/llvm-debuginfod%{exec_suffix} +%{_bindir}/llvm-debuginfod-find%{exec_suffix} +%{_bindir}/llvm-diff%{exec_suffix} +%{_bindir}/llvm-dis%{exec_suffix} +%{_bindir}/llvm-dlltool%{exec_suffix} +%{_bindir}/llvm-dwarfdump%{exec_suffix} +%{_bindir}/llvm-dwarfutil%{exec_suffix} +%{_bindir}/llvm-dwp%{exec_suffix} +%{_bindir}/llvm-exegesis%{exec_suffix} +%{_bindir}/llvm-extract%{exec_suffix} +%{_bindir}/llvm-gsymutil%{exec_suffix} +%{_bindir}/llvm-ifs%{exec_suffix} +%{_bindir}/llvm-install-name-tool%{exec_suffix} +%{_bindir}/llvm-jitlink%{exec_suffix} +%{_bindir}/llvm-jitlink-executor%{exec_suffix} +%{_bindir}/llvm-lib%{exec_suffix} +%{_bindir}/llvm-libtool-darwin%{exec_suffix} +%{_bindir}/llvm-link%{exec_suffix} +%{_bindir}/llvm-lipo%{exec_suffix} +%{_bindir}/llvm-lto%{exec_suffix} +%{_bindir}/llvm-lto2%{exec_suffix} +%{_bindir}/llvm-mc%{exec_suffix} +%{_bindir}/llvm-mca%{exec_suffix} +%{_bindir}/llvm-ml%{exec_suffix} +%{_bindir}/llvm-modextract%{exec_suffix} +%{_bindir}/llvm-mt%{exec_suffix} +%{_bindir}/llvm-nm%{exec_suffix} +%{_bindir}/llvm-objcopy%{exec_suffix} +%{_bindir}/llvm-objdump%{exec_suffix} +%{_bindir}/llvm-opt-report%{exec_suffix} +%{_bindir}/llvm-otool%{exec_suffix} +%{_bindir}/llvm-pdbutil%{exec_suffix} +%{_bindir}/llvm-PerfectShuffle%{exec_suffix} +%{_bindir}/llvm-profdata%{exec_suffix} +%{_bindir}/llvm-profgen%{exec_suffix} +%{_bindir}/llvm-ranlib%{exec_suffix} +%{_bindir}/llvm-rc%{exec_suffix} +%{_bindir}/llvm-readelf%{exec_suffix} +%{_bindir}/llvm-readobj%{exec_suffix} +%{_bindir}/llvm-readtapi%{exec_suffix} +%{_bindir}/llvm-reduce%{exec_suffix} +%{_bindir}/llvm-remarkutil%{exec_suffix} +%{_bindir}/llvm-rtdyld%{exec_suffix} +%{_bindir}/llvm-sim%{exec_suffix} +%{_bindir}/llvm-size%{exec_suffix} +%{_bindir}/llvm-split%{exec_suffix} +%{_bindir}/llvm-stress%{exec_suffix} +%{_bindir}/llvm-strings%{exec_suffix} +%{_bindir}/llvm-strip%{exec_suffix} +%{_bindir}/llvm-symbolizer%{exec_suffix} +%{_bindir}/llvm-tblgen%{exec_suffix} +%{_bindir}/llvm-tli-checker%{exec_suffix} +%{_bindir}/llvm-undname%{exec_suffix} +%{_bindir}/llvm-windres%{exec_suffix} +%{_bindir}/llvm-xray%{exec_suffix} +%{_bindir}/obj2yaml%{exec_suffix} +%{_bindir}/opt%{exec_suffix} +%{_bindir}/sancov%{exec_suffix} +%{_bindir}/sanstats%{exec_suffix} +%{_bindir}/split-file%{exec_suffix} +%{_bindir}/UnicodeNameMappingGenerator%{exec_suffix} +%{_bindir}/verify-uselistorder%{exec_suffix} +%{_bindir}/yaml2obj%{exec_suffix} + %endif %exclude %{_bindir}/llvm-config%{exec_suffix} From 01e7bab976dbc623d71b7ea623fa7763a290423b Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 8 May 2024 17:50:31 +0000 Subject: [PATCH 071/205] Fixup for ead79795eb6a155b64badfae4e75f457853418fb --- sources.spec.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources.spec.inc b/sources.spec.inc index 77ebefc..7604b8d 100644 --- a/sources.spec.inc +++ b/sources.spec.inc @@ -22,7 +22,5 @@ Source1005: globals.spec.inc Source1006: install.spec.inc Source1008: patches.spec.inc Source1009: prep.spec.inc -Source1010: post_devel.spec.inc -Source1011: postun_devel.spec.inc Source1012: sources.spec.inc Source1013: packages.spec.inc From 9824dd05a05f37a76d3e2f8fec47e39bb0d742cf Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 10 May 2024 05:56:12 +0000 Subject: [PATCH 072/205] Add libomp-tools package This is to host these files which were installed but previously went unpackaged: ``` /usr/bin/llvm-omp-device-info /usr/bin/llvm-omp-kernel-replay ``` --- files.spec.inc | 4 ++++ packages.spec.inc | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index 28a0451..ff1877e 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -552,6 +552,10 @@ %{_libdir}/libomptarget.so %endif +%files -n %{pkg_name_libomp}-tools +%{install_bindir}/llvm-omp-device-info +%{install_bindir}/llvm-omp-kernel-replay + %endif #endregion diff --git a/packages.spec.inc b/packages.spec.inc index 16dc840..c6454ce 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -290,6 +290,12 @@ Requires: clang-resource-filesystem%{?isa} = %{version} %description -n %{pkg_name_libomp}-devel OpenMP header files. +URL: http://openmp.llvm.org + +%package -n %{pkg_name_libomp}-tools +Summary: Tools for OpenMP + +URL: http://openmp.llvm.org %endif From ef9dd63babadac1d55e45b4e6a97d50290ead501 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 10 May 2024 05:57:26 +0000 Subject: [PATCH 073/205] Adjust URL: and License: tags The default `License:`-tag on the top-level llvm package is `Apache-2.0 WITH LLVM-exception OR NCSA` and the default `URL:`-tag is `http://llvm.org`. These will be inherited by all sub-packages and so we only need to list exceptions in the spec file. --- packages.spec.inc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages.spec.inc b/packages.spec.inc index c6454ce..8a8b6ec 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -87,9 +87,6 @@ LLVM's modified googletest sources. %package -n %{pkg_name_clang} Summary: A C language family front-end for LLVM -License: Apache-2.0 WITH LLVM-exception OR NCSA -URL: http://llvm.org - BuildRequires: libxml2-devel BuildRequires: perl-generators @@ -245,7 +242,6 @@ Requires: python3 Summary: LLVM "compiler-rt" runtime libraries License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT -URL: http://llvm.org BuildRequires: python3 @@ -268,7 +264,6 @@ instrumentation, and Blocks C language extension. %package -n %{pkg_name_libomp} Summary: OpenMP runtime for clang -License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://openmp.llvm.org # For clang-offload-packager @@ -285,6 +280,9 @@ OpenMP runtime for clang. %package -n %{pkg_name_libomp}-devel Summary: OpenMP header files + +URL: http://openmp.llvm.org + Requires: %{name}%{?isa} = %{version}-%{release} Requires: clang-resource-filesystem%{?isa} = %{version} @@ -306,9 +304,6 @@ URL: http://openmp.llvm.org %package -n %{pkg_name_lld} Summary: The LLVM Linker -License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT -URL: http://llvm.org - BuildRequires: clang BuildRequires: cmake BuildRequires: ninja-build From 20813393803edc484f475c667acb99377c146c7a Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 10 May 2024 06:05:31 +0000 Subject: [PATCH 074/205] List %license for each sub-package --- files.spec.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index ff1877e..65bc2da 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -333,6 +333,7 @@ %endif %files -n %{pkg_name_clang}-libs +%license clang/LICENSE.TXT %{install_prefix}/lib/clang/%{maj_ver}/include/* %{install_libdir}/*.so.* %if 0%{?fedora} == 38 @@ -340,6 +341,7 @@ %endif %files -n %{pkg_name_clang}-devel +%license clang/LICENSE.TXT %{install_libdir}/*.so %{install_includedir}/clang/ %{install_includedir}/clang-c/ @@ -351,6 +353,7 @@ %dir %{install_datadir}/clang/ %files -n %{pkg_name_clang}-resource-filesystem +%license clang/LICENSE.TXT %dir %{install_prefix}/lib/clang/ %dir %{install_prefix}/lib/clang/%{maj_ver}/ %ifarch x86_64 aarch64 %{ix86} @@ -364,6 +367,7 @@ %endif %files -n %{pkg_name_clang}-analyzer +%license clang/LICENSE.TXT %{install_bindir}/scan-view %{install_bindir}/scan-build %{install_bindir}/analyze-build @@ -392,6 +396,7 @@ %files -n %{pkg_name_clang}-tools-extra +%license clang-tools-extra/LICENSE.TXT %{install_bindir}/amdgpu-arch %{install_bindir}/clang-apply-replacements %{install_bindir}/clang-change-namespace @@ -472,9 +477,11 @@ %files -n %{pkg_name_clang}-tools-extra-devel +%license clang-tools-extra/LICENSE.TXT %{install_includedir}/clang-tidy/ %files -n git-clang-format +%license clang/LICENSE.TXT %{install_bindir}/git-clang-format %if %{with compat_build} %{_bindir}/git-clang-format-%{maj_ver} @@ -482,6 +489,7 @@ %if %{without compat_build} %files -n python3-clang +%license clang/LICENSE.TXT %{python3_sitelib}/clang/ %endif @@ -530,6 +538,7 @@ %endif %files -n %{pkg_name_libomp}-devel +%license openmp/LICENSE.TXT %{_prefix}/lib/clang/%{maj_ver}/include/omp.h %{_prefix}/lib/clang/%{maj_ver}/include/ompx.h %ifnarch %{arm} @@ -553,6 +562,7 @@ %endif %files -n %{pkg_name_libomp}-tools +%license openmp/LICENSE.TXT %{install_bindir}/llvm-omp-device-info %{install_bindir}/llvm-omp-kernel-replay @@ -576,11 +586,13 @@ %endif %files -n %{pkg_name_lld}-devel +%license lld/LICENSE.TXT %{install_includedir}/lld %{install_libdir}/liblld*.so %{install_libdir}/cmake/lld/ %files -n %{pkg_name_lld}-libs +%license lld/LICENSE.TXT %{install_libdir}/liblld*.so.* #endregion From 24e78f177d89997e0678fcf7b2d537df63c10558 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 10 May 2024 06:08:45 +0000 Subject: [PATCH 075/205] Add /usr/share/man/man1/extraclangtools.1.gz to clang-tools-extra --- files.spec.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/files.spec.inc b/files.spec.inc index 65bc2da..5cf3aed 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -464,6 +464,7 @@ %{_bindir}/run-clang-tidy-%{maj_ver} %else %{_mandir}/man1/diagtool.1.gz +%{_mandir}/man1/extraclangtools.1.gz %{_emacs_sitestartdir}/clang-format.el %{_emacs_sitestartdir}/clang-rename.el %{_emacs_sitestartdir}/clang-include-fixer.el From 8e6b7baa6d66e3ae9ea930810d40ddfac38535f5 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 10 May 2024 10:38:37 +0000 Subject: [PATCH 076/205] Add *.so libraries explicitly for clang-devel We had too many `*.so` libraries added to the `clang-devel` package. Before we've added these implicitly by accident: ``` /usr/lib64/libLLVM.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/libLTO.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/libRemarks.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/libclang-cpp.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/libclang.so.19.0.0pre20240509.g943617d12ccbd3 /usr/lib64/libclang.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/liblldCOFF.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/liblldCommon.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/liblldELF.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/liblldMachO.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/liblldMinGW.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/liblldWasm.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/libomptarget.rtl.amdgpu.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/libomptarget.rtl.cuda.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/libomptarget.rtl.host.so.19.0pre20240509.g943617d12ccbd3 /usr/lib64/libomptarget.so.19.0pre20240509.g943617d12ccbd3 ``` And now we're adding just these because these are the ones that used to exist within the clang-devel package when it was still being built in standalone mode: ``` /usr/lib64/libclang-cpp.so /usr/lib64/libclang.so ``` --- files.spec.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index 5cf3aed..21df7e8 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -342,7 +342,8 @@ %files -n %{pkg_name_clang}-devel %license clang/LICENSE.TXT -%{install_libdir}/*.so +%{install_libdir}/libclang-cpp.so +%{install_libdir}/libclang.so %{install_includedir}/clang/ %{install_includedir}/clang-c/ %{install_libdir}/cmake/* From d146c76d579133cb9798b96c37f72ab5031981af Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 10 May 2024 12:30:01 +0000 Subject: [PATCH 077/205] Add cmake files explicitly to clang-devel --- files.spec.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index 21df7e8..e196c8a 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -346,7 +346,8 @@ %{install_libdir}/libclang.so %{install_includedir}/clang/ %{install_includedir}/clang-c/ -%{install_libdir}/cmake/* +%{install_libdir}/cmake/clang +%{install_libdir}/cmake/clang/* %{install_bindir}/clang-tblgen %if %{with compat_build} %{_bindir}/clang-tblgen-%{maj_ver} From 3bebfe7be57d558d9281324a6601cf36043b9272 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 13 May 2024 11:50:07 +0000 Subject: [PATCH 078/205] Manually associate files with compiler-rt --- files.compiler-rt.spec.inc | 72 ++++++++++++++++++++++++++++++++++++++ files.spec.inc | 28 ++++++++++----- sources.spec.inc | 1 + 3 files changed, 93 insertions(+), 8 deletions(-) create mode 100644 files.compiler-rt.spec.inc diff --git a/files.compiler-rt.spec.inc b/files.compiler-rt.spec.inc new file mode 100644 index 0000000..e6d10f4 --- /dev/null +++ b/files.compiler-rt.spec.inc @@ -0,0 +1,72 @@ +# Files that appear both in x86_64 and i686 +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/clang_rt.crtbegin.o +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/clang_rt.crtend.o +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan-preinit.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan.so +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan_static.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.builtins.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.cfi.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.cfi_diag.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.fuzzer.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.fuzzer_interceptors.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.fuzzer_no_main.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.gwp_asan.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.lsan.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.profile.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.safestack.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.scudo_standalone.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.scudo_standalone_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.scudo_standalone.so +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.stats.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.stats_client.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_minimal.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_minimal.so +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone.so + +# Files that don't appear in i686 +%ifnarch %{ix86} +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.dd.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.dfsan.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.dfsan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.dyndd.so +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases.so +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan-preinit.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan.so +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof-preinit.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof.so +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.msan.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.msan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.msan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.msan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan.so +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_minimal.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.xray.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.xray-basic.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.xray-fdr.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.xray-profiling.a +%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/liborc_rt.a +%endif \ No newline at end of file diff --git a/files.spec.inc b/files.spec.inc index e196c8a..020a50a 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -502,17 +502,29 @@ %if %{without compat_build} -%files -n %{pkg_name_compiler_rt} +%files -n %{pkg_name_compiler_rt} -f files.compiler-rt.spec.inc %license compiler-rt/LICENSE.TXT %ifarch x86_64 aarch64 %{ix86} -%{_prefix}/lib/clang/%{maj_ver}/bin/* +%{_prefix}/lib/clang/%{maj_ver}/bin/hwasan_symbolize %endif -%{_prefix}/lib/clang/%{maj_ver}/include/* -%{_prefix}/lib/clang/%{maj_ver}/lib/* -%{_prefix}/lib/clang/%{maj_ver}/share/* -#%ifarch x86_64 aarch64 -#{_bindir}/hwasan_symbolize -#%endif +%{_prefix}/lib/clang/%{maj_ver}/include/fuzzer +%{_prefix}/lib/clang/%{maj_ver}/include/fuzzer/* +%{_prefix}/lib/clang/%{maj_ver}/include/orc +%{_prefix}/lib/clang/%{maj_ver}/include/orc/* +%{_prefix}/lib/clang/%{maj_ver}/include/profile +%{_prefix}/lib/clang/%{maj_ver}/include/profile/* +%{_prefix}/lib/clang/%{maj_ver}/include/sanitizer +%{_prefix}/lib/clang/%{maj_ver}/include/sanitizer/* +%{_prefix}/lib/clang/%{maj_ver}/include/xray +%{_prefix}/lib/clang/%{maj_ver}/include/xray/* + +%{_prefix}/lib/clang/%{maj_ver}/share/asan_ignorelist.txt +%{_prefix}/lib/clang/%{maj_ver}/share/asan_ignorelist.txt +%{_prefix}/lib/clang/%{maj_ver}/share/cfi_ignorelist.txt +%{_prefix}/lib/clang/%{maj_ver}/share/cfi_ignorelist.txt +%{_prefix}/lib/clang/%{maj_ver}/share/dfsan_abilist.txt +%{_prefix}/lib/clang/%{maj_ver}/share/hwasan_ignorelist.txt +%{_prefix}/lib/clang/%{maj_ver}/share/msan_ignorelist.txt %endif diff --git a/sources.spec.inc b/sources.spec.inc index 7604b8d..c8748c6 100644 --- a/sources.spec.inc +++ b/sources.spec.inc @@ -18,6 +18,7 @@ Source1001: build.spec.inc Source1002: changelog.spec.inc Source1003: check.spec.inc Source1004: files.spec.inc +Source1014: files.compiler-rt.spec.inc Source1005: globals.spec.inc Source1006: install.spec.inc Source1008: patches.spec.inc From 259e484bb39828dc8430a41d07ec48284b86e7c8 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 13 May 2024 12:51:15 +0000 Subject: [PATCH 079/205] Leave note for lld compat packaging --- files.spec.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index 020a50a..47c2581 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -597,6 +597,8 @@ %if %{without compat_build} %{_mandir}/man1/ld.lld.1* %else +# TODO(kkleine): The compat package probably needs adjustments because +# we most certainly don't want to package every binary but only those for lld. %{_bindir}/*-%{maj_ver} %endif From a5fb671bd5dd3ab815f846e6cbeaced265ee0162 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 13 May 2024 13:05:48 +0000 Subject: [PATCH 080/205] Remove package libomp-tools We don't want to package it for RHEL, so we remove it here as well. --- files.spec.inc | 5 ----- install.spec.inc | 4 ++++ packages.spec.inc | 5 ----- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 47c2581..aa350ef 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -576,11 +576,6 @@ %{_libdir}/libomptarget.so %endif -%files -n %{pkg_name_libomp}-tools -%license openmp/LICENSE.TXT -%{install_bindir}/llvm-omp-device-info -%{install_bindir}/llvm-omp-kernel-replay - %endif #endregion diff --git a/install.spec.inc b/install.spec.inc index a809ecf..3361a9b 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -226,6 +226,10 @@ rm -rf %{buildroot}/%{_datarootdir}/gdb # chmod go+w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so # chmod +w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so +# Remove files that we don't package, yet. +rm %{buildroot}%{install_bindir}/llvm-omp-device-info +rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay + %endif #endregion diff --git a/packages.spec.inc b/packages.spec.inc index 8a8b6ec..f47be45 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -290,11 +290,6 @@ Requires: clang-resource-filesystem%{?isa} = %{version} OpenMP header files. URL: http://openmp.llvm.org -%package -n %{pkg_name_libomp}-tools -Summary: Tools for OpenMP - -URL: http://openmp.llvm.org - %endif #endregion From 5bc37fd0a99cd6be00faf3a746f2fa39db1a2f61 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 13 May 2024 13:13:03 +0000 Subject: [PATCH 081/205] Leave note on removal of all binaries when installing clang compat --- install.spec.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.spec.inc b/install.spec.inc index 3361a9b..3cd1a9d 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -106,6 +106,10 @@ cd .. %if %{with compat_build} +# TODO(kkleine): I don't know if the removal of every binary +# below is what we want to do in big-merge for compat packages. +# Re-evaluate this! + # Remove binaries/other files rm -Rf %{buildroot}%{install_bindir} rm -Rf %{buildroot}%{install_prefix}/share From c445e81a3fc4eb603c8a894ab7525f5826bb2823 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 13 May 2024 16:35:09 +0000 Subject: [PATCH 082/205] Fix path to files.compiler-rt.spec.inc --- files.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index aa350ef..dad9e31 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -502,7 +502,7 @@ %if %{without compat_build} -%files -n %{pkg_name_compiler_rt} -f files.compiler-rt.spec.inc +%files -n %{pkg_name_compiler_rt} -f %{_sourcedir}/files.compiler-rt.spec.inc %license compiler-rt/LICENSE.TXT %ifarch x86_64 aarch64 %{ix86} %{_prefix}/lib/clang/%{maj_ver}/bin/hwasan_symbolize From 8442b8df62da34db62032cc485c2acd6f984d7d5 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 15 May 2024 11:24:57 +0000 Subject: [PATCH 083/205] Use github source code archive Instead of generating our own archive we now use the github generated source code archive instead [1]. We now only sync on the LLVM version and git revision via our own github releases [2]. [1]: https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives#source-code-archive-urls [2]: https://github.com/fedora-llvm-team/llvm-snapshots/releases/tag/snapshot-version-sync --- .copr/snapshot-info.sh | 29 ++++++----------------------- .gitignore | 1 + 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/.copr/snapshot-info.sh b/.copr/snapshot-info.sh index b40c5a5..d777d42 100755 --- a/.copr/snapshot-info.sh +++ b/.copr/snapshot-info.sh @@ -3,7 +3,6 @@ # You need these packages to run this script: git tar xz curl-minimal set -e -set +x # This is important for systems that have a different local but want to produce # a valid changelog date. @@ -18,30 +17,14 @@ loginfo "Determine date in YYYYMMDD form" llvm_snapshot_yyyymmdd=$(date +%Y%m%d) [[ ! -z "${YYYYMMDD}" ]] && llvm_snapshot_yyyymmdd=$YYYYMMDD -loginfo "Get the source tarball" -tarball_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/source-snapshot/llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz -tarball=llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz -if [ -e $tarball ]; then - loginfo "Source tarball already exists: $tarball" -else - loginfo "Downloading source tarball $tarball from $tarball_url" - curl -sL -o $tarball ${tarball_url} -fi - -loginfo "Grab git revision from tarball" -llvm_snapshot_git_revision=$(xzcat $tarball | git get-tar-commit-id) +git_revision_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/snapshot-version-sync/llvm-git-revision-${llvm_snapshot_yyyymmdd}.txt +loginfo "Get the revision for today from $git_revision_url" +llvm_snapshot_git_revision=$(curl -sL $git_revision_url) llvm_snapshot_git_revision_short=$(echo "${llvm_snapshot_git_revision:0:14}") -versionfile=llvm-project*.src/cmake/Modules/LLVMVersion.cmake -loginfo "Extract the ${versionfile} file from the source tarball" -if [ -e $versionfile ]; then - loginfo "CMakeLists.txt already exists: ${versionfile}" -else - tar -xf $tarball $versionfile -fi - -loginfo "Parse ${versionfile} for the LLVM version" -llvm_snapshot_version=$(grep -ioP 'set\(\s*LLVM_VERSION_(MAJOR|MINOR|PATCH)\s\K[0-9]+' ${versionfile} | paste -sd '.') +release_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/snapshot-version-sync/llvm-release-${llvm_snapshot_yyyymmdd}.txt +loginfo "Get the release for today from $release_url" +llvm_snapshot_version=$(curl -sL $release_url) llvm_snapshot_version_major=$(echo $llvm_snapshot_version | cut -f1 -d.) llvm_snapshot_version_minor=$(echo $llvm_snapshot_version | cut -f2 -d.) llvm_snapshot_version_patch=$(echo $llvm_snapshot_version | cut -f3 -d.) diff --git a/.gitignore b/.gitignore index 78c2c60..918bcc8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /*.src.rpm /*.src.tar.xz /*.src.tar.xz.sig +/*.tar.gz /cmake/ /llvm-*.src/ /results_llvm/ From 8188d9bb02732c44ff38a87e66070641c776947f Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 15 May 2024 11:36:41 +0000 Subject: [PATCH 084/205] Remove OMP SOs The SOs are no longer installed since this commit: https://github.com/llvm/llvm-project/commit/fa9e90f5d23312587b3a17920941334e0d1a58a1 --- files.spec.inc | 10 ---------- globals.spec.inc | 3 +++ sources.spec.inc | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index dad9e31..1d5e9be 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -544,11 +544,6 @@ %ifnarch %{ix86} %{arm} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. -%ifnarch s390x -%{_libdir}/libomptarget.rtl.amdgpu.so.%{so_suffix} -%{_libdir}/libomptarget.rtl.cuda.so.%{so_suffix} -%{_libdir}/libomptarget.rtl.host.so.%{so_suffix} -%endif %{_libdir}/libomptarget.so.%{so_suffix} %endif @@ -565,11 +560,6 @@ %ifnarch %{ix86} %{arm} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. -%ifnarch s390x -%{_libdir}/libomptarget.rtl.amdgpu.so -%{_libdir}/libomptarget.rtl.cuda.so -%{_libdir}/libomptarget.rtl.host.so -%endif %{_libdir}/libomptarget.devicertl.a %{_libdir}/libomptarget-amdgpu-*.bc %{_libdir}/libomptarget-nvptx-*.bc diff --git a/globals.spec.inc b/globals.spec.inc index c00e419..d0ac14f 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -19,6 +19,9 @@ # Suffixless tarball name (essentially: basename -s .tar.xz llvm-project-17.0.6.src.tar.xz) %global src_tarball_dir llvm-project-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src +%if %{with snapshot_build} +%global src_tarball_dir llvm-project-%{llvm_snapshot_git_revision} +%endif %global _lto_cflags -flto=thin diff --git a/sources.spec.inc b/sources.spec.inc index c8748c6..da180e0 100644 --- a/sources.spec.inc +++ b/sources.spec.inc @@ -1,5 +1,5 @@ %if %{with snapshot_build} -Source0: %{llvm_snapshot_source_prefix}llvm-project-%{llvm_snapshot_yyyymmdd}.src.tar.xz +Source0: https://github.com/llvm/llvm-project/archive/%{llvm_snapshot_git_revision}.tar.gz %else Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz Source1001: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz.sig From 59e5d6336365fc52613bf4dff1874c508ef456a9 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 15 May 2024 13:02:24 +0000 Subject: [PATCH 085/205] Add triple prefix to clang config files See https://src.fedoraproject.org/rpms/clang/pull-request/240 --- files.spec.inc | 3 ++- install.spec.inc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 1d5e9be..8f50a24 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -319,7 +319,8 @@ %{install_bindir}/clang++-%{maj_ver} %{install_bindir}/clang-cl %{install_bindir}/clang-cpp -%{_sysconfdir}/%{pkg_name_clang}/clang.cfg +%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang.cfg +%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang++.cfg %if %{without compat_build} %{_mandir}/man1/clang.1.gz %{_mandir}/man1/clang++.1.gz diff --git a/install.spec.inc b/install.spec.inc index 3cd1a9d..5d66d86 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -198,7 +198,8 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format # Install config file for clang %if %{maj_ver} >=18 mkdir -p %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/ -echo "--gcc-triple=%{_arch}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/clang.cfg +echo "--gcc-triple=%{_target_cpu}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang.cfg +echo "--gcc-triple=%{_target_cpu}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang++.cfg %endif #endregion From 29f8ae58c12eff7f7af8a18d4a450bb502c6e17d Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 15 May 2024 13:25:12 +0000 Subject: [PATCH 086/205] Fix paths for compiler-rt files --- files.compiler-rt.spec.inc | 134 ++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/files.compiler-rt.spec.inc b/files.compiler-rt.spec.inc index e6d10f4..5afca2b 100644 --- a/files.compiler-rt.spec.inc +++ b/files.compiler-rt.spec.inc @@ -1,72 +1,72 @@ # Files that appear both in x86_64 and i686 -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/clang_rt.crtbegin.o -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/clang_rt.crtend.o -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan-preinit.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan.so -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan_static.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.builtins.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.cfi.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.cfi_diag.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.fuzzer.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.fuzzer_interceptors.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.fuzzer_no_main.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.gwp_asan.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.lsan.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.profile.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.safestack.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.scudo_standalone.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.scudo_standalone_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.scudo_standalone.so -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.stats.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.stats_client.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_minimal.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_minimal.so -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtbegin.o +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtend.o +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan-preinit.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_static.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.builtins.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.cfi.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.cfi_diag.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer_interceptors.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer_no_main.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.gwp_asan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.lsan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.profile.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.safestack.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.stats.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.stats_client.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.so # Files that don't appear in i686 %ifnarch %{ix86} -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.asan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.dd.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.dfsan.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.dfsan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.dyndd.so -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_aliases.so -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan-preinit.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.hwasan.so -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof-preinit.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.memprof.so -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.msan.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.msan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.msan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.msan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.tsan.so -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_minimal.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.xray.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.xray-basic.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.xray-fdr.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/libclang_rt.xray-profiling.a -%{_prefix}/lib/clang/%{maj_ver}/%{llvm_triple}/liborc_rt.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dd.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dfsan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dfsan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dyndd.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan-preinit.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof-preinit.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-basic.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-fdr.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-profiling.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/liborc_rt.a %endif \ No newline at end of file From 4b4f352af97b2088766a162ce69219209c90a3ff Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 15 May 2024 14:44:56 +0000 Subject: [PATCH 087/205] List compiler-rt files Before I've used `%ifnarch` in the `` included with `%files -f `. This produced this error: ``` RPM build errors: File must begin with "/": %ifnarch File must begin with "/": i386 File must begin with "/": i486 File must begin with "/": i586 File must begin with "/": i686 File must begin with "/": pentium3 File must begin with "/": pentium4 File must begin with "/": athlon File must begin with "/": geode File must begin with "/": %endif ``` We can optimize this at any point in time later. --- files.compiler-rt.spec.inc | 72 ------------------------------------ files.spec.inc | 75 +++++++++++++++++++++++++++++++++++++- sources.spec.inc | 1 - 3 files changed, 74 insertions(+), 74 deletions(-) delete mode 100644 files.compiler-rt.spec.inc diff --git a/files.compiler-rt.spec.inc b/files.compiler-rt.spec.inc deleted file mode 100644 index 5afca2b..0000000 --- a/files.compiler-rt.spec.inc +++ /dev/null @@ -1,72 +0,0 @@ -# Files that appear both in x86_64 and i686 -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtbegin.o -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtend.o -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan-preinit.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_static.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.builtins.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.cfi.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.cfi_diag.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer_interceptors.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer_no_main.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.gwp_asan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.lsan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.profile.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.safestack.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.stats.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.stats_client.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.so - -# Files that don't appear in i686 -%ifnarch %{ix86} -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dd.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dfsan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dfsan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dyndd.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan-preinit.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof-preinit.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-basic.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-fdr.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-profiling.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/liborc_rt.a -%endif \ No newline at end of file diff --git a/files.spec.inc b/files.spec.inc index 8f50a24..aa4deed 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -503,7 +503,7 @@ %if %{without compat_build} -%files -n %{pkg_name_compiler_rt} -f %{_sourcedir}/files.compiler-rt.spec.inc +%files -n %{pkg_name_compiler_rt} %license compiler-rt/LICENSE.TXT %ifarch x86_64 aarch64 %{ix86} %{_prefix}/lib/clang/%{maj_ver}/bin/hwasan_symbolize @@ -527,6 +527,79 @@ %{_prefix}/lib/clang/%{maj_ver}/share/hwasan_ignorelist.txt %{_prefix}/lib/clang/%{maj_ver}/share/msan_ignorelist.txt +# Files that appear both in x86_64 and i686 +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtbegin.o +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtend.o +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan-preinit.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_static.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.builtins.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.cfi.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.cfi_diag.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer_interceptors.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer_no_main.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.gwp_asan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.lsan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.profile.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.safestack.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.stats.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.stats_client.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.so + +# Files that don't appear in i686 +%ifnarch %{ix86} +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dd.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dfsan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dfsan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dyndd.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan-preinit.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof-preinit.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan_cxx.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a.syms +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-basic.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-fdr.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-profiling.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/liborc_rt.a +%endif + %endif #endregion diff --git a/sources.spec.inc b/sources.spec.inc index da180e0..5b1e64c 100644 --- a/sources.spec.inc +++ b/sources.spec.inc @@ -18,7 +18,6 @@ Source1001: build.spec.inc Source1002: changelog.spec.inc Source1003: check.spec.inc Source1004: files.spec.inc -Source1014: files.compiler-rt.spec.inc Source1005: globals.spec.inc Source1006: install.spec.inc Source1008: patches.spec.inc From fc801cc563114fd6eec668089e39ebad8cf58bc1 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 16 May 2024 12:28:49 +0000 Subject: [PATCH 088/205] Remove no longer used %llvm_snapshot_source_prefix macro --- .copr/snapshot-info.sh | 1 - version.spec.inc | 1 - 2 files changed, 2 deletions(-) diff --git a/.copr/snapshot-info.sh b/.copr/snapshot-info.sh index d777d42..704efb9 100755 --- a/.copr/snapshot-info.sh +++ b/.copr/snapshot-info.sh @@ -49,7 +49,6 @@ cat > $tempfile < Date: Thu, 16 May 2024 13:57:59 +0000 Subject: [PATCH 089/205] make: Remove LTO objects when cleaning --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 89a64f4..9fff882 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ local-clean: -rm -rf x86_64 -rm -rf noarch -rm -rf *.src.rpm + -rm -rf /tmp/lto-llvm-*.o .PHONY: local-list-check local-list-check: setup From 175bb380726f136c8ea830e1254a0f20d48313cb Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 16 May 2024 14:03:37 +0000 Subject: [PATCH 090/205] Avoid listing files twice This should solve this warning: ``` RPM build warnings: File listed twice: /usr/lib64/cmake/clang/AddClang.cmake File listed twice: /usr/lib64/cmake/clang/ClangConfig.cmake File listed twice: /usr/lib64/cmake/clang/ClangConfigVersion.cmake File listed twice: /usr/lib64/cmake/clang/ClangTargets-relwithdebinfo.cmake File listed twice: /usr/lib64/cmake/clang/ClangTargets.cmake absolute symlink: /usr/bin/clang-format-diff -> /usr/share/clang/clang-format-diff.py File listed twice: /usr/lib/clang/19/include/fuzzer/FuzzedDataProvider.h File listed twice: /usr/lib/clang/19/include/orc/c_api.h File listed twice: /usr/lib/clang/19/include/profile/InstrProfData.inc File listed twice: /usr/lib/clang/19/include/profile/instr_prof_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/allocator_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/asan_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/common_interface_defs.h File listed twice: /usr/lib/clang/19/include/sanitizer/coverage_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/dfsan_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/hwasan_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/linux_syscall_hooks.h File listed twice: /usr/lib/clang/19/include/sanitizer/lsan_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/memprof_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/msan_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/netbsd_syscall_hooks.h File listed twice: /usr/lib/clang/19/include/sanitizer/scudo_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/tsan_interface.h File listed twice: /usr/lib/clang/19/include/sanitizer/tsan_interface_atomic.h File listed twice: /usr/lib/clang/19/include/sanitizer/ubsan_interface.h File listed twice: /usr/lib/clang/19/include/xray/xray_interface.h File listed twice: /usr/lib/clang/19/include/xray/xray_log_interface.h File listed twice: /usr/lib/clang/19/include/xray/xray_records.h File listed twice: /usr/lib/clang/19/share/asan_ignorelist.txt File listed twice: /usr/lib/clang/19/share/cfi_ignorelist.txt ``` --- files.spec.inc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index aa4deed..a599c13 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -509,19 +509,12 @@ %{_prefix}/lib/clang/%{maj_ver}/bin/hwasan_symbolize %endif %{_prefix}/lib/clang/%{maj_ver}/include/fuzzer -%{_prefix}/lib/clang/%{maj_ver}/include/fuzzer/* %{_prefix}/lib/clang/%{maj_ver}/include/orc -%{_prefix}/lib/clang/%{maj_ver}/include/orc/* %{_prefix}/lib/clang/%{maj_ver}/include/profile -%{_prefix}/lib/clang/%{maj_ver}/include/profile/* %{_prefix}/lib/clang/%{maj_ver}/include/sanitizer -%{_prefix}/lib/clang/%{maj_ver}/include/sanitizer/* %{_prefix}/lib/clang/%{maj_ver}/include/xray -%{_prefix}/lib/clang/%{maj_ver}/include/xray/* %{_prefix}/lib/clang/%{maj_ver}/share/asan_ignorelist.txt -%{_prefix}/lib/clang/%{maj_ver}/share/asan_ignorelist.txt -%{_prefix}/lib/clang/%{maj_ver}/share/cfi_ignorelist.txt %{_prefix}/lib/clang/%{maj_ver}/share/cfi_ignorelist.txt %{_prefix}/lib/clang/%{maj_ver}/share/dfsan_abilist.txt %{_prefix}/lib/clang/%{maj_ver}/share/hwasan_ignorelist.txt From 7f11df855427deaf4ca3588c34a87a501f77aa06 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 17 May 2024 08:44:52 +0000 Subject: [PATCH 091/205] Fixup File listed twice warning: This is a fixup for 66fec669b95fa50e7415240a59cda507dd63435e. This fixes these RPM build warnings about cmake files being listed twice. ``` RPM build warnings: File listed twice: /usr/lib64/cmake/clang/AddClang.cmake File listed twice: /usr/lib64/cmake/clang/ClangConfig.cmake File listed twice: /usr/lib64/cmake/clang/ClangConfigVersion.cmake File listed twice: /usr/lib64/cmake/clang/ClangTargets-relwithdebinfo.cmake File listed twice: /usr/lib64/cmake/clang/ClangTargets.cmake /usr/share/clang/clang-format-ddiff.py File listed twice: /usr/lib64/cmake/clang/AddClang.cmake File listed twice: /usr/lib64/cmake/clang/ClangConfig.cmake File listed twice: /usr/lib64/cmake/clang/ClangConfigVersion.cmake File listed twice: /usr/lib64/cmake/clang/ClangTargets-relwithdebinfo.cmake File listed twice: /usr/lib64/cmake/clang/ClangTargets.cmake /usr/share/clang/clang-format-diff.py ``` --- files.spec.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index a599c13..b00bea2 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -348,7 +348,6 @@ %{install_includedir}/clang/ %{install_includedir}/clang-c/ %{install_libdir}/cmake/clang -%{install_libdir}/cmake/clang/* %{install_bindir}/clang-tblgen %if %{with compat_build} %{_bindir}/clang-tblgen-%{maj_ver} From 9dcea4c065679d626414d05759e49adba2e0e7a8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 20 May 2024 06:49:48 +0200 Subject: [PATCH 092/205] Use wildcard for libclang_rt libraries https://github.com/llvm/llvm-project/pull/92456 added a new libclang_rt.ctx_profile.a library. Given that these all have a fixed prefix, I think it's fine to use a wildcard for them instead of explicitly listing them. --- files.spec.inc | 65 +------------------------------------------------- 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index b00bea2..21f85c3 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -522,73 +522,10 @@ # Files that appear both in x86_64 and i686 %{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtbegin.o %{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtend.o -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan-preinit.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_static.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.builtins.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.cfi.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.cfi_diag.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer_interceptors.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.fuzzer_no_main.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.gwp_asan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.lsan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.profile.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.safestack.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.scudo_standalone.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.stats.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.stats_client.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.so +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.* # Files that don't appear in i686 %ifnarch %{ix86} -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.asan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dd.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dfsan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dfsan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.dyndd.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_aliases.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan-preinit.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.hwasan.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof-preinit.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.memprof.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.msan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan_cxx.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.tsan.so -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_minimal.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.ubsan_standalone_cxx.a.syms -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-basic.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-fdr.a -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.xray-profiling.a %{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/liborc_rt.a %endif From 1846c73b59ce2701a0711e93cffbb6fca1c6b1ba Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Thu, 16 May 2024 13:43:43 -0300 Subject: [PATCH 093/205] Fix rhbz #2248872 Ensure the versioned llvm-config alternative gets removed during major upgrades of the non-compat package. Also add code that removes the versioned llvm-config alternatives of the previous 3 LLVM versions. These versions didn't remove their own versioned llvm-config alternative, leading to broken output, e.g. llvm-config-16 points to llvm-config-64 from LLVM 17. --- llvm.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/llvm.spec b/llvm.spec index 23f251a..212f8b9 100644 --- a/llvm.spec +++ b/llvm.spec @@ -493,6 +493,16 @@ done %{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} %if %{without compat_build} %{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} + +# During the upgrade from LLVM 16 (F38) to LLVM 17 (F39), we found out the +# main llvm-devel package was leaving entries in the alternatives system. +# Try to remove them now. +for v in 14 15 16; do + if [[ -e %{_bindir}/llvm-config-$v + && "x$(%{_bindir}/llvm-config-$v --version | awk -F . '{ print $1 }')" != "x$v" ]]; then + %{_sbindir}/update-alternatives --remove llvm-config-$v %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} + fi +done %endif From c954f67bf342ac27eb7c0d7152607229034170af Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 22 May 2024 09:23:29 +0200 Subject: [PATCH 094/205] Use wildcard for sanitizer ignore/abi lists The list of supported sanitizers differs per target, and depending on that some of these files may or may not be present. Use a wildcard rather than explicitly listing this out. --- files.spec.inc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 21f85c3..904e8cc 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -513,11 +513,7 @@ %{_prefix}/lib/clang/%{maj_ver}/include/sanitizer %{_prefix}/lib/clang/%{maj_ver}/include/xray -%{_prefix}/lib/clang/%{maj_ver}/share/asan_ignorelist.txt -%{_prefix}/lib/clang/%{maj_ver}/share/cfi_ignorelist.txt -%{_prefix}/lib/clang/%{maj_ver}/share/dfsan_abilist.txt -%{_prefix}/lib/clang/%{maj_ver}/share/hwasan_ignorelist.txt -%{_prefix}/lib/clang/%{maj_ver}/share/msan_ignorelist.txt +%{_prefix}/lib/clang/%{maj_ver}/share/*.txt # Files that appear both in x86_64 and i686 %{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtbegin.o From bee7a61730fdebefea48b4a7db753d1ab51a3851 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 22 May 2024 09:41:45 +0200 Subject: [PATCH 095/205] Fix ModuleNotFoundError: No module named 'myst_parser' This should fix this error which appears on RHEL only: ``` Configuration error: There is a programmable error in your configuration file: Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 326, in eval_config_file execfile_(filename, namespace) File "/usr/lib/python3.9/site-packages/sphinx/util/pycompat.py", line 88, in execfile_ exec(code, _globals) File "/builddir/build/BUILD/llvm-project-c1d5cc99c6ba8e897ea145dbb2221a155b5e3e5a/llvm/redhat-linux-build/tools/clang/docs/conf.py", line 42, in import myst_parser ModuleNotFoundError: No module named 'myst_parser' ``` See also https://github.com/fedora-llvm-team/llvm-snapshots/issues/492 --- ...move-myst_parser-dependency-for-RHEL.patch | 41 +++++++++++++++++++ patches.spec.inc | 6 ++- prep.spec.inc | 8 +++- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 0001-Remove-myst_parser-dependency-for-RHEL.patch diff --git a/0001-Remove-myst_parser-dependency-for-RHEL.patch b/0001-Remove-myst_parser-dependency-for-RHEL.patch new file mode 100644 index 0000000..d1df528 --- /dev/null +++ b/0001-Remove-myst_parser-dependency-for-RHEL.patch @@ -0,0 +1,41 @@ +From d8742e9b361e5fd6fee2298b8ea0aeb4671ec05a Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Wed, 22 May 2024 09:39:26 +0200 +Subject: [PATCH] Remove myst_parser dependency for RHEL + +--- + clang/docs/conf.py | 3 +-- + llvm/docs/conf.py | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/clang/docs/conf.py b/clang/docs/conf.py +index 4cee382a718f..d2e2198e05d4 100644 +--- a/clang/docs/conf.py ++++ b/clang/docs/conf.py +@@ -43,8 +43,7 @@ try: + + extensions.append("myst_parser") + except ImportError: +- if not tags.has("builder-man"): +- raise ++ pass + + + # The encoding of source files. +diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py +index 7f2ed5309606..354a41f11280 100644 +--- a/llvm/docs/conf.py ++++ b/llvm/docs/conf.py +@@ -36,8 +36,7 @@ try: + + extensions.append("myst_parser") + except ImportError: +- if not tags.has("builder-man"): +- raise ++ pass + + # Automatic anchors for markdown titles + from llvm_slug import make_slug +-- +2.44.0 + diff --git a/patches.spec.inc b/patches.spec.inc index 1f2793e..4579665 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -21,4 +21,8 @@ Patch3002: 0001-Always-build-shared-libs-for-LLD.patch # support Fedora 38 or older, which pass -fno-openmp-implicit-rpath in # redhat-rpm-config. Patch9001: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch -%endif \ No newline at end of file +%endif + +#region RHEL patches +Patch9002: 0001-Remove-myst_parser-dependency-for-RHEL.patch +#endregion \ No newline at end of file diff --git a/prep.spec.inc b/prep.spec.inc index 8f31109..bacf5c5 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -10,10 +10,16 @@ # see http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html %autosetup -N -T -b 0 -n %{src_tarball_dir} +# Apply all patches with number <= 9000 +# See https://rpm-software-management.github.io/rpm/manual/autosetup.html %autopatch -M9000 -p1 %if 0%{?fedora} == 38 -%patch -p1 9001 +%patch -p1 -P9001 +%endif + +%if %{defined rhel} +%patch -p1 -P9002 %endif #region LLVM preparation From 06767d80d87f6d53c56e4bd0c357177a67d233f1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 23 May 2024 16:05:18 +0200 Subject: [PATCH 096/205] Fix i386 build These binaries are not created on i386, so don't try to remove them. Alternatively could use rm -f. --- install.spec.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.spec.inc b/install.spec.inc index 5d66d86..cdb7da0 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -231,9 +231,11 @@ rm -rf %{buildroot}/%{_datarootdir}/gdb # chmod go+w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so # chmod +w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so +%ifnarch %{ix86} # Remove files that we don't package, yet. rm %{buildroot}%{install_bindir}/llvm-omp-device-info rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay +%endif %endif @@ -270,4 +272,4 @@ if [ $1 -eq 0 ] ; then fi %endif -#endregion \ No newline at end of file +#endregion From c422c5daf74c2232b04c22d0f068816cf1a67643 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 May 2024 09:05:05 +0200 Subject: [PATCH 097/205] More fixes for file lists Fix these errors on s390x by excluding the files on that arch: File not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240526.gc87a7b3bdb6737-1.fc41.s390x/usr/lib/clang/19/lib/s390x-redhat-linux-gnu/clang_rt.crtbegin.o File not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240526.gc87a7b3bdb6737-1.fc41.s390x/usr/lib/clang/19/lib/s390x-redhat-linux-gnu/clang_rt.crtend.o File not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240526.gc87a7b3bdb6737-1.fc41.s390x/usr/lib/clang/19/lib/s390x-redhat-linux-gnu/liborc_rt.a Fix this error on i686 by explicitly creating the directory. This matches what the implementation did pre-big-merge. I think we do want to keep this directory structure consistent across all arches. Directory not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240526.gc87a7b3bdb6737-1.fc41.i386/usr/lib/clang/19/bin --- files.spec.inc | 14 +++++++------- install.spec.inc | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 904e8cc..eb23e29 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -358,9 +358,7 @@ %license clang/LICENSE.TXT %dir %{install_prefix}/lib/clang/ %dir %{install_prefix}/lib/clang/%{maj_ver}/ -%ifarch x86_64 aarch64 %{ix86} %dir %{install_prefix}/lib/clang/%{maj_ver}/bin/ -%endif %dir %{install_prefix}/lib/clang/%{maj_ver}/include/ %dir %{install_prefix}/lib/clang/%{maj_ver}/lib/ %dir %{install_prefix}/lib/clang/%{maj_ver}/share/ @@ -515,13 +513,15 @@ %{_prefix}/lib/clang/%{maj_ver}/share/*.txt -# Files that appear both in x86_64 and i686 -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtbegin.o -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtend.o +# Files that appear on all targets %{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.* -# Files that don't appear in i686 -%ifnarch %{ix86} +%ifnarch s390x +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtbegin.o +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtend.o +%endif + +%ifnarch %{ix86} s390x %{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/liborc_rt.a %endif diff --git a/install.spec.inc b/install.spec.inc index cdb7da0..0f11287 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -182,7 +182,7 @@ chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* # Create sub-directories in the clang resource directory that will be # populated by other packages -mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{include,lib,share}/ +mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{bin,include,lib,share}/ %if 0%{?fedora} == 38 # Install config file From 3ddc01eec2b073d506c42b9e2f0cab9f3ab7aab5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 23 May 2024 16:15:54 +0200 Subject: [PATCH 098/205] Clean up the lto_cflags mess We were defining lto_cflags in three places. It looks like on aarch64 nil won (LTO disabled), while on other architectures `-flto=thin` won. I think on rawhide, this means that we're currently shipping bitcode in static archives, because the required `-ffat-lto-objects` option from redhat-rpm-config is missing. Resolve this by leaving the option at its default value -- if enabling it on aarch64 causes issues, we can disable it just there again. Also reenable the LLVM_UNITTEST_LINK_FLAGS option, which should reduce the amount of time LTO takes. --- build.spec.inc | 12 ------------ globals.spec.inc | 2 -- 2 files changed, 14 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 026dbdc..adeba87 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -1,8 +1,3 @@ -# Disable LTO to speed up builds -%if %{with snapshot_build} -%global _lto_cflags %nil -%endif - # TODO(kkleine): In clang we had this %ifarch s390 s390x %{arm} aarch64 %ix86 ppc64le %ifarch s390 s390x %{arm} %ix86 # Decrease debuginfo verbosity to reduce memory consumption during final library linking @@ -17,11 +12,6 @@ export ASMFLAGS="%{build_cflags}" #region BEGIN: COPIED FROM CLANG -# And disable LTO on AArch64 entirely. -%ifarch aarch64 -%define _lto_cflags %{nil} -%endif - # TODO(kkleine): Make sure the paths actually work. I have the feeling this needs adjustment pwd %if 0%{?__isa_bits} == 64 @@ -203,9 +193,7 @@ cd llvm %ifarch x86_64 -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error" \ %endif -%if %{without snapshot_build} -DLLVM_UNITTEST_LINK_FLAGS="-Wl,-plugin-opt=O0" -%endif # Build libLLVM.so first. This ensures that when libLLVM.so is linking, there # are no other compile jobs running. This will help reduce OOM errors on the diff --git a/globals.spec.inc b/globals.spec.inc index d0ac14f..01dad73 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -23,8 +23,6 @@ %global src_tarball_dir llvm-project-%{llvm_snapshot_git_revision} %endif -%global _lto_cflags -flto=thin - #region LLVM globals %if %{with compat_build} From 1115746e65d7026712e2ec654908dca6d4d795b6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 May 2024 09:16:41 +0200 Subject: [PATCH 099/205] Make lto handling similar to current rawhide Have a --with lto_build option, where LTO is enabled by default for everything except i686 and riscv. Use that flag to condition whether `-DLLVM_UNITTEST_LINK_FLAGS` is passed. Additionally, make use of the new Fat LTO functionality in rawhide to use `-fno-lto` instead of `-Wl,-plugin-opt=O0` to save more time linking unit tests. --- build.spec.inc | 6 ++++++ globals.spec.inc | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/build.spec.inc b/build.spec.inc index adeba87..a027314 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -193,7 +193,13 @@ cd llvm %ifarch x86_64 -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error" \ %endif +%if %{with lto_build} +%if 0%{?fedora} >= 41 + -DLLVM_UNITTEST_LINK_FLAGS="-fno-lto" +%else -DLLVM_UNITTEST_LINK_FLAGS="-Wl,-plugin-opt=O0" +%endif +%endif # Build libLLVM.so first. This ensures that when libLLVM.so is linking, there # are no other compile jobs running. This will help reduce OOM errors on the diff --git a/globals.spec.inc b/globals.spec.inc index 01dad73..cafcec7 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -9,6 +9,17 @@ %bcond_with compat_build %bcond_without check +# Disable LTO on x86 and riscv in order to reduce memory consumption. +%ifarch %ix86 riscv64 +%bcond_with lto_build +%else +%bcond_without lto_build +%endif + +%if %{without lto_build} +%global _lto_cflags %nil +%endif + # We are building with clang for faster/lower memory LTO builds. # See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros %global toolchain clang From 99dd05a90b9f529a1d8d2fe1356964792744439f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 May 2024 08:36:49 +0200 Subject: [PATCH 100/205] Remove fedora 38 related workarounds This chroot is no longer supported on copr. --- ...p-implicit-rpath-disabled-by-default.patch | 92 ------------------- clang.cfg | 3 - files.spec.inc | 3 - install.spec.inc | 6 -- patches.spec.inc | 9 +- prep.spec.inc | 4 - sources.spec.inc | 1 - 7 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch delete mode 100644 clang.cfg diff --git a/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch b/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch deleted file mode 100644 index 2831c90..0000000 --- a/0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 5c209e4632cb6acdda3be01ae7d83c31ba956979 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 9 Mar 2023 21:52:41 -0800 -Subject: [PATCH] Restore -fopenmp-implicit-rpath, disabled by default - -Used by redhat-rpm-config on older Fedora versions. ---- - clang/include/clang/Driver/Options.td | 6 ++++++ - clang/lib/Driver/ToolChains/CommonArgs.cpp | 19 +++++++++++++++++++ - clang/lib/Driver/ToolChains/CommonArgs.h | 3 +++ - clang/test/OpenMP/Inputs/libomp.a | 1 + - 4 files changed, 29 insertions(+) - create mode 100644 clang/test/OpenMP/Inputs/libomp.a - -diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td -index f745e573eb26..6289c1af9ada 100644 ---- a/clang/include/clang/Driver/Options.td -+++ b/clang/include/clang/Driver/Options.td -@@ -5484,6 +5484,12 @@ def offload_add_rpath: Flag<["--"], "offload-add-rpath">, - def no_offload_add_rpath: Flag<["--"], "no-offload-add-rpath">, - Flags<[NoArgumentUnused]>, - Alias; -+defm openmp_implicit_rpath: BoolFOption<"openmp-implicit-rpath", -+ LangOpts<"OpenMP">, -+ DefaultFalse, -+ PosFlag, -+ NegFlag, -+ BothFlags<[NoArgumentUnused]>>; - def r : Flag<["-"], "r">, Flags<[LinkerInput, NoArgumentUnused]>, - Group; - def regcall4 : Flag<["-"], "regcall4">, Group, -diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp -index 62a53b85ce09..c51766250983 100644 ---- a/clang/lib/Driver/ToolChains/CommonArgs.cpp -+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp -@@ -1109,6 +1109,23 @@ static void addOpenMPDeviceLibC(const Compilation &C, const ArgList &Args, - } - } - -+ -+void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC, -+ const ArgList &Args, -+ ArgStringList &CmdArgs) { -+ -+ if (Args.hasFlag(options::OPT_fopenmp_implicit_rpath, -+ options::OPT_fno_openmp_implicit_rpath, false)) { -+ // Default to clang lib / lib64 folder, i.e. the same location as device -+ // runtime -+ SmallString<256> DefaultLibPath = -+ llvm::sys::path::parent_path(TC.getDriver().Dir); -+ llvm::sys::path::append(DefaultLibPath, CLANG_INSTALL_LIBDIR_BASENAME); -+ CmdArgs.push_back("-rpath"); -+ CmdArgs.push_back(Args.MakeArgString(DefaultLibPath)); -+ } -+} -+ - void tools::addOpenMPRuntimeLibraryPath(const ToolChain &TC, - const ArgList &Args, - ArgStringList &CmdArgs) { -@@ -1185,6 +1202,8 @@ bool tools::addOpenMPRuntime(const Compilation &C, ArgStringList &CmdArgs, - addOpenMPDeviceLibC(C, Args, CmdArgs); - - addArchSpecificRPath(TC, Args, CmdArgs); -+ if (RTKind == Driver::OMPRT_OMP) -+ addOpenMPRuntimeSpecificRPath(TC, Args, CmdArgs); - addOpenMPRuntimeLibraryPath(TC, Args, CmdArgs); - - return true; -diff --git a/clang/lib/Driver/ToolChains/CommonArgs.h b/clang/lib/Driver/ToolChains/CommonArgs.h -index 5581905db311..3360eb0c6a37 100644 ---- a/clang/lib/Driver/ToolChains/CommonArgs.h -+++ b/clang/lib/Driver/ToolChains/CommonArgs.h -@@ -105,6 +105,9 @@ void AddAssemblerKPIC(const ToolChain &ToolChain, - const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs); - -+void addOpenMPRuntimeSpecificRPath(const ToolChain &TC, -+ const llvm::opt::ArgList &Args, -+ llvm::opt::ArgStringList &CmdArgs); - void addArchSpecificRPath(const ToolChain &TC, const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs); - void addOpenMPRuntimeLibraryPath(const ToolChain &TC, -diff --git a/clang/test/OpenMP/Inputs/libomp.a b/clang/test/OpenMP/Inputs/libomp.a -new file mode 100644 -index 000000000000..8b277f0dd5dc ---- /dev/null -+++ b/clang/test/OpenMP/Inputs/libomp.a -@@ -0,0 +1 @@ -+! --- -2.42.0 - diff --git a/clang.cfg b/clang.cfg deleted file mode 100644 index 08bf8e0..0000000 --- a/clang.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Drop the following option after debugedit adds support to DWARF-5: -# https://sourceware.org/bugzilla/show_bug.cgi?id=28728 --gdwarf-4 -g0 diff --git a/files.spec.inc b/files.spec.inc index eb23e29..59dee2a 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -337,9 +337,6 @@ %license clang/LICENSE.TXT %{install_prefix}/lib/clang/%{maj_ver}/include/* %{install_libdir}/*.so.* -%if 0%{?fedora} == 38 -%{_sysconfdir}/%{name}/%{_target_platform}.cfg -%endif %files -n %{pkg_name_clang}-devel %license clang/LICENSE.TXT diff --git a/install.spec.inc b/install.spec.inc index 0f11287..8c05418 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -184,12 +184,6 @@ chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* # populated by other packages mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{bin,include,lib,share}/ -%if 0%{?fedora} == 38 -# Install config file -mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ -mv %{SOURCE2006} %{buildroot}%{_sysconfdir}/%{name}/%{_target_platform}.cfg -%endif - %if %{without compat_build} # Add a symlink in /usr/bin to clang-format-diff ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff diff --git a/patches.spec.inc b/patches.spec.inc index 4579665..a6bbc88 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -16,13 +16,6 @@ Patch3002: 0001-Always-build-shared-libs-for-LLD.patch # # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 # Source2006: 0001-Produce-DWARF4-by-default.patch -%if %{with snapshot_build} -# Temporary patch to add back -fno-openmp-implicit-rpath until we no longer -# support Fedora 38 or older, which pass -fno-openmp-implicit-rpath in -# redhat-rpm-config. -Patch9001: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch -%endif - #region RHEL patches Patch9002: 0001-Remove-myst_parser-dependency-for-RHEL.patch -#endregion \ No newline at end of file +#endregion diff --git a/prep.spec.inc b/prep.spec.inc index bacf5c5..c023cc9 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -14,10 +14,6 @@ # See https://rpm-software-management.github.io/rpm/manual/autosetup.html %autopatch -M9000 -p1 -%if 0%{?fedora} == 38 -%patch -p1 -P9001 -%endif - %if %{defined rhel} %patch -p1 -P9002 %endif diff --git a/sources.spec.inc b/sources.spec.inc index 5b1e64c..df2ec47 100644 --- a/sources.spec.inc +++ b/sources.spec.inc @@ -9,7 +9,6 @@ Source1006: release-keys.asc %if %{without compat_build} Source2005: macros.%{pkg_name_clang} %endif -Source2006: clang.cfg # Sources we use to split up the main spec file in sections so that we can more # easily see what specfile sections are touched by a patch. From c14e5cf088a21625ed4f3a6d49cc1b8c86987299 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 May 2024 09:25:39 +0200 Subject: [PATCH 101/205] Fix clang resource directory path The clang resource directory is always in lib/, while this was creating the directories in lib64 (for 64-bit symbols). This should fix the following error on ppc64le: > error: Directory not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240528.g1de1ee9cbabd64-1.fc39.ppc64le/usr/lib/clang/19/bin --- install.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.spec.inc b/install.spec.inc index 8c05418..db4b5a9 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -182,7 +182,7 @@ chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* # Create sub-directories in the clang resource directory that will be # populated by other packages -mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{bin,include,lib,share}/ +mkdir -p %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,share}/ %if %{without compat_build} # Add a symlink in /usr/bin to clang-format-diff From 9e875aeb6ae9572cc782e8f39703ae3a0f758694 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 May 2024 15:57:25 +0200 Subject: [PATCH 102/205] Add i686 -> i386 compiler-rt symlink This ports the change from https://src.fedoraproject.org/rpms/compiler-rt/pull-request/67 to big-merge, which is a bit more complicated here due to the explicit file lists. By default compiler_rt_triple is the same as llvm_triple. For x86 it is i386-redhat-linux-gnu instead, with a symlink to the llvm_triple i686-redhat-linux-gnu. And then the file list also needs to ship that symlink. --- files.spec.inc | 13 +++++++++---- install.spec.inc | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 59dee2a..59b03e5 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -511,15 +511,20 @@ %{_prefix}/lib/clang/%{maj_ver}/share/*.txt # Files that appear on all targets -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.* +%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/libclang_rt.* %ifnarch s390x -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtbegin.o -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtend.o +%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/clang_rt.crtbegin.o +%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/clang_rt.crtend.o %endif %ifnarch %{ix86} s390x -%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/liborc_rt.a +%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/liborc_rt.a +%endif + +# Additional symlink if two triples are in use. +%if "%{llvm_triple}" != "%{compiler_rt_triple}" +%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple} %endif %endif diff --git a/install.spec.inc b/install.spec.inc index db4b5a9..f97a81b 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -202,10 +202,23 @@ echo "--gcc-triple=%{_target_cpu}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{ %if %{without compat_build} +# Triple where compiler-rt libs are installed. If it differs from llvm_triple, then there is +# also a symlink llvm_triple -> compiler_rt_triple. +%global compiler_rt_triple %{llvm_triple} + %ifarch ppc64le # Fix install path on ppc64le so that the directory name matches the triple used # by clang. -mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/ppc64le-redhat-linux-gnu +mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple} +%endif + +%ifarch %{ix86} +# Fix install path on ix86 so that the directory name matches the triple used +# by clang on both actual ix86 (i686) and on x86_64 with -m32 (i386): +%global compiler_rt_triple i386-redhat-linux-gnu +%if "%{llvm_triple}" != "%{compiler_rt_triple}" +ln -s %{compiler_rt_triple} %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple} +%endif %endif %endif From 8794e47395b1704ec5a38610bd72e652d909822e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 May 2024 16:01:28 +0200 Subject: [PATCH 103/205] Exclude hwasan_symbolize on i686 --- files.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index 59b03e5..f776d10 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -499,7 +499,7 @@ %files -n %{pkg_name_compiler_rt} %license compiler-rt/LICENSE.TXT -%ifarch x86_64 aarch64 %{ix86} +%ifarch x86_64 aarch64 %{_prefix}/lib/clang/%{maj_ver}/bin/hwasan_symbolize %endif %{_prefix}/lib/clang/%{maj_ver}/include/fuzzer From 388833f3d812738a692f2cb92c994bbda4a59302 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 May 2024 11:23:09 +0200 Subject: [PATCH 104/205] Add new reduce-chunk-list binary Added in https://github.com/llvm/llvm-project/pull/89470. --- files.spec.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index f776d10..a85cf30 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -133,6 +133,7 @@ %{install_bindir}/llvm-undname %{install_bindir}/llvm-windres %{install_bindir}/llvm-xray +%{install_bindir}/reduce-chunk-list %{install_bindir}/obj2yaml %{install_bindir}/opt %{install_bindir}/sancov @@ -219,6 +220,7 @@ %{_bindir}/llvm-undname%{exec_suffix} %{_bindir}/llvm-windres%{exec_suffix} %{_bindir}/llvm-xray%{exec_suffix} +%{_bindir}/reduce-chunk-list%{exec_suffix} %{_bindir}/obj2yaml%{exec_suffix} %{_bindir}/opt%{exec_suffix} %{_bindir}/sancov%{exec_suffix} From 4fea24b487c104296fd5fd89d9b747f200fdd561 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 May 2024 10:18:56 +0200 Subject: [PATCH 105/205] Remove 32-bit arm related conditionals 32-bit ARM hasn't been supported for quite a while, remove the related conditions. This has already happened for the non-big-merge branches. --- build.spec.inc | 9 +++------ check.spec.inc | 10 ---------- files.spec.inc | 8 ++------ globals.spec.inc | 8 +------- packages.spec.inc | 5 ----- 5 files changed, 6 insertions(+), 34 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index a027314..0e6db0f 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -1,5 +1,5 @@ -# TODO(kkleine): In clang we had this %ifarch s390 s390x %{arm} aarch64 %ix86 ppc64le -%ifarch s390 s390x %{arm} %ix86 +# TODO(kkleine): In clang we had this %ifarch s390 s390x aarch64 %ix86 ppc64le +%ifarch s390 s390x %ix86 # Decrease debuginfo verbosity to reduce memory consumption during final library linking %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif @@ -67,9 +67,6 @@ cd llvm -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra \ -DCLANG_CONFIG_FILE_SYSTEM_DIR=%{_sysconfdir}/%{pkg_name_clang}/ \ -%ifarch %{arm} - -DCLANG_DEFAULT_LINKER=lld \ -%endif -DCLANG_DEFAULT_UNWINDLIB=libgcc \ \ \ @@ -112,7 +109,7 @@ cd llvm -DLLVM_PARALLEL_LINK_JOBS=1 \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -%ifarch s390 %{arm} %ix86 +%ifarch s390 %ix86 -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ %endif diff --git a/check.spec.inc b/check.spec.inc index b79aa69..6292ae9 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -1,14 +1,6 @@ # TODO(kkleine): Instead of deleting test files we should mark them as expected # to fail. See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-xfail -# Disable check section on arm due to some kind of memory related failure. -# Possibly related to https://bugzilla.redhat.com/show_bug.cgi?id=1920183 -%ifnarch %{arm} - -# TODO: Fix the failures below -%ifarch %{arm} -rm llvm/test/tools/llvm-readobj/ELF/dependent-libraries.test -%endif %ifarch ppc64le # TODO: Re-enable when ld.gold fixed its internal error. rm llvm/test/tools/gold/PowerPC/mtriple.ll @@ -224,5 +216,3 @@ cd llvm %endif #endregion - -%endif diff --git a/files.spec.inc b/files.spec.inc index a85cf30..640a679 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -541,10 +541,8 @@ %license openmp/LICENSE.TXT %{_libdir}/libomp.so %{_libdir}/libompd.so -%ifnarch %{arm} %{_libdir}/libarcher.so -%endif -%ifnarch %{ix86} %{arm} +%ifnarch %{ix86} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. %{_libdir}/libomptarget.so.%{so_suffix} @@ -554,13 +552,11 @@ %license openmp/LICENSE.TXT %{_prefix}/lib/clang/%{maj_ver}/include/omp.h %{_prefix}/lib/clang/%{maj_ver}/include/ompx.h -%ifnarch %{arm} %{_prefix}/lib/clang/%{maj_ver}/include/omp-tools.h %{_prefix}/lib/clang/%{maj_ver}/include/ompt.h %{_prefix}/lib/clang/%{maj_ver}/include/ompt-multiplex.h -%endif %{_libdir}/cmake/openmp/FindOpenMPTarget.cmake -%ifnarch %{ix86} %{arm} +%ifnarch %{ix86} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. %{_libdir}/libomptarget.devicertl.a diff --git a/globals.spec.inc b/globals.spec.inc index cafcec7..d3dacfe 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -1,6 +1,6 @@ %bcond_without snapshot_build # Components enabled if supported by target architecture: -%define gold_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x +%define gold_arches %{ix86} x86_64 aarch64 %{power64} s390x %ifarch %{gold_arches} %bcond_without gold %else @@ -76,13 +76,7 @@ %global _dwz_low_mem_die_limit_s390x 1 %global _dwz_max_die_limit_s390x 1000000 -%ifarch %{arm} -# koji overrides the _gnu variable to be gnu, which is not correct for clang, so -# we need to hard-code the correct triple here. -%global llvm_triple armv7l-redhat-linux-gnueabihf -%else %global llvm_triple %{_target_platform} -%endif # https://fedoraproject.org/wiki/Changes/PythonSafePath#Opting_out # Don't add -P to Python shebangs diff --git a/packages.spec.inc b/packages.spec.inc index f47be45..b17f3a0 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -154,11 +154,6 @@ Recommends: libatomic%{?_isa} Recommends: libomp-devel%{_isa} = %{version} Recommends: libomp%{_isa} = %{version} -# Use lld as the default linker on ARM due to rhbz#1918924 -%ifarch %{arm} -Requires: lld -%endif - %description -n %{pkg_name_clang}-libs Runtime library for clang. From 481c78feb06e0fdfc7b697f3a543ed9a19970d2b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 May 2024 18:19:54 +0200 Subject: [PATCH 106/205] Ship .ninja_log in llvm-build-stats package This should make it easier to analyze which parts of the build are slow. The new package is only available in snapshot builds, we don't want to ship it in production. --- check.spec.inc | 5 +++++ files.spec.inc | 5 +++++ packages.spec.inc | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/check.spec.inc b/check.spec.inc index 6292ae9..598b335 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -216,3 +216,8 @@ cd llvm %endif #endregion + +%if %{with snapshot_build} +# Do this here instead of in install so the check targets are also included. +cp %{_vpath_builddir}/.ninja_log %{buildroot}%{pkg_datadir} +%endif diff --git a/files.spec.inc b/files.spec.inc index 640a679..5c14f26 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -309,6 +309,11 @@ %{install_includedir}/llvm-gtest %{install_includedir}/llvm-gmock +%if %{with snapshot_build} +%files -n %{pkg_name_llvm}-build-stats +%{pkg_datadir}/.ninja_log +%endif + #endregion #region CLANG files diff --git a/packages.spec.inc b/packages.spec.inc index b17f3a0..b9f5273 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -80,6 +80,14 @@ LLVM's modified googletest sources. %endif +%if %{with snapshot_build} +%package -n %{pkg_name_llvm}-build-stats +Summary: Statistics for the RPM build + +%description -n %{pkg_name_llvm}-build-stats +Statistics for the RPM build. Only available in snapshot builds. +%endif + #endregion #region CLANG packages From 4db7fe1bea5e9ac101ace09ab71dc5a5ea37d850 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 5 Jun 2024 08:47:13 +0200 Subject: [PATCH 107/205] Rebase LLD patch --- 0001-Always-build-shared-libs-for-LLD.patch | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/0001-Always-build-shared-libs-for-LLD.patch b/0001-Always-build-shared-libs-for-LLD.patch index 1659800..6840554 100644 --- a/0001-Always-build-shared-libs-for-LLD.patch +++ b/0001-Always-build-shared-libs-for-LLD.patch @@ -1,4 +1,4 @@ -From b1c60d7fa322a2d208556087df9e7ef94bfbffb8 Mon Sep 17 00:00:00 2001 +From 69faadbc396000bfa60c722f6fb9c0fc3fb2daf0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 8 May 2024 12:30:36 +0900 Subject: [PATCH] Always build shared libs for LLD @@ -10,7 +10,7 @@ but we do want to build lld libraries. 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake -index 2ee066b41535..270c03f096ac 100644 +index 9f2684b6f933..743ec87814a2 100644 --- a/lld/cmake/modules/AddLLD.cmake +++ b/lld/cmake/modules/AddLLD.cmake @@ -7,9 +7,8 @@ macro(add_lld_library name) @@ -23,7 +23,8 @@ index 2ee066b41535..270c03f096ac 100644 + # Always build shared libs for LLD. + set(ARG_ENABLE_SHARED SHARED) llvm_add_library(${name} ${ARG_ENABLE_SHARED} ${ARG_UNPARSED_ARGUMENTS}) - set_target_properties(${name} PROPERTIES FOLDER "lld libraries") + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) -- -2.44.0 \ No newline at end of file +2.45.1 + From 766f32331febd4a3c5458ff786d52a3252d7fd7c Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 8 Jun 2024 00:52:12 +0000 Subject: [PATCH 108/205] Build libclang-cpp.so separately to avoid OOM errors We were running out of memory linking this on the ppc64le COPR builders. --- build.spec.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.spec.inc b/build.spec.inc index 0e6db0f..e447682 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -203,6 +203,10 @@ cd llvm # builders without having to artificially limit the number of concurrent jobs. %cmake_build --target LLVM +# Also build libclang-cpp.so separately to avoid OOM errors. +# This is to fix occasional OOM errors on the ppc64le COPR builders. +%cmake_build --target libclang-cpp.so + %cmake_build # If we don't build the runtimes target here, we'll have to wait for the %check From f67a3015ee4146e81ab6c2a44d5fb0b9b8577d3b Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 22 May 2024 09:50:11 +0200 Subject: [PATCH 109/205] Add pre-commit --- .pre-commit-config.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..8afd326 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-ast + - id: check-case-conflict + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-symlinks + - id: trailing-whitespace + - id: end-of-file-fixer + - id: mixed-line-ending + - id: fix-byte-order-marker + - id: detect-private-key + - id: check-toml + - id: check-yaml + args: + - "--allow-multiple-documents" + + # See https://tmt.readthedocs.io/en/latest/guide.html#checking-data-validity + - repo: https://github.com/teemtee/tmt.git + rev: 1.32.2 + hooks: + - id: tmt-lint + +exclude: ".*\\.patch" From d786a89a64e4155c1a1706f2ab7d1c4fc05ee257 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 22 May 2024 09:53:23 +0200 Subject: [PATCH 110/205] Format all files with 'pre-commit run -a' --- .copr/snapshot-info.sh | 2 +- .pre-commit-config.yaml | 1 + Makefile | 3 +-- check.spec.inc | 18 +++++++++--------- globals.spec.inc | 2 +- llvm.rpmlintrc | 16 ++++++++-------- tests/README.md | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.copr/snapshot-info.sh b/.copr/snapshot-info.sh index 704efb9..70cfb4f 100755 --- a/.copr/snapshot-info.sh +++ b/.copr/snapshot-info.sh @@ -5,7 +5,7 @@ set -e # This is important for systems that have a different local but want to produce -# a valid changelog date. +# a valid changelog date. LANG=en_EN function loginfo() { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8afd326..61ca349 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,6 +19,7 @@ repos: - id: check-yaml args: - "--allow-multiple-documents" + - "--unsafe" # See https://tmt.readthedocs.io/en/latest/guide.html#checking-data-validity - repo: https://github.com/teemtee/tmt.git diff --git a/Makefile b/Makefile index 9fff882..ee3cd59 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ local-list-check: setup --define "_disable_source_fetch 0" \ -- $(SPEC) -bl -.PHONY: local-prep +.PHONY: local-prep local-prep: setup fedpkg --release $(FEDORA_RELEASE) -v \ prep \ @@ -94,4 +94,3 @@ local-tmt-vm: -c fedora-llvm-team/llvm-snapshots-big-merge-20240124 \ test \ report - diff --git a/check.spec.inc b/check.spec.inc index 598b335..7d5b935 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -22,17 +22,17 @@ export LIT_XFAIL="" # in your test paths. declare -a filter_out_tests -#region LLVM xfail tests +#region LLVM xfail tests # Xfail testing of update utility tools -# LLVM :: +# LLVM :: export LIT_XFAIL="$LIT_XFAIL;tools/UpdateTestChecks" #endregion #region CLANG xfail tests -# Clang :: +# Clang :: export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c" #endregion @@ -45,7 +45,7 @@ export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c" # Change Dir: '/builddir/build/BUILD/openmp-17.0.6.src/redhat-linux-build' # Run Build Command(s): /usr/bin/ninja-build -v -j 6 check-openmp # [1/1] cd /builddir/build/BUILD/openmp-17.0.6.src/redhat-linux-build && /usr/bin/cmake -E echo check-openmp\ does\ nothing,\ dependencies\ not\ found. -# +# # We're marking the tests that are failing with the follwing error as expected to fail (XFAIL): # # gdb.error: No symbol "ompd_sizeof____kmp_gtid" in current context @@ -79,7 +79,7 @@ filter_out_tests+=("libomp :: ompt/teams/distribute_dispatch.c") # The following tests seem pass on ppc64le and x86_64 and aarch64 only: %ifnarch ppc64le x86_64 s390x aarch64 -# Passes on ppc64le: +# Passes on ppc64le: # libomptarget :: powerpc64le-ibm-linux-gnu :: mapping/target_derefence_array_pointrs.cpp # libomptarget :: powerpc64le-ibm-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp # Passes on x86_64: @@ -88,7 +88,7 @@ filter_out_tests+=("libomp :: ompt/teams/distribute_dispatch.c") # Passes on s390x: # libomptarget :: s390x-ibm-linux-gnu :: mapping/target_derefence_array_pointrs.cpp # libomptarget :: s390x-ibm-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp -export LIT_XFAIL="$LIT_XFAIL;mapping/target_derefence_array_pointrs.cpp" +export LIT_XFAIL="$LIT_XFAIL;mapping/target_derefence_array_pointrs.cpp" %endif %ifnarch x86_64 @@ -97,8 +97,8 @@ export LIT_XFAIL="$LIT_XFAIL;mapping/target_derefence_array_pointrs.cpp" # libomptarget :: x86_64-pc-linux-gnu :: api/ompx_3d.cpp # libomptarget :: x86_64-pc-linux-gnu-LTO :: api/ompx_3d.c # libomptarget :: x86_64-pc-linux-gnu-LTO :: api/ompx_3d.cpp -# libomptarget :: aarch64-unknown-linux-gnu :: -export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.c" +# libomptarget :: aarch64-unknown-linux-gnu :: +export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.c" export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.cpp" %endif @@ -194,7 +194,7 @@ export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_one_int.c" filter_out_tests=$(printf "|%s" "${filter_out_tests[@]}") # Remove the initial pipe symbol filter_out_tests=${filter_out_tests:1} -# Properly escape path dots (".") for use in regular expression +# Properly escape path dots (".") for use in regular expression filter_out_tests=$(echo $filter_out_tests | sed 's/\./\\./') # Add enclosing parenthesis export LIT_FILTER_OUT="($filter_out_tests)" diff --git a/globals.spec.inc b/globals.spec.inc index d3dacfe..349172e 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -98,7 +98,7 @@ %ifarch ppc64le # Too many threads on ppc64 systems causes OOM errors. -# TODO(kkleine): Is this really needed when building together with llvm? +# TODO(kkleine): Is this really needed when building together with llvm? %global _smp_mflags -j8 %endif diff --git a/llvm.rpmlintrc b/llvm.rpmlintrc index 5f98c56..de8f68f 100644 --- a/llvm.rpmlintrc +++ b/llvm.rpmlintrc @@ -23,10 +23,10 @@ addFilter("llvm-test.x86_64: W: no-documentation") # This is a devel package addFilter("W: devel-file-in-non-devel-package") - + # These symlinks are dangling on x64_64 addFilter("compiler-rt.x86_64: W: dangling-relative-symlink /usr/lib64/clang/[0-9]+.[0-9]+.[0-9]+/") - + addFilter("E: hardcoded-library-path in ../../lib/clang/") @@ -37,13 +37,13 @@ addFilter("E: hardcoded-library-path in ../../lib/clang/") ## CLANG ############################################################ clang needs libstdc++-devel installed in order to compile c++ programs. - + addFilter("E: devel-dependency libstdc\+\+-devel") - + addFilter("E: explicit-lib-dependency libstdc\+\+-devel") - + # clang installs libear to /usr/lib on all arches, so we have to use - + # a hard-coded /usr/lib path in order to move it to the python3 sitelib. - -addFilter("E: hardcoded-library-path in %{_prefix}/lib/{libear") \ No newline at end of file + +addFilter("E: hardcoded-library-path in %{_prefix}/lib/{libear") diff --git a/tests/README.md b/tests/README.md index 5aeb3d6..2afa54e 100644 --- a/tests/README.md +++ b/tests/README.md @@ -3,4 +3,4 @@ The tests for LLVM are in a separate repo: https://src.fedoraproject.org/tests/llvm This directory should contain only fmf plans (such as build-gating.fmf) which import the tests from the tests repo. This can be done using the "url" parameter of the -plan's "discover" step. Reference: https://tmt.readthedocs.io/en/stable/spec/plans.html#fmf \ No newline at end of file +plan's "discover" step. Reference: https://tmt.readthedocs.io/en/stable/spec/plans.html#fmf From 102959aa2f80c9c41bd59c08260b9ab45c1037b6 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 29 May 2024 22:33:49 +0000 Subject: [PATCH 111/205] Add directory ownership for libomp cmake dir --- files.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index 5c14f26..797efb1 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -560,7 +560,7 @@ %{_prefix}/lib/clang/%{maj_ver}/include/omp-tools.h %{_prefix}/lib/clang/%{maj_ver}/include/ompt.h %{_prefix}/lib/clang/%{maj_ver}/include/ompt-multiplex.h -%{_libdir}/cmake/openmp/FindOpenMPTarget.cmake +%{_libdir}/cmake/openmp/ %ifnarch %{ix86} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. From 5d65390bed6acbf1f02eaed471b628f41a8de727 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 26 Jun 2024 09:37:20 +0200 Subject: [PATCH 112/205] Remove HTML asset files from /usr/share/clang-doc In https://github.com/fedora-llvm-team/llvm-snapshots/issues/564#issuecomment-2191023635 we noticed that `clang-doc-default-stylesheet.css` and `index.js` are no longer installed to `/usr/share/clang` but `/usr/share/clang-doc` instead. This addresses the [change in upstream](https://github.com/llvm/llvm-project/pull/96555). --- install.spec.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index f97a81b..398909b 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -160,8 +160,8 @@ rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py* # TODO: Package html docs rm -Rvf %{buildroot}%{_docdir}/LLVM/clang/html rm -Rvf %{buildroot}%{_docdir}/LLVM/clang-tools/html -rm -Rvf %{buildroot}%{_datadir}/clang/clang-doc-default-stylesheet.css -rm -Rvf %{buildroot}%{_datadir}/clang/index.js +rm -Rvf %{buildroot}%{_datadir}/clang-doc/clang-doc-default-stylesheet.css +rm -Rvf %{buildroot}%{_datadir}/clang-doc/index.js # TODO: What are the Fedora guidelines for packaging bash autocomplete files? rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh From abc6958dafeb7ce38fb1bbcf83d323c63785049c Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 2 Jul 2024 09:40:45 +0000 Subject: [PATCH 113/205] Fix lit filtering I forgot to add the 'g' modifier to sed. Before only the first occurence of a '.' was replaced in a path and not every dot. --- check.spec.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index 7d5b935..a1e789c 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -195,11 +195,10 @@ filter_out_tests=$(printf "|%s" "${filter_out_tests[@]}") # Remove the initial pipe symbol filter_out_tests=${filter_out_tests:1} # Properly escape path dots (".") for use in regular expression -filter_out_tests=$(echo $filter_out_tests | sed 's/\./\\./') +filter_out_tests=$(echo $filter_out_tests | sed 's/\./\\./g') # Add enclosing parenthesis export LIT_FILTER_OUT="($filter_out_tests)" - export LIT_OPTS="-vv" export LD_LIBRARY_PATH="%{buildroot}/%{install_libdir}:%{buildroot}/%{_libdir}"; From c0d6e6d162baadd8641f769a2f23b6756d4967c2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 3 Jul 2024 11:28:50 +0200 Subject: [PATCH 114/205] Only put libLLVM*.a into llvm-static Currently we also accidentally ship libomptarget.devicertl.a. --- files.spec.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 797efb1..5b796ca 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -281,11 +281,9 @@ %files -n %{pkg_name_llvm}-static %license llvm/LICENSE.TXT -%{install_libdir}/*.a +%{install_libdir}/libLLVM*.a %exclude %{install_libdir}/libLLVMTestingSupport.a %exclude %{install_libdir}/libLLVMTestingAnnotations.a -%exclude %{install_libdir}/libllvm_gtest.a -%exclude %{install_libdir}/libllvm_gtest_main.a %files -n %{pkg_name_llvm}-cmake-utils %license llvm/LICENSE.TXT From 52ba00adbd0c62cb0eed5b1261b99b914fc2c86a Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 2 Jul 2024 16:37:18 +0200 Subject: [PATCH 115/205] Add lldb.spec from which we integrate --- lldb.spec | 530 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 530 insertions(+) create mode 100644 lldb.spec diff --git a/lldb.spec b/lldb.spec new file mode 100644 index 0000000..f21bc0f --- /dev/null +++ b/lldb.spec @@ -0,0 +1,530 @@ + +%global lldb_version 18.1.7 +#global rc_ver 4 + +%prep +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%autosetup -n %{lldb_srcdir} -p2 + +%build +%global _lto_cflags -flto=thin + +%cmake -GNinja \ + -DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \ + +%cmake_build + +%install +%cmake_install + +%multilib_fix_c_header --file %{_includedir}/lldb/Host/Config.h + +# remove static libraries +rm -fv %{buildroot}%{_libdir}/*.a + +# python: fix binary libraries location +liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) +ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so +%py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb + +# remove bundled six.py +rm -f %{buildroot}%{python3_sitearch}/six.* + +%ldconfig_scriptlets + +%check + + +%files +%license LICENSE.TXT +%{_bindir}/lldb* +# Usually, *.so symlinks are kept in devel subpackages. However, the python +# bindings depend on this symlink at runtime. +%{_libdir}/*.so +%{_libdir}/liblldb.so.* +%{_libdir}/liblldbIntelFeatures.so.* + +%files devel +%{_includedir}/lldb + +%files -n python3-lldb +%{python3_sitearch}/lldb + +%changelog +* Fri Jun 14 2024 Tom Stellard - 18.1.7-1 +- 18.1.7 Release + +* Fri Jun 07 2024 Python Maint - 18.1.6-2 +- Rebuilt for Python 3.13 + +* Tue May 21 2024 Tom Stellard - 18.1.6-1 +- 18.1.6 Release + +* Fri May 03 2024 Tom Stellard - 18.1.4-1 +- 18.1.4 Release + +* Wed Apr 17 2024 Tom Stellard - 18.1.3-1 +- 18.1.3 Release + +* Mon Mar 25 2024 Tulio Magno Quites Machado Filho - 18.1.2-2 +- Move liblldb symlink to the main package. Fix rhbz#2260611. + +* Fri Mar 22 2024 Tom Stellard - 18.1.2-1 +- 18.1.2 Release + +* Tue Mar 12 2024 Tom Stellard - 18.1.1-1 +- 18.1.1 Release + +* Wed Feb 28 2024 Tom Stellard - 18.1.0~rc4-1 +- 18.1.0-rc4 Release + +* Thu Jan 25 2024 Fedora Release Engineering - 17.0.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 17.0.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Nov 29 2023 Tulio Magno Quites Machado Filho - 17.0.6-1 +- Update to LLVM 17.0.6 + +* Wed Nov 01 2023 Tulio Magno Quites Machado Filho - 17.0.4-1 +- Update to LLVM 17.0.4 + +* Wed Oct 18 2023 Tulio Magno Quites Machado Filho - 17.0.3-1 +- Update to LLVM 17.0.3 + +* Wed Oct 04 2023 Tulio Magno Quites Machado Filho - 17.0.2-1 +- Update to LLVM 17.0.2 + +* Mon Sep 25 2023 Tulio Magno Quites Machado Filho - 17.0.1-1 +- Update to LLVM 17.0.1 + +* Mon Sep 11 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-1 +- Update to LLVM 17.0.0 RC4 + +* Fri Aug 25 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc3-1 +- Update to LLVM 17.0.0 RC3 + +* Wed Aug 23 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc2-1 +- Update to LLVM 17.0.0 RC2 + +* Wed Aug 02 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-1 +- Update to LLVM 17.0.0 RC1 + +* Thu Jul 20 2023 Fedora Release Engineering - 16.0.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jul 10 2023 Tulio Magno Quites Machado Filho - 16.0.6-1 +- Update to LLVM 16.0.6 + +* Fri Jun 16 2023 Python Maint - 16.0.5-4 +- Rebuilt for Python 3.12 + +* Thu Jun 15 2023 Nikita Popov - 16.0.5-3 +- Use llvm-cmake-utils package + +* Thu Jun 15 2023 Python Maint - 16.0.5-2 +- Rebuilt for Python 3.12 + +* Tue Jun 06 2023 Tulio Magno Quites Machado Filho - 16.0.5-1 +- Update to LLVM 16.0.5 + +* Fri May 19 2023 Tulio Magno Quites Machado Filho - 16.0.4-1 +- Update to LLVM 16.0.4 + +* Wed May 10 2023 Tulio Magno Quites Machado Filho - 16.0.3-1 +- Update to LLVM 16.0.3 + +* Wed Apr 26 2023 Tulio Magno Quites Machado Filho - 16.0.2-1 +- Update to LLVM 16.0.2 + +* Thu Apr 13 2023 Tulio Magno Quites Machado Filho - 16.0.1-1 +- Update to LLVM 16.0.1 + +* Tue Mar 21 2023 Tulio Magno Quites Machado Filho - 16.0.0-1 +- Update to LLVM 16.0.0 + +* Wed Mar 15 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-1 +- Update to LLVM 16.0.0 RC4 + +* Thu Feb 23 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-1 +- Update to LLVM 16.0.0 RC3 + +* Tue Feb 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc1-1 +- Update to LLVM 16.0.0 RC1 + +* Thu Jan 19 2023 Tulio Magno Quites Machado Filho - 15.0.7-3 +- Include the Apache license adopted in 2019. + +* Thu Jan 19 2023 Fedora Release Engineering - 15.0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jan 13 2023 Nikita Popov - 15.0.7-1 +- Update to LLVM 15.0.7 + +* Thu Jan 12 2023 Tom Stellard - 15.0.6-2 +- Omit frame pointers when building + +* Tue Dec 06 2022 Nikita Popov - 15.0.6-1 +- Update to LLVM 15.0.6 + +* Mon Nov 07 2022 Nikita Popov - 15.0.4-1 +- Update to LLVM 15.0.4 + +* Tue Oct 18 2022 Nikita Popov - 15.0.0-3 +- Fix crash on ppc64le (fix rhbz#2121369) + +* Mon Oct 03 2022 sguelton@redhat.com - 15.0.0-2 +- Backport compat patches for swig 4.1.0, see rhbz#2128646 + +* Tue Sep 06 2022 Nikita Popov - 15.0.0-1 +- Update to LLVM 15.0.0 + +* Tue Aug 09 2022 Nikita Popov - 14.0.5-3 +- Fix s390x build + +* Thu Jul 21 2022 Fedora Release Engineering - 14.0.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 20 2022 Timm Bäder - 14.0.5-1 +- Update to 14.0.5 + +* Mon Jun 13 2022 Python Maint - 14.0.0-2 +- Rebuilt for Python 3.11 + +* Wed Mar 23 2022 Timm Bäder - 14.0.0-1 +- Update to 14.0.0 + +* Thu Feb 03 2022 Nikita Popov - 13.0.1-1 +- Update to LLVM 13.0.1 final + +* Thu Jan 20 2022 Fedora Release Engineering - 13.0.1~rc2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jan 14 2022 Nikita Popov - 13.0.1~rc2-1 +- Update to LLVM 13.0.1rc2 + +* Wed Jan 12 2022 Nikita Popov - 13.0.1~rc1-1 +- Update to LLVM 13.0.1rc1 + +* Fri Oct 01 2021 Tom Stellard - 13.0.0-1 +- 13.0.0 Release + +* Wed Sep 22 2021 Tom Stellard - 13.0.0~rc3-1 +- 13.0.0-rc3 Release + +* Mon Aug 09 2021 Tom Stellard - 13.0.0~rc1-1 +- 13.0.0-rc1 Release + +* Thu Jul 22 2021 Fedora Release Engineering - 12.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jul 14 2021 Tom Stellard - 12.0.1-1 +- 12.0.1 Release + +* Thu Jul 01 2021 Tom Stellard - 12.0.0~rc3-1 +- 12.0.0-rc3 Release + +* Fri Jun 04 2021 Python Maint - 12.0.1~rc1-2 +- Rebuilt for Python 3.10 + +* Thu Jun 03 2021 Tom Stellard - 12.0.0~rc1-1 +- 12.0.0-rc1 Release + +* Fri Apr 16 2021 Tom Stellard - 12.0.0-1 +- 12.0.0 Release + +* Thu Apr 08 2021 sguelton@redhat.com - 12.0.0-11.rc5 +- New upstream release candidate + +* Fri Apr 02 2021 sguelton@redhat.com - 12.0.0-10.rc4 +- New upstream release candidate + +* Wed Mar 31 2021 Jonathan Wakely - 12.0.0-9.rc3 +- Rebuilt for removed libstdc++ symbols (#1937698) + +* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-8.rc3 +- LLVM 12.0.0 rc3 + +* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-7.rc2 +- rebuilt + +* Tue Mar 02 2021 sguelton@redhat.com - 12.0.0-6.rc2 +- Update test regexp + +* Tue Mar 02 2021 sguelton@redhat.com - 12.0.0-5.rc2 +- Improve CI debugging + +* Tue Mar 02 2021 sguelton@redhat.com - 12.0.0-4.rc2 +- Apply upstream D97721 + +* Mon Mar 01 2021 sguelton@redhat.com - 12.0.0-3.rc2 +- Update CI test + +* Thu Feb 25 2021 sguelton@redhat.com - 12.0.0-0.2.rc2 +- 12.0.0-rc2 release + +* Wed Feb 17 2021 sguelton@redhat.com - 12.0.0-0.1.rc1 +- 12.0.0-rc1 release + +* Tue Jan 26 2021 Fedora Release Engineering - 11.1.0-3.rc2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 22 2021 Serge Guelton - 11.1.0-2.rc2 +- llvm 11.1.0-rc2 release + +* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1 +- 11.1.0-rc1 release + +* Wed Jan 06 2021 Serge Guelton - 11.0.1-3 +- LLVM 11.0.1 final + +* Tue Dec 22 2020 sguelton@redhat.com - 11.0.1-2.rc2 +- llvm 11.0.1-rc2 + +* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1 +- llvm 11.0.1-rc1 + +* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1 +- Fix NVR + +* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.5 +- llvm 11.0.0 - final release + +* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.4.rc6 +- 11.0.0-rc6 + +* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.3.rc5 +- 11.0.0-rc5 Release + +* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.2.rc3 +- Fix NVR + +* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3 +- 11.0.0-rc3 Release + +* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.1.rc2 +- 11.0.0-rc2 Release + +* Mon Aug 10 2020 Tom Stellard - 11.0.0-0.1.rc1 +- 11.0.0-rc1 Release + +* Wed Jul 29 2020 sguelton@redhat.com - 10.0.0-8 +- Make gcc dependency explicit, see https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires +- use %%license macro + +* Tue Jul 28 2020 Fedora Release Engineering - 10.0.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 17 2020 sguelton@redhat.com - 10.0.0-6 +- Use ninja and according macros as build system + +* Tue Jun 16 2020 sguelton@redhat.com - 10.0.0-5 +- Finer grain specification of python3-lldb deps + +* Tue Jun 02 2020 sguelton@redhat.com - 10.0.0-4 +- Fix arch-dependent header + +* Tue Jun 02 2020 sguelton@redhat.com - 10.0.0-3 +- Instruct cmake not to generate RPATH + +* Tue May 26 2020 Miro Hrončok - 10.0.0-2 +- Rebuilt for Python 3.9 + +* Mon Mar 30 2020 sguelton@redhat.com - 10.0.0-1 +- 10.0.0 final + +* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-0.6.rc6 +- 10.0.0 rc6 + +* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.5.rc5 +- 10.0.0 rc5 + +* Sun Mar 15 2020 sguelton@redhat.com - 10.0.0-0.4.rc4 +- 10.0.0 rc4 + +* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.3.rc3 +- 10.0.0 rc3 + +* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.2.rc2 +- 10.0.0 rc2 + +* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1 +- 10.0.0 rc1 + +* Wed Jan 29 2020 Tom Stellard - 9.0.1-4 +- Link against libclang-cpp.so +- https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package + +* Wed Jan 29 2020 Fedora Release Engineering - 9.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Dec 21 2019 Tom Stellard - 9.0.1-2 +- 9.0.1 Release + +* Thu Sep 19 2019 Tom Stellard - 9.0.0-1 +- 9.0.0 Release + +* Thu Aug 22 2019 Tom Stellard - 9.0.0-0.1.rc3 +- 9.0.0-rc3 Release + +* Mon Aug 19 2019 Miro Hrončok - 8.0.0-2.2 +- Rebuilt for Python 3.8 + +* Thu Jul 25 2019 Fedora Release Engineering - 8.0.0-2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Mar 26 2019 sguelton@redhat.com - 8.0.0-2 +- Only depend on Python3 + +* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1 +- 8.0.0 final + +* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.4.rc4 +- 8.0.0 Release candidate 4 + +* Tue Mar 5 2019 sguelton@redhat.com - 8.0.0-0.3.rc3 +- 8.0.0 Release candidate 3 + +* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2 +- 8.0.0 Release candidate 2 + +* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-0.1.rc1 +- 8.0.0 Release candidate 1 + +* Fri Feb 01 2019 Fedora Release Engineering - 7.0.1-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1 +- 7.0.1 Release + +* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-2 +- Ensure rpmlint passes on specfile + +* Tue Sep 25 2018 Tom Stellard - 7.0.0-1 +- 7.0.0 Release + +* Fri Sep 21 2018 Tom Stellard - 7.0.0-0.5.rc3 +- lldb should depend on python2-lldb + +* Mon Sep 17 2018 Tom Stellard - 7.0.0-0.4.rc3 +- 7.0.0-rc3 Release + +* Wed Sep 12 2018 Tom Stellard - 7.0.0-0.3.rc2 +- Enable build on s390x + +* Fri Aug 31 2018 Tom Stellard - 7.0.0-0.2.rc2 +- 7.0.0-rc2 Release + +* Tue Aug 14 2018 Tom Stellard - 7.0.0-0.1.rc1 +- 7.0.1-rc1 Release + +* Tue Aug 07 2018 Tom Stellard - 6.0.1-3 +- Enable ppc64le arch + +* Fri Jul 13 2018 Fedora Release Engineering - 6.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon May 21 2018 Tom Stellard - 6.0.1-1 +- 6.0.1 Release + +* Mon May 21 2018 Tom Stellard - 6.0.1-0.1.rc1 +- 6.0.1-rc1 Release + +* Sat May 05 2018 Miro Hrončok - 6.0.0-4 +- Update Python macros to new packaging standards + (See https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build) + +* Tue Mar 20 2018 Tom Stellard - 6.0.0-3 +- Rebuild against llvm with the rhbz#1558657 fix + +* Wed Mar 14 2018 Tilmann Scheller - 6.0.0-2 +- Restore LLDB SB API headers, fixes rhbz#1548758 + +* Fri Mar 09 2018 Tom Stellard - 6.0.0-1 +- 6.0.0 Release + +* Tue Feb 13 2018 Tom Stellard - 6.0.0-0.3.rc2 +- 6.0.0-rc2 release + +* Thu Feb 08 2018 Fedora Release Engineering - 6.0.0-0.2.rc1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 25 2018 Tom Stellard - 6.0.0-0.1.rc1 +- 6.0.1-rc1 Release + +* Thu Dec 21 2017 Tom Stellard - 5.0.1-1 +- 5.0.1 Release + +* Fri Oct 06 2017 Tom Stellard - 5.0.0-1 +- 5.0.0 Release + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 4.0.1-4 +- Python 2 binary package renamed to python2-lldb + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Mon Jul 31 2017 Jan Kratochvil - 4.0.1-3 +- Backport lldb r303907 + Resolves rhbz #1356140 + +* Wed Jul 26 2017 Fedora Release Engineering - 4.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jun 26 2017 Tom Stellard - 4.0.1-1 +- 4.0.1 Release + +* Mon May 15 2017 Fedora Release Engineering - 4.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild + +* Fri Mar 24 2017 Tom Stellard - 4.0.0-1 +- lldb 4.0.0 + +* Tue Mar 21 2017 Tom Stellard - 3.9.1-4 +- Add explicit Requires for llvm-libs and clang-libs + +* Fri Mar 17 2017 Tom Stellard - 3.9.1-3 +- Adjust python sys.path so lldb can find readline.so + +* Tue Mar 14 2017 Tom Stellard - 3.9.1-2 +- Fix build with gcc 7 + +* Thu Mar 02 2017 Dave Airlie - 3.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Nov 14 2016 Nathaniel McCallum - 3.9.0-3 +- Disable libedit support until upstream fixes it (#1356140) + +* Wed Nov 2 2016 Peter Robinson 3.9.0-2 +- Set upstream supported architectures in an ExclusiveArch + +* Wed Oct 26 2016 Dave Airlie - 3.9.0-1 +- lldb 3.9.0 +- fixup some issues with MIUtilParse by removing it +- build with -fno-rtti + +* Tue Jul 19 2016 Fedora Release Engineering - 3.8.0-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Mar 10 2016 Dave Airlie 3.8.0-1 +- lldb 3.8.0 + +* Thu Mar 03 2016 Dave Airlie 3.8.0-0.3 +- lldb 3.8.0 rc3 + +* Wed Feb 24 2016 Dave Airlie - 3.8.0-0.2 +- dynamically link to llvm + +* Thu Feb 18 2016 Dave Airlie - 3.8.0-0.1 +- lldb 3.8.0 rc2 + +* Sun Feb 14 2016 Dave Airlie 3.7.1-3 +- rebuild lldb against latest llvm + +* Thu Feb 04 2016 Fedora Release Engineering - 3.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Oct 06 2015 Jan Vcelak 3.7.0-100 +- initial version using cmake build system From 572039ea86099b5fd58def12e91cda2a82818ce4 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 1 Jul 2024 13:30:45 +0200 Subject: [PATCH 116/205] Add lldb to big-merge See https://github.com/fedora-llvm-team/llvm-snapshots/issues/573 --- build.spec.inc | 11 +- check.spec.inc | 2 +- files.spec.inc | 18 ++ globals.spec.inc | 4 + install.spec.inc | 18 ++ lldb.spec | 530 ---------------------------------------------- packages.spec.inc | 50 +++++ prep.spec.inc | 4 + 8 files changed, 105 insertions(+), 532 deletions(-) delete mode 100644 lldb.spec diff --git a/build.spec.inc b/build.spec.inc index e447682..fa45e65 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -38,7 +38,7 @@ cd llvm # TODO: Override LIBOMP_INSTALL_LIBDIR, because otherwise the libraries # are installed to /usr/lib64/$TRIPLE and clang can't find them. %cmake -G Ninja \ - -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" \ + -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb" \ \ \ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ @@ -187,6 +187,15 @@ cd llvm -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \ \ \ + \ + -DLLDB_DISABLE_CURSES:BOOL=OFF \ + -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \ + -DLLDB_DISABLE_PYTHON:BOOL=OFF \ + -DPYTHON_VERSION_MAJOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.major)") \ + -DPYTHON_VERSION_MINOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.minor)") \ + \ + \ + \ %ifarch x86_64 -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error" \ %endif diff --git a/check.spec.inc b/check.spec.inc index a1e789c..dfdec6f 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -204,7 +204,7 @@ export LIT_OPTS="-vv" export LD_LIBRARY_PATH="%{buildroot}/%{install_libdir}:%{buildroot}/%{_libdir}"; cd llvm -%cmake_build --target check-llvm check-clang check-lld +%cmake_build --target check-llvm check-clang check-lld check-lldb %endif diff --git a/files.spec.inc b/files.spec.inc index 5b796ca..539b2b5 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -600,3 +600,21 @@ %{install_libdir}/liblld*.so.* #endregion + +#region LLDB files +%files -n %{pkg_name_lldb} +%license lldb/LICENSE.TXT +%{install_bindir}/lldb* +# Usually, *.so symlinks are kept in devel subpackages. However, the python +# bindings depend on this symlink at runtime. +# TODO(kkleine): This first entry is too broad. Include it back if needed but make it more narrow. +# %{install_libdir}/*.so +%{install_libdir}/liblldb.so.* +%{install_libdir}/liblldbIntelFeatures.so.* + +%files -n %{pkg_name_lldb}-devel +%{install_includedir}/lldb + +%files -n python3-lldb +%{python3_sitearch}/lldb +#endregion diff --git a/globals.spec.inc b/globals.spec.inc index 349172e..ce25d34 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -154,3 +154,7 @@ %global pkg_name_lld lld %endif #endregion + +#region LLDB globals +%global pkg_name_lldb lldb +#endregion diff --git a/install.spec.inc b/install.spec.inc index 398909b..646d6bf 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -280,3 +280,21 @@ fi %endif #endregion + +#region LLDB installation +%multilib_fix_c_header --file %{install_includedir}/lldb/Host/Config.h + +# remove static libraries +# TODO(kkleine): We need to remove these static libaries but not so widely, remember we're build all of LLVM. +# rm -fv %{buildroot}%{_libdir}/*.a + +# python: fix binary libraries location +liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) +ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so +%py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb + +# remove bundled six.py +rm -f %{buildroot}%{python3_sitearch}/six.* + +%ldconfig_scriptlets +#endregion diff --git a/lldb.spec b/lldb.spec deleted file mode 100644 index f21bc0f..0000000 --- a/lldb.spec +++ /dev/null @@ -1,530 +0,0 @@ - -%global lldb_version 18.1.7 -#global rc_ver 4 - -%prep -%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup -n %{lldb_srcdir} -p2 - -%build -%global _lto_cflags -flto=thin - -%cmake -GNinja \ - -DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \ - -%cmake_build - -%install -%cmake_install - -%multilib_fix_c_header --file %{_includedir}/lldb/Host/Config.h - -# remove static libraries -rm -fv %{buildroot}%{_libdir}/*.a - -# python: fix binary libraries location -liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) -ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so -%py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb - -# remove bundled six.py -rm -f %{buildroot}%{python3_sitearch}/six.* - -%ldconfig_scriptlets - -%check - - -%files -%license LICENSE.TXT -%{_bindir}/lldb* -# Usually, *.so symlinks are kept in devel subpackages. However, the python -# bindings depend on this symlink at runtime. -%{_libdir}/*.so -%{_libdir}/liblldb.so.* -%{_libdir}/liblldbIntelFeatures.so.* - -%files devel -%{_includedir}/lldb - -%files -n python3-lldb -%{python3_sitearch}/lldb - -%changelog -* Fri Jun 14 2024 Tom Stellard - 18.1.7-1 -- 18.1.7 Release - -* Fri Jun 07 2024 Python Maint - 18.1.6-2 -- Rebuilt for Python 3.13 - -* Tue May 21 2024 Tom Stellard - 18.1.6-1 -- 18.1.6 Release - -* Fri May 03 2024 Tom Stellard - 18.1.4-1 -- 18.1.4 Release - -* Wed Apr 17 2024 Tom Stellard - 18.1.3-1 -- 18.1.3 Release - -* Mon Mar 25 2024 Tulio Magno Quites Machado Filho - 18.1.2-2 -- Move liblldb symlink to the main package. Fix rhbz#2260611. - -* Fri Mar 22 2024 Tom Stellard - 18.1.2-1 -- 18.1.2 Release - -* Tue Mar 12 2024 Tom Stellard - 18.1.1-1 -- 18.1.1 Release - -* Wed Feb 28 2024 Tom Stellard - 18.1.0~rc4-1 -- 18.1.0-rc4 Release - -* Thu Jan 25 2024 Fedora Release Engineering - 17.0.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 17.0.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Nov 29 2023 Tulio Magno Quites Machado Filho - 17.0.6-1 -- Update to LLVM 17.0.6 - -* Wed Nov 01 2023 Tulio Magno Quites Machado Filho - 17.0.4-1 -- Update to LLVM 17.0.4 - -* Wed Oct 18 2023 Tulio Magno Quites Machado Filho - 17.0.3-1 -- Update to LLVM 17.0.3 - -* Wed Oct 04 2023 Tulio Magno Quites Machado Filho - 17.0.2-1 -- Update to LLVM 17.0.2 - -* Mon Sep 25 2023 Tulio Magno Quites Machado Filho - 17.0.1-1 -- Update to LLVM 17.0.1 - -* Mon Sep 11 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-1 -- Update to LLVM 17.0.0 RC4 - -* Fri Aug 25 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc3-1 -- Update to LLVM 17.0.0 RC3 - -* Wed Aug 23 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc2-1 -- Update to LLVM 17.0.0 RC2 - -* Wed Aug 02 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-1 -- Update to LLVM 17.0.0 RC1 - -* Thu Jul 20 2023 Fedora Release Engineering - 16.0.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Mon Jul 10 2023 Tulio Magno Quites Machado Filho - 16.0.6-1 -- Update to LLVM 16.0.6 - -* Fri Jun 16 2023 Python Maint - 16.0.5-4 -- Rebuilt for Python 3.12 - -* Thu Jun 15 2023 Nikita Popov - 16.0.5-3 -- Use llvm-cmake-utils package - -* Thu Jun 15 2023 Python Maint - 16.0.5-2 -- Rebuilt for Python 3.12 - -* Tue Jun 06 2023 Tulio Magno Quites Machado Filho - 16.0.5-1 -- Update to LLVM 16.0.5 - -* Fri May 19 2023 Tulio Magno Quites Machado Filho - 16.0.4-1 -- Update to LLVM 16.0.4 - -* Wed May 10 2023 Tulio Magno Quites Machado Filho - 16.0.3-1 -- Update to LLVM 16.0.3 - -* Wed Apr 26 2023 Tulio Magno Quites Machado Filho - 16.0.2-1 -- Update to LLVM 16.0.2 - -* Thu Apr 13 2023 Tulio Magno Quites Machado Filho - 16.0.1-1 -- Update to LLVM 16.0.1 - -* Tue Mar 21 2023 Tulio Magno Quites Machado Filho - 16.0.0-1 -- Update to LLVM 16.0.0 - -* Wed Mar 15 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-1 -- Update to LLVM 16.0.0 RC4 - -* Thu Feb 23 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-1 -- Update to LLVM 16.0.0 RC3 - -* Tue Feb 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc1-1 -- Update to LLVM 16.0.0 RC1 - -* Thu Jan 19 2023 Tulio Magno Quites Machado Filho - 15.0.7-3 -- Include the Apache license adopted in 2019. - -* Thu Jan 19 2023 Fedora Release Engineering - 15.0.7-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jan 13 2023 Nikita Popov - 15.0.7-1 -- Update to LLVM 15.0.7 - -* Thu Jan 12 2023 Tom Stellard - 15.0.6-2 -- Omit frame pointers when building - -* Tue Dec 06 2022 Nikita Popov - 15.0.6-1 -- Update to LLVM 15.0.6 - -* Mon Nov 07 2022 Nikita Popov - 15.0.4-1 -- Update to LLVM 15.0.4 - -* Tue Oct 18 2022 Nikita Popov - 15.0.0-3 -- Fix crash on ppc64le (fix rhbz#2121369) - -* Mon Oct 03 2022 sguelton@redhat.com - 15.0.0-2 -- Backport compat patches for swig 4.1.0, see rhbz#2128646 - -* Tue Sep 06 2022 Nikita Popov - 15.0.0-1 -- Update to LLVM 15.0.0 - -* Tue Aug 09 2022 Nikita Popov - 14.0.5-3 -- Fix s390x build - -* Thu Jul 21 2022 Fedora Release Engineering - 14.0.5-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 20 2022 Timm Bäder - 14.0.5-1 -- Update to 14.0.5 - -* Mon Jun 13 2022 Python Maint - 14.0.0-2 -- Rebuilt for Python 3.11 - -* Wed Mar 23 2022 Timm Bäder - 14.0.0-1 -- Update to 14.0.0 - -* Thu Feb 03 2022 Nikita Popov - 13.0.1-1 -- Update to LLVM 13.0.1 final - -* Thu Jan 20 2022 Fedora Release Engineering - 13.0.1~rc2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jan 14 2022 Nikita Popov - 13.0.1~rc2-1 -- Update to LLVM 13.0.1rc2 - -* Wed Jan 12 2022 Nikita Popov - 13.0.1~rc1-1 -- Update to LLVM 13.0.1rc1 - -* Fri Oct 01 2021 Tom Stellard - 13.0.0-1 -- 13.0.0 Release - -* Wed Sep 22 2021 Tom Stellard - 13.0.0~rc3-1 -- 13.0.0-rc3 Release - -* Mon Aug 09 2021 Tom Stellard - 13.0.0~rc1-1 -- 13.0.0-rc1 Release - -* Thu Jul 22 2021 Fedora Release Engineering - 12.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jul 14 2021 Tom Stellard - 12.0.1-1 -- 12.0.1 Release - -* Thu Jul 01 2021 Tom Stellard - 12.0.0~rc3-1 -- 12.0.0-rc3 Release - -* Fri Jun 04 2021 Python Maint - 12.0.1~rc1-2 -- Rebuilt for Python 3.10 - -* Thu Jun 03 2021 Tom Stellard - 12.0.0~rc1-1 -- 12.0.0-rc1 Release - -* Fri Apr 16 2021 Tom Stellard - 12.0.0-1 -- 12.0.0 Release - -* Thu Apr 08 2021 sguelton@redhat.com - 12.0.0-11.rc5 -- New upstream release candidate - -* Fri Apr 02 2021 sguelton@redhat.com - 12.0.0-10.rc4 -- New upstream release candidate - -* Wed Mar 31 2021 Jonathan Wakely - 12.0.0-9.rc3 -- Rebuilt for removed libstdc++ symbols (#1937698) - -* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-8.rc3 -- LLVM 12.0.0 rc3 - -* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-7.rc2 -- rebuilt - -* Tue Mar 02 2021 sguelton@redhat.com - 12.0.0-6.rc2 -- Update test regexp - -* Tue Mar 02 2021 sguelton@redhat.com - 12.0.0-5.rc2 -- Improve CI debugging - -* Tue Mar 02 2021 sguelton@redhat.com - 12.0.0-4.rc2 -- Apply upstream D97721 - -* Mon Mar 01 2021 sguelton@redhat.com - 12.0.0-3.rc2 -- Update CI test - -* Thu Feb 25 2021 sguelton@redhat.com - 12.0.0-0.2.rc2 -- 12.0.0-rc2 release - -* Wed Feb 17 2021 sguelton@redhat.com - 12.0.0-0.1.rc1 -- 12.0.0-rc1 release - -* Tue Jan 26 2021 Fedora Release Engineering - 11.1.0-3.rc2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jan 22 2021 Serge Guelton - 11.1.0-2.rc2 -- llvm 11.1.0-rc2 release - -* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1 -- 11.1.0-rc1 release - -* Wed Jan 06 2021 Serge Guelton - 11.0.1-3 -- LLVM 11.0.1 final - -* Tue Dec 22 2020 sguelton@redhat.com - 11.0.1-2.rc2 -- llvm 11.0.1-rc2 - -* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1 -- llvm 11.0.1-rc1 - -* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1 -- Fix NVR - -* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.5 -- llvm 11.0.0 - final release - -* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.4.rc6 -- 11.0.0-rc6 - -* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.3.rc5 -- 11.0.0-rc5 Release - -* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.2.rc3 -- Fix NVR - -* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3 -- 11.0.0-rc3 Release - -* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.1.rc2 -- 11.0.0-rc2 Release - -* Mon Aug 10 2020 Tom Stellard - 11.0.0-0.1.rc1 -- 11.0.0-rc1 Release - -* Wed Jul 29 2020 sguelton@redhat.com - 10.0.0-8 -- Make gcc dependency explicit, see https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires -- use %%license macro - -* Tue Jul 28 2020 Fedora Release Engineering - 10.0.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jul 17 2020 sguelton@redhat.com - 10.0.0-6 -- Use ninja and according macros as build system - -* Tue Jun 16 2020 sguelton@redhat.com - 10.0.0-5 -- Finer grain specification of python3-lldb deps - -* Tue Jun 02 2020 sguelton@redhat.com - 10.0.0-4 -- Fix arch-dependent header - -* Tue Jun 02 2020 sguelton@redhat.com - 10.0.0-3 -- Instruct cmake not to generate RPATH - -* Tue May 26 2020 Miro Hrončok - 10.0.0-2 -- Rebuilt for Python 3.9 - -* Mon Mar 30 2020 sguelton@redhat.com - 10.0.0-1 -- 10.0.0 final - -* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-0.6.rc6 -- 10.0.0 rc6 - -* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.5.rc5 -- 10.0.0 rc5 - -* Sun Mar 15 2020 sguelton@redhat.com - 10.0.0-0.4.rc4 -- 10.0.0 rc4 - -* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.3.rc3 -- 10.0.0 rc3 - -* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.2.rc2 -- 10.0.0 rc2 - -* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1 -- 10.0.0 rc1 - -* Wed Jan 29 2020 Tom Stellard - 9.0.1-4 -- Link against libclang-cpp.so -- https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package - -* Wed Jan 29 2020 Fedora Release Engineering - 9.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Sat Dec 21 2019 Tom Stellard - 9.0.1-2 -- 9.0.1 Release - -* Thu Sep 19 2019 Tom Stellard - 9.0.0-1 -- 9.0.0 Release - -* Thu Aug 22 2019 Tom Stellard - 9.0.0-0.1.rc3 -- 9.0.0-rc3 Release - -* Mon Aug 19 2019 Miro Hrončok - 8.0.0-2.2 -- Rebuilt for Python 3.8 - -* Thu Jul 25 2019 Fedora Release Engineering - 8.0.0-2.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Tue Mar 26 2019 sguelton@redhat.com - 8.0.0-2 -- Only depend on Python3 - -* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1 -- 8.0.0 final - -* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.4.rc4 -- 8.0.0 Release candidate 4 - -* Tue Mar 5 2019 sguelton@redhat.com - 8.0.0-0.3.rc3 -- 8.0.0 Release candidate 3 - -* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2 -- 8.0.0 Release candidate 2 - -* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-0.1.rc1 -- 8.0.0 Release candidate 1 - -* Fri Feb 01 2019 Fedora Release Engineering - 7.0.1-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1 -- 7.0.1 Release - -* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-2 -- Ensure rpmlint passes on specfile - -* Tue Sep 25 2018 Tom Stellard - 7.0.0-1 -- 7.0.0 Release - -* Fri Sep 21 2018 Tom Stellard - 7.0.0-0.5.rc3 -- lldb should depend on python2-lldb - -* Mon Sep 17 2018 Tom Stellard - 7.0.0-0.4.rc3 -- 7.0.0-rc3 Release - -* Wed Sep 12 2018 Tom Stellard - 7.0.0-0.3.rc2 -- Enable build on s390x - -* Fri Aug 31 2018 Tom Stellard - 7.0.0-0.2.rc2 -- 7.0.0-rc2 Release - -* Tue Aug 14 2018 Tom Stellard - 7.0.0-0.1.rc1 -- 7.0.1-rc1 Release - -* Tue Aug 07 2018 Tom Stellard - 6.0.1-3 -- Enable ppc64le arch - -* Fri Jul 13 2018 Fedora Release Engineering - 6.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon May 21 2018 Tom Stellard - 6.0.1-1 -- 6.0.1 Release - -* Mon May 21 2018 Tom Stellard - 6.0.1-0.1.rc1 -- 6.0.1-rc1 Release - -* Sat May 05 2018 Miro Hrončok - 6.0.0-4 -- Update Python macros to new packaging standards - (See https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build) - -* Tue Mar 20 2018 Tom Stellard - 6.0.0-3 -- Rebuild against llvm with the rhbz#1558657 fix - -* Wed Mar 14 2018 Tilmann Scheller - 6.0.0-2 -- Restore LLDB SB API headers, fixes rhbz#1548758 - -* Fri Mar 09 2018 Tom Stellard - 6.0.0-1 -- 6.0.0 Release - -* Tue Feb 13 2018 Tom Stellard - 6.0.0-0.3.rc2 -- 6.0.0-rc2 release - -* Thu Feb 08 2018 Fedora Release Engineering - 6.0.0-0.2.rc1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jan 25 2018 Tom Stellard - 6.0.0-0.1.rc1 -- 6.0.1-rc1 Release - -* Thu Dec 21 2017 Tom Stellard - 5.0.1-1 -- 5.0.1 Release - -* Fri Oct 06 2017 Tom Stellard - 5.0.0-1 -- 5.0.0 Release - -* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 4.0.1-4 -- Python 2 binary package renamed to python2-lldb - See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 - -* Mon Jul 31 2017 Jan Kratochvil - 4.0.1-3 -- Backport lldb r303907 - Resolves rhbz #1356140 - -* Wed Jul 26 2017 Fedora Release Engineering - 4.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Mon Jun 26 2017 Tom Stellard - 4.0.1-1 -- 4.0.1 Release - -* Mon May 15 2017 Fedora Release Engineering - 4.0.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild - -* Fri Mar 24 2017 Tom Stellard - 4.0.0-1 -- lldb 4.0.0 - -* Tue Mar 21 2017 Tom Stellard - 3.9.1-4 -- Add explicit Requires for llvm-libs and clang-libs - -* Fri Mar 17 2017 Tom Stellard - 3.9.1-3 -- Adjust python sys.path so lldb can find readline.so - -* Tue Mar 14 2017 Tom Stellard - 3.9.1-2 -- Fix build with gcc 7 - -* Thu Mar 02 2017 Dave Airlie - 3.9.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Nov 14 2016 Nathaniel McCallum - 3.9.0-3 -- Disable libedit support until upstream fixes it (#1356140) - -* Wed Nov 2 2016 Peter Robinson 3.9.0-2 -- Set upstream supported architectures in an ExclusiveArch - -* Wed Oct 26 2016 Dave Airlie - 3.9.0-1 -- lldb 3.9.0 -- fixup some issues with MIUtilParse by removing it -- build with -fno-rtti - -* Tue Jul 19 2016 Fedora Release Engineering - 3.8.0-2 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Thu Mar 10 2016 Dave Airlie 3.8.0-1 -- lldb 3.8.0 - -* Thu Mar 03 2016 Dave Airlie 3.8.0-0.3 -- lldb 3.8.0 rc3 - -* Wed Feb 24 2016 Dave Airlie - 3.8.0-0.2 -- dynamically link to llvm - -* Thu Feb 18 2016 Dave Airlie - 3.8.0-0.1 -- lldb 3.8.0 rc2 - -* Sun Feb 14 2016 Dave Airlie 3.7.1-3 -- rebuild lldb against latest llvm - -* Thu Feb 04 2016 Fedora Release Engineering - 3.7.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Oct 06 2015 Jan Vcelak 3.7.0-100 -- initial version using cmake build system diff --git a/packages.spec.inc b/packages.spec.inc index b9f5273..59edba1 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -344,3 +344,53 @@ Summary: LLD shared libraries Shared libraries for LLD. #endregion + +#region LLDB packages + +%package -n %{pkg_name_lldb} +Summary: Next generation high-performance debugger +License: Apache-2.0 WITH LLVM-exception OR NCSA +URL: http://lldb.llvm.org/ + +BuildRequires: clang +BuildRequires: cmake +BuildRequires: ncurses-devel +BuildRequires: swig +BuildRequires: libffi-devel +BuildRequires: zlib-devel +BuildRequires: libxml2-devel +BuildRequires: libedit-devel +BuildRequires: python3-lit +BuildRequires: multilib-rpm-config +BuildRequires: doxygen + +Requires: python3-lldb + +# For origin certification +BuildRequires: gnupg2 + +%description -n %{pkg_name_lldb} +LLDB is a next generation, high-performance debugger. It is built as a set +of reusable components which highly leverage existing libraries in the +larger LLVM Project, such as the Clang expression parser and LLVM +disassembler. + +%package -n %{pkg_name_lldb}-devel +Summary: Development header files for LLDB +Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} + +%description -n %{pkg_name_lldb}-devel +The package contains header files for the LLDB debugger. + +%package -n python3-lldb +%{?python_provide:%python_provide python3-lldb} +Summary: Python module for LLDB +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-six +Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} + +%description -n python3-lldb +The package contains the LLDB Python module. + +#endregion diff --git a/prep.spec.inc b/prep.spec.inc index c023cc9..35a0693 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -56,3 +56,7 @@ %endif #endregion + +#region LLDB preparation +# Nothing needed here because the sources are extracted with the llvm tarball. +#endregion From c89b2b03b0680e00f65eacfd76e7798f1485386d Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 1 Jul 2024 14:03:54 +0000 Subject: [PATCH 117/205] Avoid building lldb docs This should fix this error: ``` Jul 01 12:48:27 FAILED: tools/lldb/docs/CMakeFiles/docs-lldb-html /home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs/CMakeFiles/docs-lldb-html Jul 01 12:48:27 cd /home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs && /usr/bin/cmake -E env LLDB_SWIG_MODULE=/home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs /usr/bin/sphinx-build-3 -b html -d /home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs/_doctrees-lldb-html -q -t builder-html -D version=19 -D release=mainline /home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/lldb/docs /home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs/html Jul 01 12:48:27 Jul 01 12:48:27 Extension error: Jul 01 12:48:27 Could not import extension sphinx_automodapi.automodapi (exception: No module named 'sphinx_automodapi') Jul 01 12:48:27 install sphinx_automodapi with /usr/bin/python3 -m pip install sphinx_automodapi Jul 01 12:48:27 install sphinx furo theme with /usr/bin/python3 -m pip install furo ``` the two python modules are not in fedroa unfortunately. --- prep.spec.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prep.spec.inc b/prep.spec.inc index 35a0693..fe1b528 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -58,5 +58,6 @@ #endregion #region LLDB preparation -# Nothing needed here because the sources are extracted with the llvm tarball. +# Empty lldb/docs/CMakeLists.txt because we cannot build it +echo "" > lldb/docs/CMakeLists.txt #endregion From 51b8ad136cabf64cac0427b52851c27a63aed07f Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 1 Jul 2024 15:11:06 +0000 Subject: [PATCH 118/205] Filter out flaky, unresolved and broken lldb test --- check.spec.inc | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/check.spec.inc b/check.spec.inc index dfdec6f..cf997d9 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -189,6 +189,48 @@ export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_one_int.c" #endregion +#region LLDB +filter_out_tests+=("lldb-api :: functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py") + +# The following test is actually reported as lldb-unit :: Expression/./ExpressionTests/ClangHostTest/ComputeClangResourceDirectory +# It is a unit test and therefore must be filtered out using GTEST_FILTER. +# Filtering it out using LIT would mean to use a number that is not future proof: +#filter_out_tests+=("lldb-unit :: Expression/./ExpressionTests/0/47") +# NOTE: Replace slashes with dots and beware that anything behind the "-" will be filtered out. +export GTEST_FILTER="-*ClangHostTest.ComputeClangResourceDirectory*" + +# Flaky tests: +filter_out_tests+=("lldb-shell :: SymbolFile/DWARF/x86/dwp-foreign-type-units.cpp") + +# TODO(kkleine): I think I saw this test hanging at least once. Comment back in if needed. +#filter_out_tests+=("lldb-api :: commands/process/attach/TestProcessAttach.py") + +# Filter out unresolved tests: +filter_out_tests+=("lldb-api :: api/multiple-debuggers/TestMultipleDebuggers.py") +filter_out_tests+=("lldb-api :: commands/expression/multiline-completion/TestMultilineCompletion.py") +filter_out_tests+=("lldb-api :: commands/expression/multiline-navigation/TestMultilineNavigation.py") +filter_out_tests+=("lldb-api :: commands/gui/basic/TestGuiBasic.py") +filter_out_tests+=("lldb-api :: commands/gui/breakpoints/TestGuiBreakpoints.py") +filter_out_tests+=("lldb-api :: commands/gui/spawn-threads/TestGuiSpawnThreads.py") +filter_out_tests+=("lldb-api :: commands/gui/viewlarge/TestGuiViewLarge.py") +filter_out_tests+=("lldb-api :: driver/batch_mode/TestBatchMode.py") +filter_out_tests+=("lldb-api :: driver/job_control/TestJobControl.py") +filter_out_tests+=("lldb-api :: driver/quit_speed/TestQuitWithProcess.py") +filter_out_tests+=("lldb-api :: functionalities/breakpoint/breakpoint_callback_command_source/TestBreakpointCallbackCommandSource.py") +filter_out_tests+=("lldb-api :: functionalities/progress_reporting/TestTrimmedProgressReporting.py") +filter_out_tests+=("lldb-api :: functionalities/rerun_and_expr/TestRerunAndExpr.py") +filter_out_tests+=("lldb-api :: iohandler/autosuggestion/TestAutosuggestion.py") +filter_out_tests+=("lldb-api :: iohandler/completion/TestIOHandlerCompletion.py") +filter_out_tests+=("lldb-api :: iohandler/resize/TestIOHandlerResize.py") +filter_out_tests+=("lldb-api :: iohandler/sigint/TestIOHandlerPythonREPLSigint.py") +filter_out_tests+=("lldb-api :: iohandler/sigint/TestProcessIOHandlerInterrupt.py") +filter_out_tests+=("lldb-api :: iohandler/stdio/TestIOHandlerProcessSTDIO.py") +filter_out_tests+=("lldb-api :: iohandler/unicode/TestUnicode.py") +filter_out_tests+=("lldb-api :: repl/clang/TestClangREPL.py") +filter_out_tests+=("lldb-api :: terminal/TestEditline.py") +filter_out_tests+=("lldb-api :: terminal/TestSTTYBeforeAndAfter.py") +#endregion + # Prepare LIT_FILTER_OUT regex from index bash array # Join each element with a pipe symbol (regex for "or") filter_out_tests=$(printf "|%s" "${filter_out_tests[@]}") From bbf0c012f89f97b982b85748d731cb4100f11b29 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 2 Jul 2024 16:07:43 +0000 Subject: [PATCH 119/205] Don't clean after building the RPM --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ee3cd59..ee94585 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ local-rpm: setup --buildrootdir $(BUILDROOTDIR) \ --define "yyyymmdd $(YYYYMMDD)" \ --define "_disable_source_fetch 0" \ - -- $(SPEC) + -- $(SPEC) --noclean .PHONY: local-clean local-clean: From 2fdbeecccdbbfcff670e3ebed12058bb8daea1a4 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 2 Jul 2024 16:08:10 +0000 Subject: [PATCH 120/205] Remove %ldconfig_scriptlets and remove liblldb*.a files --- install.spec.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 646d6bf..0fc1424 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -285,8 +285,7 @@ fi %multilib_fix_c_header --file %{install_includedir}/lldb/Host/Config.h # remove static libraries -# TODO(kkleine): We need to remove these static libaries but not so widely, remember we're build all of LLVM. -# rm -fv %{buildroot}%{_libdir}/*.a +rm -fv %{buildroot}%{_libdir}/liblldb*.a # python: fix binary libraries location liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) @@ -295,6 +294,4 @@ ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so # remove bundled six.py rm -f %{buildroot}%{python3_sitearch}/six.* - -%ldconfig_scriptlets #endregion From d06b46b7247c830bc8744533e3adc301268a7ef1 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 2 Jul 2024 21:15:43 +0000 Subject: [PATCH 121/205] Move all BuildRequires: tags to llvm.spec See https://src.fedoraproject.org/rpms/llvm/pull-request/234#comment-206917 --- llvm.spec | 47 ++++++++++++++++++++++++++++++- packages.spec.inc | 71 +---------------------------------------------- 2 files changed, 47 insertions(+), 71 deletions(-) diff --git a/llvm.spec b/llvm.spec index 212f8b9..bb4a536 100644 --- a/llvm.spec +++ b/llvm.spec @@ -143,9 +143,54 @@ BuildRequires: libedit-devel BuildRequires: python3-devel BuildRequires: python3-setuptools -# For origin certification +# For gpg source verification BuildRequires: gnupg2 +BuildRequires: python3-rpm-macros +BuildRequires: python3-lit +BuildRequires: swig +BuildRequires: libxml2-devel +BuildRequires: doxygen + +# For clang-offload-packager +BuildRequires: elfutils-libelf-devel +BuildRequires: perl +BuildRequires: perl-Data-Dumper +BuildRequires: perl-Encode +BuildRequires: libffi-devel +BuildRequires: python3 + +BuildRequires: perl-generators + +# According to https://fedoraproject.org/wiki/Packaging:Emacs a package +# should BuildRequires: emacs if it packages emacs integration files. +BuildRequires: emacs + +BuildRequires: libatomic + +# scan-build uses these perl modules so they need to be installed in order +# to run the tests. +BuildRequires: perl(Digest::MD5) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Temp) +BuildRequires: perl(FindBin) +BuildRequires: perl(Hash::Util) +BuildRequires: perl(lib) +BuildRequires: perl(Term::ANSIColor) +BuildRequires: perl(Text::ParseWords) +BuildRequires: perl(Sys::Hostname) + +BuildRequires: graphviz + +%if %{without compat_build} +# For reproducible pyc file generation +# See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility +BuildRequires: /usr/bin/marshalparser +%global py_reproducible_pyc_path %{buildroot}%{python3_sitelib} +%endif + Requires: %{pkg_name_llvm}-libs%{?_isa} = %{version}-%{release} Provides: llvm(major) = %{maj_ver} diff --git a/packages.spec.inc b/packages.spec.inc index 59edba1..7da2dd5 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -32,7 +32,6 @@ programs that use the LLVM infrastructure. %package -n %{pkg_name_llvm}-doc Summary: Documentation for LLVM BuildArch: noarch -BuildRequires: graphviz Requires: %{pkg_name_llvm} = %{version}-%{release} %description -n %{pkg_name_llvm}-doc @@ -95,36 +94,6 @@ Statistics for the RPM build. Only available in snapshot builds. %package -n %{pkg_name_clang} Summary: A C language family front-end for LLVM -BuildRequires: libxml2-devel -BuildRequires: perl-generators - -# According to https://fedoraproject.org/wiki/Packaging:Emacs a package -# should BuildRequires: emacs if it packages emacs integration files. -BuildRequires: emacs - -BuildRequires: libatomic - -%if %{without compat_build} -# For reproducible pyc file generation -# See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility -BuildRequires: /usr/bin/marshalparser -%global py_reproducible_pyc_path %{buildroot}%{python3_sitelib} -%endif - -# scan-build uses these perl modules so they need to be installed in order -# to run the tests. -BuildRequires: perl(Digest::MD5) -BuildRequires: perl(File::Copy) -BuildRequires: perl(File::Find) -BuildRequires: perl(File::Path) -BuildRequires: perl(File::Temp) -BuildRequires: perl(FindBin) -BuildRequires: perl(Hash::Util) -BuildRequires: perl(lib) -BuildRequires: perl(Term::ANSIColor) -BuildRequires: perl(Text::ParseWords) -BuildRequires: perl(Sys::Hostname) - Requires: %{pkg_name_clang}-libs%{?_isa} = %{version}-%{release} # clang requires gcc, clang++ requires libstdc++-devel @@ -246,8 +215,6 @@ Summary: LLVM "compiler-rt" runtime libraries License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT -BuildRequires: python3 - Requires: clang-resource-filesystem%{?isa} = %{version} %description -n %{pkg_name_compiler_rt} @@ -269,13 +236,6 @@ Summary: OpenMP runtime for clang URL: http://openmp.llvm.org -# For clang-offload-packager -BuildRequires: elfutils-libelf-devel -BuildRequires: perl -BuildRequires: perl-Data-Dumper -BuildRequires: perl-Encode -BuildRequires: libffi-devel - Requires: elfutils-libelf%{?isa} %description -n %{pkg_name_libomp} @@ -302,19 +262,6 @@ URL: http://openmp.llvm.org %package -n %{pkg_name_lld} Summary: The LLVM Linker -BuildRequires: clang -BuildRequires: cmake -BuildRequires: ninja-build -BuildRequires: ncurses-devel -BuildRequires: zlib-devel - -# For make check: -BuildRequires: python3-rpm-macros -BuildRequires: python3-lit - -# For gpg source verification -BuildRequires: gnupg2 - Requires(post): %{_sbindir}/update-alternatives Requires(preun): %{_sbindir}/update-alternatives @@ -352,23 +299,8 @@ Summary: Next generation high-performance debugger License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://lldb.llvm.org/ -BuildRequires: clang -BuildRequires: cmake -BuildRequires: ncurses-devel -BuildRequires: swig -BuildRequires: libffi-devel -BuildRequires: zlib-devel -BuildRequires: libxml2-devel -BuildRequires: libedit-devel -BuildRequires: python3-lit -BuildRequires: multilib-rpm-config -BuildRequires: doxygen - Requires: python3-lldb -# For origin certification -BuildRequires: gnupg2 - %description -n %{pkg_name_lldb} LLDB is a next generation, high-performance debugger. It is built as a set of reusable components which highly leverage existing libraries in the @@ -385,8 +317,7 @@ The package contains header files for the LLDB debugger. %package -n python3-lldb %{?python_provide:%python_provide python3-lldb} Summary: Python module for LLDB -BuildRequires: python3-devel -BuildRequires: python3-setuptools + Requires: python3-six Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} From 40d89f60098904b7ca03f94b0227e1cb5d837f4d Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 2 Jul 2024 21:26:42 +0000 Subject: [PATCH 122/205] Include liblldb*.so in %files See https://src.fedoraproject.org/rpms/llvm/pull-request/234#comment-206914 --- files.spec.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 539b2b5..8225407 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -607,8 +607,7 @@ %{install_bindir}/lldb* # Usually, *.so symlinks are kept in devel subpackages. However, the python # bindings depend on this symlink at runtime. -# TODO(kkleine): This first entry is too broad. Include it back if needed but make it more narrow. -# %{install_libdir}/*.so +%{install_libdir}/liblldb*.so %{install_libdir}/liblldb.so.* %{install_libdir}/liblldbIntelFeatures.so.* From f474b07a47a84525f1376bafc80ca92c38ffb77e Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 3 Jul 2024 07:47:34 +0000 Subject: [PATCH 123/205] Makefile fixes We can prefetch the sources using spectool as usual. --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ee94585..d5ee677 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ SPEC=llvm.spec BUILDDIR=$(shell pwd)/BUILD BUILDROOTDIR=$(shell pwd)/BUILD SOURCEDIR=$(shell pwd) -FEDORA_RELEASE=f39 +FEDORA_RELEASE=f40 .PHONY: setup setup: @@ -15,6 +15,7 @@ setup: mkdir -pv $(SOURCEDIR) YYYYMMDD=$(YYYYMMDD) ./.copr/snapshot-info.sh > $(SOURCEDIR)/version.spec.inc + spectool -g --define "_sourcedir $(SOURCEDIR)" llvm.spec .PHONY: local-srpm local-srpm: setup @@ -22,7 +23,6 @@ local-srpm: setup --define "yyyymmdd $(YYYYMMDD)" \ --define "_srcrpmdir $(OUTDIR)" \ --define "_sourcedir $(SOURCEDIR)" \ - --define "_disable_source_fetch 0" \ -bs $(SPEC) .PHONY: local-rpm @@ -32,7 +32,6 @@ local-rpm: setup --builddir $(BUILDDIR) \ --buildrootdir $(BUILDROOTDIR) \ --define "yyyymmdd $(YYYYMMDD)" \ - --define "_disable_source_fetch 0" \ -- $(SPEC) --noclean .PHONY: local-clean @@ -55,7 +54,6 @@ local-list-check: setup --builddir $(BUILDDIR) \ --buildrootdir $(BUILDROOTDIR) \ --define "yyyymmdd $(YYYYMMDD)" \ - --define "_disable_source_fetch 0" \ -- $(SPEC) -bl .PHONY: local-prep @@ -65,7 +63,6 @@ local-prep: setup --builddir $(BUILDDIR) \ --buildrootdir $(BUILDROOTDIR) \ --define "yyyymmdd $(YYYYMMDD)" \ - --define "_disable_source_fetch 0" \ -- $(SPEC) From d8be89d90c0ef7cb70524decddab6d3be7888adc Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 3 Jul 2024 07:48:20 +0000 Subject: [PATCH 124/205] Add another flaky lldb test to exclude list This test seems flaky: lldb-api :: functionalities/fork/concurrent_vfork/TestConcurrentVFork.py --- check.spec.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index cf997d9..0eeaebe 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -190,8 +190,6 @@ export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_one_int.c" #endregion #region LLDB -filter_out_tests+=("lldb-api :: functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py") - # The following test is actually reported as lldb-unit :: Expression/./ExpressionTests/ClangHostTest/ComputeClangResourceDirectory # It is a unit test and therefore must be filtered out using GTEST_FILTER. # Filtering it out using LIT would mean to use a number that is not future proof: @@ -201,6 +199,8 @@ export GTEST_FILTER="-*ClangHostTest.ComputeClangResourceDirectory*" # Flaky tests: filter_out_tests+=("lldb-shell :: SymbolFile/DWARF/x86/dwp-foreign-type-units.cpp") +filter_out_tests+=("lldb-api :: functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py") +filter_out_tests+=("lldb-api :: functionalities/fork/concurrent_vfork/TestConcurrentVFork.py") # TODO(kkleine): I think I saw this test hanging at least once. Comment back in if needed. #filter_out_tests+=("lldb-api :: commands/process/attach/TestProcessAttach.py") From 3c82b12f115d6739a94d939265e1eeb3c362ae0a Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 2 Jul 2024 09:39:32 -0300 Subject: [PATCH 125/205] Add subpackage llvm-toolset Related: RHEL-45729 --- files.spec.inc | 7 +++++++ packages.spec.inc | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index 8225407..98e9751 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -601,6 +601,13 @@ #endregion +#region Toolset files +%if 0%{?rhel} +%files -n %{pkg_name_llvm}-toolset +%license LICENSE.TXT +%endif +#endregion + #region LLDB files %files -n %{pkg_name_lldb} %license lldb/LICENSE.TXT diff --git a/packages.spec.inc b/packages.spec.inc index 7da2dd5..5f2a519 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -292,6 +292,19 @@ Shared libraries for LLD. #endregion +#region Toolset package +%if 0%{?rhel} +%package -n %{pkg_name_llvm}-toolset +Summary: Package that installs llvm-toolset +Requires: clang = %{version} +Requires: llvm = %{version} +Requires: lld = %{version} + +%description -n %{pkg_name_llvm}-toolset +This is the main package for llvm-toolset. +%endif +#endregion + #region LLDB packages %package -n %{pkg_name_lldb} From 7a17ad996702fdfded7e7fa3366b2fb4ae4d9ac9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 8 Jul 2024 11:19:40 +0200 Subject: [PATCH 126/205] Only ship libclang* in clang-libs Previously we were also shipping libLLVM* and libLLD*. --- files.spec.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index 98e9751..28b0018 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -341,7 +341,8 @@ %files -n %{pkg_name_clang}-libs %license clang/LICENSE.TXT %{install_prefix}/lib/clang/%{maj_ver}/include/* -%{install_libdir}/*.so.* +%{install_libdir}/libclang.so.* +%{install_libdir}/libclang-cpp.so.* %files -n %{pkg_name_clang}-devel %license clang/LICENSE.TXT From 9a3a566d6cb3bafd4bd009c387581e0d137928ff Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 8 Jul 2024 12:32:57 +0200 Subject: [PATCH 127/205] Fix python3-clang Drop confusing `cd ..` so we stay in the root of the LLVM sources and the install command succeeds. --- install.spec.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 0fc1424..5f4a43b 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -98,8 +98,6 @@ touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix} mkdir -p %{buildroot}%{pkg_datadir}/llvm/cmake cp -Rv cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake -cd .. - #endregion #region CLANG installation @@ -134,7 +132,7 @@ mkdir -p %{buildroot}%{python3_sitelib}/clang/ # install: omitting directory 'bindings/python/clang/__pycache__' # NOTE: this only happens if we include the gdb plugin of libomp. # Remove the plugin with command and we're good: rm -rf %{buildroot}/%{_datarootdir}/gdb -install -p -m644 clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/ || true +install -p -m644 clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/ %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/clang # install scanbuild-py to python sitelib. @@ -268,7 +266,7 @@ done # https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ touch %{buildroot}%{_bindir}/ld -install -D -m 644 -t %{buildroot}%{_mandir}/man1/ %{src_tarball_dir}/lld/docs/ld.lld.1 +install -D -m 644 -t %{buildroot}%{_mandir}/man1/ lld/docs/ld.lld.1 %post -n %{pkg_name_lld} %{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 From c59ccd73026c2e79b62493f6ad82191eb6608827 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 9 Jul 2024 14:28:12 +0000 Subject: [PATCH 128/205] Remove compact_unwind_encoding.h patch This is no longer necessary now that we're building from the monorepo. --- ...-compact_unwind_encoding.h-from-libu.patch | 497 ------------------ install.spec.inc | 3 - patches.spec.inc | 3 +- 3 files changed, 1 insertion(+), 502 deletions(-) delete mode 100644 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch diff --git a/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch b/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch deleted file mode 100644 index 8d31209..0000000 --- a/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch +++ /dev/null @@ -1,497 +0,0 @@ -From 9df81767571465ef1f2e7370299e21c64fe34f40 Mon Sep 17 00:00:00 2001 -From: serge-sans-paille -Date: Thu, 25 Feb 2021 14:24:14 +0100 -Subject: [PATCH][lld] Import compact_unwind_encoding.h from libunwind - -This avoids an implicit cross package dependency ---- - lld/include/mach-o/compact_unwind_encoding.h | 477 +++++++++++++++++++ - 1 file changed, 477 insertions(+) - create mode 100644 lld/include/mach-o/compact_unwind_encoding.h - -diff --git a/lld/include/mach-o/compact_unwind_encoding.h b/lld/include/mach-o/compact_unwind_encoding.h -new file mode 100644 -index 000000000000..5301b1055ef9 ---- /dev/null -+++ b/lld/include/mach-o/compact_unwind_encoding.h -@@ -0,0 +1,477 @@ -+//===------------------ mach-o/compact_unwind_encoding.h ------------------===// -+// -+// 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 -+ --- -2.30.2 - diff --git a/install.spec.inc b/install.spec.inc index 5f4a43b..b3aebc5 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -251,9 +251,6 @@ rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay # Remove LLD's HTML documentation files rm -Rvf %{buildroot}%{_docdir}/LLVM/lld/html -# This is generated by Patch1 during build and (probably) must be removed afterward -rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h - %if %{with compat_build} # Add version suffix to binaries mkdir -p %{buildroot}%{_bindir} diff --git a/patches.spec.inc b/patches.spec.inc index a6bbc88..35db509 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -8,8 +8,7 @@ Patch2002: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch #region LLD patches -Patch3001: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch -Patch3002: 0001-Always-build-shared-libs-for-LLD.patch +Patch3001: 0001-Always-build-shared-libs-for-LLD.patch #endregion # # Drop the following patch after debugedit adds support to DWARF-5: From ed430189249eca3de87437e3610130a535e0b10c Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 5 Jul 2024 15:21:26 +0000 Subject: [PATCH 129/205] Reorganize %check section --- build.spec.inc | 3 + check.spec.inc | 168 ++++++++++++++++++++++++++----------------------- 2 files changed, 94 insertions(+), 77 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index fa45e65..84c7ec8 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -193,6 +193,9 @@ cd llvm -DLLDB_DISABLE_PYTHON:BOOL=OFF \ -DPYTHON_VERSION_MAJOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.major)") \ -DPYTHON_VERSION_MINOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.minor)") \ +%ifarch ppc64le + -DLLDB_TEST_USER_ARGS=--skip-category=watchpoint \ +%endif \ \ \ diff --git a/check.spec.inc b/check.spec.inc index 0eeaebe..5cd429d 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -12,32 +12,87 @@ rm llvm/test/tools/dsymutil/X86/swift-interface.test %if %{with check} -# See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-xfail -export LIT_XFAIL="" +cd llvm -# See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-filter-out -# Unfortunately LIT_FILTER_OUT is not accepting a list but a regular expression. -# To make this easily maintainable, we'll create an associate array in bash, -# to which you can append and later we'll join that array and escpate dots (".") -# in your test paths. -declare -a filter_out_tests +#region Helper functions -#region LLVM xfail tests +# Call this function before setting up a next component to test. +function reset_test_opts() +{ + # Some libraries will not be found if we don't set this + export LD_LIBRARY_PATH="%{buildroot}/%{install_libdir}:%{buildroot}/%{_libdir}"; -# Xfail testing of update utility tools -# LLVM :: -export LIT_XFAIL="$LIT_XFAIL;tools/UpdateTestChecks" + # See https://llvm.org/docs/CommandGuide/lit.html#general-options + export LIT_OPTS="-vv" + + # Set to mark tests as expected to fail. + # See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-xfail + unset LIT_XFAIL + + # Set to mark tests to not even run. + # See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-filter-out + # Unfortunately LIT_FILTER_OUT is not accepting a list but a regular expression. + # To make this easily maintainable, we'll create an associate array in bash, + # to which you can append and later we'll join that array and escape dots (".") + # in your test paths. The following line resets this array. + # See also the function "test_list_to_regex". + test_list_filter_out=() + unset LIT_FILTER_OUT + + # Set for filtering out unit tests. + # See http://google.github.io/googletest/advanced.html#running-a-subset-of-the-tests + unset GTEST_FILTER +} + +# Convert array of test names into a regex. +# Call this function with an indexed array. +# +# Example: +# +# testlist=() +# testlist+=("foo") +# testlist+=("bar") +# export LIT_FILTER_OUT=$(test_list_to_regex testlist) +# +# Then $LIT_FILTER_OUT should evaluate to: (foo|bar) +function test_list_to_regex() +{ + local -n arr=$1 + # Prepare LIT_FILTER_OUT regex from index bash array + # Join each element with a pipe symbol (regex for "or") + arr=$(printf "|%s" "${arr[@]}") + # Remove the initial pipe symbol + arr=${arr:1} + # Properly escape path dots (".") for use in regular expression + arr=$(echo $arr | sed 's/\./\\./g') + # Add enclosing parenthesis + echo "($arr)" +} #endregion -#region CLANG xfail tests +#region Test LLVM + +reset_test_opts +# Xfail testing of update utility tools +export LIT_XFAIL="tools/UpdateTestChecks" +%cmake_build --target check-llvm + +#endregion + +#region Test CLANG + +reset_test_opts -# Clang :: export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c" +%cmake_build --target check-clang + #endregion -#region OPENMP xfail tests +#region Test OPENMP + +reset_test_opts # TODO(kkleine): OpenMP tests are currently not run on rawhide (see https://bugzilla.redhat.com/show_bug.cgi?id=2252966): # @@ -51,7 +106,7 @@ export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c" # gdb.error: No symbol "ompd_sizeof____kmp_gtid" in current context # # NOTE: It could be a different symbol in some tests. -export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_curr_task_handle.c" +export LIT_XFAIL="api_tests/test_ompd_get_curr_task_handle.c" export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_enclosing_parallel_handle.c" export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_generating_task_handle.c" export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_icv_from_scope.c" @@ -75,7 +130,9 @@ export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_display_control_vars.c" export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_handle.c" # The following test is flaky and we'll filter it out -filter_out_tests+=("libomp :: ompt/teams/distribute_dispatch.c") +test_list_filter_out+=("libomp :: ompt/teams/distribute_dispatch.c") +test_list_filter_out+=("libomp :: affinity/kmp-abs-hw-subset.c") +test_list_filter_out+=("libarcher :: races/task-taskgroup-unrelated.c") # The following tests seem pass on ppc64le and x86_64 and aarch64 only: %ifnarch ppc64le x86_64 s390x aarch64 @@ -187,77 +244,34 @@ export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_LTLEGE_int.c" export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_one_int.c" %endif +export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out) + +%cmake_build --target check-openmp + #endregion -#region LLDB -# The following test is actually reported as lldb-unit :: Expression/./ExpressionTests/ClangHostTest/ComputeClangResourceDirectory -# It is a unit test and therefore must be filtered out using GTEST_FILTER. -# Filtering it out using LIT would mean to use a number that is not future proof: -#filter_out_tests+=("lldb-unit :: Expression/./ExpressionTests/0/47") -# NOTE: Replace slashes with dots and beware that anything behind the "-" will be filtered out. -export GTEST_FILTER="-*ClangHostTest.ComputeClangResourceDirectory*" - -# Flaky tests: -filter_out_tests+=("lldb-shell :: SymbolFile/DWARF/x86/dwp-foreign-type-units.cpp") -filter_out_tests+=("lldb-api :: functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py") -filter_out_tests+=("lldb-api :: functionalities/fork/concurrent_vfork/TestConcurrentVFork.py") - -# TODO(kkleine): I think I saw this test hanging at least once. Comment back in if needed. -#filter_out_tests+=("lldb-api :: commands/process/attach/TestProcessAttach.py") - -# Filter out unresolved tests: -filter_out_tests+=("lldb-api :: api/multiple-debuggers/TestMultipleDebuggers.py") -filter_out_tests+=("lldb-api :: commands/expression/multiline-completion/TestMultilineCompletion.py") -filter_out_tests+=("lldb-api :: commands/expression/multiline-navigation/TestMultilineNavigation.py") -filter_out_tests+=("lldb-api :: commands/gui/basic/TestGuiBasic.py") -filter_out_tests+=("lldb-api :: commands/gui/breakpoints/TestGuiBreakpoints.py") -filter_out_tests+=("lldb-api :: commands/gui/spawn-threads/TestGuiSpawnThreads.py") -filter_out_tests+=("lldb-api :: commands/gui/viewlarge/TestGuiViewLarge.py") -filter_out_tests+=("lldb-api :: driver/batch_mode/TestBatchMode.py") -filter_out_tests+=("lldb-api :: driver/job_control/TestJobControl.py") -filter_out_tests+=("lldb-api :: driver/quit_speed/TestQuitWithProcess.py") -filter_out_tests+=("lldb-api :: functionalities/breakpoint/breakpoint_callback_command_source/TestBreakpointCallbackCommandSource.py") -filter_out_tests+=("lldb-api :: functionalities/progress_reporting/TestTrimmedProgressReporting.py") -filter_out_tests+=("lldb-api :: functionalities/rerun_and_expr/TestRerunAndExpr.py") -filter_out_tests+=("lldb-api :: iohandler/autosuggestion/TestAutosuggestion.py") -filter_out_tests+=("lldb-api :: iohandler/completion/TestIOHandlerCompletion.py") -filter_out_tests+=("lldb-api :: iohandler/resize/TestIOHandlerResize.py") -filter_out_tests+=("lldb-api :: iohandler/sigint/TestIOHandlerPythonREPLSigint.py") -filter_out_tests+=("lldb-api :: iohandler/sigint/TestProcessIOHandlerInterrupt.py") -filter_out_tests+=("lldb-api :: iohandler/stdio/TestIOHandlerProcessSTDIO.py") -filter_out_tests+=("lldb-api :: iohandler/unicode/TestUnicode.py") -filter_out_tests+=("lldb-api :: repl/clang/TestClangREPL.py") -filter_out_tests+=("lldb-api :: terminal/TestEditline.py") -filter_out_tests+=("lldb-api :: terminal/TestSTTYBeforeAndAfter.py") -#endregion - -# Prepare LIT_FILTER_OUT regex from index bash array -# Join each element with a pipe symbol (regex for "or") -filter_out_tests=$(printf "|%s" "${filter_out_tests[@]}") -# Remove the initial pipe symbol -filter_out_tests=${filter_out_tests:1} -# Properly escape path dots (".") for use in regular expression -filter_out_tests=$(echo $filter_out_tests | sed 's/\./\\./g') -# Add enclosing parenthesis -export LIT_FILTER_OUT="($filter_out_tests)" - -export LIT_OPTS="-vv" - -export LD_LIBRARY_PATH="%{buildroot}/%{install_libdir}:%{buildroot}/%{_libdir}"; - -cd llvm -%cmake_build --target check-llvm check-clang check-lld check-lldb - +#region Test LLDB +reset_test_opts +# Don't run check-lldb on s390x because more than 150 tests are failing there +%ifnarch s390x +%cmake_build --target check-lldb %endif +#endregion -#region LLD +#region Test LLD + +reset_test_opts %if %{without compat_build} %ldconfig_scriptlets -n %{pkg_name_lld}-libs %endif +%cmake_build --target check-lld + #endregion +%endif + %if %{with snapshot_build} # Do this here instead of in install so the check targets are also included. cp %{_vpath_builddir}/.ninja_log %{buildroot}%{pkg_datadir} From d2784c597d453c1b5ade27f7c227d429f69d7ef8 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 5 Jul 2024 19:19:24 +0000 Subject: [PATCH 130/205] lldb: add BuildRequires: procps-ng This is to mitigate `/bin/sh: line 1: ps: command not found` in the build logs. --- llvm.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm.spec b/llvm.spec index bb4a536..f3296b0 100644 --- a/llvm.spec +++ b/llvm.spec @@ -184,6 +184,9 @@ BuildRequires: perl(Sys::Hostname) BuildRequires: graphviz +# This is required because we need "ps" when running LLDB tests +BuildRequires: procps-ng + %if %{without compat_build} # For reproducible pyc file generation # See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility From 67ad348eff5898c12962b460b38ac37c01941547 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 5 Jul 2024 19:23:26 +0000 Subject: [PATCH 131/205] lld: move ldconfig_scriptlets into llvm.spec --- check.spec.inc | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index 5cd429d..cc1850c 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -15,7 +15,6 @@ rm llvm/test/tools/dsymutil/X86/swift-interface.test cd llvm #region Helper functions - # Call this function before setting up a next component to test. function reset_test_opts() { @@ -68,30 +67,22 @@ function test_list_to_regex() # Add enclosing parenthesis echo "($arr)" } - #endregion #region Test LLVM - reset_test_opts # Xfail testing of update utility tools export LIT_XFAIL="tools/UpdateTestChecks" %cmake_build --target check-llvm - #endregion #region Test CLANG - reset_test_opts - export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c" - %cmake_build --target check-clang - #endregion #region Test OPENMP - reset_test_opts # TODO(kkleine): OpenMP tests are currently not run on rawhide (see https://bugzilla.redhat.com/show_bug.cgi?id=2252966): @@ -247,7 +238,6 @@ export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_one_int.c" export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out) %cmake_build --target check-openmp - #endregion #region Test LLDB @@ -259,15 +249,8 @@ reset_test_opts #endregion #region Test LLD - reset_test_opts - -%if %{without compat_build} -%ldconfig_scriptlets -n %{pkg_name_lld}-libs -%endif - %cmake_build --target check-lld - #endregion %endif From a3b9c83bd0436d5e1ab5e1d2d17cd7a813b49d9d Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 9 Jul 2024 19:04:42 +0000 Subject: [PATCH 132/205] Remove timestamp prefix in log lines With the llvm-build-stats we have what we wanted. --- llvm.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/llvm.spec b/llvm.spec index f3296b0..5701a28 100644 --- a/llvm.spec +++ b/llvm.spec @@ -112,9 +112,6 @@ URL: http://llvm.org %include %{_sourcedir}/patches.spec.inc -%if %{undefined rhel} -BuildRequires: moreutils -%endif BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang From af1c7f659965c27e52569a873643710818d6e5fc Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 10 Jul 2024 12:52:46 +0000 Subject: [PATCH 133/205] lldb: fix ModuleNotFoundError: No module named 'pexpect' We've seen a lot of tests that were missing the pexpect python module and that resulted in a state of [`UNRESOLVED`](https://llvm.org/docs/CommandGuide/lit.html). --- llvm.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm.spec b/llvm.spec index 5701a28..6067ab1 100644 --- a/llvm.spec +++ b/llvm.spec @@ -181,6 +181,9 @@ BuildRequires: perl(Sys::Hostname) BuildRequires: graphviz +# This is required because of "ModuleNotFoundError: No module named 'pexpect'" when running LLDB tests. +BuildRequires: python3-pexpect + # This is required because we need "ps" when running LLDB tests BuildRequires: procps-ng From be3aa829cbb6dcdb82ef3af8da8b50763ef35ce6 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 11 Jul 2024 11:36:42 +0000 Subject: [PATCH 134/205] lldb: disable tests for lldb --- check.spec.inc | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index cc1850c..b13e041 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -240,13 +240,25 @@ export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out) %cmake_build --target check-openmp #endregion -#region Test LLDB -reset_test_opts -# Don't run check-lldb on s390x because more than 150 tests are failing there -%ifnarch s390x -%cmake_build --target check-lldb -%endif -#endregion +## TODO(kkleine): Come back and re-enable testing for LLDB +## # Don't run LLDB tests on s390x because more than 150 tests are failing there +## %ifnarch s390x +## #region LLDB unit tests +## reset_test_opts +## %cmake_build --target check-lldb-unit +## #endregion +## +## #region LLDB SB API tests +## reset_test_opts +## %cmake_build --target check-lldb-api +## #endregion +## +## #region LLDB shell tests +## reset_test_opts +## %cmake_build --target check-lldb-shell +## #endregion +## %endif + #region Test LLD reset_test_opts From 361c194ff04a23f86088215b3736d3ff670fafea Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 11 Jul 2024 11:37:05 +0000 Subject: [PATCH 135/205] lldb: Fail to configure if certain requirements are not met for testing --- build.spec.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/build.spec.inc b/build.spec.inc index 84c7ec8..a7dc2d7 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -196,6 +196,7 @@ cd llvm %ifarch ppc64le -DLLDB_TEST_USER_ARGS=--skip-category=watchpoint \ %endif + -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL=ON \ \ \ \ From 7f69c7ebdfa8e194d89dc51a0099d02559d81a5e Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 17 May 2024 09:27:48 +0000 Subject: [PATCH 136/205] Prepare non-snapshot builds Remove version.spec.inc from git ================================ We no longer track `version.spec.inc` in git. This is useful for development. If we build a snapshot, the file is required but if we build a `release` build (see below), then we don't include it. Make improvements ================= We distinguish between `snapshot-` and `release-` builds now in the `Makefile`. These old targets are mapped to their new counterparts and a deprecation warning is shown: * `setup` -> `snapshot-setup` * `local-rpm` -> `snapshot-rpm` * `local-srpm` -> `snapshot-srpm` * `local-prep` -> `snapshot-prep` * `local-clean` -> `snapshot-clean` We also have these new Make targets that run the build process with a release tarball instead: * `release-setup` * `release-rpm` * `release-srpm` * `release-prep` * `release-clean` The targets `local-list-check` and `local-tmt-vm` have been commented out because I think they were not needed. I just kept them for future reference of research done in those areas. All builds described by the `Makefile` are still local and no `mock` is involved. I find this the easiest to debug. Toggle default bcond state for snapshot_build ============================================= We want to be able to build non-snapshot releases with this repo. That's why be default the build condition `snapshot_build` is off. So only when you explicitly enable `--with=snapshot_build` or define `--define "_with_snapshot_build 1"` you'll be able to build a snapshot. If however the build happens in Copr with a namespace that begins with `fedora-llvm-team/llvm-snapshots-`, then the build condition is ON by default and there's no need to enable it explicitly with `--with=snapshot_build`. Things related to release update ================================ * Add llvm-project tarball and signature to sources * Fix: error: source 1001 defined multiple times * Fix: error: source 1006 defined multiple times * Fix missing newline * Conditionally apply 0001-Always-build-shared-libs-for-LLD.patch * Only enable offload runtime in snapshot mode Misc. ===== * Add missing prep dependency --- .copr/snapshot-info.sh | 2 + .gitignore | 1 + Makefile | 202 +++++++++++++++++++++++++++-------------- build.spec.inc | 4 + changelog.spec.inc | 3 + globals.spec.inc | 4 +- patches.spec.inc | 4 +- prep.spec.inc | 2 +- sources.spec.inc | 6 +- version.spec.inc | 15 --- 10 files changed, 152 insertions(+), 91 deletions(-) delete mode 100644 version.spec.inc diff --git a/.copr/snapshot-info.sh b/.copr/snapshot-info.sh index 70cfb4f..db44c56 100755 --- a/.copr/snapshot-info.sh +++ b/.copr/snapshot-info.sh @@ -34,6 +34,7 @@ llvm_snapshot_changelog_entry="* $(date +'%a %b %d %Y') LLVM snapshot - ${llvm_s tempfile=$(mktemp) cat > $tempfile < $tempfile < $(SOURCEDIR)/version.spec.inc - spectool -g --define "_sourcedir $(SOURCEDIR)" llvm.spec + spectool -g --define "_sourcedir $(SOURCEDIR)" --define "_with_snapshot_build 1" $(SPEC) -.PHONY: local-srpm -local-srpm: setup +.PHONY: release-setup +release-setup: release-vars prep + spectool -g --define "_sourcedir $(SOURCEDIR)" $(SPEC) + +.PHONY: snapshot-srpm +snapshot-srpm: snapshot-setup rpmbuild \ - --define "yyyymmdd $(YYYYMMDD)" \ - --define "_srcrpmdir $(OUTDIR)" \ + --with=snapshot_build \ + --define "_rpmdir $(RESULTDIR)" \ --define "_sourcedir $(SOURCEDIR)" \ + --define "_specdir $(SOURCEDIR)" \ + --define "_srcrpmdir $(RESULTDIR)" \ + --define "_builddir $(RESULTDIR)" \ -bs $(SPEC) -.PHONY: local-rpm -local-rpm: setup - fedpkg --release $(FEDORA_RELEASE) -v \ - local \ - --builddir $(BUILDDIR) \ - --buildrootdir $(BUILDROOTDIR) \ - --define "yyyymmdd $(YYYYMMDD)" \ - -- $(SPEC) --noclean +.PHONY: release-srpm +release-srpm: release-setup + rpmbuild \ + --define "_rpmdir $(RESULTDIR)" \ + --define "_sourcedir $(SOURCEDIR)" \ + --define "_specdir $(SOURCEDIR)" \ + --define "_srcrpmdir $(RESULTDIR)" \ + --define "_builddir $(RESULTDIR)" \ + -bs $(SPEC) -.PHONY: local-clean -local-clean: - -rm -rf $(BUILDDIR) - -rm -rf $(BUILDROOTDIR) - -rm -rf $(OUTDIR) +.PHONY: snapshot-rpm +snapshot-rpm: snapshot-setup + rpmbuild \ + --with=snapshot_build \ + --define "_rpmdir $(RESULTDIR)" \ + --define "_sourcedir $(SOURCEDIR)" \ + --define "_specdir $(SOURCEDIR)" \ + --define "_srcrpmdir $(RESULTDIR)" \ + --define "_builddir $(RESULTDIR)" \ + --noclean \ + -bb $(SPEC) + +.PHONY: release-rpm +release-rpm: release-setup + rpmbuild \ + --define "_rpmdir $(RESULTDIR)" \ + --define "_sourcedir $(SOURCEDIR)" \ + --define "_specdir $(SOURCEDIR)" \ + --define "_srcrpmdir $(RESULTDIR)" \ + --define "_builddir $(RESULTDIR)" \ + --noclean \ + -bb $(SPEC) + +.PHONY: snapshot-clean +snapshot-clean: snapshot-vars _clean + +.PHONY: release-clean +release-clean: release-vars _clean + +.PHONY: _clean +_clean: + -rm -rf $(RESULTDIR) -rm -f *.txt -rm -f *.tar.xz -rm -f *.tar.xz.sig - -rm -rf x86_64 + -rm -rf $(shell uname -m) -rm -rf noarch -rm -rf *.src.rpm -rm -rf /tmp/lto-llvm-*.o -.PHONY: local-list-check -local-list-check: setup - fedpkg --release $(FEDORA_RELEASE) -v \ - local \ - --builddir $(BUILDDIR) \ - --buildrootdir $(BUILDROOTDIR) \ - --define "yyyymmdd $(YYYYMMDD)" \ - -- $(SPEC) -bl +.PHONY: snapshot-prep +snapshot-prep: snapshot-setup + rpmbuild \ + --with=snapshot_build \ + --define "_rpmdir $(RESULTDIR)" \ + --define "_sourcedir $(SOURCEDIR)" \ + --define "_specdir $(SOURCEDIR)" \ + --define "_srcrpmdir $(RESULTDIR)" \ + --define "_builddir $(RESULTDIR)" \ + --noclean \ + -bp $(SPEC) -.PHONY: local-prep -local-prep: setup - fedpkg --release $(FEDORA_RELEASE) -v \ - prep \ - --builddir $(BUILDDIR) \ - --buildrootdir $(BUILDROOTDIR) \ - --define "yyyymmdd $(YYYYMMDD)" \ - -- $(SPEC) +.PHONY: release-prep +release-prep: releae-setup + rpmbuild \ + --define "_rpmdir $(RESULTDIR)" \ + --define "_sourcedir $(SOURCEDIR)" \ + --define "_specdir $(SOURCEDIR)" \ + --define "_srcrpmdir $(RESULTDIR)" \ + --define "_builddir $(RESULTDIR)" \ + --noclean \ + -bp $(SPEC) +# .PHONY: local-list-check +# local-list-check: setup +# fedpkg --release $(FEDORA_RELEASE) -v \ +# local \ +# --builddir $(BUILDDIR) \ +# --buildrootdir $(BUILDROOTDIR) \ +# +# --with=snapshot_build \ +# -- $(SPEC) -bl -.PHONY: local-tmt-vm -local-tmt-vm: - # This is to ensure the required packages are installed - rpm -q tmt tmt+provision-virtual - # This is to check if you've started libvirt - # If this fails, run: sudo systemctl start libvirtd - # systemctl status libvirtd --no-pager - # In case of: Failed to boot testcloud instance (authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage') - # Add yourself to libvirt group: sudo usermod -a -G libvirt $USER - cat /etc/group | grep libvirt | grep $(USER) - tmt \ - -c distro=fedora-rawhide \ - -c arch=x86_64 \ - -c snapshot=20240124 - run \ - -avv \ - provision \ - -h virtual.testcloud \ - -c system \ - -i fedora-rawhide \ - prepare \ - -h install \ - -c fedora-llvm-team/llvm-snapshots-big-merge-20240124 \ - test \ - report +# .PHONY: local-tmt-vm +# local-tmt-vm: +# # This is to ensure the required packages are installed +# rpm -q tmt tmt+provision-virtual +# # This is to check if you've started libvirt +# # If this fails, run: sudo systemctl start libvirtd +# # systemctl status libvirtd --no-pager +# # In case of: Failed to boot testcloud instance (authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage') +# # Add yourself to libvirt group: sudo usermod -a -G libvirt $USER +# cat /etc/group | grep libvirt | grep $(USER) +# tmt \ +# -c distro=fedora-rawhide \ +# -c arch=x86_64 \ +# -c snapshot=20240124 +# run \ +# -avv \ +# provision \ +# -h virtual.testcloud \ +# -c system \ +# -i fedora-rawhide \ +# prepare \ +# -h install \ +# -c fedora-llvm-team/llvm-snapshots-big-merge-20240124 \ +# test \ +# report diff --git a/build.spec.inc b/build.spec.inc index a7dc2d7..fae3830 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -73,7 +73,11 @@ cd llvm \ \ %if %{without compat_build} +%if %{with snapshot_build} -DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp;offload" \ +%else +-DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp" \ +%endif %endif \ \ diff --git a/changelog.spec.inc b/changelog.spec.inc index 2299b19..8f7babd 100644 --- a/changelog.spec.inc +++ b/changelog.spec.inc @@ -1,5 +1,8 @@ %{?llvm_snapshot_changelog_entry} +* Fri May 17 2024 Konrad Kleine - 18.1.5 +- Update to 18.1.5 + * Tue Aug 01 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-2 - Enable LLVM_UNREACHABLE_OPTIMIZE temporarily diff --git a/globals.spec.inc b/globals.spec.inc index ce25d34..1513a84 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -1,4 +1,3 @@ -%bcond_without snapshot_build # Components enabled if supported by target architecture: %define gold_arches %{ix86} x86_64 aarch64 %{power64} s390x %ifarch %{gold_arches} @@ -29,9 +28,10 @@ %undefine _include_frame_pointers # Suffixless tarball name (essentially: basename -s .tar.xz llvm-project-17.0.6.src.tar.xz) -%global src_tarball_dir llvm-project-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src %if %{with snapshot_build} %global src_tarball_dir llvm-project-%{llvm_snapshot_git_revision} +%else +%global src_tarball_dir llvm-project-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src %endif #region LLVM globals diff --git a/patches.spec.inc b/patches.spec.inc index 35db509..629863a 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -8,7 +8,9 @@ Patch2002: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch #region LLD patches -Patch3001: 0001-Always-build-shared-libs-for-LLD.patch +%if %{with snapshot_build} +Patch3002: 0001-Always-build-shared-libs-for-LLD.patch +%endif #endregion # # Drop the following patch after debugedit adds support to DWARF-5: diff --git a/prep.spec.inc b/prep.spec.inc index fe1b528..9a4cd2f 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -1,6 +1,6 @@ %if %{without snapshot_build} # llvm -%{gpgverify} --keyring='%{SOURCE1006}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %endif # -T : Do Not Perform Default Archive Unpacking (without this, the th source would be unpacked twice) diff --git a/sources.spec.inc b/sources.spec.inc index df2ec47..321b787 100644 --- a/sources.spec.inc +++ b/sources.spec.inc @@ -2,8 +2,8 @@ Source0: https://github.com/llvm/llvm-project/archive/%{llvm_snapshot_git_revision}.tar.gz %else Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz -Source1001: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz.sig -Source1006: release-keys.asc +Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz.sig +Source6: release-keys.asc %endif %if %{without compat_build} @@ -12,7 +12,9 @@ Source2005: macros.%{pkg_name_clang} # Sources we use to split up the main spec file in sections so that we can more # easily see what specfile sections are touched by a patch. +%if %{with snapshot_build} Source1000: version.spec.inc +%endif Source1001: build.spec.inc Source1002: changelog.spec.inc Source1003: check.spec.inc diff --git a/version.spec.inc b/version.spec.inc deleted file mode 100644 index 4d6a882..0000000 --- a/version.spec.inc +++ /dev/null @@ -1,15 +0,0 @@ -%global maj_ver 18 -%global min_ver 0 -%global patch_ver 0 -%undefine rc_ver - -%global llvm_snapshot_version 18.0.0 -%global llvm_snapshot_version_tag 18.0.0~pre20231225.ga041da31093303 -%global llvm_snapshot_version_major 18 -%global llvm_snapshot_version_minor 0 -%global llvm_snapshot_version_patch 0 -%global llvm_snapshot_yyyymmdd 20231225 -%global llvm_snapshot_git_revision a041da31093303b02b6da5fe919a0a3c234eb466 -%global llvm_snapshot_git_revision_short a041da31093303 -%global llvm_snapshot_version_suffix pre20231225.ga041da31093303 -%global llvm_snapshot_changelog_entry * Mon Dec 25 2023 LLVM snapshot - 18.0.0~pre20231225.ga041da31093303 From 9552a8f6c7263af060e6b15e18f97898b84cda38 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Jul 2024 09:52:51 +0200 Subject: [PATCH 137/205] Actually disable lldb tests Make sure to use %% for macros inside comments. --- check.spec.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index b13e041..6126915 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -240,24 +240,24 @@ export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out) %cmake_build --target check-openmp #endregion +# Don't run LLDB tests on s390x because more than 150 tests are failing there +%ifnarch s390x ## TODO(kkleine): Come back and re-enable testing for LLDB -## # Don't run LLDB tests on s390x because more than 150 tests are failing there -## %ifnarch s390x ## #region LLDB unit tests ## reset_test_opts -## %cmake_build --target check-lldb-unit +## %%cmake_build --target check-lldb-unit ## #endregion ## ## #region LLDB SB API tests ## reset_test_opts -## %cmake_build --target check-lldb-api +## %%cmake_build --target check-lldb-api ## #endregion ## ## #region LLDB shell tests ## reset_test_opts -## %cmake_build --target check-lldb-shell +## %%cmake_build --target check-lldb-shell ## #endregion -## %endif +%endif #region Test LLD From f553e4d7d0bc6e73156827146e94fdd8457c51c7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Jul 2024 12:04:40 +0200 Subject: [PATCH 138/205] Don't xfail omp_collapse tests on ppc64le The tests pass: https://download.copr.fedorainfracloud.org/results/@fedora-llvm-team/llvm-snapshots-big-merge-20240716/fedora-rawhide-ppc64le/07737001-llvm/builder-live.log.gz The tests do fail on s390x. Note that the thread_state_{1,2}.c tests are already part of the ppc64le exclusive xfail list above, so we can make this one specific to s390x. --- check.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check.spec.inc b/check.spec.inc index 6126915..0c782bc 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -226,7 +226,7 @@ export LIT_XFAIL="$LIT_XFAIL;ompt/target_memcpy.c" export LIT_XFAIL="$LIT_XFAIL;ompt/target_memcpy_emi.c" %endif -%ifarch s390x ppc64le +%ifarch s390x export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c" export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c" export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_GELTGT_int.c" From 3aac563374a451af4013754f8ac0907af3a4c613 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 17 Jul 2024 14:24:59 +0200 Subject: [PATCH 139/205] Don't use wildcard for lld binaries Otherwise we'll also ship lldb. Instead explicitly list lld and lld-link. --- files.spec.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index 28b0018..1eb28f6 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -578,7 +578,8 @@ %files -n %{pkg_name_lld} %license lld/LICENSE.TXT %ghost %{_bindir}/ld -%{install_bindir}/lld* +%{install_bindir}/lld +%{install_bindir}/lld-link %{install_bindir}/ld.lld %{install_bindir}/ld64.lld %{install_bindir}/wasm-ld From b6c196c8a3adc05b6e5f9a9fdaa15e11db8f5205 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 12 Jul 2024 08:07:52 +0000 Subject: [PATCH 140/205] Remove not needed condition in version.spec.inc --- .copr/snapshot-info.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.copr/snapshot-info.sh b/.copr/snapshot-info.sh index db44c56..70cfb4f 100755 --- a/.copr/snapshot-info.sh +++ b/.copr/snapshot-info.sh @@ -34,7 +34,6 @@ llvm_snapshot_changelog_entry="* $(date +'%a %b %d %Y') LLVM snapshot - ${llvm_s tempfile=$(mktemp) cat > $tempfile < $tempfile < Date: Fri, 12 Jul 2024 08:10:31 +0000 Subject: [PATCH 141/205] Remove conditions that tried to support LLVM 18 in big-merge --- build.spec.inc | 4 ---- patches.spec.inc | 2 -- 2 files changed, 6 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index fae3830..a7dc2d7 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -73,11 +73,7 @@ cd llvm \ \ %if %{without compat_build} -%if %{with snapshot_build} -DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp;offload" \ -%else --DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp" \ -%endif %endif \ \ diff --git a/patches.spec.inc b/patches.spec.inc index 629863a..06a0480 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -8,9 +8,7 @@ Patch2002: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch #region LLD patches -%if %{with snapshot_build} Patch3002: 0001-Always-build-shared-libs-for-LLD.patch -%endif #endregion # # Drop the following patch after debugedit adds support to DWARF-5: From f631698c03ed5b6a048dc788817bd51fed599617 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 17 Jul 2024 14:37:41 +0200 Subject: [PATCH 142/205] Filter out omp_collapse tests on ppc64le, s390x and i686 These tests also fail on i686: https://download.copr.fedorainfracloud.org/results/@fedora-llvm-team/llvm-snapshots-big-merge-20240717/fedora-39-i386/07740274-llvm/builder-live.log.gz And yesterday they failed on ppc64le: https://download.copr.fedorainfracloud.org/results/@fedora-llvm-team/llvm-snapshots-big-merge-20240717/fedora-39-ppc64le/07740275-llvm/builder-live.log.gz While the day before they succeeded on ppc64le. As such, ignore them instead of marking them as xfail. --- check.spec.inc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index 0c782bc..8887aa6 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -125,6 +125,14 @@ test_list_filter_out+=("libomp :: ompt/teams/distribute_dispatch.c") test_list_filter_out+=("libomp :: affinity/kmp-abs-hw-subset.c") test_list_filter_out+=("libarcher :: races/task-taskgroup-unrelated.c") +%ifarch ppc64le s390x %ix86 +# These tests fail more often than not, but not always. +test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_many_GELTGT_int.c") +test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_many_GTGEGT_int.c") +test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_many_LTLEGE_int.c") +test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_one_int.c") +%endif + # The following tests seem pass on ppc64le and x86_64 and aarch64 only: %ifnarch ppc64le x86_64 s390x aarch64 # Passes on ppc64le: @@ -202,8 +210,6 @@ export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count_thread_limit.cpp" export LIT_XFAIL="$LIT_XFAIL;offloading/spmdization.c" export LIT_XFAIL="$LIT_XFAIL;offloading/target_critical_region.cpp" export LIT_XFAIL="$LIT_XFAIL;offloading/thread_limit.c" -export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c" -export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c" export LIT_XFAIL="$LIT_XFAIL;api/omp_dynamic_shared_memory.c" export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl1.c" export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl2.c" @@ -226,13 +232,9 @@ export LIT_XFAIL="$LIT_XFAIL;ompt/target_memcpy.c" export LIT_XFAIL="$LIT_XFAIL;ompt/target_memcpy_emi.c" %endif -%ifarch s390x +%ifarch s390x ppc64le export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c" export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c" -export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_GELTGT_int.c" -export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_GTGEGT_int.c" -export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_LTLEGE_int.c" -export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_one_int.c" %endif export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out) From 4cca104eded319ef0f955dcd71264523808b5d32 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 18 Jul 2024 08:37:03 +0000 Subject: [PATCH 143/205] Run check-clang-tools These were lost during the big-merge migration, because they have their own check target. I locally confirmed that the XFAIL for i686 is still needed. --- check.spec.inc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/check.spec.inc b/check.spec.inc index 8887aa6..a774b3c 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -82,6 +82,15 @@ export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c" %cmake_build --target check-clang #endregion +#region Test Clang Tools +reset_test_opts +%ifarch %ix86 +# Clang Tools :: clang-tidy/checkers/altera/struct-pack-align.cpp +export LIT_XFAIL="$LIT_XFAIL;clang-tidy/checkers/altera/struct-pack-align.cpp" +%endif +%cmake_build --target check-clang-tools +#endregion + #region Test OPENMP reset_test_opts @@ -158,11 +167,6 @@ export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.c" export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.cpp" %endif -%ifarch %ix86 -# Clang Tools :: clang-tidy/checkers/altera/struct-pack-align.cpp -export LIT_XFAIL="$LIT_XFAIL;clang-tidy/checkers/altera/struct-pack-align.cpp" -%endif - %ifarch ppc64le export LIT_XFAIL="$LIT_XFAIL;barrier/barrier.c" export LIT_XFAIL="$LIT_XFAIL;critical/critical.c" From 961276e5f3b927fa9b9288f24f73ee45c95b3e3b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Jul 2024 10:29:26 +0000 Subject: [PATCH 144/205] Disable marshalparser on RHEL 8 --- llvm.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 6067ab1..46a2eda 100644 --- a/llvm.spec +++ b/llvm.spec @@ -187,9 +187,10 @@ BuildRequires: python3-pexpect # This is required because we need "ps" when running LLDB tests BuildRequires: procps-ng -%if %{without compat_build} # For reproducible pyc file generation # See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility +# Since Fedora 41 this happens automatically, and RHEL 8 does not support this. +%if (%{defined fedora} && 0%{?fedora} < 41) || 0%{?rhel} == 9 || 0%{?rhel} == 10 BuildRequires: /usr/bin/marshalparser %global py_reproducible_pyc_path %{buildroot}%{python3_sitelib} %endif From 724af11e097abc19eb946aa76e58bfdc6953cb14 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Jul 2024 10:45:51 +0000 Subject: [PATCH 145/205] Undefine __cmake_in_source_build on RHEL 8 So we get the same behavior as in newer versions. --- build.spec.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.spec.inc b/build.spec.inc index a7dc2d7..a579317 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -31,6 +31,10 @@ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:`pwd`/llvm/%{_vpath_builddir}/%{_lib} cd llvm +%if 0%{?rhel} == 8 +%undefine __cmake_in_source_build +%endif + # TODO(kkleine): Follow more closely the Distribution guidelines found here: https://llvm.org/docs/BuildingADistribution.html # force off shared libs as cmake macros turns it on. # TODO: Disable LLVM_UNREACHABLE_OPTIMIZE. From 61f67fb13521aa25c72442ac257a1f79ffd48283 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Jul 2024 12:27:11 +0000 Subject: [PATCH 146/205] Use Python3_EXECUTABLE instead of PYTHON_EXECUTABLE Also drop the unnecessary python version variables. If there are multiple python versions installed, the wrong one may be picked. PYTHON_EXECUTABLE tries to avoid that problem, but the correct way to spell this nowadays is Python3_EXECUTABLE. --- build.spec.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index a579317..29d51d9 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -49,7 +49,7 @@ cd llvm %if 0%{?fedora} || 0%{?rhel} > 9 -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON \ %endif - -DPYTHON_EXECUTABLE=%{__python3} \ + -DPython3_EXECUTABLE=%{__python3} \ %if %{with compat_build} -DLLVM_INCLUDE_TESTS:BOOL=OFF \ -DCLANG_INCLUDE_TESTS:BOOL=OFF \ @@ -195,8 +195,6 @@ cd llvm -DLLDB_DISABLE_CURSES:BOOL=OFF \ -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \ -DLLDB_DISABLE_PYTHON:BOOL=OFF \ - -DPYTHON_VERSION_MAJOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.major)") \ - -DPYTHON_VERSION_MINOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.minor)") \ %ifarch ppc64le -DLLDB_TEST_USER_ARGS=--skip-category=watchpoint \ %endif From 690b69906ab1c13c39c37d30ff6d171493a6ba77 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Jul 2024 15:21:53 +0000 Subject: [PATCH 147/205] Set LLVM_RAM_PER_COMPILE_JOB on RHEL 8 RHEL 8 uses gcc instead of clang as the host compiler, which uses more memory. --- build.spec.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.spec.inc b/build.spec.inc index 29d51d9..13cc33b 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -205,6 +205,9 @@ cd llvm %ifarch x86_64 -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error" \ %endif +%if 0%{?rhel} == 8 + -DLLVM_RAM_PER_COMPILE_JOB=2048 \ +%endif %if %{with lto_build} %if 0%{?fedora} >= 41 -DLLVM_UNITTEST_LINK_FLAGS="-fno-lto" From 7d226f4859e67074c6f98b8adf548e1a9a048d74 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 17 Jul 2024 09:48:33 +0000 Subject: [PATCH 148/205] Fix py_byte_compile invocation --- install.spec.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.spec.inc b/install.spec.inc index b3aebc5..ff5e487 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -137,7 +137,9 @@ install -p -m644 clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/cl # install scanbuild-py to python sitelib. mv %{buildroot}%{_prefix}/%{_lib}/{libear,libscanbuild} %{buildroot}%{python3_sitelib} -%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/{libear,libscanbuild} +# Cannot use {libear,libscanbuild} style expansion in py_byte_compile. +%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/libear +%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/libscanbuild # Fix permissions of scan-view scripts chmod a+x %{buildroot}%{_datadir}/scan-view/{Reporter.py,startfile.py} From 712adc2eb04fe69f69984d4dbed7c4b58d6da44e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 19 Jul 2024 13:17:57 +0000 Subject: [PATCH 149/205] Patch back in Python 3.6 support on RHEL 8 --- 0001-Add-back-support-for-Python-3.6.patch | 50 ++++++++++++++++++++++ patches.spec.inc | 5 ++- prep.spec.inc | 3 ++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 0001-Add-back-support-for-Python-3.6.patch diff --git a/0001-Add-back-support-for-Python-3.6.patch b/0001-Add-back-support-for-Python-3.6.patch new file mode 100644 index 0000000..154e587 --- /dev/null +++ b/0001-Add-back-support-for-Python-3.6.patch @@ -0,0 +1,50 @@ +From fea6f0e31253ad0f335eea2e4718bacd5930d6d4 Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Fri, 19 Jul 2024 14:52:49 +0200 +Subject: [PATCH] Add back support for Python 3.6 + +--- + llvm/CMakeLists.txt | 2 +- + llvm/utils/update_test_body.py | 6 ++++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt +index 12618966c4ad..9c4df0082a9a 100644 +--- a/llvm/CMakeLists.txt ++++ b/llvm/CMakeLists.txt +@@ -932,7 +932,7 @@ set(LLVM_PROFDATA_FILE "" CACHE FILEPATH + + if(LLVM_INCLUDE_TESTS) + # All LLVM Python files should be compatible down to this minimum version. +- set(LLVM_MINIMUM_PYTHON_VERSION 3.8) ++ set(LLVM_MINIMUM_PYTHON_VERSION 3.6) + else() + # FIXME: it is unknown if this is the actual minimum bound + set(LLVM_MINIMUM_PYTHON_VERSION 3.0) +diff --git a/llvm/utils/update_test_body.py b/llvm/utils/update_test_body.py +index 661b0270d783..152d0c5f8476 100755 +--- a/llvm/utils/update_test_body.py ++++ b/llvm/utils/update_test_body.py +@@ -57,7 +57,8 @@ def process(args, path): + input="\n".join( + prolog[:-1] if prolog[-1].startswith(".endif") else prolog + ).encode(), +- capture_output=True, ++ stdout=subprocess.PIPE, ++ stderr=subprocess.PIPE, + check=True, + ) + except subprocess.CalledProcessError as ex: +@@ -71,7 +72,8 @@ def process(args, path): + + sub = subprocess.run( + ["sh", "-eu", "gen"], +- capture_output=True, ++ stdout=subprocess.PIPE, ++ stderr=subprocess.PIPE, + # Don't encode the directory information to the Clang output. + # Remove unneeded details (.ident) as well. + env=dict( +-- +2.45.2 + diff --git a/patches.spec.inc b/patches.spec.inc index 06a0480..c4f1a75 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -16,5 +16,8 @@ Patch3002: 0001-Always-build-shared-libs-for-LLD.patch # Source2006: 0001-Produce-DWARF4-by-default.patch #region RHEL patches -Patch9002: 0001-Remove-myst_parser-dependency-for-RHEL.patch +# All RHEL +Patch9001: 0001-Remove-myst_parser-dependency-for-RHEL.patch +# RHEL 8 only +Patch9002: 0001-Add-back-support-for-Python-3.6.patch #endregion diff --git a/prep.spec.inc b/prep.spec.inc index 9a4cd2f..9fbbc4d 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -15,8 +15,11 @@ %autopatch -M9000 -p1 %if %{defined rhel} +%patch -p1 -P9001 +%if %rhel == 8 %patch -p1 -P9002 %endif +%endif #region LLVM preparation From 1612a9fa8fd1b2d8b5cd86757ab1c92d52d8871c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 18 Jul 2024 15:10:31 +0200 Subject: [PATCH 150/205] Explicitly list lld libraries Otherwise we end up shipping liblldb.so and liblldbIntelFeatures.so as part of lld-libs/lld-devel. --- files.spec.inc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 1eb28f6..31b3e6a 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -594,12 +594,22 @@ %files -n %{pkg_name_lld}-devel %license lld/LICENSE.TXT %{install_includedir}/lld -%{install_libdir}/liblld*.so +%{install_libdir}/liblldCOFF.so +%{install_libdir}/liblldCommon.so +%{install_libdir}/liblldELF.so +%{install_libdir}/liblldMachO.so +%{install_libdir}/liblldMinGW.so +%{install_libdir}/liblldWasm.so %{install_libdir}/cmake/lld/ %files -n %{pkg_name_lld}-libs %license lld/LICENSE.TXT -%{install_libdir}/liblld*.so.* +%{install_libdir}/liblldCOFF.so.* +%{install_libdir}/liblldCommon.so.* +%{install_libdir}/liblldELF.so.* +%{install_libdir}/liblldMachO.so.* +%{install_libdir}/liblldMinGW.so.* +%{install_libdir}/liblldWasm.so.* #endregion From 542735e3c444191709abea4b36632c9908a56a70 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 Jul 2024 15:40:00 +0200 Subject: [PATCH 151/205] Decrease debuginfo verbosity on RHEL 8 To see whether this fixes the OOMs. This also drops the change on i686 for other OSs, to see whether that works or not. On s390x this was already not effective due to a mismatch with the condition in the cmake invocation. --- build.spec.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 13cc33b..784878c 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -1,5 +1,5 @@ # TODO(kkleine): In clang we had this %ifarch s390 s390x aarch64 %ix86 ppc64le -%ifarch s390 s390x %ix86 +%if 0%{?rhel} == 8 # Decrease debuginfo verbosity to reduce memory consumption during final library linking %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif @@ -113,7 +113,7 @@ cd llvm -DLLVM_PARALLEL_LINK_JOBS=1 \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -%ifarch s390 %ix86 +%if 0%{?rhel} == 8 -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ %endif From 16b62060baaa43c368bc5b092e4a07e679ac288b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 Jul 2024 15:03:26 +0200 Subject: [PATCH 152/205] Restore reduced debuginfo on i686 At least on f40 this resulted in a segfault during gdb-add-index. --- build.spec.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 784878c..bb41376 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -1,6 +1,14 @@ # TODO(kkleine): In clang we had this %ifarch s390 s390x aarch64 %ix86 ppc64le +# Decrease debuginfo verbosity to reduce memory consumption during final library linking. +%global reduce_debuginfo 0 +%ifarch %ix86 +%global reduce_debuginfo 1 +%endif %if 0%{?rhel} == 8 -# Decrease debuginfo verbosity to reduce memory consumption during final library linking +%global reduce_debuginfo 1 +%endif + +%if %reduce_debuginfo == 1 %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif @@ -113,7 +121,7 @@ cd llvm -DLLVM_PARALLEL_LINK_JOBS=1 \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -%if 0%{?rhel} == 8 +%if %reduce_debuginfo == 1 -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ %endif From f6e24c047d6b8d495f0a867a7a5d045843bd84ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 22 Jul 2024 18:12:00 +0200 Subject: [PATCH 153/205] Require llvm-libs from clang-libs --- packages.spec.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/packages.spec.inc b/packages.spec.inc index 5f2a519..43397bc 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -124,6 +124,7 @@ libomp-devel to enable -fopenmp. Summary: Runtime library for clang Requires: %{pkg_name_clang}-resource-filesystem%{?_isa} = %{version} Recommends: compiler-rt%{?_isa} = %{version} +Requires: %{pkg_name_llvm}-libs = %{version} # atomic support is not part of compiler-rt Recommends: libatomic%{?_isa} # libomp-devel is required, so clang can find the omp.h header when compiling From fd8973dfc05b27a89dfa63cff717052388a82d23 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 23 Jul 2024 10:11:01 +0200 Subject: [PATCH 154/205] Update Python 3.6 patch Port the changes from https://github.com/llvm/llvm-project/pull/89490 to Python 3.6. --- 0001-Add-back-support-for-Python-3.6.patch | 59 ++++++++++++++++++++-- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/0001-Add-back-support-for-Python-3.6.patch b/0001-Add-back-support-for-Python-3.6.patch index 154e587..36d118a 100644 --- a/0001-Add-back-support-for-Python-3.6.patch +++ b/0001-Add-back-support-for-Python-3.6.patch @@ -1,13 +1,64 @@ -From fea6f0e31253ad0f335eea2e4718bacd5930d6d4 Mon Sep 17 00:00:00 2001 +From 74f3d3579ef636a20d7832b39bf1355c0f734848 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 19 Jul 2024 14:52:49 +0200 Subject: [PATCH] Add back support for Python 3.6 --- - llvm/CMakeLists.txt | 2 +- - llvm/utils/update_test_body.py | 6 ++++-- - 2 files changed, 5 insertions(+), 3 deletions(-) + .../clang-tidy/tool/run-clang-tidy.py | 21 ++++++++++++++++--- + llvm/CMakeLists.txt | 2 +- + llvm/utils/update_test_body.py | 6 ++++-- + 3 files changed, 23 insertions(+), 6 deletions(-) +diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py +index 48401ba5ea42..c6552db36587 100755 +--- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py ++++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py +@@ -36,7 +36,6 @@ http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html + + import argparse + import asyncio +-from dataclasses import dataclass + import glob + import json + import multiprocessing +@@ -223,7 +222,6 @@ async def run_with_semaphore( + return await f(*args, **kwargs) + + +-@dataclass + class ClangTidyResult: + filename: str + invocation: List[str] +@@ -232,6 +230,22 @@ class ClangTidyResult: + stderr: str + elapsed: float + ++ def __init( ++ self, ++ filename: str, ++ invocation: List[str], ++ returncode: int, ++ stdout: str, ++ stderr: str, ++ elapsed: float, ++ ): ++ self.filename = filename ++ self.invocation = invocation ++ self.returncode = returncode ++ self.stdout = stdout ++ self.stderr = stderr ++ self.elapsed = elapsed ++ + + async def run_tidy( + args: argparse.Namespace, +@@ -623,4 +637,5 @@ async def main() -> None: + + + if __name__ == "__main__": +- asyncio.run(main()) ++ loop = asyncio.new_event_loop() ++ loop.run_until_complete(main()) diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 12618966c4ad..9c4df0082a9a 100644 --- a/llvm/CMakeLists.txt From 2e22c397b6ad08b3f19842f39647f6294c03c46e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 22 Jul 2024 12:25:34 +0000 Subject: [PATCH 155/205] Add python3-lit to big-merge --- build.spec.inc | 6 ++++++ check.spec.inc | 5 +++++ files.spec.inc | 9 +++++++++ install.spec.inc | 11 +++++++++-- packages.spec.inc | 12 ++++++++++++ 5 files changed, 41 insertions(+), 2 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index bb41376..a4b04b0 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -39,6 +39,12 @@ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:`pwd`/llvm/%{_vpath_builddir}/%{_lib} cd llvm +#region LLVM lit +pushd utils/lit +%py3_build +popd +#endregion + %if 0%{?rhel} == 8 %undefine __cmake_in_source_build %endif diff --git a/check.spec.inc b/check.spec.inc index a774b3c..913fe7b 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -69,6 +69,11 @@ function test_list_to_regex() } #endregion +#region Test LLVM lit +reset_test_opts +%cmake_build --target check-lit +#endregion + #region Test LLVM reset_test_opts # Xfail testing of update utility tools diff --git a/files.spec.inc b/files.spec.inc index 31b3e6a..9464e0d 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -1,3 +1,12 @@ +#region LLVM lit files +%files -n python3-lit +%license llvm/utils/lit/LICENSE.TXT +%doc llvm/utils/lit/README.rst +%{python3_sitelib}/lit/ +%{python3_sitelib}/lit-*-info/ +%{_bindir}/lit +#endregion + #region LLVM files %files -n %{pkg_name_llvm} diff --git a/install.spec.inc b/install.spec.inc index ff5e487..1b0261b 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -1,10 +1,17 @@ #region LLVM installation -cd llvm +pushd llvm + +pushd utils/lit +%py3_install + +# Strip out #!/usr/bin/env python +sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/lit/*.py +popd %cmake_install -cd - +popd mkdir -p %{buildroot}/%{_bindir} diff --git a/packages.spec.inc b/packages.spec.inc index 43397bc..18065d2 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -1,3 +1,15 @@ +#region LLVM lit package +%package -n python3-lit +Summary: LLVM lit test runner for Python 3 + +BuildArch: noarch +Requires: python3-setuptools +Recommends: python3-psutil + +%description -n python3-lit +lit is a tool used by the LLVM project for executing its test suites. +#endregion + #region LLVM packages %package -n %{pkg_name_llvm}-devel From b2926ef5b4cb8ee93d790e4abf6d6e0c8b61fa09 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 22 Jul 2024 08:24:04 +0000 Subject: [PATCH 156/205] Move patches and sources into main spec file This way all the dependencies are listed in the main spec file. Given how small these are, I don't think there's benefit to having them split out. --- llvm.spec | 46 ++++++++++++++++++++++++++++++++++++++++++++-- patches.spec.inc | 23 ----------------------- sources.spec.inc | 27 --------------------------- 3 files changed, 44 insertions(+), 52 deletions(-) delete mode 100644 patches.spec.inc delete mode 100644 sources.spec.inc diff --git a/llvm.spec b/llvm.spec index 46a2eda..f94de8b 100644 --- a/llvm.spec +++ b/llvm.spec @@ -108,9 +108,51 @@ Summary: The Low Level Virtual Machine License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://llvm.org -%include %{_sourcedir}/sources.spec.inc +%if %{with snapshot_build} +Source0: https://github.com/llvm/llvm-project/archive/%{llvm_snapshot_git_revision}.tar.gz +%else +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz +Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz.sig +Source6: release-keys.asc +%endif -%include %{_sourcedir}/patches.spec.inc +%if %{without compat_build} +Source2005: macros.%{pkg_name_clang} +%endif + +# Sources we use to split up the main spec file in sections so that we can more +# easily see what specfile sections are touched by a patch. +%if %{with snapshot_build} +Source1000: version.spec.inc +%endif +Source1001: build.spec.inc +Source1002: changelog.spec.inc +Source1003: check.spec.inc +Source1004: files.spec.inc +Source1005: globals.spec.inc +Source1006: install.spec.inc +Source1007: prep.spec.inc +Source1008: packages.spec.inc + +#region CLANG patches +Patch2001: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch +Patch2002: 0003-PATCH-clang-Don-t-install-static-libraries.patch +#endregion + +# Workaround a bug in ORC on ppc64le. +# More info is available here: https://reviews.llvm.org/D159115#4641826 +Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch + +#region LLD patches +Patch3002: 0001-Always-build-shared-libs-for-LLD.patch +#endregion + +#region RHEL patches +# All RHEL +Patch9001: 0001-Remove-myst_parser-dependency-for-RHEL.patch +# RHEL 8 only +Patch9002: 0001-Add-back-support-for-Python-3.6.patch +#endregion BuildRequires: gcc BuildRequires: gcc-c++ diff --git a/patches.spec.inc b/patches.spec.inc deleted file mode 100644 index c4f1a75..0000000 --- a/patches.spec.inc +++ /dev/null @@ -1,23 +0,0 @@ -#region CLANG patches -Patch2001: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch -Patch2002: 0003-PATCH-clang-Don-t-install-static-libraries.patch -#endregion - -# Workaround a bug in ORC on ppc64le. -# More info is available here: https://reviews.llvm.org/D159115#4641826 -Patch2005: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch - -#region LLD patches -Patch3002: 0001-Always-build-shared-libs-for-LLD.patch -#endregion - -# # Drop the following patch after debugedit adds support to DWARF-5: -# # https://sourceware.org/bugzilla/show_bug.cgi?id=28728 -# Source2006: 0001-Produce-DWARF4-by-default.patch - -#region RHEL patches -# All RHEL -Patch9001: 0001-Remove-myst_parser-dependency-for-RHEL.patch -# RHEL 8 only -Patch9002: 0001-Add-back-support-for-Python-3.6.patch -#endregion diff --git a/sources.spec.inc b/sources.spec.inc deleted file mode 100644 index 321b787..0000000 --- a/sources.spec.inc +++ /dev/null @@ -1,27 +0,0 @@ -%if %{with snapshot_build} -Source0: https://github.com/llvm/llvm-project/archive/%{llvm_snapshot_git_revision}.tar.gz -%else -Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz -Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz.sig -Source6: release-keys.asc -%endif - -%if %{without compat_build} -Source2005: macros.%{pkg_name_clang} -%endif - -# Sources we use to split up the main spec file in sections so that we can more -# easily see what specfile sections are touched by a patch. -%if %{with snapshot_build} -Source1000: version.spec.inc -%endif -Source1001: build.spec.inc -Source1002: changelog.spec.inc -Source1003: check.spec.inc -Source1004: files.spec.inc -Source1005: globals.spec.inc -Source1006: install.spec.inc -Source1008: patches.spec.inc -Source1009: prep.spec.inc -Source1012: sources.spec.inc -Source1013: packages.spec.inc From 8879ae32d2d3cc77d70c8e1adb3a69fc1a6835ca Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 24 Jul 2024 09:26:06 +0200 Subject: [PATCH 157/205] Add clang-nvlink-wrapper to file list Introduced in https://github.com/llvm/llvm-project/pull/96561. I've added the file to clang-tools-extra, as we also put many similar binaries like clang-linker-wrapper in there. --- files.spec.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index 9464e0d..e859282 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -423,6 +423,7 @@ %{install_bindir}/clang-offload-bundler %{install_bindir}/clang-offload-packager %{install_bindir}/clang-linker-wrapper +%{install_bindir}/clang-nvlink-wrapper %{install_bindir}/clang-pseudo %{install_bindir}/clang-query %{install_bindir}/clang-refactor @@ -456,6 +457,7 @@ %{_bindir}/clang-offload-bundler-%{maj_ver} %{_bindir}/clang-offload-packager-%{maj_ver} %{_bindir}/clang-linker-wrapper-%{maj_ver} +%{_bindir}/clang-nvlink-wrapper-%{maj_ver} %{_bindir}/clang-pseudo-%{maj_ver} %{_bindir}/clang-query-%{maj_ver} %{_bindir}/clang-refactor-%{maj_ver} From 6ce190142da0ee4fb9bdf169252def6618d0d5ae Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 25 Jul 2024 07:56:15 +0000 Subject: [PATCH 158/205] llvm-omp-device-info -> llvm-offload-device-info Was renamed in https://github.com/llvm/llvm-project/pull/100309. --- install.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.spec.inc b/install.spec.inc index 1b0261b..a017571 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -247,7 +247,7 @@ rm -rf %{buildroot}/%{_datarootdir}/gdb %ifnarch %{ix86} # Remove files that we don't package, yet. -rm %{buildroot}%{install_bindir}/llvm-omp-device-info +rm %{buildroot}%{install_bindir}/llvm-offload-device-info rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay %endif From 760435b3cf551324954a1f68d1c511f27fb01bc9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 25 Jul 2024 10:50:12 +0000 Subject: [PATCH 159/205] Add compiler-rt(major) provide From: https://src.fedoraproject.org/rpms/compiler-rt/c/7d3d8b8866c9a43c324fff4ad680406bd888fb2e?branch=rawhide --- packages.spec.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/packages.spec.inc b/packages.spec.inc index 18065d2..2f09afc 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -229,6 +229,7 @@ Summary: LLVM "compiler-rt" runtime libraries License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT Requires: clang-resource-filesystem%{?isa} = %{version} +Provides: compiler-rt(major) = %{maj_ver} %description -n %{pkg_name_compiler_rt} The compiler-rt project is a part of the LLVM project. It provides From 88414b35811c27a2d9f6cc3f3ef33619ef096c91 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 25 Jul 2024 10:52:55 +0000 Subject: [PATCH 160/205] Ship hwasan_symbolize on riscv64 From: https://src.fedoraproject.org/rpms/compiler-rt/c/19722bfcff59f982866c3abeb763417f9ffc351c?branch=rawhide --- files.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.spec.inc b/files.spec.inc index e859282..ac56147 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -516,7 +516,7 @@ %files -n %{pkg_name_compiler_rt} %license compiler-rt/LICENSE.TXT -%ifarch x86_64 aarch64 +%ifarch x86_64 aarch64 riscv64 %{_prefix}/lib/clang/%{maj_ver}/bin/hwasan_symbolize %endif %{_prefix}/lib/clang/%{maj_ver}/include/fuzzer From d77a012eb7bda338aaede2374e8b1cffb9c3de5b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 25 Jul 2024 12:05:10 +0000 Subject: [PATCH 161/205] Fix clang(major) provides From: https://src.fedoraproject.org/rpms/clang/c/46db6738a319f00582e266d08b225e6673a887bc?branch=rawhide From: https://src.fedoraproject.org/rpms/clang/c/ffe2656114e7524f8b1fc018dc9f93e8b2a9780c?branch=rawhide --- packages.spec.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages.spec.inc b/packages.spec.inc index 2f09afc..9b6b404 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -154,6 +154,7 @@ Requires: %{pkg_name_clang}-libs = %{version}-%{release} Requires: %{pkg_name_clang}%{?_isa} = %{version}-%{release} # The clang CMake files reference tools from clang-tools-extra. Requires: %{pkg_name_clang}-tools-extra%{?_isa} = %{version}-%{release} +Provides: clang-devel(major) = %{maj_ver} %endif %description -n %{pkg_name_clang}-devel @@ -161,7 +162,7 @@ Development header files for clang. %package -n %{pkg_name_clang}-resource-filesystem Summary: Filesystem package that owns the clang resource directory -Provides: %{pkg_name_clang}-resource-filesystem(major) = %{maj_ver} +Provides: clang-resource-filesystem(major) = %{maj_ver} %description -n %{pkg_name_clang}-resource-filesystem This package owns the clang resouce directory: $libdir/clang/$version/ From a576e25924fa7deeceb5e5f5e946ba5ad6d000e0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 25 Jul 2024 12:10:51 +0000 Subject: [PATCH 162/205] Also fix lld-devel(major) provide This is incorrect in rawhide compat rpms, fix it for the future. --- packages.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.spec.inc b/packages.spec.inc index 9b6b404..a4d185b 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -293,7 +293,7 @@ Requires: %{pkg_name_lld}-libs%{?_isa} = %{version}-%{release} # dependency. Requires: %{pkg_name_lld}%{?_isa} = %{version}-%{release} %endif -Provides: %{pkg_name_lld}-devel(major) = %{maj_ver} +Provides: lld-devel(major) = %{maj_ver} %description -n %{pkg_name_lld}-devel This package contains library and header files needed to develop new native From ced5c791daf90e7c561264e3bb416608a53ce525 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 25 Jul 2024 12:14:28 +0000 Subject: [PATCH 163/205] Remove FEDORA_LLVM_LIB_SUFFIX handling From: https://src.fedoraproject.org/rpms/clang/c/6f21bc0e93b271f53cf5bcbeac23e8d9215e390a?branch=rawhide --- build.spec.inc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index a4b04b0..d7b4f68 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -20,14 +20,6 @@ export ASMFLAGS="%{build_cflags}" #region BEGIN: COPIED FROM CLANG -# TODO(kkleine): Make sure the paths actually work. I have the feeling this needs adjustment -pwd -%if 0%{?__isa_bits} == 64 -sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' llvm/test/lit.cfg.py -%else -sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' llvm/test/lit.cfg.py -%endif - # Disable dwz on aarch64, because it takes a huge amount of time to decide not to optimize things. %ifarch aarch64 %define _find_debuginfo_dwz_opts %{nil} From e7a1f94f299c00d632910c336451e71f9ce59853 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 25 Jul 2024 12:17:13 +0000 Subject: [PATCH 164/205] Don't explicitly set LIBOMP_HAVE_VERSION_SCRIPT_FLAG From: https://src.fedoraproject.org/rpms/libomp/c/ee22a23839c17d6b02e4ba53c7e41a1aec01689a?branch=rawhide --- build.spec.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index d7b4f68..bbf1688 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -44,7 +44,6 @@ popd # TODO(kkleine): Follow more closely the Distribution guidelines found here: https://llvm.org/docs/BuildingADistribution.html # force off shared libs as cmake macros turns it on. # TODO: Disable LLVM_UNREACHABLE_OPTIMIZE. -# TODO: LIBOMP_HAVE_VERSION_SCRIPT_FLAG should be set automatically. # TODO: Override LIBOMP_INSTALL_LIBDIR, because otherwise the libraries # are installed to /usr/lib64/$TRIPLE and clang can't find them. %cmake -G Ninja \ @@ -101,7 +100,6 @@ popd \ \ %if %{without compat_build} - -DLIBOMP_HAVE_VERSION_SCRIPT_FLAG:BOOL=ON \ -DLIBOMP_INSTALL_ALIASES=OFF \ %if 0%{?__isa_bits} == 64 -DOPENMP_LIBDIR_SUFFIX=64 \ From 00f2957d29cde03e8e04e0e21039ca3c5b134fa7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 29 Jul 2024 09:30:27 +0200 Subject: [PATCH 165/205] Add llvm-ctxprof-util to file list Added in https://github.com/llvm/llvm-project/pull/100379. --- files.spec.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index ac56147..78ff31f 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -82,6 +82,7 @@ %{install_bindir}/llvm-cat %{install_bindir}/llvm-cfi-verify %{install_bindir}/llvm-cov +%{install_bindir}/llvm-ctxprof-util %{install_bindir}/llvm-cvtres %{install_bindir}/llvm-cxxdump %{install_bindir}/llvm-cxxfilt @@ -169,6 +170,7 @@ %{_bindir}/llvm-cat%{exec_suffix} %{_bindir}/llvm-cfi-verify%{exec_suffix} %{_bindir}/llvm-cov%{exec_suffix} +%{_bindir}/llvm-ctxprof-util%{exec_suffix} %{_bindir}/llvm-cvtres%{exec_suffix} %{_bindir}/llvm-cxxdump%{exec_suffix} %{_bindir}/llvm-cxxfilt%{exec_suffix} From 8d1fbf35a9d6effc08dc72ab70674fc756012c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 31 Jul 2024 14:41:05 +0200 Subject: [PATCH 166/205] Revert "Add llvm-ctxprof-util to file list" This reverts commit 26a4e937ba0f8bb225f69ee4da56ec2c1c2527e1. --- files.spec.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 78ff31f..ac56147 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -82,7 +82,6 @@ %{install_bindir}/llvm-cat %{install_bindir}/llvm-cfi-verify %{install_bindir}/llvm-cov -%{install_bindir}/llvm-ctxprof-util %{install_bindir}/llvm-cvtres %{install_bindir}/llvm-cxxdump %{install_bindir}/llvm-cxxfilt @@ -170,7 +169,6 @@ %{_bindir}/llvm-cat%{exec_suffix} %{_bindir}/llvm-cfi-verify%{exec_suffix} %{_bindir}/llvm-cov%{exec_suffix} -%{_bindir}/llvm-ctxprof-util%{exec_suffix} %{_bindir}/llvm-cvtres%{exec_suffix} %{_bindir}/llvm-cxxdump%{exec_suffix} %{_bindir}/llvm-cxxfilt%{exec_suffix} From ac897c65956dd45218c82de118615ac679fe16e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 31 Jul 2024 14:41:13 +0200 Subject: [PATCH 167/205] Revert "llvm-omp-device-info -> llvm-offload-device-info" This reverts commit 62d7c09c1c2c8f78c318fd6c78479a41b82e16b7. --- install.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.spec.inc b/install.spec.inc index a017571..1b0261b 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -247,7 +247,7 @@ rm -rf %{buildroot}/%{_datarootdir}/gdb %ifnarch %{ix86} # Remove files that we don't package, yet. -rm %{buildroot}%{install_bindir}/llvm-offload-device-info +rm %{buildroot}%{install_bindir}/llvm-omp-device-info rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay %endif From b6b17b013eecb6e92d46327c2bb09616bc01c2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 28 Aug 2024 13:21:20 +0200 Subject: [PATCH 168/205] Update to 19.1.0-rc3 --- ...ed-libraries-to-customize-the-soname.patch | 39 - check.spec.inc | 2 - globals.spec.inc | 2 +- llvm.spec | 1448 +---------------- packages.spec.inc | 1 + sources | 8 +- 6 files changed, 77 insertions(+), 1423 deletions(-) delete mode 100644 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch diff --git a/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch b/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch deleted file mode 100644 index e425475..0000000 --- a/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3dc5722d5c7673a879f2b4680369d3ac8b6b64b6 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Wed, 4 Aug 2021 14:05:38 -0700 -Subject: [PATCH] cmake: Allow shared libraries to customize the soname using - LLVM_ABI_REVISION - -The LLVM_ABI_REVISION variable is intended to be used for release -candidates which introduce an ABI change to a shared library. This -variable can be specified per library, so there is not one global value -for all of LLVM. - -For example, if we LLVM X.0.0-rc2 introduces an ABI change for a library -compared with LLVM X.0.0-rc1, then the LLVM_ABI_REVISION number for -library will be incremented by 1. - -In the main branch, LLVM_ABI_REVISION should always be 0, it is only -meant to be used in the release branch. - -Differential Revision: https://reviews.llvm.org/D105594 ---- - clang/tools/clang-shlib/CMakeLists.txt | 5 +++++ - 3 files changed, 19 insertions(+), 2 deletions(-) - -diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt -index 9c1f8ea452b3..4d785924e4bb 100644 ---- a/clang/tools/clang-shlib/CMakeLists.txt -+++ b/clang/tools/clang-shlib/CMakeLists.txt -@@ -1,3 +1,8 @@ -+# In the main branch, LLVM_ABI_REVISION should always be 0. In the release -+# branches, this should be incremented before each release candidate every -+# time the ABI of libclang-cpp.so changes. -+set(LLVM_ABI_REVISION 0) -+ - # Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off - if (NOT LLVM_ENABLE_PIC) - return() --- -2.27.0 - diff --git a/check.spec.inc b/check.spec.inc index 913fe7b..b5e105f 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -139,13 +139,11 @@ test_list_filter_out+=("libomp :: ompt/teams/distribute_dispatch.c") test_list_filter_out+=("libomp :: affinity/kmp-abs-hw-subset.c") test_list_filter_out+=("libarcher :: races/task-taskgroup-unrelated.c") -%ifarch ppc64le s390x %ix86 # These tests fail more often than not, but not always. test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_many_GELTGT_int.c") test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_many_GTGEGT_int.c") test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_many_LTLEGE_int.c") test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_one_int.c") -%endif # The following tests seem pass on ppc64le and x86_64 and aarch64 only: %ifnarch ppc64le x86_64 s390x aarch64 diff --git a/globals.spec.inc b/globals.spec.inc index 1513a84..8e7d78d 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -31,7 +31,7 @@ %if %{with snapshot_build} %global src_tarball_dir llvm-project-%{llvm_snapshot_git_revision} %else -%global src_tarball_dir llvm-project-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src +%global src_tarball_dir llvm-project-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}.src %endif #region LLVM globals diff --git a/llvm.spec b/llvm.spec index f94de8b..40d8a17 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,108 +1,32 @@ +# We assume that we're building a snapshot if the if the build happens +# in Copr and the project has this prefix: @fedora-llvm-team/llvm-snapshots- +%global copr_snapshot_build_detected %(/bin/bash -fc 'if [[ "%{?copr_username}/%{?copr_projectname}" == @fedora-llvm-team/llvm-snapshots-* ]]; +then + echo "yes" +else + echo "no" +fi') + +%if "%{copr_snapshot_build_detected}" == "yes" +%bcond_without snapshot_build +%else %bcond_with snapshot_build +%endif + +%global maj_ver 19 +%global min_ver 1 +%global patch_ver 0 +%global rc_ver 3 + +%if %{with snapshot_build} +%include %{_sourcedir}/version.spec.inc +%endif %include %{_sourcedir}/globals.spec.inc -# We are building with clang for faster/lower memory LTO builds. -# See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros -%global toolchain clang - -# Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer -# https://bugzilla.redhat.com/show_bug.cgi?id=2158587 -%undefine _include_frame_pointers - -# Components enabled if supported by target architecture: -%define gold_arches %{ix86} x86_64 aarch64 %{power64} s390x -%ifarch %{gold_arches} - %bcond_without gold -%else - %bcond_with gold -%endif - -%bcond_with compat_build -%bcond_without check - -%ifarch %ix86 riscv64 -# Disable LTO on x86 in order to reduce memory consumption -%bcond_with lto_build -%elif %{with snapshot_build} -# Disable LTO to speed up builds -%bcond_with lto_build -%else -%bcond_without lto_build -%endif - -%global maj_ver 18 -%global min_ver 1 -%global patch_ver 8 -#global rc_ver 4 - -%if %{with snapshot_build} -%undefine rc_ver -%global maj_ver %{llvm_snapshot_version_major} -%global min_ver %{llvm_snapshot_version_minor} -%global patch_ver %{llvm_snapshot_version_patch} -%endif - -%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src -%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src -%global third_party_srcdir third-party-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src - -%if %{with snapshot_build} -%undefine rc_ver -%global maj_ver %{llvm_snapshot_version_major} -%global min_ver %{llvm_snapshot_version_minor} -%global patch_ver %{llvm_snapshot_version_patch} -%endif - -%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src -%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src -%global third_party_srcdir third-party-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src - - -%if %{with compat_build} -%global pkg_name llvm%{maj_ver} -%global exec_suffix -%{maj_ver} -%global install_prefix %{_libdir}/%{name} -%global install_bindir %{install_prefix}/bin -%global install_includedir %{install_prefix}/include -%global install_libdir %{install_prefix}/lib - -%global pkg_includedir %{_includedir}/%{name} -%global pkg_datadir %{install_prefix}/share -%else -%global pkg_name llvm -%global install_prefix /usr -%global install_bindir %{_bindir} -%global install_libdir %{_libdir} -%global install_includedir %{_includedir} -%global pkg_datadir %{_datadir} -%global exec_suffix %{nil} -%endif - -%if 0%{?rhel} -%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly" -%global experimental_targets_to_build "" -%else -%global targets_to_build "all" -%global experimental_targets_to_build "AVR" -%endif - -%global build_install_prefix %{buildroot}%{install_prefix} - -# Lower memory usage of dwz on s390x -%global _dwz_low_mem_die_limit_s390x 1 -%global _dwz_max_die_limit_s390x 1000000 - -%global llvm_triple %{_target_platform} - -# https://fedoraproject.org/wiki/Changes/PythonSafePath#Opting_out -# Don't add -P to Python shebangs -# The executable Python scripts in /usr/share/opt-viewer/ import each other -%undefine _py3_shebang_P - -Name: %{pkg_name} +Name: %{pkg_name_llvm} Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: The Low Level Virtual Machine License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -113,13 +37,18 @@ Source0: https://github.com/llvm/llvm-project/archive/%{llvm_snapshot_git_revisi %else Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{src_tarball_dir}.tar.xz.sig -Source6: release-keys.asc %endif +Source6: release-keys.asc %if %{without compat_build} Source2005: macros.%{pkg_name_clang} %endif +%if %{with bundle_compat_lib} +Source3000: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-project-%{compat_ver}.src.tar.xz +Source3001: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-project-%{compat_ver}.src.tar.xz.sig +%endif + # Sources we use to split up the main spec file in sections so that we can more # easily see what specfile sections are touched by a patch. %if %{with snapshot_build} @@ -150,10 +79,16 @@ Patch3002: 0001-Always-build-shared-libs-for-LLD.patch #region RHEL patches # All RHEL Patch9001: 0001-Remove-myst_parser-dependency-for-RHEL.patch + # RHEL 8 only -Patch9002: 0001-Add-back-support-for-Python-3.6.patch +#Patch9002: 0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch #endregion +%if 0%{?rhel} == 8 +%global python3_pkgversion 3.12 +%global __python3 /usr/bin/python3.12 +%endif + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang @@ -162,10 +97,17 @@ BuildRequires: ninja-build BuildRequires: zlib-devel BuildRequires: libffi-devel BuildRequires: ncurses-devel -BuildRequires: python3-psutil +# This intentionally does not use python3_pkgversion. RHEL 8 does not have +# python3.12-sphinx, and we are only using it as a binary anyway. BuildRequires: python3-sphinx +%if 0%{?rhel} != 8 +# RHEL 8 does not have these packages for python3.12. However, they are only +# needed for LLDB tests. +BuildRequires: python%{python3_pkgversion}-psutil +BuildRequires: python%{python3_pkgversion}-pexpect +%endif %if %{undefined rhel} -BuildRequires: python3-myst-parser +BuildRequires: python%{python3_pkgversion}-myst-parser %endif # Needed for %%multilib_fix_c_header BuildRequires: multilib-rpm-config @@ -179,14 +121,15 @@ BuildRequires: valgrind-devel # LLVM's LineEditor library will use libedit if it is available. BuildRequires: libedit-devel # We need python3-devel for %%py3_shebang_fix -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%if 0%{?rhel} == 8 +BuildRequires: python%{python3_pkgversion}-rpm-macros +%endif # For gpg source verification BuildRequires: gnupg2 -BuildRequires: python3-rpm-macros -BuildRequires: python3-lit BuildRequires: swig BuildRequires: libxml2-devel BuildRequires: doxygen @@ -197,7 +140,6 @@ BuildRequires: perl BuildRequires: perl-Data-Dumper BuildRequires: perl-Encode BuildRequires: libffi-devel -BuildRequires: python3 BuildRequires: perl-generators @@ -223,9 +165,6 @@ BuildRequires: perl(Sys::Hostname) BuildRequires: graphviz -# This is required because of "ModuleNotFoundError: No module named 'pexpect'" when running LLDB tests. -BuildRequires: python3-pexpect - # This is required because we need "ps" when running LLDB tests BuildRequires: procps-ng @@ -247,340 +186,27 @@ 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 devel -Summary: Libraries and header files for LLVM -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{version}-%{release} -# The installed LLVM cmake files will add -ledit to the linker flags for any -# app that requires the libLLVMLineEditor, so we need to make sure -# libedit-devel is available. -Requires: libedit-devel -# The installed cmake files reference binaries from llvm-test, llvm-static, and -# llvm-gtest. We tried in the past to split the cmake exports for these binaries -# out into separate files, so that llvm-devel would not need to Require these packages, -# but this caused bugs (rhbz#1773678) and forced us to carry two non-upstream -# patches. -Requires: %{name}-static%{?_isa} = %{version}-%{release} -Requires: %{name}-test%{?_isa} = %{version}-%{release} -Requires: %{name}-googletest%{?_isa} = %{version}-%{release} - - -Requires(post): /usr/sbin/alternatives -Requires(postun): /usr/sbin/alternatives - -Provides: llvm-devel(major) = %{maj_ver} - -%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 -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description doc -Documentation for the LLVM compiler infrastructure. - -%package libs -Summary: LLVM shared libraries -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig - -%description libs -Shared libraries for the LLVM compiler infrastructure. - -%package static -Summary: LLVM static libraries -Conflicts: %{name}-devel < 8 - -Provides: llvm-static(major) = %{maj_ver} - -%description static -Static libraries for the LLVM compiler infrastructure. - -%package cmake-utils -Summary: CMake utilities shared across LLVM subprojects - -%description cmake-utils -CMake utilities shared across LLVM subprojects. -This is for internal use by LLVM packages only. - -%package test -Summary: LLVM regression tests -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{version}-%{release} - -Provides: llvm-test(major) = %{maj_ver} - -%description test -LLVM regression tests. - -%package googletest -Summary: LLVM's modified googletest sources - -%description googletest -LLVM's modified googletest sources. - -%if 0%{?rhel} -%package toolset -Summary: Package that installs llvm-toolset -Requires: clang = %{version} -Requires: llvm = %{version} -Requires: lld = %{version} - -%description toolset -This is the main package for llvm-toolset. -%endif +%include %{_sourcedir}/packages.spec.inc %prep -%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE3}' --data='%{SOURCE2}' -%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE5}' --data='%{SOURCE4}' -%setup -T -q -b 2 -n %{cmake_srcdir} -# TODO: It would be more elegant to set -DLLVM_COMMON_CMAKE_UTILS=%{_builddir}/%{cmake_srcdir}, -# but this is not a CACHED variable, so we can't actually set it externally :( -cd .. -mv %{cmake_srcdir} cmake -%setup -T -q -b 4 -n %{third_party_srcdir} -cd .. -mv %{third_party_srcdir} third-party - -%setup -T -q -b 0 -n %{llvm_srcdir} -%autopatch -M%{?!rhel:100}%{?rhel:200} -p2 - -%py3_shebang_fix \ - test/BugPoint/compile-custom.ll.py \ - tools/opt-viewer/*.py \ - utils/update_cc_test_checks.py +%include %{_sourcedir}/prep.spec.inc %build - -%if %{without lto_build} -%global _lto_cflags %nil -%endif - -%ifarch s390 s390x %ix86 riscv64 -# Decrease debuginfo verbosity to reduce memory consumption during final library linking -%global optflags %(echo %{optflags} | sed 's/-g /-g1 /') -%endif - -# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files. -export ASMFLAGS="%{build_cflags}" - -# force off shared libs as cmake macros turns it on. -# TODO: Disable LLVM_UNREACHABLE_OPTIMIZE. -%cmake -G Ninja \ - -DBUILD_SHARED_LIBS:BOOL=OFF \ - -DLLVM_PARALLEL_LINK_JOBS=1 \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_SKIP_RPATH:BOOL=ON \ -%ifarch s390 %ix86 riscv64 - -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ -%endif -%if %{without compat_build} -%if 0%{?__isa_bits} == 64 - -DLLVM_LIBDIR_SUFFIX=64 \ -%else - -DLLVM_LIBDIR_SUFFIX= \ -%endif -%endif - \ - -DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \ - -DLLVM_ENABLE_LIBCXX:BOOL=OFF \ - -DLLVM_ENABLE_ZLIB:BOOL=ON \ - -DLLVM_ENABLE_FFI:BOOL=ON \ - -DLLVM_ENABLE_RTTI:BOOL=ON \ - -DLLVM_USE_PERF:BOOL=ON \ -%if %{with gold} - -DLLVM_BINUTILS_INCDIR=%{_includedir} \ -%endif - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \ - \ - -DLLVM_BUILD_RUNTIME:BOOL=ON \ - \ - -DLLVM_INCLUDE_TOOLS:BOOL=ON \ - -DLLVM_BUILD_TOOLS:BOOL=ON \ - \ - -DLLVM_INCLUDE_TESTS:BOOL=ON \ - -DLLVM_BUILD_TESTS:BOOL=ON \ -%if %{with compat_build} - -DLLVM_INSTALL_GTEST:BOOL=OFF \ -%else - -DLLVM_INSTALL_GTEST:BOOL=ON \ -%endif - -DLLVM_LIT_ARGS=-v \ - \ - -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \ - -DLLVM_BUILD_EXAMPLES:BOOL=OFF \ - \ - -DLLVM_INCLUDE_UTILS:BOOL=ON \ - -DLLVM_INSTALL_UTILS:BOOL=ON \ - -DLLVM_UTILS_INSTALL_DIR:PATH=bin \ - -DLLVM_TOOLS_INSTALL_DIR:PATH=bin \ - \ - -DLLVM_INCLUDE_DOCS:BOOL=ON \ - -DLLVM_BUILD_DOCS:BOOL=ON \ - -DLLVM_ENABLE_SPHINX:BOOL=ON \ - -DLLVM_ENABLE_DOXYGEN:BOOL=OFF \ - \ -%if %{with snapshot_build} - -DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \ -%else - -DLLVM_VERSION_SUFFIX='' \ -%endif - -DLLVM_UNREACHABLE_OPTIMIZE:BOOL=ON \ - -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ - -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ - -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \ - -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \ - -DLLVM_DEFAULT_TARGET_TRIPLE=%{llvm_triple} \ - -DSPHINX_WARNINGS_AS_ERRORS=OFF \ - -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ - -DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \ - -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-3 \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ -%if %{with lto_build} - -DLLVM_UNITTEST_LINK_FLAGS="-Wl,-plugin-opt=O0" \ -%endif -%ifarch x86_64 - -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error" -%endif - -# Build libLLVM.so first. This ensures that when libLLVM.so is linking, there -# are no other compile jobs running. This will help reduce OOM errors on the -# builders without having to artificially limit the number of concurrent jobs. -%cmake_build --target LLVM -%cmake_build +%include %{_sourcedir}/build.spec.inc %install -%cmake_install - -mkdir -p %{buildroot}/%{_bindir} - -# Install binaries needed for lit tests -%global test_binaries llvm-isel-fuzzer llvm-opt-fuzzer - -for f in %{test_binaries} -do - install -m 0755 %{_vpath_builddir}/bin/$f %{buildroot}%{install_bindir} -done - -# Remove testing of update utility tools -rm -rf test/tools/UpdateTestChecks - -# Install libraries needed for unittests -%if %{without compat_build} -%global build_libdir %{_vpath_builddir}/%{_lib} -%else -%global build_libdir %{_vpath_builddir}/lib -%endif - -install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{install_libdir} -install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{install_libdir} - -# Fix multi-lib -%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h - -%if %{without compat_build} - -# Fix some man pages -ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config%{exec_suffix}-%{__isa_bits}.1 - -%if %{with gold} -# Add symlink to lto plugin in the binutils plugin directory. -%{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/ -ln -s -t %{buildroot}%{_libdir}/bfd-plugins/ ../LLVMgold.so -%endif - -%else - -# Add version suffix to binaries -for f in %{buildroot}/%{install_bindir}/*; do - filename=`basename $f` - ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} -done - -# Create ld.so.conf.d entry -mkdir -p %{buildroot}/etc/ld.so.conf.d -cat >> %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf << EOF -%{install_libdir} -EOF - -# Add version suffix to man pages and move them to mandir. -mkdir -p %{buildroot}/%{_mandir}/man1 -for f in %{build_install_prefix}/share/man/man1/*; do - filename=`basename $f | cut -f 1 -d '.'` - mv $f %{buildroot}%{_mandir}/man1/$filename%{exec_suffix}.1 -done - -%endif - -# llvm-config special casing. llvm-config is managed by update-alternatives. -# the original file must remain available for compatibility with the CMake -# infrastructure. Without compat, cmake points to the symlink, with compat it -# points to the original file. - -%if %{without compat_build} - -mv %{buildroot}/%{install_bindir}/llvm-config %{buildroot}/%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} -# We still maintain a versionned symlink for consistency across llvm versions. -# This is specific to the non-compat build and matches the exec prefix for -# compat builds. An isa-agnostic versionned symlink is also maintained in the (un)install -# steps. -(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config%{exec_suffix}-%{__isa_bits} llvm-config-%{maj_ver}-%{__isa_bits} ) -# ghost presence -touch %{buildroot}%{_bindir}/llvm-config-%{maj_ver} - -%else - -rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix} -(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config llvm-config%{exec_suffix}-%{__isa_bits} ) - -%endif - -# ghost presence -touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix} - -mkdir -p %{buildroot}%{pkg_datadir}/llvm/cmake -cp -Rv ../cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake - +%include %{_sourcedir}/install.spec.inc %check -# non reproducible errors -rm test/tools/dsymutil/X86/swift-interface.test - -%if %{with check} -# FIXME: use %%cmake_build instead of %%__ninja -LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C %{_vpath_builddir} -%endif - -%if %{with compat_build} -# Packages that install files in /etc/ld.so.conf have to manually run -# ldconfig. -# See https://bugzilla.redhat.com/show_bug.cgi?id=2001328 and -# https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_linker_configuration_files -%post -p /sbin/ldconfig libs -%postun -p /sbin/ldconfig libs -%endif %include %{_sourcedir}/check.spec.inc -%post devel -/usr/sbin/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} -%if %{without compat_build} -/usr/sbin/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} +%ldconfig_scriptlets -n %{pkg_name-llvm}-libs -# During the upgrade from LLVM 16 (F38) to LLVM 17 (F39), we found out the -# main llvm-devel package was leaving entries in the alternatives system. -# Try to remove them now. -for v in 14 15 16; do - if [[ -e %{_bindir}/llvm-config-$v - && "x$(%{_bindir}/llvm-config-$v --version | awk -F . '{ print $1 }')" != "x$v" ]]; then - /usr/sbin/update-alternatives --remove llvm-config-$v %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} - fi -done +%if %{without compat_build} +%ldconfig_scriptlets -n %{pkg_name_lld}-libs %endif + +%post -n %{pkg_name_llvm}-devel %{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} %if %{without compat_build} %{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} @@ -596,10 +222,9 @@ for v in 14 15 16; do done %endif - -%postun devel +%postun -n %{pkg_name_llvm}-devel if [ $1 -eq 0 ]; then - /usr/sbin/update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} + %{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} fi %if %{without compat_build} # When upgrading between minor versions (i.e. from x.y.1 to x.y.2), we must @@ -608,949 +233,22 @@ fi # alternative must be removed in order to give priority to a newly installed # compat package. if [[ $1 -eq 0 - || "x$(%{_bindir}/llvm-config-%{maj_ver} --version | awk -F . '{ print $1 }')" != "x%{maj_ver}" ]]; then - /usr/sbin/update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} + || "x$(%{_bindir}/llvm-config-%{maj_ver} --version | awk -F . '{ print $1 }')" != "x%{maj_ver}" ]]; then + %{_sbindir}/update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} fi %endif -%files -%license LICENSE.TXT -%exclude %{_mandir}/man1/llvm-config* -%{_mandir}/man1/* -%{install_bindir}/* -%if %{with compat_build} -# This is for all the binaries with the version suffix. -%{_bindir}/*%{exec_suffix} -%endif - -%exclude %{_bindir}/llvm-config%{exec_suffix} -%exclude %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} - -%exclude %{_bindir}/llvm-config-%{maj_ver} -%exclude %{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} -%exclude %{install_bindir}/not -%exclude %{install_bindir}/count -%exclude %{install_bindir}/yaml-bench -%exclude %{install_bindir}/lli-child-target -%exclude %{install_bindir}/llvm-isel-fuzzer -%exclude %{install_bindir}/llvm-opt-fuzzer -%{pkg_datadir}/opt-viewer - -%files libs -%license LICENSE.TXT -%{install_libdir}/libLLVM-%{maj_ver}%{?llvm_snapshot_version_suffix:%{llvm_snapshot_version_suffix}}.so -%if %{with gold} -%{install_libdir}/LLVMgold.so %if %{without compat_build} -%{_libdir}/bfd-plugins/LLVMgold.so -%endif -%endif -%{install_libdir}/libLLVM-%{maj_ver}.so -%{install_libdir}/libLLVM.so.%{maj_ver}.%{min_ver} -%{install_libdir}/libLTO.so* -%{install_libdir}/libRemarks.so* -%if %{with compat_build} -%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf -%endif - -%files devel -%license LICENSE.TXT - -%ghost %{_bindir}/llvm-config%{exec_suffix} -%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} -%{_mandir}/man1/llvm-config* - -%{install_includedir}/llvm -%{install_includedir}/llvm-c -%{install_libdir}/libLLVM.so -%{install_libdir}/cmake/llvm -%{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} -%ghost %{_bindir}/llvm-config-%{maj_ver} - -%files doc -%license LICENSE.TXT -%doc %{_pkgdocdir}/html - -%files static -%license LICENSE.TXT -%{install_libdir}/*.a -%exclude %{install_libdir}/libLLVMTestingSupport.a -%exclude %{install_libdir}/libLLVMTestingAnnotations.a -%exclude %{install_libdir}/libllvm_gtest.a -%exclude %{install_libdir}/libllvm_gtest_main.a - -%files cmake-utils -%license LICENSE.TXT -%{pkg_datadir}/llvm/cmake - -%files test -%license LICENSE.TXT -%{install_bindir}/not -%{install_bindir}/count -%{install_bindir}/yaml-bench -%{install_bindir}/lli-child-target -%{install_bindir}/llvm-isel-fuzzer -%{install_bindir}/llvm-opt-fuzzer - -%files googletest -%license LICENSE.TXT -%{install_libdir}/libLLVMTestingSupport.a -%{install_libdir}/libLLVMTestingAnnotations.a -%{install_libdir}/libllvm_gtest.a -%{install_libdir}/libllvm_gtest_main.a -%{install_includedir}/llvm-gtest -%{install_includedir}/llvm-gmock - -%if 0%{?rhel} -%files toolset -%license LICENSE.TXT +#%post -n %{pkg_name_lld} +#%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 + +#%postun -n %{pkg_name_lld} +#if [ $1 -eq 0 ] ; then +# %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld +#fi %endif +%include %{_sourcedir}/files.spec.inc %changelog -* Thu Jul 18 2024 Fedora Release Engineering - 18.1.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Thu Jul 11 2024 Jesus Checa Hidalgo - 18.1.8-1 -- Update to LLVM 18.1.8 - -* Fri Jun 07 2024 Tom Stellard - 18.1.7-1 -- 18.1.7 Release - -* Tue May 28 2024 Nikita Popov - 18.1.6-2 -- Fix use after free on ppc64le (rhbz#2283525) - -* Sat May 18 2024 Tom Stellard - 18.1.6-1 -- 18.1.6 Release - -* Tue May 14 2024 Tom Stellard - 18.1.3-2 -- Backport fix for rhbz#2275090 - -%{?llvm_snapshot_changelog_entry} -* Thu Apr 25 2024 Tom Stellard - 18.1.4-1 -- 18.1.4 Release - -* Fri Apr 12 2024 Tom Stellard - 18.1.3-1 -- 18.1.3 Release - -* Thu Mar 21 2024 Zhengyu He - 18.1.2-2 -- Add support for riscv64 - -* Thu Mar 21 2024 Tom Stellard - 18.1.2-1 -- 18.1.2 Release - -* Mon Mar 11 2024 Tom Stellard - 18.1.1-1 -- 18.1.1 Release - -* Tue Feb 27 2024 Tom Stellard - 18.1.0~rc4-1 -- 18.1.0-rc4 Release - -* Tue Feb 20 2024 Tom Stellard - 18.1.0~rc3-1 -- 18.1.0-rc3 Release - -* Thu Feb 01 2024 Nikita Popov - 17.0.6-6 -- Fix crash with -fzero-call-used-regs (rhbz#2262260) - -* Mon Jan 29 2024 Nikita Popov - 17.0.6-5 -- Only use cet-report=error on x86_64 - -* Thu Jan 25 2024 Fedora Release Engineering - 17.0.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 17.0.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Nov 30 2023 Tulio Magno Quites Machado Filho - 17.0.6-2 -- Fix rhbz #2248872 - -* Tue Nov 28 2023 Tulio Magno Quites Machado Filho - 17.0.6-1 -- Update to LLVM 17.0.6 - -* Tue Nov 14 2023 Tulio Magno Quites Machado Filho - 17.0.5-1 -- Update to LLVM 17.0.5 - -* Tue Oct 31 2023 Tulio Magno Quites Machado Filho - 17.0.4-1 -- Update to LLVM 17.0.4 - -* Tue Oct 17 2023 Tulio Magno Quites Machado Filho - 17.0.3-1 -- Update to LLVM 17.0.3 - -* Tue Oct 03 2023 Tulio Magno Quites Machado Filho - 17.0.2-1 -- Update to LLVM 17.0.2 - -* Fri Sep 22 2023 Tulio Magno Quites Machado Filho - 17.0.1~rc4-1 -- Update to LLVM 17.0.1 - -* Tue Sep 05 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc4-1 -- Update to LLVM 17.0.0 RC4 - -* Thu Aug 24 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc3-1 -- Update to LLVM 17.0.0 RC3 - -* Thu Aug 24 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc2-2 -- Temporarily disable a failing test on ppc64le - -* Thu Aug 17 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc2-1 -- Update to LLVM 17.0.0 RC2 - -* Wed Aug 16 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-4 -- Disable LTO on i686 - -* Mon Aug 14 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-3 -- Re-add patch removed by mistake - -* Tue Aug 01 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-2 -- Enable LLVM_UNREACHABLE_OPTIMIZE temporarily - -* Mon Jul 31 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-1 -- Update to LLVM 17.0.0 RC1 - -* Mon Jul 31 2023 Tulio Magno Quites Machado Filho - 16.0.6-6 -- Fix rhbz #2224885 - -* Thu Jul 20 2023 Fedora Release Engineering - 16.0.6-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Mon Jul 10 2023 Tulio Magno Quites Machado Filho - 16.0.6-4 -- Use LLVM_UNITTEST_LINK_FLAGS to reduce link times for unit tests - -* Mon Jul 03 2023 Tulio Magno Quites Machado Filho - 16.0.6-3 -- Improve error messages for unsupported relocs on s390x (rhbz#2216906) -- Disable LLVM_UNREACHABLE_OPTIMIZE - -* Wed Jun 14 2023 Tulio Magno Quites Machado Filho - 16.0.6-1 -- Update to LLVM 16.0.6 - -* Fri Jun 09 2023 Nikita Popov - 16.0.5-2 -- Split off llvm-cmake-utils package - -* Mon Jun 05 2023 Tulio Magno Quites Machado Filho - 16.0.5-1 -- Update to LLVM 16.0.5 - -* Fri May 19 2023 Yaakov Selkowitz - 16.0.4-2 -- Avoid recommonmark dependency in RHEL builds - -* Thu May 18 2023 Tulio Magno Quites Machado Filho - 16.0.4-1 -- Update to LLVM 16.0.4 - -* Tue May 09 2023 Tulio Magno Quites Machado Filho - 16.0.3-1 -- Update to LLVM 16.0.3 - -* Tue Apr 25 2023 Tulio Magno Quites Machado Filho - 16.0.2-1 -- Update to LLVM 16.0.2 - -* Tue Apr 11 2023 Tulio Magno Quites Machado Filho - 16.0.1-1 -- Update to LLVM 16.0.1 - -* Thu Mar 23 2023 Tulio Magno Quites Machado Filho - 16.0.0-2 -- Distribute libllvm_gtest.a and libllvm_gtest_main.a with llvm-googletest -- Stop distributing /usr/share/llvm/src/utils - -* Mon Mar 20 2023 Tulio Magno Quites Machado Filho - 16.0.0-1 -- Update to LLVM 16.0.0 - -* Thu Mar 16 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-2 -- Fix the ppc64le triple - -* Tue Mar 14 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc4-1 -- Update to LLVM 16.0.0 RC4 - -* Fri Mar 10 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-2 -- Fix llvm-exegesis failures on s390x - -* Wed Feb 22 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc3-1 -- Update to LLVM 16.0.0 RC3 - -* Wed Feb 01 2023 Tulio Magno Quites Machado Filho - 16.0.0~rc1-1 -- Update to LLVM 16.0.0 RC1 - -* Thu Jan 19 2023 Tulio Magno Quites Machado Filho - 15.0.7-3 -- Update license to SPDX identifiers. -- Include the Apache license adopted in 2019. - -* Thu Jan 19 2023 Fedora Release Engineering - 15.0.7-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Jan 12 2023 Nikita Popov - 15.0.7-1 -- Update to LLVM 15.0.7 - -* Mon Jan 09 2023 Tom Stellard - 15.0.6-3 -- Omit frame pointers when building - -* Mon Dec 19 2022 Nikita Popov - 15.0.6-2 -- Remove workaround for rbhz#2048440 - -* Mon Dec 05 2022 Nikita Popov - 15.0.6-1 -- Update to LLVM 15.0.6 - -* Fri Nov 11 2022 Nikita Popov - 15.0.4-2 -- Copy CFLAGS to ASMFLAGs to enable CET in asm files - -* Wed Nov 02 2022 Nikita Popov - 15.0.4-1 -- Update to LLVM 15.0.4 - -* Wed Nov 02 2022 Nikita Popov - 15.0.4-1 -- Update to LLVM 15.0.4 - -* Tue Sep 27 2022 Nikita Popov - 15.0.0-2 -- Export GetHostTriple.cmake - -* Tue Sep 06 2022 Nikita Popov - 15.0.0-1 -- Update to LLVM 15.0.0 - -* Thu Jul 21 2022 Fedora Release Engineering - 14.0.5-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Jun 17 2022 Timm Bäder - 14.0.5-2 -- Release bump for new redhat-rpm-config - -* Mon Jun 13 2022 Timm Bäder - 14.0.5-1 -- 14.0.5 Release - -* Wed May 18 2022 Tom Stellard - 14.0.3-1 -- 14.0.3 Release - -* Fri Apr 29 2022 Timm Bäder - 14.0.0-2 -- Remove llvm-cmake-devel package - -* Wed Mar 23 2022 Timm Bäder - 14.0.0-1 -- Update to LLVM 14.0.0 - -* Wed Feb 02 2022 Nikita Popov - 13.0.1-1 -- Update to LLVM 13.0.1 final - -* Tue Jan 25 2022 Nikita Popov - 13.0.1~rc3-1 -- Update to LLVM 13.0.1rc3 - -* Thu Jan 20 2022 Fedora Release Engineering - 13.0.1~rc2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Jan 13 2022 Nikita Popov - 13.0.1~rc2-1 -- Update to LLVM 13.0.1rc2 - -* Mon Jan 10 2022 Nikita Popov - 13.0.1~rc1-1 -- Upstream 13.0.1 rc1 release - -* Sat Jan 08 2022 Miro Hrončok - 13.0.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34 - -* Thu Nov 11 2021 Tom Stellard - 13.0.0-7 -- Enable lto on s390x and arm - -* Mon Oct 25 2021 Tom Stellard - 13.0.0-6 -- Build with Thin LTO - -* Mon Oct 18 2021 Tom Stellard - 13.0.0-5 -- Build with clang - -* Fri Oct 08 2021 Tom Stellard - 13.0.0-4 -- Fix default triple on arm - -* Wed Oct 06 2021 Tom Stellard - 13.0.0-3 -- Set default triple - -* Mon Oct 04 2021 Tom Stellard - 13.0.0-2 -- Drop abi_revision from soname - -* Thu Sep 30 2021 Tom Stellard - 13.0.0-1 -- 13.0.0 Release - -* Thu Sep 30 2021 Tom Stellard - 13.0.0~rc4-2 -- Restore config.guess for host triple detection - -* Fri Sep 24 2021 Tom Stellard - 13.0.0~rc4-1 -- 13.0.0-rc4 Release - -* Fri Sep 17 2021 Tom Stellard - 13.0.0~rc3-1 -- 13.0.0-rc3 Release - -* Mon Sep 13 2021 Tom Stellard - 13.0.0~rc1-3 -- Pass LLVM_DEFAULT_TARGET_TRIPLE to cmake - -* Mon Sep 13 2021 Konrad Kleine - 13.0.0~rc1-2 -- Add --without=check option - -* Wed Aug 04 2021 Tom Stellard - 13.0.0~rc1-1 -- 13.0.0-rc1 Release - -* Thu Jul 22 2021 sguelton@redhat.com - 12.0.1-3 -- Maintain versionned link to llvm-config - -* Thu Jul 22 2021 Fedora Release Engineering - 12.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Jul 12 2021 Tom Stellard - 12.0.1-1 -- 12.0.1 Release - -* Wed Jun 30 2021 Tom Stellard - llvm-12.0.1~rc3-1 -- 12.0.1-rc3 Release - -* Fri May 28 2021 Tom Stellard - 12.0.1~rc1-2 -- Stop installing lit tests - -* Wed May 26 2021 Tom Stellard - llvm-12.0.1~rc1-1 -- 12.0.1-rc1 Release - -* Mon May 17 2021 sguelton@redhat.com - 12.0.0-7 -- Fix handling of llvm-config - -* Mon May 03 2021 kkleine@redhat.com - 12.0.0-6 -- More verbose builds thanks to python3-psutil - -* Sat May 01 2021 sguelton@redhat.com - 12.0.0-5 -- Fix llvm-config install - -* Tue Apr 27 2021 sguelton@redhat.com - 12.0.0-4 -- Provide default empty value for exec_suffix when not in compat mode - -* Tue Apr 27 2021 sguelton@redhat.com - 12.0.0-3 -- Fix llvm-config install - -* Tue Apr 20 2021 sguelton@redhat.com - 12.0.0-2 -- Backport compat package fix - -* Thu Apr 15 2021 Tom Stellard - 12.0.0-1 -- 12.0.0 Release - -* Thu Apr 08 2021 sguelton@redhat.com - 12.0.0-0.11.rc5 -- New upstream release candidate - -* Tue Apr 06 2021 sguelton@redhat.com - 12.0.0-0.10.rc4 -- Patch test case for compatibility with llvm-test latout - -* Fri Apr 02 2021 sguelton@redhat.com - 12.0.0-0.9.rc4 -- New upstream release candidate - -* Wed Mar 31 2021 Jonathan Wakely - 12.0.0-0.8.rc3 -- Rebuilt for removed libstdc++ symbols (#1937698) - -* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-0.7.rc3 -- LLVM 12.0.0 rc3 - -* Wed Mar 10 2021 Kalev Lember - 12.0.0-0.6.rc2 -- Add llvm-static(major) provides to the -static subpackage - -* Tue Mar 09 2021 sguelton@redhat.com - 12.0.0-0.5.rc2 -- rebuilt - -* Tue Mar 02 2021 sguelton@redhat.com - 12.0.0-0.4.rc2 -- Change CI working dir - -* Wed Feb 24 2021 sguelton@redhat.com - 12.0.0-0.3.rc2 -- 12.0.0-rc2 release - -* Tue Feb 16 2021 Dave Airlie - 12.0.0-0.2.rc1 -- Enable LLVM_USE_PERF to allow perf integration - -* Tue Feb 2 2021 Serge Guelton - 12.0.0-0.1.rc1 -- 12.0.0-rc1 release - -* Tue Jan 26 2021 Fedora Release Engineering - 11.1.0-0.3.rc2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jan 22 2021 Serge Guelton - 11.1.0-0.2.rc2 -- 11.1.0-rc2 release - -* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1 -- 11.1.0-rc1 release - -* Tue Jan 05 2021 Serge Guelton - 11.0.1-3.rc2 -- Waive extra test case - -* Sun Dec 20 2020 sguelton@redhat.com - 11.0.1-2.rc2 -- 11.0.1-rc2 release - -* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1 -- 11.0.1-rc1 release - -* Sat Oct 31 2020 Jeff Law - 11.0.0-2 -- Fix missing #include for gcc-11 - -* Wed Oct 14 2020 Josh Stone - 11.0.0-1 -- Fix coreos-installer test crash on s390x (rhbz#1883457) - -* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.11 -- llvm 11.0.0 - final release - -* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.10.rc6 -- 11.0.0-rc6 - -* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.9.rc5 -- 11.0.0-rc5 Release - -* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.8.rc3 -- Fix NVR - -* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.2.rc3 -- Obsolete patch for rhbz#1862012 - -* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3 -- 11.0.0-rc3 Release - -* Wed Sep 02 2020 sguelton@redhat.com - 11.0.0-0.7.rc2 -- Apply upstream patch for rhbz#1862012 - -* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.6.rc2 -- Fix source location - -* Fri Aug 21 2020 Tom Stellard - 11.0.0-0.5.rc2 -- 11.0.0-rc2 Release - -* Wed Aug 19 2020 Tom Stellard - 11.0.0-0.4.rc1 -- Fix regression-tests CI tests - -* Tue Aug 18 2020 Tom Stellard - 11.0.0-0.3.rc1 -- Fix rust crash on ppc64le compiling firefox -- rhbz#1862012 - -* Tue Aug 11 2020 Tom Stellard - 11.0.0-0.2.rc1 -- Install update_cc_test_checks.py script - -* Thu Aug 06 2020 Tom Stellard - 11.0.0-0.1-rc1 -- LLVM 11.0.0-rc1 Release -- Make llvm-devel require llvm-static and llvm-test - -* Tue Aug 04 2020 Tom Stellard - 10.0.0-10 -- Backport upstream patch to fix build with -flto. -- Disable LTO on s390x to work-around unit test failures. - -* Sat Aug 01 2020 sguelton@redhat.com - 10.0.0-9 -- Fix update-alternative uninstall script - -* Sat Aug 01 2020 sguelton@redhat.com - 10.0.0-8 -- Fix gpg verification and update macro usage. - -* Sat Aug 01 2020 Fedora Release Engineering - 10.0.0-7 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 10.0.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild -* Thu Jun 11 2020 sguelton@redhat.com - 10.0.0-5 -- Make llvm-test.tar.gz creation reproducible. - -* Tue Jun 02 2020 sguelton@redhat.com - 10.0.0-4 -- Instruct cmake not to generate RPATH - -* Thu Apr 30 2020 Tom Stellard - 10.0.0-3 -- Install LLVMgold.so symlink in bfd-plugins directory - -* Tue Apr 07 2020 sguelton@redhat.com - 10.0.0-2 -- Do not package UpdateTestChecks tests in llvm-tests -- Apply upstream patch bab5908df to pass gating tests - -* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-1 -- 10.0.0 final - -* Mon Mar 23 2020 sguelton@redhat.com - 10.0.0-0.6.rc6 -- 10.0.0 rc6 - -* Thu Mar 19 2020 sguelton@redhat.com - 10.0.0-0.5.rc5 -- 10.0.0 rc5 - -* Sat Mar 14 2020 sguelton@redhat.com - 10.0.0-0.4.rc4 -- 10.0.0 rc4 - -* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.3.rc3 -- 10.0.0 rc3 - -* Fri Feb 28 2020 sguelton@redhat.com - 10.0.0-0.2.rc2 -- Remove *_finite support, see rhbz#1803203 - -* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.1.rc2 -- 10.0.0 rc2 - -* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1 -- 10.0.0 rc1 - -* Wed Jan 29 2020 Fedora Release Engineering - 9.0.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Tue Jan 21 2020 Tom Stellard - 9.0.1-4 -- Rebuild after previous build failed to strip binaries - -* Fri Jan 17 2020 Tom Stellard - 9.0.1-3 -- Add explicit Requires from sub-packages to llvm-libs - -* Fri Jan 10 2020 Tom Stellard - 9.0.1-2 -- Fix crash with kernel bpf self-tests - -* Thu Dec 19 2019 tstellar@redhat.com - 9.0.1-1 -- 9.0.1 Release - -* Mon Nov 25 2019 sguelton@redhat.com - 9.0.0-4 -- Activate AVR on all architectures - -* Mon Sep 30 2019 Tom Stellard - 9.0.0-3 -- Build libLLVM.so first to avoid OOM errors - -* Fri Sep 27 2019 Tom Stellard - 9.0.0-2 -- Remove unneeded BuildRequires: libstdc++-static - -* Thu Sep 19 2019 sguelton@redhat.com - 9.0.0-1 -- 9.0.0 Release - -* Wed Sep 18 2019 sguelton@redhat.com - 9.0.0-0.5.rc3 -- Support avr target, see rhbz#1718492 - -* Tue Sep 10 2019 Tom Stellard - 9.0.0-0.4.rc3 -- Split out test executables into their own export file - -* Fri Sep 06 2019 Tom Stellard - 9.0.0-0.3.rc3 -- Fix patch for splitting out static library exports - -* Fri Aug 30 2019 Tom Stellard - 9.0.0-0.2.rc3 -- 9.0.0-rc3 Release - -* Thu Aug 01 2019 Tom Stellard - 9.0.0-0.1.rc2 -- 9.0.0-rc2 Release - -* Tue Jul 30 2019 Tom Stellard - 8.0.0-9 -- Sync with llvm8.0 spec file - -* Thu Jul 25 2019 Fedora Release Engineering - 8.0.0-8.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Wed Jul 17 2019 Tom Stellard - 8.0.0-8 -- Add provides for the major version of sub-packages - -* Fri May 17 2019 sguelton@redhat.com - 8.0.0-7 -- Fix conflicts between llvm-static = 8 and llvm-dev < 8 around LLVMStaticExports.cmake - -* Wed Apr 24 2019 Tom Stellard - 8.0.0-6 -- Make sure we aren't passing -g on s390x - -* Sat Mar 30 2019 Tom Stellard - 8.0.0-5 -- Enable build rpath while keeping install rpath disabled - -* Wed Mar 27 2019 Tom Stellard - 8.0.0-4 -- Backport r351577 from trunk to fix ninja check failures - -* Tue Mar 26 2019 Tom Stellard - 8.0.0-3 -- Fix ninja check - -* Fri Mar 22 2019 Tom Stellard - 8.0.0-2 -- llvm-test fixes - -* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1 -- 8.0.0 final - -* Fri Mar 15 2019 sguelton@redhat.com - 8.0.0-0.6.rc4 -- Activate all backends (rhbz#1689031) - -* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.5.rc4 -- 8.0.0 Release candidate 4 - -* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.4.rc3 -- Move some binaries to -test package, cleanup specfile - -* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3 -- 8.0.0 Release candidate 3 - -* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2 -- 8.0.0 Release candidate 2 - -* Sat Feb 9 2019 sguelton@redhat.com - 8.0.0-0.1.rc1 -- 8.0.0 Release candidate 1 - -* Fri Feb 01 2019 Fedora Release Engineering - 7.0.1-2.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 21 2019 Josh Stone - 7.0.1-2 -- Fix discriminators in metadata, rhbz#1668033 - -* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1 -- 7.0.1 release - -* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-5 -- Ensure rpmlint passes on specfile - -* Sat Nov 17 2018 Tom Stellard - 7.0.0-4 -- Install testing libraries for unittests - -* Sat Oct 27 2018 Tom Stellard - 7.0.0-3 -- Fix running unittests as not-root user - -* Thu Sep 27 2018 Tom Stellard - 7.0.0-2 -- Fixes for llvm-test package: -- Add some missing Requires -- Add --threads option to run-lit-tests script -- Set PATH so lit can find tools like count, not, etc. -- Don't hardcode tools directory to /usr/lib64/llvm -- Fix typo in yaml-bench define -- Only print information about failing tests - -* Fri Sep 21 2018 Tom Stellard - 7.0.0-1 -- 7.0.0 Release - -* Thu Sep 13 2018 Tom Stellard - 7.0.0-0.15.rc3 -- Disable rpath on install LLVM and related sub-projects - -* Wed Sep 12 2018 Tom Stellard - 7.0.0-0.14.rc3 -- Remove rpath from executables and libraries - -* Tue Sep 11 2018 Tom Stellard - 7.0.0-0.13.rc3 -- Re-enable arm and aarch64 targets on x86_64 - -* Mon Sep 10 2018 Tom Stellard - 7.0.0-0.12.rc3 -- 7.0.0-rc3 Release - -* Fri Sep 07 2018 Tom Stellard - 7.0.0-0.11.rc2 -- Use python3 shebang for opt-viewewr scripts - -* Thu Aug 30 2018 Tom Stellard - 7.0.0-0.10.rc2 -- Drop all uses of python2 from lit tests - -* Thu Aug 30 2018 Tom Stellard - 7.0.0-0.9.rc2 -- Build the gold plugin on all supported architectures - -* Wed Aug 29 2018 Kevin Fenzi - 7.0.0-0.8.rc2 -- Re-enable debuginfo to avoid 25x size increase. - -* Tue Aug 28 2018 Tom Stellard - 7.0.0-0.7.rc2 -- 7.0.0-rc2 Release - -* Tue Aug 28 2018 Tom Stellard - 7.0.0-0.6.rc1 -- Guard valgrind usage with valgrind_arches macro - -* Thu Aug 23 2018 Tom Stellard - 7.0.0-0.5.rc1 -- Package lit tests and googletest sources. - -* Mon Aug 20 2018 Tom Stellard - 7.0.0-0.4.rc1 -- Re-enable AMDGPU target on ARM rhbz#1618922 - -* Mon Aug 13 2018 Tom Stellard - 7.0.0-0.3.rc1 -- Drop references to TestPlugin.so from cmake files - -* Fri Aug 10 2018 Tom Stellard - 7.0.0-0.2.rc1 -- Fixes for lit tests - -* Fri Aug 10 2018 Tom Stellard - 7.0.0-0.1.rc1 -- 7.0.0-rc1 Release -- Reduce number of enabled targets on all arches. -- Drop s390 detection patch, LLVM does not support s390 codegen. - -* Mon Aug 06 2018 Tom Stellard - 6.0.1-6 -- Backport some fixes needed by mesa and rust - -* Thu Jul 26 2018 Tom Stellard - 6.0.1-5 -- Move libLLVM-6.0.so to llvm6.0-libs. - -* Mon Jul 23 2018 Tom Stellard - 6.0.1-4 -- Rebuild because debuginfo stripping failed with the previous build - -* Fri Jul 13 2018 Tom Stellard - 6.0.1-3 -- Sync specfile with llvm6.0 package - -* Fri Jul 13 2018 Fedora Release Engineering - 6.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jun 25 2018 Tom Stellard - 6.0.1-1 -- 6.0.1 Release - -* Thu Jun 07 2018 Tom Stellard - 6.0.1-0.4.rc2 -- 6.0.1-rc2 - -* Wed Jun 06 2018 Tom Stellard - 6.0.1-0.3.rc1 -- Re-enable all targets to avoid breaking the ABI. - -* Mon Jun 04 2018 Tom Stellard - 6.0.1-0.2.rc1 -- Reduce the number of enabled targets based on the architecture - -* Thu May 10 2018 Tom Stellard - 6.0.1-0.1.rc1 -- 6.0.1 rc1 - -* Tue Mar 27 2018 Tom Stellard - 6.0.0-11 -- Re-enable arm tests that used to hang - -* Thu Mar 22 2018 Tom Stellard - 6.0.0-10 -- Fix testcase in backported patch - -* Tue Mar 20 2018 Tom Stellard - 6.0.0-9 -- Prevent external projects from linking against both static and shared - libraries. rhbz#1558657 - -* Mon Mar 19 2018 Tom Stellard - 6.0.0-8 -- Backport r327651 from trunk rhbz#1554349 - -* Fri Mar 16 2018 Tom Stellard - 6.0.0-7 -- Filter out cxxflags and cflags from llvm-config that aren't supported by clang -- rhbz#1556980 - -* Wed Mar 14 2018 Tom Stellard - 6.0.0-6 -- Enable symbol versioning in libLLVM.so - -* Wed Mar 14 2018 Tom Stellard - 6.0.0-5 -- Stop statically linking libstdc++. This is no longer required by Steam - client, but the steam installer still needs a work-around which should - be handled in the steam package. -* Wed Mar 14 2018 Tom Stellard - 6.0.0-4 -- s/make check/ninja check/ - -* Fri Mar 09 2018 Tom Stellard - 6.0.0-3 -- Backport fix for compile time regression on rust rhbz#1552915 - -* Thu Mar 08 2018 Tom Stellard - 6.0.0-2 -- Build with Ninja: This reduces RPM build time on a 6-core x86_64 builder - from 82 min to 52 min. - -* Thu Mar 08 2018 Tom Stellard - 6.0.0-1 -- 6.0.0 Release - -* Thu Mar 08 2018 Tom Stellard - 6.0.0-0.5.rc2 -- Reduce debuginfo size on i686 to avoid OOM errors during linking - -* Fri Feb 09 2018 Tom Stellard - 6.0.0-0.4.rc2 -- 6.0.1 rc2 - -* Fri Feb 09 2018 Igor Gnatenko - 6.0.0-0.3.rc1 -- Escape macros in %%changelog - -* Thu Feb 08 2018 Fedora Release Engineering - 6.0.0-0.2.rc1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Fri Jan 19 2018 Tom Stellard - 6.0.0-0.1.rc1 -- 6.0.1 rc1 - -* Tue Dec 19 2017 Tom Stellard - 5.0.1-1 -- 5.0.1 Release - -* Mon Nov 20 2017 Tom Stellard - 5.0.0-5 -- Backport debuginfo fix for rust - -* Fri Nov 03 2017 Tom Stellard - 5.0.0-4 -- Reduce debuginfo size for ARM - -* Tue Oct 10 2017 Tom Stellard - 5.0.0-2 -- Reduce memory usage on ARM by disabling debuginfo and some non-ARM targets. - -* Mon Sep 25 2017 Tom Stellard - 5.0.0-1 -- 5.0.0 Release - -* Mon Sep 18 2017 Tom Stellard - 4.0.1-6 -- Add Requires: libedit-devel for llvm-devel - -* Fri Sep 08 2017 Tom Stellard - 4.0.1-5 -- Enable libedit backend for LineEditor API - -* Fri Aug 25 2017 Tom Stellard - 4.0.1-4 -- Enable extra functionality when run the LLVM JIT under valgrind. - -* Thu Aug 03 2017 Fedora Release Engineering - 4.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 4.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Wed Jun 21 2017 Tom Stellard - 4.0.1-1 -- 4.0.1 Release - -* Thu Jun 15 2017 Tom Stellard - 4.0.0-6 -- Install llvm utils - -* Thu Jun 08 2017 Tom Stellard - 4.0.0-5 -- Fix docs-llvm-man target - -* Mon May 01 2017 Tom Stellard - 4.0.0-4 -- Make cmake files no longer depend on static libs (rhbz 1388200) - -* Tue Apr 18 2017 Josh Stone - 4.0.0-3 -- Fix computeKnownBits for ARMISD::CMOV (rust-lang/llvm#67) - -* Mon Apr 03 2017 Tom Stellard - 4.0.0-2 -- Simplify spec with rpm macros. - -* Thu Mar 23 2017 Tom Stellard - 4.0.0-1 -- LLVM 4.0.0 Final Release - -* Wed Mar 22 2017 tstellar@redhat.com - 3.9.1-6 -- Fix %%postun sep for -devel package. - -* Mon Mar 13 2017 Tom Stellard - 3.9.1-5 -- Disable failing tests on ARM. - -* Sun Mar 12 2017 Peter Robinson 3.9.1-4 -- Fix missing mask on relocation for aarch64 (rhbz 1429050) - -* Wed Mar 01 2017 Dave Airlie - 3.9.1-3 -- revert upstream radeonsi breaking change. - -* Thu Feb 23 2017 Josh Stone - 3.9.1-2 -- disable sphinx warnings-as-errors - -* Fri Feb 10 2017 Orion Poplawski - 3.9.1-1 -- llvm 3.9.1 - -* Fri Feb 10 2017 Fedora Release Engineering - 3.9.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Nov 29 2016 Josh Stone - 3.9.0-7 -- Apply backports from rust-lang/llvm#55, #57 - -* Tue Nov 01 2016 Dave Airlie - 3.9.0-5 -- apply the patch from -4 - -* Wed Oct 26 2016 Dave Airlie - 3.9.0-4 -- add fix for lldb out-of-tree build - -* Mon Oct 17 2016 Josh Stone - 3.9.0-3 -- Apply backports from rust-lang/llvm#47, #48, #53, #54 - -* Sat Oct 15 2016 Josh Stone - 3.9.0-2 -- Apply an InstCombine backport via rust-lang/llvm#51 - -* Wed Sep 07 2016 Dave Airlie - 3.9.0-1 -- llvm 3.9.0 -- upstream moved where cmake files are packaged. -- upstream dropped CppBackend - -* Wed Jul 13 2016 Adam Jackson - 3.8.1-1 -- llvm 3.8.1 -- Add mips target -- Fix some shared library mispackaging - -* Tue Jun 07 2016 Jan Vcelak - 3.8.0-2 -- fix color support detection on terminal - -* Thu Mar 10 2016 Dave Airlie 3.8.0-1 -- llvm 3.8.0 release - -* Wed Mar 09 2016 Dan Horák 3.8.0-0.3 -- install back memory consumption workaround for s390 - -* Thu Mar 03 2016 Dave Airlie 3.8.0-0.2 -- llvm 3.8.0 rc3 release - -* Fri Feb 19 2016 Dave Airlie 3.8.0-0.1 -- llvm 3.8.0 rc2 release - -* Tue Feb 16 2016 Dan Horák 3.7.1-7 -- recognize s390 as SystemZ when configuring build - -* Sat Feb 13 2016 Dave Airlie 3.7.1-6 -- export C++ API for mesa. - -* Sat Feb 13 2016 Dave Airlie 3.7.1-5 -- reintroduce llvm-static, clang needs it currently. - -* Fri Feb 12 2016 Dave Airlie 3.7.1-4 -- jump back to single llvm library, the split libs aren't working very well. - -* Fri Feb 05 2016 Dave Airlie 3.7.1-3 -- add missing obsoletes (#1303497) - -* Thu Feb 04 2016 Fedora Release Engineering - 3.7.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Thu Jan 07 2016 Jan Vcelak 3.7.1-1 -- new upstream release -- enable gold linker - -* Wed Nov 04 2015 Jan Vcelak 3.7.0-100 -- fix Requires for subpackages on the main package - -* Tue Oct 06 2015 Jan Vcelak 3.7.0-100 -- initial version using cmake build system +%include %{_sourcedir}/changelog.spec.inc diff --git a/packages.spec.inc b/packages.spec.inc index a4d185b..d2ebcba 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -20,6 +20,7 @@ Requires: %{pkg_name_llvm}-libs%{?_isa} = %{version}-%{release} # app that requires the libLLVMLineEditor, so we need to make sure # libedit-devel is available. Requires: libedit-devel +Requires: libzstd-devel # The installed cmake files reference binaries from llvm-test, llvm-static, and # llvm-gtest. We tried in the past to split the cmake exports for these binaries # out into separate files, so that llvm-devel would not need to Require these packages, diff --git a/sources b/sources index 06046a7..be64176 100644 --- a/sources +++ b/sources @@ -1,6 +1,2 @@ -SHA512 (cmake-18.1.8.src.tar.xz) = e02243b491f9e688db28d7b53270fcf87debf09d3c95b136a7c7b96e26890de68712c60a1e85f5a448a95ad8c81f2d8ae77047780822443bbe39f1a9e6211007 -SHA512 (cmake-18.1.8.src.tar.xz.sig) = 99191e95130fe4363a8db8f411a0e61af0549ad182a1280f99f0dd3ee679a321b993d103c6915d535a55d9f8a4d7fea86b7fdcc77605e02150e8edf1e18dee57 -SHA512 (llvm-18.1.8.src.tar.xz) = 930814730bb2d80cf7f7b2968f0f1f1442009ca62a7ca29992b69d63823270584b059d16aa845bb381411da566e7e4f255fcfbc38acbdf865eb0419b4dfd7459 -SHA512 (llvm-18.1.8.src.tar.xz.sig) = aab7cb61a6b5dd3776a9b306d91d08763710725b72ba6a4263d3cca5ae5959e3b073b27dbfd95f9a53a78600c6f414e2fd1cc0dbe3176d7cf142996f7af700ca -SHA512 (third-party-18.1.8.src.tar.xz) = bedaa5d29ebeaf0ee1c700eb8492d0fef185e7c16528202927c81117d94fadd568829aa0e1873e1217e8e72866f3876a9681bbdb2a6a0a5466fc911f7b3620d4 -SHA512 (third-party-18.1.8.src.tar.xz.sig) = 32c4d779a56a3908b291a4f0cf1df72ccb86b55439ad66f9cbad1b48a77cb92b129b131806d2914d0e63cb319cde3181a2c03b75856ec36cee5f88120bb58214 +SHA512 (llvm-project-19.1.0-rc3.src.tar.xz) = 3ee4eab848e5e38c396e6f5addf5eb42570d451fc8e7cd77150dc5542f8f710f4a9db51836f7a799996dd1b8194defe4d58efe7c19e5d5e1c5f3dbdda94c0cf3 +SHA512 (llvm-project-19.1.0-rc3.src.tar.xz.sig) = ef0fd2e3e7069fbfd410cbcf71294d1b7182456330ff151348058b5cb0f292edaecb9dcbf613ee4fc979214a23bd3bb8077d71e674635359da36b938dc143266 From 1e0387cf857bf2ef27e05d190fbbb2b1ceffa5e9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 30 Jul 2024 14:59:07 +0000 Subject: [PATCH 169/205] Disable python-lit and lldb for compat builds --- build.spec.inc | 11 ++++++++++- check.spec.inc | 3 +++ files.spec.inc | 4 ++++ globals.spec.inc | 9 +++++++++ install.spec.inc | 4 ++++ packages.spec.inc | 6 ++++-- 6 files changed, 34 insertions(+), 3 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index bbf1688..732837c 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -12,6 +12,11 @@ %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif +%global projects clang;clang-tools-extra;lld +%if %{with lldb} +%global projects %{projects};lldb +%endif + # Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files. export ASMFLAGS="%{build_cflags}" @@ -32,9 +37,11 @@ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:`pwd`/llvm/%{_vpath_builddir}/%{_lib} cd llvm #region LLVM lit +%if %{with python_lit} pushd utils/lit %py3_build popd +%endif #endregion %if 0%{?rhel} == 8 @@ -47,7 +54,7 @@ popd # TODO: Override LIBOMP_INSTALL_LIBDIR, because otherwise the libraries # are installed to /usr/lib64/$TRIPLE and clang can't find them. %cmake -G Ninja \ - -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb" \ + -DLLVM_ENABLE_PROJECTS="%{projects}" \ \ \ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ @@ -196,6 +203,7 @@ popd \ \ \ +%if %{with lldb} -DLLDB_DISABLE_CURSES:BOOL=OFF \ -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \ -DLLDB_DISABLE_PYTHON:BOOL=OFF \ @@ -203,6 +211,7 @@ popd -DLLDB_TEST_USER_ARGS=--skip-category=watchpoint \ %endif -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL=ON \ +%endif \ \ \ diff --git a/check.spec.inc b/check.spec.inc index b5e105f..b772f63 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -70,6 +70,7 @@ function test_list_to_regex() #endregion #region Test LLVM lit +# It's fine to always run this, even if we're not shipping python-lit. reset_test_opts %cmake_build --target check-lit #endregion @@ -249,6 +250,7 @@ export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out) %cmake_build --target check-openmp #endregion +%if %{with lldb} # Don't run LLDB tests on s390x because more than 150 tests are failing there %ifnarch s390x ## TODO(kkleine): Come back and re-enable testing for LLDB @@ -267,6 +269,7 @@ export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out) ## %%cmake_build --target check-lldb-shell ## #endregion %endif +%endif #region Test LLD diff --git a/files.spec.inc b/files.spec.inc index ac56147..76158dc 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -1,10 +1,12 @@ #region LLVM lit files +%if %{with python_lit} %files -n python3-lit %license llvm/utils/lit/LICENSE.TXT %doc llvm/utils/lit/README.rst %{python3_sitelib}/lit/ %{python3_sitelib}/lit-*-info/ %{_bindir}/lit +%endif #endregion #region LLVM files @@ -632,6 +634,7 @@ #endregion #region LLDB files +%if %{with lldb} %files -n %{pkg_name_lldb} %license lldb/LICENSE.TXT %{install_bindir}/lldb* @@ -646,4 +649,5 @@ %files -n python3-lldb %{python3_sitearch}/lldb +%endif #endregion diff --git a/globals.spec.inc b/globals.spec.inc index 8e7d78d..cf96b1a 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -8,6 +8,15 @@ %bcond_with compat_build %bcond_without check +# Compat builds do not include python-lit and lldb +%if %{with compat_build} +%bcond_with python_lit +%bcond_with lldb +%else +%bcond_without python_lit +%bcond_without lldb +%endif + # Disable LTO on x86 and riscv in order to reduce memory consumption. %ifarch %ix86 riscv64 %bcond_with lto_build diff --git a/install.spec.inc b/install.spec.inc index 1b0261b..5e0848c 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -2,12 +2,14 @@ pushd llvm +%if %{with python_lit} pushd utils/lit %py3_install # Strip out #!/usr/bin/env python sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/lit/*.py popd +%endif %cmake_install @@ -286,6 +288,7 @@ fi #endregion #region LLDB installation +%if %{with lldb} %multilib_fix_c_header --file %{install_includedir}/lldb/Host/Config.h # remove static libraries @@ -298,4 +301,5 @@ ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so # remove bundled six.py rm -f %{buildroot}%{python3_sitearch}/six.* +%endif #endregion diff --git a/packages.spec.inc b/packages.spec.inc index d2ebcba..8abf8d7 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -1,4 +1,5 @@ #region LLVM lit package +%if %{with python_lit} %package -n python3-lit Summary: LLVM lit test runner for Python 3 @@ -8,6 +9,7 @@ Recommends: python3-psutil %description -n python3-lit lit is a tool used by the LLVM project for executing its test suites. +%endif #endregion #region LLVM packages @@ -322,7 +324,7 @@ This is the main package for llvm-toolset. #endregion #region LLDB packages - +%if %{with lldb} %package -n %{pkg_name_lldb} Summary: Next generation high-performance debugger License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -352,5 +354,5 @@ Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} %description -n python3-lldb The package contains the LLDB Python module. - +%endif #endregion From 360dd3bc6830a76006537021c3da794646f21ee3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 16:51:22 +0200 Subject: [PATCH 170/205] Remove _smp_mflags override on ppc64le Using a fixed -j argument is pretty dubious and may have the opposite of the desired effect. E.g. on a recent copr build I see ppc64le having 5 cpus, so this actually increases the level of parallelism (and oversubscribes...) rather than decreasing. I don't think we have evidence that this particular workaround is still needed, so drop it. --- globals.spec.inc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/globals.spec.inc b/globals.spec.inc index cf96b1a..fe2e57e 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -105,12 +105,6 @@ %global pkg_includedir %{install_prefix}/include %endif -%ifarch ppc64le -# Too many threads on ppc64 systems causes OOM errors. -# TODO(kkleine): Is this really needed when building together with llvm? -%global _smp_mflags -j8 -%endif - #endregion #region COMPILER-RT globals From c3ed99b303f7e76e266f7ad9ed76a98cb16351c5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 11:27:03 +0000 Subject: [PATCH 171/205] Port llvm changes From: https://src.fedoraproject.org/rpms/llvm/c/d5ddbea65fca7bfff8b61d76a2bba8001838f2ea?branch=rawhide --- build.spec.inc | 10 +--------- install.spec.inc | 32 +++++++++++--------------------- packages.spec.inc | 6 ------ 3 files changed, 12 insertions(+), 36 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 732837c..685a6b4 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -153,24 +153,16 @@ popd -DLLVM_BUILD_TOOLS:BOOL=ON \ \ -DLLVM_BUILD_TESTS:BOOL=ON \ -%if %{with compat_build} - -DLLVM_INSTALL_GTEST:BOOL=OFF \ -%else -DLLVM_INSTALL_GTEST:BOOL=ON \ -%endif -DLLVM_LIT_ARGS="-vv" \ \ -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \ -DLLVM_BUILD_EXAMPLES:BOOL=OFF \ \ -DLLVM_INCLUDE_UTILS:BOOL=ON \ -%if %{with compat_build} - -DLLVM_INSTALL_UTILS:BOOL=OFF \ -%else -DLLVM_INSTALL_UTILS:BOOL=ON \ - -DLLVM_UTILS_INSTALL_DIR:PATH=%{_bindir} \ + -DLLVM_UTILS_INSTALL_DIR:PATH=bin \ -DLLVM_TOOLS_INSTALL_DIR:PATH=bin \ -%endif \ -DLLVM_INCLUDE_DOCS:BOOL=ON \ -DLLVM_BUILD_DOCS:BOOL=ON \ diff --git a/install.spec.inc b/install.spec.inc index 5e0848c..4c62fee 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -17,26 +17,27 @@ popd mkdir -p %{buildroot}/%{_bindir} -%if %{without compat_build} - -# Fix some man pages -ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config%{exec_suffix}-%{__isa_bits}.1 - # Install binaries needed for lit tests %global test_binaries llvm-isel-fuzzer llvm-opt-fuzzer for f in %{test_binaries} do - install -m 0755 llvm/%{_vpath_builddir}/bin/$f %{buildroot}%{_bindir} + install -m 0755 llvm/%{_vpath_builddir}/bin/$f %{buildroot}%{install_bindir} done -%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h - # Install libraries needed for unittests %global build_libdir llvm/%{_vpath_builddir}/%{_lib} -install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir} -install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{_libdir} +install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{install_libdir} +install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{install_libdir} + +# Fix multi-lib +%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h + +%if %{without compat_build} + +# Fix some man pages +ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config%{exec_suffix}-%{__isa_bits}.1 %if %{with gold} # Add symlink to lto plugin in the binutils plugin directory. @@ -52,14 +53,6 @@ for f in %{buildroot}/%{install_bindir}/*; do ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} done -# Move header files -mkdir -p %{buildroot}/%{pkg_includedir} -ln -s ../../../%{install_includedir}/llvm %{buildroot}/%{pkg_includedir}/llvm -ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{pkg_includedir}/llvm-c - -# Fix multi-lib -%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h - # Create ld.so.conf.d entry mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{pkg_name_llvm}-%{_arch}.conf << EOF @@ -73,9 +66,6 @@ for f in %{build_install_prefix}/share/man/man1/*; do mv $f %{buildroot}%{_mandir}/man1/$filename%{exec_suffix}.1 done -# Remove opt-viewer, since this is just a compatibility package. -rm -Rf %{build_install_prefix}/share/opt-viewer - %endif # llvm-config special casing. llvm-config is managed by update-alternatives. diff --git a/packages.spec.inc b/packages.spec.inc index 8abf8d7..7c7e118 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -29,10 +29,8 @@ Requires: libzstd-devel # but this caused bugs (rhbz#1773678) and forced us to carry two non-upstream # patches. Requires: %{pkg_name_llvm}-static%{?_isa} = %{version}-%{release} -%if %{without compat_build} Requires: %{pkg_name_llvm}-test%{?_isa} = %{version}-%{release} Requires: %{pkg_name_llvm}-googletest%{?_isa} = %{version}-%{release} -%endif Requires(post): %{_sbindir}/alternatives @@ -74,8 +72,6 @@ Summary: CMake utilities shared across LLVM subprojects CMake utilities shared across LLVM subprojects. This is for internal use by LLVM packages only. -%if %{without compat_build} - %package -n %{pkg_name_llvm}-test Summary: LLVM regression tests Requires: %{pkg_name_llvm}%{?_isa} = %{version}-%{release} @@ -92,8 +88,6 @@ Summary: LLVM's modified googletest sources %description -n %{pkg_name_llvm}-googletest LLVM's modified googletest sources. -%endif - %if %{with snapshot_build} %package -n %{pkg_name_llvm}-build-stats Summary: Statistics for the RPM build From ba868932acddc61ccd3291f957b4c4d53a80991c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 12:38:37 +0000 Subject: [PATCH 172/205] Port clang changes From: https://src.fedoraproject.org/rpms/clang/c/bec39369677cabc2cb5f9d8ad7ab3bf375751941?branch=rawhide --- build.spec.inc | 6 ---- files.spec.inc | 2 +- globals.spec.inc | 2 ++ install.spec.inc | 85 +++++++++++++++++++++++++---------------------- packages.spec.inc | 15 ++++----- 5 files changed, 55 insertions(+), 55 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 685a6b4..bca74e7 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -62,15 +62,9 @@ popd -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON \ %endif -DPython3_EXECUTABLE=%{__python3} \ -%if %{with compat_build} - -DLLVM_INCLUDE_TESTS:BOOL=OFF \ - -DCLANG_INCLUDE_TESTS:BOOL=OFF \ - -DCLANG_BUILD_TOOLS:BOOL=OFF \ -%else -DLLVM_INCLUDE_TESTS:BOOL=ON \ -DCLANG_INCLUDE_TESTS:BOOL=ON \ -DLLVM_BUILD_UTILS:BOOL=ON \ -%endif -DCLANG_ENABLE_ARCMT:BOOL=ON \ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \ -DCLANG_INCLUDE_DOCS:BOOL=ON \ diff --git a/files.spec.inc b/files.spec.inc index 76158dc..13a5471 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -497,7 +497,7 @@ %license clang-tools-extra/LICENSE.TXT %{install_includedir}/clang-tidy/ -%files -n git-clang-format +%files -n git-clang-format%{pkg_suffix} %license clang/LICENSE.TXT %{install_bindir}/git-clang-format %if %{with compat_build} diff --git a/globals.spec.inc b/globals.spec.inc index fe2e57e..4f6d12a 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -47,6 +47,7 @@ %if %{with compat_build} %global pkg_name_llvm llvm%{maj_ver} +%global pkg_suffix %{maj_ver} %global exec_suffix -%{maj_ver} %global install_prefix %{_libdir}/%{pkg_name_llvm} %global install_bindir %{install_prefix}/bin @@ -68,6 +69,7 @@ %global install_libexecdir %{_libexecdir} %global install_docdir %{_docdir} %global pkg_datadir %{_datadir} +%global pkg_suffix %{nil} %global exec_suffix %{nil} %endif diff --git a/install.spec.inc b/install.spec.inc index 4c62fee..a124a00 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -101,24 +101,13 @@ cp -Rv cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake #region CLANG installation -%if %{with compat_build} - -# TODO(kkleine): I don't know if the removal of every binary -# below is what we want to do in big-merge for compat packages. -# Re-evaluate this! - -# Remove binaries/other files -rm -Rf %{buildroot}%{install_bindir} -rm -Rf %{buildroot}%{install_prefix}/share -rm -Rf %{buildroot}%{install_prefix}/libexec -# Remove scanview-py helper libs -rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild} - -%else +# Add a symlink in /usr/bin to clang-format-diff +ln -s %{install_datadir}/clang/clang-format-diff.py %{buildroot}%{install_bindir}/clang-format-diff # File in the macros file for other packages to use. We are not doing this # in the compat package, because the version macros would # conflict with # eachother if both clang and the clang compat package were installed together. +%if %{without compat_build} install -p -m0644 -D %{SOURCE2005} %{buildroot}%{_rpmmacrodir}/macros.%{pkg_name_clang} sed -i -e "s|@@CLANG_MAJOR_VERSION@@|%{maj_ver}|" \ -e "s|@@CLANG_MINOR_VERSION@@|%{min_ver}|" \ @@ -140,18 +129,55 @@ mv %{buildroot}%{_prefix}/%{_lib}/{libear,libscanbuild} %{buildroot}%{python3_si %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/libear %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/libscanbuild -# Fix permissions of scan-view scripts -chmod a+x %{buildroot}%{_datadir}/scan-view/{Reporter.py,startfile.py} - -# multilib fix -%multilib_fix_c_header --file %{_includedir}/clang/Config/config.h - # Move emacs integration files to the correct directory mkdir -p %{buildroot}%{_emacs_sitestartdir} for f in clang-format.el clang-rename.el clang-include-fixer.el; do mv %{buildroot}{%{_datadir}/clang,%{_emacs_sitestartdir}}/$f done +# Create Manpage symlinks +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++.1.gz +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz + +# Fix permission +chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* + +# Add clang++-{version} symlink +ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver} + +%else + +# Not sure where to put these python modules for the compat build. +rm -Rf %{buildroot}%{install_libdir}/{libear,libscanbuild} + +# Not sure where to put the emacs integration files for the compat build. +rm -Rf %{buildroot}%{install_datadir}/clang/*.el + +# Not sure what to do with man pages for the compat builds +rm -Rf %{buildroot}%{install_prefix}/share/man/ + +# Add version suffix to binaries +mkdir -p %{buildroot}%{_bindir} +for f in %{buildroot}/%{install_bindir}/*; do + filename=`basename $f` + if echo $filename | grep -e '%{maj_ver}'; then + continue + fi + ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename-%{maj_ver} +done + +# Add clang++-{version} symlink +ln -s ../../%{install_bindir}/clang++ %{buildroot}%{install_bindir}/clang++-%{maj_ver} + +%endif + +# Fix permissions of scan-view scripts +chmod a+x %{buildroot}%{_datadir}/scan-view/{Reporter.py,startfile.py} + +# multilib fix +%multilib_fix_c_header --file %{_includedir}/clang/Config/config.h + # remove editor integrations (bbedit, sublime, emacs, vim) rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py* @@ -165,29 +191,10 @@ rm -Rvf %{buildroot}%{_datadir}/clang-doc/index.js # TODO: What are the Fedora guidelines for packaging bash autocomplete files? rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh -# Create Manpage symlinks -ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++.1.gz -ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz -ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz - -# Add clang++-{version} symlink -ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver} - - -# Fix permission -chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* - -%endif - # Create sub-directories in the clang resource directory that will be # populated by other packages mkdir -p %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,share}/ -%if %{without compat_build} -# Add a symlink in /usr/bin to clang-format-diff -ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff -%endif - # Install config file for clang %if %{maj_ver} >=18 mkdir -p %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/ diff --git a/packages.spec.inc b/packages.spec.inc index 7c7e118..5d14f8b 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -132,14 +132,14 @@ libomp-devel to enable -fopenmp. %package -n %{pkg_name_clang}-libs Summary: Runtime library for clang Requires: %{pkg_name_clang}-resource-filesystem%{?_isa} = %{version} -Recommends: compiler-rt%{?_isa} = %{version} +Recommends: %{pkg_name_compiler_rt}%{?_isa} = %{version} Requires: %{pkg_name_llvm}-libs = %{version} # atomic support is not part of compiler-rt Recommends: libatomic%{?_isa} # libomp-devel is required, so clang can find the omp.h header when compiling # with -fopenmp. -Recommends: libomp-devel%{_isa} = %{version} -Recommends: libomp%{_isa} = %{version} +Recommends: %{pkg_name_libomp}-devel%{_isa} = %{version} +Recommends: %{pkg_name_libomp}%{_isa} = %{version} %description -n %{pkg_name_clang}-libs Runtime library for clang. @@ -147,12 +147,10 @@ Runtime library for clang. %package -n %{pkg_name_clang}-devel Summary: Development header files for clang Requires: %{pkg_name_clang}-libs = %{version}-%{release} -%if %{without compat_build} Requires: %{pkg_name_clang}%{?_isa} = %{version}-%{release} # The clang CMake files reference tools from clang-tools-extra. Requires: %{pkg_name_clang}-tools-extra%{?_isa} = %{version}-%{release} Provides: clang-devel(major) = %{maj_ver} -%endif %description -n %{pkg_name_clang}-devel Development header files for clang. @@ -164,7 +162,6 @@ Provides: clang-resource-filesystem(major) = %{maj_ver} %description -n %{pkg_name_clang}-resource-filesystem This package owns the clang resouce directory: $libdir/clang/$version/ -%if %{without compat_build} %package -n %{pkg_name_clang}-analyzer Summary: A source code analysis framework License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT @@ -195,16 +192,16 @@ Development header files for clang tools. # Put git-clang-format in its own package, because it Requires git # and we don't want to force users to install all those dependenices if they # just want clang. -%package -n git-clang-format +%package -n git-clang-format%{pkg_suffix} Summary: Integration of clang-format for git Requires: %{pkg_name_clang}-tools-extra = %{version}-%{release} Requires: git Requires: python3 -%description -n git-clang-format +%description -n git-clang-format%{pkg_suffix} clang-format integration for git. - +%if %{without compat_build} %package -n python3-clang Summary: Python3 bindings for clang Requires: %{pkg_name_clang}-devel%{?_isa} = %{version}-%{release} From 52ddcd59f56be09562926e29e9b4093bbe594283 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 12:40:12 +0000 Subject: [PATCH 173/205] Add versioned macros From: https://src.fedoraproject.org/rpms/clang/c/1382930328753fc5d7c62a2b494883036a984878?branch=rawhide --- files.spec.inc | 2 -- install.spec.inc | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 13a5471..8576e09 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -376,9 +376,7 @@ %dir %{install_prefix}/lib/clang/%{maj_ver}/include/ %dir %{install_prefix}/lib/clang/%{maj_ver}/lib/ %dir %{install_prefix}/lib/clang/%{maj_ver}/share/ -%if %{without compat_build} %{_rpmmacrodir}/macros.%{pkg_name_clang} -%endif %files -n %{pkg_name_clang}-analyzer %license clang/LICENSE.TXT diff --git a/install.spec.inc b/install.spec.inc index a124a00..5e1feca 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -195,6 +195,10 @@ rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh # populated by other packages mkdir -p %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,share}/ +#Add versioned resource directory macro +mkdir -p %{buildroot}%{_rpmmacrodir}/ +echo "%%clang%{maj_ver}_resource_dir %%{_prefix}/lib/clang/%{maj_ver}" >> %{buildroot}%{_rpmmacrodir}/macros.%{name} + # Install config file for clang %if %{maj_ver} >=18 mkdir -p %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/ From 5868bd75d6b002c95e338d476301b836c42a2673 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 12:45:09 +0000 Subject: [PATCH 174/205] Port compiler-rt changes From: https://src.fedoraproject.org/rpms/compiler-rt/c/f0ee285ff183f6e6b0969ac3887680f7f1a676c7?branch=rawhide --- build.spec.inc | 4 ---- globals.spec.inc | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index bca74e7..7aa2cff 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -82,19 +82,15 @@ popd \ \ \ -%if %{without compat_build} -DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp;offload" \ -%endif \ \ \ \ \ -%if %{without compat_build} -DCOMPILER_RT_INSTALL_PATH=%{_prefix}/lib/clang/%{maj_ver} \ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \ -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF \ -%endif \ \ \ diff --git a/globals.spec.inc b/globals.spec.inc index 4f6d12a..d8d552a 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -113,7 +113,7 @@ %if %{without compat_build} -%global pkg_name_compiler_rt compiler-rt +%global pkg_name_compiler_rt compiler-rt%{pkg_suffix} # TODO(kkleine): do these optflags hurt llvm and/or clang? From 318d6afcaabaaea108be5a332ee547991b821259 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 12:51:01 +0000 Subject: [PATCH 175/205] Add libomp compat package support This is not part of current rawhide sources, but based on libomp17 instead. --- build.spec.inc | 2 +- files.spec.inc | 22 +++++++++------------- globals.spec.inc | 6 +----- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 7aa2cff..1f5a351 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -96,8 +96,8 @@ popd \ \ \ -%if %{without compat_build} -DLIBOMP_INSTALL_ALIASES=OFF \ +%if %{without compat_build} %if 0%{?__isa_bits} == 64 -DOPENMP_LIBDIR_SUFFIX=64 \ %else diff --git a/files.spec.inc b/files.spec.inc index 8576e09..7580588 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -550,17 +550,15 @@ #region OPENMP files -%if %{without compat_build} - %files -n %{pkg_name_libomp} %license openmp/LICENSE.TXT -%{_libdir}/libomp.so -%{_libdir}/libompd.so -%{_libdir}/libarcher.so +%{install_libdir}/libomp.so +%{install_libdir}/libompd.so +%{install_libdir}/libarcher.so %ifnarch %{ix86} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. -%{_libdir}/libomptarget.so.%{so_suffix} +%{install_libdir}/libomptarget.so.%{so_suffix} %endif %files -n %{pkg_name_libomp}-devel @@ -570,16 +568,14 @@ %{_prefix}/lib/clang/%{maj_ver}/include/omp-tools.h %{_prefix}/lib/clang/%{maj_ver}/include/ompt.h %{_prefix}/lib/clang/%{maj_ver}/include/ompt-multiplex.h -%{_libdir}/cmake/openmp/ +%{install_libdir}/cmake/openmp/ %ifnarch %{ix86} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. -%{_libdir}/libomptarget.devicertl.a -%{_libdir}/libomptarget-amdgpu-*.bc -%{_libdir}/libomptarget-nvptx-*.bc -%{_libdir}/libomptarget.so -%endif - +%{install_libdir}/libomptarget.devicertl.a +%{install_libdir}/libomptarget-amdgpu-*.bc +%{install_libdir}/libomptarget-nvptx-*.bc +%{install_libdir}/libomptarget.so %endif #endregion diff --git a/globals.spec.inc b/globals.spec.inc index d8d552a..3c6ed10 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -132,9 +132,7 @@ #region OPENMP globals -%if %{without compat_build} - -%global pkg_name_libomp libomp +%global pkg_name_libomp libomp%{pkg_suffix} %global so_suffix %{maj_ver}.%{min_ver} @@ -148,8 +146,6 @@ %global libomp_arch %{_arch} %endif -%endif - #endregion #region LLD globals From 8e0f66c2d2e3ec183968a87ef303f586eab73dc0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 12:55:15 +0000 Subject: [PATCH 176/205] Misc fixes and cleanup --- globals.spec.inc | 20 ++------------------ install.spec.inc | 8 -------- packages.spec.inc | 8 -------- 3 files changed, 2 insertions(+), 34 deletions(-) diff --git a/globals.spec.inc b/globals.spec.inc index 3c6ed10..2280164 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -98,21 +98,12 @@ #region CLANG globals -%global pkg_name_clang clang - -%if %{with compat_build} -%global pkg_name_clang clang%{maj_ver} -# Install clang to same prefix as llvm, so that apps that use llvm-config -# will also be able to find clang libs. -%global pkg_includedir %{install_prefix}/include -%endif +%global pkg_name_clang clang%{pkg_suffix} #endregion #region COMPILER-RT globals -%if %{without compat_build} - %global pkg_name_compiler_rt compiler-rt%{pkg_suffix} # TODO(kkleine): do these optflags hurt llvm and/or clang? @@ -125,9 +116,6 @@ # Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files. # export ASMFLAGS=$CFLAGS - -%endif - #endregion #region OPENMP globals @@ -149,11 +137,7 @@ #endregion #region LLD globals -%if %{with compat_build} -%global pkg_name_lld lld%{maj_ver} -%else -%global pkg_name_lld lld -%endif +%global pkg_name_lld lld%{pkg_suffix} #endregion #region LLDB globals diff --git a/install.spec.inc b/install.spec.inc index 5e1feca..7dcfa0e 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -210,8 +210,6 @@ echo "--gcc-triple=%{_target_cpu}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{ #region COMPILER-RT installation -%if %{without compat_build} - # Triple where compiler-rt libs are installed. If it differs from llvm_triple, then there is # also a symlink llvm_triple -> compiler_rt_triple. %global compiler_rt_triple %{llvm_triple} @@ -231,14 +229,10 @@ ln -s %{compiler_rt_triple} %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{ll %endif %endif -%endif - #endregion #region OPENMP installation -%if %{without compat_build} - # Remove static libraries with equivalent shared libraries rm -rf %{buildroot}%{_libdir}/libarcher_static.a @@ -254,8 +248,6 @@ rm %{buildroot}%{install_bindir}/llvm-omp-device-info rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay %endif -%endif - #endregion #region LLD installation diff --git a/packages.spec.inc b/packages.spec.inc index 5d14f8b..cee6a90 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -216,8 +216,6 @@ Requires: python3 #region COMPILER-RT packages -%if %{without compat_build} - %package -n %{pkg_name_compiler_rt} Summary: LLVM "compiler-rt" runtime libraries @@ -232,14 +230,10 @@ implementation of the low-level target-specific hooks required by code generation, sanitizer runtimes and profiling library for code instrumentation, and Blocks C language extension. -%endif - #endregion #region OPENMP packages -%if %{without compat_build} - %package -n %{pkg_name_libomp} Summary: OpenMP runtime for clang @@ -262,8 +256,6 @@ Requires: clang-resource-filesystem%{?isa} = %{version} OpenMP header files. URL: http://openmp.llvm.org -%endif - #endregion #region LLD packages From 593bda882088fdd7644a2426a662524afd1f4385 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 13:54:15 +0000 Subject: [PATCH 177/205] Fix build_libddir --- build.spec.inc | 2 +- globals.spec.inc | 2 ++ install.spec.inc | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 1f5a351..38a9da0 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -32,7 +32,7 @@ export ASMFLAGS="%{build_cflags}" #endregion -export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:`pwd`/llvm/%{_vpath_builddir}/%{_lib}" +export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:`pwd`/%{build_libdir}" cd llvm diff --git a/globals.spec.inc b/globals.spec.inc index 2280164..08d474f 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -56,6 +56,7 @@ %global install_datadir %{install_prefix}/share %global install_libexecdir %{install_prefix}/libexec %global install_docdir %{install_datadir}/doc +%global build_libdir llvm/%{_vpath_builddir}/lib %global pkg_includedir %{_includedir}/%{pkg_name_llvm} %global pkg_datadir %{install_prefix}/share @@ -68,6 +69,7 @@ %global install_includedir %{_includedir} %global install_libexecdir %{_libexecdir} %global install_docdir %{_docdir} +%global build_libdir llvm/%{_vpath_builddir}/%{_lib} %global pkg_datadir %{_datadir} %global pkg_suffix %{nil} %global exec_suffix %{nil} diff --git a/install.spec.inc b/install.spec.inc index 7dcfa0e..6e04b4e 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -26,8 +26,6 @@ do done # Install libraries needed for unittests -%global build_libdir llvm/%{_vpath_builddir}/%{_lib} - install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{install_libdir} install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{install_libdir} From 1ad15a154834990a327895080ad88c00d5ba0b51 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 15:19:30 +0000 Subject: [PATCH 178/205] Don't try to create versioned symlinks multiple times --- install.spec.inc | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 6e04b4e..13c5fc5 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -48,6 +48,9 @@ ln -s -t %{buildroot}%{_libdir}/bfd-plugins/ ../LLVMgold.so # Add version suffix to binaries for f in %{buildroot}/%{install_bindir}/*; do filename=`basename $f` + if echo $filename | grep -e '%{maj_ver}'; then + continue + fi ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} done @@ -155,16 +158,6 @@ rm -Rf %{buildroot}%{install_datadir}/clang/*.el # Not sure what to do with man pages for the compat builds rm -Rf %{buildroot}%{install_prefix}/share/man/ -# Add version suffix to binaries -mkdir -p %{buildroot}%{_bindir} -for f in %{buildroot}/%{install_bindir}/*; do - filename=`basename $f` - if echo $filename | grep -e '%{maj_ver}'; then - continue - fi - ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename-%{maj_ver} -done - # Add clang++-{version} symlink ln -s ../../%{install_bindir}/clang++ %{buildroot}%{install_bindir}/clang++-%{maj_ver} @@ -253,14 +246,7 @@ rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay # Remove LLD's HTML documentation files rm -Rvf %{buildroot}%{_docdir}/LLVM/lld/html -%if %{with compat_build} -# Add version suffix to binaries -mkdir -p %{buildroot}%{_bindir} -for f in %{buildroot}/%{install_bindir}/*; do - filename=`basename $f` - ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename-%{maj_ver} -done -%else +%if %{without compat_build} # Required when using update-alternatives: # https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ touch %{buildroot}%{_bindir}/ld From 1434c4a0c2bded4006a4eb8e50bc188263352a06 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 15:57:48 +0000 Subject: [PATCH 179/205] Fix some paths --- build.spec.inc | 4 ++++ files.spec.inc | 14 +++++++------- install.spec.inc | 20 ++++++++++---------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 38a9da0..41cff18 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -74,7 +74,11 @@ popd -DCLANG_LINK_CLANG_DYLIB=ON \ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ -DCLANG_REPOSITORY_STRING="%{?dist_vendor} %{version}-%{release}" \ +%if %{with compat_build} -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ +%else + -DCLANG_RESOURCE_DIR=../../../lib/clang/%{maj_ver} \ +%endif -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra \ -DCLANG_CONFIG_FILE_SYSTEM_DIR=%{_sysconfdir}/%{pkg_name_clang}/ \ -DCLANG_DEFAULT_UNWINDLIB=libgcc \ diff --git a/files.spec.inc b/files.spec.inc index 7580588..246204e 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -351,7 +351,7 @@ %files -n %{pkg_name_clang}-libs %license clang/LICENSE.TXT -%{install_prefix}/lib/clang/%{maj_ver}/include/* +%{_prefix}/lib/clang/%{maj_ver}/include/* %{install_libdir}/libclang.so.* %{install_libdir}/libclang-cpp.so.* @@ -370,12 +370,12 @@ %files -n %{pkg_name_clang}-resource-filesystem %license clang/LICENSE.TXT -%dir %{install_prefix}/lib/clang/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/bin/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/include/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/lib/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/share/ +%dir %{_prefix}/lib/clang/ +%dir %{_prefix}/lib/clang/%{maj_ver}/ +%dir %{_prefix}/lib/clang/%{maj_ver}/bin/ +%dir %{_prefix}/lib/clang/%{maj_ver}/include/ +%dir %{_prefix}/lib/clang/%{maj_ver}/lib/ +%dir %{_prefix}/lib/clang/%{maj_ver}/share/ %{_rpmmacrodir}/macros.%{pkg_name_clang} %files -n %{pkg_name_clang}-analyzer diff --git a/install.spec.inc b/install.spec.inc index 13c5fc5..137d887 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -164,29 +164,29 @@ ln -s ../../%{install_bindir}/clang++ %{buildroot}%{install_bindir}/clang++-%{m %endif # Fix permissions of scan-view scripts -chmod a+x %{buildroot}%{_datadir}/scan-view/{Reporter.py,startfile.py} +chmod a+x %{buildroot}%{install_datadir}/scan-view/{Reporter.py,startfile.py} # multilib fix -%multilib_fix_c_header --file %{_includedir}/clang/Config/config.h +%multilib_fix_c_header --file %{install_includedir}/clang/Config/config.h # remove editor integrations (bbedit, sublime, emacs, vim) -rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript -rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py* +rm -vf %{buildroot}%{install_datadir}/clang/clang-format-bbedit.applescript +rm -vf %{buildroot}%{install_datadir}/clang/clang-format-sublime.py* # TODO: Package html docs -rm -Rvf %{buildroot}%{_docdir}/LLVM/clang/html -rm -Rvf %{buildroot}%{_docdir}/LLVM/clang-tools/html -rm -Rvf %{buildroot}%{_datadir}/clang-doc/clang-doc-default-stylesheet.css -rm -Rvf %{buildroot}%{_datadir}/clang-doc/index.js +rm -Rvf %{buildroot}%{install_docdir}/LLVM/clang/html +rm -Rvf %{buildroot}%{install_docdir}/LLVM/clang-tools/html +rm -Rvf %{buildroot}%{install_datadir}/clang-doc/clang-doc-default-stylesheet.css +rm -Rvf %{buildroot}%{install_datadir}/clang-doc/index.js # TODO: What are the Fedora guidelines for packaging bash autocomplete files? -rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh +rm -vf %{buildroot}%{install_datadir}/clang/bash-autocomplete.sh # Create sub-directories in the clang resource directory that will be # populated by other packages mkdir -p %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,share}/ -#Add versioned resource directory macro +# Add versioned resource directory macro mkdir -p %{buildroot}%{_rpmmacrodir}/ echo "%%clang%{maj_ver}_resource_dir %%{_prefix}/lib/clang/%{maj_ver}" >> %{buildroot}%{_rpmmacrodir}/macros.%{name} From 8fe6e008baecda66a89ebaec1bed8da5b4a9bd07 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 06:55:16 +0000 Subject: [PATCH 180/205] Fix prep --- prep.spec.inc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/prep.spec.inc b/prep.spec.inc index 9fbbc4d..14bfe33 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -32,8 +32,6 @@ #region CLANG preparation -%if %{without compat_build} - %py3_shebang_fix \ clang-tools-extra/clang-tidy/tool/ \ clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py @@ -48,15 +46,11 @@ clang/tools/scan-build-py/bin/* \ clang/tools/scan-build-py/libexec/* -%endif - #endregion #region COMPILER-RT preparation -%if %{without compat_build} %py3_shebang_fix compiler-rt/lib/hwasan/scripts/hwasan_symbolize -%endif #endregion From f18108da4078d0f77003736ef90279bc35d7ca0a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 08:04:35 +0000 Subject: [PATCH 181/205] Fix manpages --- files.spec.inc | 108 +++++++++++++++++++++++------------------------ install.spec.inc | 3 -- 2 files changed, 54 insertions(+), 57 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 246204e..4269d1b 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -15,60 +15,60 @@ %license llvm/LICENSE.TXT %exclude %{_mandir}/man1/llvm-config* -%{_mandir}/man1/bugpoint.1.gz -%{_mandir}/man1/clang-tblgen.1.gz -%{_mandir}/man1/dsymutil.1.gz -%{_mandir}/man1/FileCheck.1.gz -%{_mandir}/man1/lit.1.gz -%{_mandir}/man1/llc.1.gz -%{_mandir}/man1/lldb-tblgen.1.gz -%{_mandir}/man1/lli.1.gz -%{_mandir}/man1/llvm-addr2line.1.gz -%{_mandir}/man1/llvm-ar.1.gz -%{_mandir}/man1/llvm-as.1.gz -%{_mandir}/man1/llvm-bcanalyzer.1.gz -%{_mandir}/man1/llvm-cov.1.gz -%{_mandir}/man1/llvm-cxxfilt.1.gz -%{_mandir}/man1/llvm-cxxmap.1.gz -%{_mandir}/man1/llvm-debuginfo-analyzer.1.gz -%{_mandir}/man1/llvm-diff.1.gz -%{_mandir}/man1/llvm-dis.1.gz -%{_mandir}/man1/llvm-dwarfdump.1.gz -%{_mandir}/man1/llvm-dwarfutil.1.gz -%{_mandir}/man1/llvm-exegesis.1.gz -%{_mandir}/man1/llvm-extract.1.gz -%{_mandir}/man1/llvm-ifs.1.gz -%{_mandir}/man1/llvm-install-name-tool.1.gz -%{_mandir}/man1/llvm-lib.1.gz -%{_mandir}/man1/llvm-libtool-darwin.1.gz -%{_mandir}/man1/llvm-link.1.gz -%{_mandir}/man1/llvm-lipo.1.gz -%{_mandir}/man1/llvm-locstats.1.gz -%{_mandir}/man1/llvm-mc.1.gz -%{_mandir}/man1/llvm-mca.1.gz -%{_mandir}/man1/llvm-nm.1.gz -%{_mandir}/man1/llvm-objcopy.1.gz -%{_mandir}/man1/llvm-objdump.1.gz -%{_mandir}/man1/llvm-opt-report.1.gz -%{_mandir}/man1/llvm-otool.1.gz -%{_mandir}/man1/llvm-pdbutil.1.gz -%{_mandir}/man1/llvm-profdata.1.gz -%{_mandir}/man1/llvm-profgen.1.gz -%{_mandir}/man1/llvm-ranlib.1.gz -%{_mandir}/man1/llvm-readelf.1.gz -%{_mandir}/man1/llvm-readobj.1.gz -%{_mandir}/man1/llvm-reduce.1.gz -%{_mandir}/man1/llvm-remarkutil.1.gz -%{_mandir}/man1/llvm-size.1.gz -%{_mandir}/man1/llvm-stress.1.gz -%{_mandir}/man1/llvm-strings.1.gz -%{_mandir}/man1/llvm-strip.1.gz -%{_mandir}/man1/llvm-symbolizer.1.gz -%{_mandir}/man1/llvm-tblgen.1.gz -%{_mandir}/man1/llvm-tli-checker.1.gz -%{_mandir}/man1/mlir-tblgen.1.gz -%{_mandir}/man1/opt.1.gz -%{_mandir}/man1/tblgen.1.gz +%{_mandir}/man1/bugpoint%{exec_suffix}.1.gz +%{_mandir}/man1/clang-tblgen%{exec_suffix}.1.gz +%{_mandir}/man1/dsymutil%{exec_suffix}.1.gz +%{_mandir}/man1/FileCheck%{exec_suffix}.1.gz +%{_mandir}/man1/lit%{exec_suffix}.1.gz +%{_mandir}/man1/llc%{exec_suffix}.1.gz +%{_mandir}/man1/lldb-tblgen%{exec_suffix}.1.gz +%{_mandir}/man1/lli%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-addr2line%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-ar%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-as%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-bcanalyzer%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-cov%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-cxxfilt%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-cxxmap%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-debuginfo-analyzer%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-diff%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-dis%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-dwarfdump%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-dwarfutil%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-exegesis%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-extract%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-ifs%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-install-name-tool%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-lib%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-libtool-darwin%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-link%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-lipo%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-locstats%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-mc%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-mca%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-nm%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-objcopy%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-objdump%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-opt-report%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-otool%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-pdbutil%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-profdata%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-profgen%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-ranlib%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-readelf%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-readobj%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-reduce%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-remarkutil%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-size%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-stress%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-strings%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-strip%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-symbolizer%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-tblgen%{exec_suffix}.1.gz +%{_mandir}/man1/llvm-tli-checker%{exec_suffix}.1.gz +%{_mandir}/man1/mlir-tblgen%{exec_suffix}.1.gz +%{_mandir}/man1/opt%{exec_suffix}.1.gz +%{_mandir}/man1/tblgen%{exec_suffix}.1.gz %{install_bindir}/bugpoint %{install_bindir}/dsymutil diff --git a/install.spec.inc b/install.spec.inc index 137d887..016e513 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -155,9 +155,6 @@ rm -Rf %{buildroot}%{install_libdir}/{libear,libscanbuild} # Not sure where to put the emacs integration files for the compat build. rm -Rf %{buildroot}%{install_datadir}/clang/*.el -# Not sure what to do with man pages for the compat builds -rm -Rf %{buildroot}%{install_prefix}/share/man/ - # Add clang++-{version} symlink ln -s ../../%{install_bindir}/clang++ %{buildroot}%{install_bindir}/clang++-%{maj_ver} From a9bfa390837403ebcdd843669cc3bf32aa609f81 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 09:08:14 +0000 Subject: [PATCH 182/205] Avoid duplicate llvm-config files --- files.spec.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 4269d1b..ae32119 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -275,16 +275,18 @@ %files -n %{pkg_name_llvm}-devel %license llvm/LICENSE.TXT -%ghost %{_bindir}/llvm-config%{exec_suffix} -%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} -%{_mandir}/man1/llvm-config* +%if %{without compat_build} +%ghost %{_bindir}/llvm-config +%{install_bindir}/llvm-config-%{__isa_bits} +%endif +%ghost %{_bindir}/llvm-config-%{maj_ver} +%{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} +%{_mandir}/man1/llvm-config* %{install_includedir}/llvm %{install_includedir}/llvm-c %{install_libdir}/libLLVM.so %{install_libdir}/cmake/llvm -%{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} -%ghost %{_bindir}/llvm-config-%{maj_ver} %files -n %{pkg_name_llvm}-doc %license llvm/LICENSE.TXT From 1fc607d3b7510fb9a7a9a952a15268bdb94049d7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 09:12:14 +0000 Subject: [PATCH 183/205] Fix inverted resource dir condition --- build.spec.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 41cff18..a87d16f 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -75,9 +75,9 @@ popd -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ -DCLANG_REPOSITORY_STRING="%{?dist_vendor} %{version}-%{release}" \ %if %{with compat_build} - -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ -%else -DCLANG_RESOURCE_DIR=../../../lib/clang/%{maj_ver} \ +%else + -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ %endif -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra \ -DCLANG_CONFIG_FILE_SYSTEM_DIR=%{_sysconfdir}/%{pkg_name_clang}/ \ From e481d5405294055041ff3c35bde820a795dfe66b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 09:59:21 +0000 Subject: [PATCH 184/205] Fix name of macros file --- install.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.spec.inc b/install.spec.inc index 016e513..73cfb9a 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -185,7 +185,7 @@ mkdir -p %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,share}/ # Add versioned resource directory macro mkdir -p %{buildroot}%{_rpmmacrodir}/ -echo "%%clang%{maj_ver}_resource_dir %%{_prefix}/lib/clang/%{maj_ver}" >> %{buildroot}%{_rpmmacrodir}/macros.%{name} +echo "%%clang%{maj_ver}_resource_dir %%{_prefix}/lib/clang/%{maj_ver}" >> %{buildroot}%{_rpmmacrodir}/macros.%{pkg_name_clang} # Install config file for clang %if %{maj_ver} >=18 From b99883cb6f9efee5046577a9d38994c949ec1f7d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 10:55:17 +0000 Subject: [PATCH 185/205] Fix binary symlinks --- install.spec.inc | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 73cfb9a..9ca6aad 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -45,15 +45,6 @@ ln -s -t %{buildroot}%{_libdir}/bfd-plugins/ ../LLVMgold.so %else -# Add version suffix to binaries -for f in %{buildroot}/%{install_bindir}/*; do - filename=`basename $f` - if echo $filename | grep -e '%{maj_ver}'; then - continue - fi - ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} -done - # Create ld.so.conf.d entry mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{pkg_name_llvm}-%{_arch}.conf << EOF @@ -277,3 +268,15 @@ ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so rm -f %{buildroot}%{python3_sitearch}/six.* %endif #endregion + +%if %{with compat_build} +# Add version suffix to binaries. Do this at the end so it includes any +# additional binaries that may be been added by other steps. +for f in %{buildroot}/%{install_bindir}/*; do + filename=`basename $f` + if echo $filename | grep -e '%{maj_ver}'; then + continue + fi + ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} +done +%endif From fb09e28335851515b786fcdaa1f0ece8971f4792 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 12:24:01 +0000 Subject: [PATCH 186/205] Move llvm-config handling --- install.spec.inc | 53 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 9ca6aad..06110ff 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -60,32 +60,6 @@ done %endif -# llvm-config special casing. llvm-config is managed by update-alternatives. -# the original file must remain available for compatibility with the CMake -# infrastructure. Without compat, cmake points to the symlink, with compat it -# points to the original file. - -%if %{without compat_build} - -mv %{buildroot}/%{install_bindir}/llvm-config %{buildroot}/%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} -# We still maintain a versionned symlink for consistency across llvm versions. -# This is specific to the non-compat build and matches the exec prefix for -# compat builds. An isa-agnostic versionned symlink is also maintained in the (un)install -# steps. -(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config%{exec_suffix}-%{__isa_bits} llvm-config-%{maj_ver}-%{__isa_bits} ) -# ghost presence -touch %{buildroot}%{_bindir}/llvm-config-%{maj_ver} - -%else - -rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix} -(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config llvm-config%{exec_suffix}-%{__isa_bits} ) - -%endif - -# ghost presence -touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix} - mkdir -p %{buildroot}%{pkg_datadir}/llvm/cmake cp -Rv cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake @@ -280,3 +254,30 @@ for f in %{buildroot}/%{install_bindir}/*; do ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} done %endif + +# llvm-config special casing. llvm-config is managed by update-alternatives. +# the original file must remain available for compatibility with the CMake +# infrastructure. Without compat, cmake points to the symlink, with compat it +# points to the original file. + +%if %{without compat_build} + +mv %{buildroot}/%{install_bindir}/llvm-config %{buildroot}/%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} +# We still maintain a versionned symlink for consistency across llvm versions. +# This is specific to the non-compat build and matches the exec prefix for +# compat builds. An isa-agnostic versionned symlink is also maintained in the (un)install +# steps. +(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config%{exec_suffix}-%{__isa_bits} llvm-config-%{maj_ver}-%{__isa_bits} ) +# ghost presence +touch %{buildroot}%{_bindir}/llvm-config-%{maj_ver} + +%else + +rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix} +(cd %{buildroot}/%{install_bindir} ; ln -s llvm-config llvm-config%{exec_suffix}-%{__isa_bits} ) + +%endif + +# ghost presence +touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix} + From 396ce413c41d7e90ded980ad62d545cb545e1b94 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 13:23:10 +0000 Subject: [PATCH 187/205] Fix libomp libdir --- build.spec.inc | 13 ++----------- globals.spec.inc | 2 ++ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index a87d16f..9232954 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -51,8 +51,6 @@ popd # TODO(kkleine): Follow more closely the Distribution guidelines found here: https://llvm.org/docs/BuildingADistribution.html # force off shared libs as cmake macros turns it on. # TODO: Disable LLVM_UNREACHABLE_OPTIMIZE. -# TODO: Override LIBOMP_INSTALL_LIBDIR, because otherwise the libraries -# are installed to /usr/lib64/$TRIPLE and clang can't find them. %cmake -G Ninja \ -DLLVM_ENABLE_PROJECTS="%{projects}" \ \ @@ -101,15 +99,8 @@ popd \ \ -DLIBOMP_INSTALL_ALIASES=OFF \ -%if %{without compat_build} -%if 0%{?__isa_bits} == 64 - -DOPENMP_LIBDIR_SUFFIX=64 \ -%else - -DOPENMP_LIBDIR_SUFFIX= \ -%endif -%endif - -DOPENMP_INSTALL_LIBDIR=%{_lib} \ - -DOFFLOAD_INSTALL_LIBDIR=%{_lib} \ + -DOPENMP_INSTALL_LIBDIR=%{unprefixed_libdir} \ + -DOFFLOAD_INSTALL_LIBDIR=%{unprefixed_libdir} \ \ \ \ diff --git a/globals.spec.inc b/globals.spec.inc index 08d474f..5714776 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -56,6 +56,7 @@ %global install_datadir %{install_prefix}/share %global install_libexecdir %{install_prefix}/libexec %global install_docdir %{install_datadir}/doc +%global unprefixed_libdir lib %global build_libdir llvm/%{_vpath_builddir}/lib %global pkg_includedir %{_includedir}/%{pkg_name_llvm} @@ -69,6 +70,7 @@ %global install_includedir %{_includedir} %global install_libexecdir %{_libexecdir} %global install_docdir %{_docdir} +%global unprefixed_libdir %{_lib} %global build_libdir llvm/%{_vpath_builddir}/%{_lib} %global pkg_datadir %{_datadir} %global pkg_suffix %{nil} From 4d9f2d0c22c3b6675e922c467f66cce2a7560d04 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 14:11:45 +0000 Subject: [PATCH 188/205] Remove incorrect compiler-rt conditional --- files.spec.inc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index ae32119..c1337c3 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -514,8 +514,6 @@ #region COMPILER-RT files -%if %{without compat_build} - %files -n %{pkg_name_compiler_rt} %license compiler-rt/LICENSE.TXT %ifarch x86_64 aarch64 riscv64 @@ -546,8 +544,6 @@ %{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple} %endif -%endif - #endregion #region OPENMP files From 640fcf80708150b59a43d7d690f6df8c3bfa830c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 14:13:17 +0000 Subject: [PATCH 189/205] Fix some removals --- install.spec.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 06110ff..a7865ca 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -187,10 +187,10 @@ ln -s %{compiler_rt_triple} %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{ll #region OPENMP installation # Remove static libraries with equivalent shared libraries -rm -rf %{buildroot}%{_libdir}/libarcher_static.a +rm -rf %{buildroot}%{install_libdir}/libarcher_static.a # Remove the openmp gdb plugin for now -rm -rf %{buildroot}/%{_datarootdir}/gdb +rm -rf %{buildroot}/%{install_datadir}/gdb # # TODO(kkleine): These was added to avoid a permission issue # chmod go+w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so # chmod +w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so @@ -206,7 +206,7 @@ rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay #region LLD installation # Remove LLD's HTML documentation files -rm -Rvf %{buildroot}%{_docdir}/LLVM/lld/html +rm -Rvf %{buildroot}%{install_docdir}/LLVM/lld/html %if %{without compat_build} # Required when using update-alternatives: From 4abb11c7c7608186fc286adcf7cd815af67d091e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 14:27:02 +0000 Subject: [PATCH 190/205] More manpage fixes --- files.spec.inc | 10 +++++----- install.spec.inc | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index c1337c3..319ab23 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -339,11 +339,11 @@ %{install_bindir}/clang-cpp %{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang.cfg %{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang++.cfg +%{_mandir}/man1/clang-%{maj_ver}.1.gz +%{_mandir}/man1/clang++-%{maj_ver}.1.gz %if %{without compat_build} %{_mandir}/man1/clang.1.gz %{_mandir}/man1/clang++.1.gz -%{_mandir}/man1/clang-%{maj_ver}.1.gz -%{_mandir}/man1/clang++-%{maj_ver}.1.gz %else %{_bindir}/clang-%{maj_ver} %{_bindir}/clang++-%{maj_ver} @@ -402,8 +402,8 @@ %{install_libexecdir}/intercept-cc %{install_datadir}/scan-view/ %{install_datadir}/scan-build/ +%{_mandir}/man1/scan-build%{exec_suffix}.1.* %if %{without compat_build} -%{_mandir}/man1/scan-build.1.* %{python3_sitelib}/libear %{python3_sitelib}/libscanbuild %endif @@ -479,12 +479,12 @@ %{_bindir}/clang-format-diff-%{maj_ver} %{_bindir}/run-clang-tidy-%{maj_ver} %else -%{_mandir}/man1/diagtool.1.gz -%{_mandir}/man1/extraclangtools.1.gz %{_emacs_sitestartdir}/clang-format.el %{_emacs_sitestartdir}/clang-rename.el %{_emacs_sitestartdir}/clang-include-fixer.el %endif +%{_mandir}/man1/diagtool%{exec_suffix}.1.gz +%{_mandir}/man1/extraclangtools%{exec_suffix}.1.gz %{install_datadir}/clang/clang-format.py* %{install_datadir}/clang/clang-format-diff.py* %{install_datadir}/clang/clang-include-fixer.py* diff --git a/install.spec.inc b/install.spec.inc index a7865ca..f5132ad 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -101,19 +101,21 @@ for f in clang-format.el clang-rename.el clang-include-fixer.el; do mv %{buildroot}{%{_datadir}/clang,%{_emacs_sitestartdir}}/$f done -# Create Manpage symlinks -ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++.1.gz -ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz -ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz - -# Fix permission -chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* - # Add clang++-{version} symlink ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver} %else +# Create Manpage symlinks +ln -s clang%{exec_suffix}.1.gz %{buildroot}%{_mandir}/man1/clang++%{exec_suffix}.1.gz +%if %{without compat_build} +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz +%endif + +# Fix permission +chmod u-x %{buildroot}%{_mandir}/man1/scan-build%{exec_suffix}.1* + # Not sure where to put these python modules for the compat build. rm -Rf %{buildroot}%{install_libdir}/{libear,libscanbuild} From 082429fcd5f747bc45a7e6bb20e527f71b31ede5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 14:37:12 +0000 Subject: [PATCH 191/205] There is also an unprefixed llvm-config in the prefixed dir --- files.spec.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files.spec.inc b/files.spec.inc index 319ab23..8c533a8 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -278,6 +278,8 @@ %if %{without compat_build} %ghost %{_bindir}/llvm-config %{install_bindir}/llvm-config-%{__isa_bits} +%else +%{install_bindir}/llvm-config %endif %ghost %{_bindir}/llvm-config-%{maj_ver} %{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} From ee476f958345beb7dd0fcc9c729b3ba76e2c5a46 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Aug 2024 10:26:55 +0000 Subject: [PATCH 192/205] Move post/postun out of install.spec These start new sections and the following code is no longer executed as part of %install. --- install.spec.inc | 8 -------- llvm.spec | 12 ++++++------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index f5132ad..692e3c5 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -216,14 +216,6 @@ rm -Rvf %{buildroot}%{install_docdir}/LLVM/lld/html touch %{buildroot}%{_bindir}/ld install -D -m 644 -t %{buildroot}%{_mandir}/man1/ lld/docs/ld.lld.1 - -%post -n %{pkg_name_lld} -%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 - -%postun -n %{pkg_name_lld} -if [ $1 -eq 0 ] ; then - %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld -fi %endif #endregion diff --git a/llvm.spec b/llvm.spec index 40d8a17..9c94bea 100644 --- a/llvm.spec +++ b/llvm.spec @@ -239,13 +239,13 @@ fi %endif %if %{without compat_build} -#%post -n %{pkg_name_lld} -#%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 +%post -n %{pkg_name_lld} +%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 -#%postun -n %{pkg_name_lld} -#if [ $1 -eq 0 ] ; then -# %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld -#fi +%postun -n %{pkg_name_lld} +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld +fi %endif %include %{_sourcedir}/files.spec.inc From 468da93677422dda128fb14e2127e67ef6fca96d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Aug 2024 10:30:58 +0000 Subject: [PATCH 193/205] Remove six removal This is already gone upstream since: https://github.com/llvm/llvm-project/commit/5ed6d99a8311e54762df3d40dfb1d12578aaa4f5 --- install.spec.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 692e3c5..53195d8 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -231,9 +231,6 @@ rm -fv %{buildroot}%{_libdir}/liblldb*.a liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so %py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb - -# remove bundled six.py -rm -f %{buildroot}%{python3_sitearch}/six.* %endif #endregion From bf12d461f133dfb3a70f2b72daaea7da2927ff4b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Aug 2024 10:32:38 +0000 Subject: [PATCH 194/205] Remove static lldb library removal It doesn't seem like this is necessary. The static libraries do not get installed. --- install.spec.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 53195d8..729ba4a 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -224,9 +224,6 @@ install -D -m 644 -t %{buildroot}%{_mandir}/man1/ lld/docs/ld.lld.1 %if %{with lldb} %multilib_fix_c_header --file %{install_includedir}/lldb/Host/Config.h -# remove static libraries -rm -fv %{buildroot}%{_libdir}/liblldb*.a - # python: fix binary libraries location liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so From 7b14d8acaa60a66267d2a2c4b26f2588d88d0ea2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Aug 2024 11:39:18 +0000 Subject: [PATCH 195/205] Move manpage logic to the right place This was not supposed to be inside a compat build conditional. --- install.spec.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 729ba4a..552e531 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -106,13 +106,6 @@ ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver} %else -# Create Manpage symlinks -ln -s clang%{exec_suffix}.1.gz %{buildroot}%{_mandir}/man1/clang++%{exec_suffix}.1.gz -%if %{without compat_build} -ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz -ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz -%endif - # Fix permission chmod u-x %{buildroot}%{_mandir}/man1/scan-build%{exec_suffix}.1* @@ -127,6 +120,13 @@ ln -s ../../%{install_bindir}/clang++ %{buildroot}%{install_bindir}/clang++-%{m %endif +# Create Manpage symlinks +ln -s clang%{exec_suffix}.1.gz %{buildroot}%{_mandir}/man1/clang++%{exec_suffix}.1.gz +%if %{without compat_build} +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz +ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz +%endif + # Fix permissions of scan-view scripts chmod a+x %{buildroot}%{install_datadir}/scan-view/{Reporter.py,startfile.py} From 823d6b3e9221d041dd94a995aed2dc7e23ed010a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 5 Aug 2024 12:57:14 +0000 Subject: [PATCH 196/205] Fix binary lists for compat builds Explicitly list the lld binaries instead of packaging everything. Also add missing versioned binaries for llvm-test. --- files.spec.inc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 8c533a8..8c51a5b 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -312,6 +312,14 @@ %{install_bindir}/lli-child-target %{install_bindir}/llvm-isel-fuzzer %{install_bindir}/llvm-opt-fuzzer +%if %{with compat_build} +%{_bindir}/not%{exec_suffix} +%{_bindir}/count%{exec_suffix} +%{_bindir}/yaml-bench%{exec_suffix} +%{_bindir}/lli-child-target%{exec_suffix} +%{_bindir}/llvm-isel-fuzzer%{exec_suffix} +%{_bindir}/llvm-opt-fuzzer%{exec_suffix} +%endif %files -n %{pkg_name_llvm}-googletest %license llvm/LICENSE.TXT @@ -593,9 +601,11 @@ %if %{without compat_build} %{_mandir}/man1/ld.lld.1* %else -# TODO(kkleine): The compat package probably needs adjustments because -# we most certainly don't want to package every binary but only those for lld. -%{_bindir}/*-%{maj_ver} +%{_bindir}/lld%{exec_suffix} +%{_bindir}/lld-link%{exec_suffix} +%{_bindir}/ld.lld%{exec_suffix} +%{_bindir}/ld64.lld%{exec_suffix} +%{_bindir}/wasm-ld%{exec_suffix} %endif %files -n %{pkg_name_lld}-devel From a20000fbc7d109d4fd06786c8fdf4e7dcbeda4cf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Jul 2024 14:14:11 +0000 Subject: [PATCH 197/205] Build against Python 3.12 on RHEL 8 The minimum Python version has been raised to 3.8 in LLVM 19. --- build.spec.inc | 4 ++++ files.spec.inc | 4 ++-- packages.spec.inc | 27 ++++++++++++++++++--------- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 9232954..3621702 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -187,7 +187,11 @@ popd %ifarch ppc64le -DLLDB_TEST_USER_ARGS=--skip-category=watchpoint \ %endif +%if 0%{?rhel} == 8 + -DLLDB_INCLUDE_TESTS:BOOL=OFF \ +%else -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL=ON \ +%endif %endif \ \ diff --git a/files.spec.inc b/files.spec.inc index 8c51a5b..0fa7a89 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -515,7 +515,7 @@ %endif %if %{without compat_build} -%files -n python3-clang +%files -n python%{python3_pkgversion}-clang %license clang/LICENSE.TXT %{python3_sitelib}/clang/ %endif @@ -651,7 +651,7 @@ %files -n %{pkg_name_lldb}-devel %{install_includedir}/lldb -%files -n python3-lldb +%files -n python%{python3_pkgversion}-lldb %{python3_sitearch}/lldb %endif #endregion diff --git a/packages.spec.inc b/packages.spec.inc index cee6a90..9197984 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -196,17 +196,21 @@ Development header files for clang tools. Summary: Integration of clang-format for git Requires: %{pkg_name_clang}-tools-extra = %{version}-%{release} Requires: git -Requires: python3 +Requires: python%{python3_pkgversion} %description -n git-clang-format%{pkg_suffix} clang-format integration for git. %if %{without compat_build} -%package -n python3-clang +%package -n python%{python3_pkgversion}-clang Summary: Python3 bindings for clang Requires: %{pkg_name_clang}-devel%{?_isa} = %{version}-%{release} -Requires: python3 -%description -n python3-clang +Requires: python%{python3_pkgversion} +%if 0%{?rhel} == 8 +# Became python3.12-clang in LLVM 19 +Obsoletes: python3-clang < 18.9 +%endif +%description -n python%{python3_pkgversion}-clang %{summary}. @@ -313,7 +317,7 @@ Summary: Next generation high-performance debugger License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://lldb.llvm.org/ -Requires: python3-lldb +Requires: python%{python3_pkgversion}-lldb %description -n %{pkg_name_lldb} LLDB is a next generation, high-performance debugger. It is built as a set @@ -328,14 +332,19 @@ Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} %description -n %{pkg_name_lldb}-devel The package contains header files for the LLDB debugger. -%package -n python3-lldb -%{?python_provide:%python_provide python3-lldb} +%package -n python%{python3_pkgversion}-lldb +%{?python_provide:%python_provide python%{python3_pkgversion}-lldb} Summary: Python module for LLDB -Requires: python3-six +Requires: python%{python3_pkgversion}-six Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} -%description -n python3-lldb +%if 0%{?rhel} == 8 +# Became python3.12-lldb in LLVM 19 +Obsoletes: python3-lldb < 18.9 +%endif + +%description -n python%{python3_pkgversion}-lldb The package contains the LLDB Python module. %endif #endregion From 05f7af9c0d227c435b46c65540af970e8b3e5ec1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Aug 2024 07:32:13 +0000 Subject: [PATCH 198/205] Add python-lit, remove patch, change obsoletes version --- 0001-Add-back-support-for-Python-3.6.patch | 101 --------------------- files.spec.inc | 2 +- packages.spec.inc | 22 +++-- prep.spec.inc | 3 - 4 files changed, 15 insertions(+), 113 deletions(-) delete mode 100644 0001-Add-back-support-for-Python-3.6.patch diff --git a/0001-Add-back-support-for-Python-3.6.patch b/0001-Add-back-support-for-Python-3.6.patch deleted file mode 100644 index 36d118a..0000000 --- a/0001-Add-back-support-for-Python-3.6.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 74f3d3579ef636a20d7832b39bf1355c0f734848 Mon Sep 17 00:00:00 2001 -From: Nikita Popov -Date: Fri, 19 Jul 2024 14:52:49 +0200 -Subject: [PATCH] Add back support for Python 3.6 - ---- - .../clang-tidy/tool/run-clang-tidy.py | 21 ++++++++++++++++--- - llvm/CMakeLists.txt | 2 +- - llvm/utils/update_test_body.py | 6 ++++-- - 3 files changed, 23 insertions(+), 6 deletions(-) - -diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -index 48401ba5ea42..c6552db36587 100755 ---- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -+++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -@@ -36,7 +36,6 @@ http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html - - import argparse - import asyncio --from dataclasses import dataclass - import glob - import json - import multiprocessing -@@ -223,7 +222,6 @@ async def run_with_semaphore( - return await f(*args, **kwargs) - - --@dataclass - class ClangTidyResult: - filename: str - invocation: List[str] -@@ -232,6 +230,22 @@ class ClangTidyResult: - stderr: str - elapsed: float - -+ def __init( -+ self, -+ filename: str, -+ invocation: List[str], -+ returncode: int, -+ stdout: str, -+ stderr: str, -+ elapsed: float, -+ ): -+ self.filename = filename -+ self.invocation = invocation -+ self.returncode = returncode -+ self.stdout = stdout -+ self.stderr = stderr -+ self.elapsed = elapsed -+ - - async def run_tidy( - args: argparse.Namespace, -@@ -623,4 +637,5 @@ async def main() -> None: - - - if __name__ == "__main__": -- asyncio.run(main()) -+ loop = asyncio.new_event_loop() -+ loop.run_until_complete(main()) -diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt -index 12618966c4ad..9c4df0082a9a 100644 ---- a/llvm/CMakeLists.txt -+++ b/llvm/CMakeLists.txt -@@ -932,7 +932,7 @@ set(LLVM_PROFDATA_FILE "" CACHE FILEPATH - - if(LLVM_INCLUDE_TESTS) - # All LLVM Python files should be compatible down to this minimum version. -- set(LLVM_MINIMUM_PYTHON_VERSION 3.8) -+ set(LLVM_MINIMUM_PYTHON_VERSION 3.6) - else() - # FIXME: it is unknown if this is the actual minimum bound - set(LLVM_MINIMUM_PYTHON_VERSION 3.0) -diff --git a/llvm/utils/update_test_body.py b/llvm/utils/update_test_body.py -index 661b0270d783..152d0c5f8476 100755 ---- a/llvm/utils/update_test_body.py -+++ b/llvm/utils/update_test_body.py -@@ -57,7 +57,8 @@ def process(args, path): - input="\n".join( - prolog[:-1] if prolog[-1].startswith(".endif") else prolog - ).encode(), -- capture_output=True, -+ stdout=subprocess.PIPE, -+ stderr=subprocess.PIPE, - check=True, - ) - except subprocess.CalledProcessError as ex: -@@ -71,7 +72,8 @@ def process(args, path): - - sub = subprocess.run( - ["sh", "-eu", "gen"], -- capture_output=True, -+ stdout=subprocess.PIPE, -+ stderr=subprocess.PIPE, - # Don't encode the directory information to the Clang output. - # Remove unneeded details (.ident) as well. - env=dict( --- -2.45.2 - diff --git a/files.spec.inc b/files.spec.inc index 0fa7a89..f8ddaa4 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -1,6 +1,6 @@ #region LLVM lit files %if %{with python_lit} -%files -n python3-lit +%files -n python%{python3_pkgversion}-lit %license llvm/utils/lit/LICENSE.TXT %doc llvm/utils/lit/README.rst %{python3_sitelib}/lit/ diff --git a/packages.spec.inc b/packages.spec.inc index 9197984..09008eb 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -1,13 +1,19 @@ #region LLVM lit package %if %{with python_lit} -%package -n python3-lit +%package -n python%{python3_pkgversion}-lit Summary: LLVM lit test runner for Python 3 BuildArch: noarch -Requires: python3-setuptools -Recommends: python3-psutil +Requires: python%{python3_pkgversion}-setuptools +%if 0%{?rhel} == 8 +# Became python3.12-clang in LLVM 20 +Obsoletes: python3-lit < 19.9 +%else +# This optional dependency is not available for python3.12 on RHEL 8. +Recommends: python%{python3_pkgversion}-psutil +%endif -%description -n python3-lit +%description -n python%{python3_pkgversion}-lit lit is a tool used by the LLVM project for executing its test suites. %endif #endregion @@ -207,8 +213,8 @@ Summary: Python3 bindings for clang Requires: %{pkg_name_clang}-devel%{?_isa} = %{version}-%{release} Requires: python%{python3_pkgversion} %if 0%{?rhel} == 8 -# Became python3.12-clang in LLVM 19 -Obsoletes: python3-clang < 18.9 +# Became python3.12-clang in LLVM 20 +Obsoletes: python3-clang < 19.9 %endif %description -n python%{python3_pkgversion}-clang %{summary}. @@ -340,8 +346,8 @@ Requires: python%{python3_pkgversion}-six Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} %if 0%{?rhel} == 8 -# Became python3.12-lldb in LLVM 19 -Obsoletes: python3-lldb < 18.9 +# Became python3.12-lldb in LLVM 20 +Obsoletes: python3-lldb < 19.9 %endif %description -n python%{python3_pkgversion}-lldb diff --git a/prep.spec.inc b/prep.spec.inc index 14bfe33..c28a911 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -16,9 +16,6 @@ %if %{defined rhel} %patch -p1 -P9001 -%if %rhel == 8 -%patch -p1 -P9002 -%endif %endif #region LLVM preparation From 4866c39eb730ef88013ee2bdda769ae5488ff6d1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 8 Aug 2024 09:15:13 +0200 Subject: [PATCH 199/205] Remove unnecessary Requires on python3-six python3.12-six is not available on RHEL 8, so this breaks installation of the package. The dependency is no longer needed since: https://github.com/llvm/llvm-project/commit/5ed6d99a8311e54762df3d40dfb1d12578aaa4f5 --- packages.spec.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/packages.spec.inc b/packages.spec.inc index 09008eb..0d0773b 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -342,7 +342,6 @@ The package contains header files for the LLDB debugger. %{?python_provide:%python_provide python%{python3_pkgversion}-lldb} Summary: Python module for LLDB -Requires: python%{python3_pkgversion}-six Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} %if 0%{?rhel} == 8 From 3f9db5634ad43292f4ed8e7bd9815c136531b890 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 12 Aug 2024 07:23:58 +0000 Subject: [PATCH 200/205] Disable LLVM_UNREACHABLE_OPTIMIZE This was needed at some point to prevent an assertion failure, but shouldn't be relevant anymore. --- build.spec.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 3621702..39814fa 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -50,7 +50,6 @@ popd # TODO(kkleine): Follow more closely the Distribution guidelines found here: https://llvm.org/docs/BuildingADistribution.html # force off shared libs as cmake macros turns it on. -# TODO: Disable LLVM_UNREACHABLE_OPTIMIZE. %cmake -G Ninja \ -DLLVM_ENABLE_PROJECTS="%{projects}" \ \ @@ -162,7 +161,7 @@ popd -DLLVM_VERSION_SUFFIX='' \ %endif %endif - -DLLVM_UNREACHABLE_OPTIMIZE:BOOL=ON \ + -DLLVM_UNREACHABLE_OPTIMIZE:BOOL=OFF \ -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \ From 5218c9a2fbdd663d8cdfb06171dbd052deb9cbac Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 14 Aug 2024 10:15:15 +0000 Subject: [PATCH 201/205] Add compiler-rt patch for RHEL 8 page sizes RHEL 8 uses different page sizes, and we need to patch the CFI implementation to use those. --- ...size-constant-on-aarch64-and-ppc64le.patch | 25 +++++++++++++++++++ llvm.spec | 2 +- prep.spec.inc | 4 +++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch diff --git a/0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch b/0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch new file mode 100644 index 0000000..925c996 --- /dev/null +++ b/0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch @@ -0,0 +1,25 @@ +From 5f73befe5a0df82e455f4b1052e62f34009e98bb Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 23 Apr 2024 15:08:34 -0700 +Subject: [PATCH] Fix page size constant on aarch64 and ppc64le + +--- + compiler-rt/lib/cfi/cfi.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/compiler-rt/lib/cfi/cfi.cpp b/compiler-rt/lib/cfi/cfi.cpp +index ad1c91623514..e7e86e5807a8 100644 +--- a/compiler-rt/lib/cfi/cfi.cpp ++++ b/compiler-rt/lib/cfi/cfi.cpp +@@ -53,6 +53,8 @@ namespace __cfi { + + #if SANITIZER_LOONGARCH64 + #define kCfiShadowLimitsStorageSize 16384 // 16KiB on loongarch64 per page ++#elif defined(__aarch64__) || defined(__powerpc64__) ++#define kCfiShadowLimitsStorageSize 65536 // 1 page + #else + #define kCfiShadowLimitsStorageSize 4096 // 1 page + #endif +-- +2.40.1 + diff --git a/llvm.spec b/llvm.spec index 9c94bea..de017c9 100644 --- a/llvm.spec +++ b/llvm.spec @@ -81,7 +81,7 @@ Patch3002: 0001-Always-build-shared-libs-for-LLD.patch Patch9001: 0001-Remove-myst_parser-dependency-for-RHEL.patch # RHEL 8 only -#Patch9002: 0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch +Patch9002: 0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch #endregion %if 0%{?rhel} == 8 diff --git a/prep.spec.inc b/prep.spec.inc index c28a911..896a4c4 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -16,6 +16,10 @@ %if %{defined rhel} %patch -p1 -P9001 + +%if %{rhel} == 8 +%patch -p1 -P9002 +%endif %endif #region LLVM preparation From ad9f519879e045bd87b6dc3aaaea7a4d951b9d87 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 8 Aug 2024 14:33:26 +0000 Subject: [PATCH 202/205] Add support for bundle_compat_lib --- build.spec.inc | 20 ++++++++++++++++++++ files.spec.inc | 11 +++++++++-- globals.spec.inc | 11 +++++++++++ install.spec.inc | 5 +++++ prep.spec.inc | 5 +++++ 5 files changed, 50 insertions(+), 2 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 39814fa..ea72efb 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -230,3 +230,23 @@ popd %cmake_build --target runtimes cd .. + +%if %{with bundle_compat_lib} +%cmake -S ../llvm-project-%{compat_ver}.src/llvm -B ../llvm-compat-libs -G Ninja \ + -DCMAKE_INSTALL_PREFIX=%{buildroot}%{_libdir}/llvm%{compat_maj_ver}/ \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DLLVM_BUILD_LLVM_DYLIB=ON \ + -DLLVM_ENABLE_EH=ON \ + -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_ENABLE_PROJECTS=clang \ + -DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DLLVM_INCLUDE_TESTS=OFF + +%ninja_build -C ../llvm-compat-libs LLVM +%ninja_build -C ../llvm-compat-libs libclang.so +%ninja_build -C ../llvm-compat-libs libclang-cpp.so + +%endif diff --git a/files.spec.inc b/files.spec.inc index f8ddaa4..d00fc1c 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -271,6 +271,9 @@ %if %{with compat_build} %config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf %endif +%if %{with bundle_compat_lib} +%{_libdir}/libLLVM.so.%{compat_maj_ver}* +%endif %files -n %{pkg_name_llvm}-devel %license llvm/LICENSE.TXT @@ -364,8 +367,12 @@ %files -n %{pkg_name_clang}-libs %license clang/LICENSE.TXT %{_prefix}/lib/clang/%{maj_ver}/include/* -%{install_libdir}/libclang.so.* -%{install_libdir}/libclang-cpp.so.* +%{install_libdir}/libclang.so.%{maj_ver}* +%{install_libdir}/libclang-cpp.so.%{maj_ver}* +%if %{with bundle_compat_lib} +%{_libdir}/libclang.so.%{compat_maj_ver}* +%{_libdir}/libclang-cpp.so.%{compat_maj_ver}* +%endif %files -n %{pkg_name_clang}-devel %license clang/LICENSE.TXT diff --git a/globals.spec.inc b/globals.spec.inc index 5714776..4b8cb30 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -5,9 +5,20 @@ %else %bcond_with gold %endif + +# Build compat packages llvmN instead of main package for the current LLVM +# version. Used on Fedora. %bcond_with compat_build +# Bundle compat libraries for a previous LLVM version, as part of llvm-libs and +# clang-libs. Used on RHEL. +%bcond_with bundle_compat_lib %bcond_without check +%if %{with bundle_compat_lib} +%global compat_maj_ver 18 +%global compat_ver %{compat_maj_ver}.1.8 +%endif + # Compat builds do not include python-lit and lldb %if %{with compat_build} %bcond_with python_lit diff --git a/install.spec.inc b/install.spec.inc index 552e531..204781b 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -269,3 +269,8 @@ rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix} # ghost presence touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix} +%if %{with bundle_compat_lib} +install -m 0755 ../llvm-compat-libs/lib/libLLVM.so.%{compat_maj_ver}* %{buildroot}%{_libdir} +install -m 0755 ../llvm-compat-libs/lib/libclang.so.%{compat_maj_ver}* %{buildroot}%{_libdir} +install -m 0755 ../llvm-compat-libs/lib/libclang-cpp.so.%{compat_maj_ver}* %{buildroot}%{_libdir} +%endif diff --git a/prep.spec.inc b/prep.spec.inc index 896a4c4..aacb9c3 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -3,6 +3,11 @@ %{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %endif +%if %{with bundle_compat_lib} +%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE3001}' --data='%{SOURCE3000}' +%setup -T -q -b 3000 -n llvm-project-%{compat_ver}.src +%endif + # -T : Do Not Perform Default Archive Unpacking (without this, the th source would be unpacked twice) # -b : Unpack The nth Sources Before Changing Directory # -n : Set Name of Build Directory From a4d77d580fe94176221685dfb8f00aa16d4b1d94 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 2 Sep 2024 08:01:03 +0000 Subject: [PATCH 203/205] Fix libscanbuild/libear location https://github.com/llvm/llvm-project/pull/106612 moved these from lib64 to lib, so look for them there. --- install.spec.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.spec.inc b/install.spec.inc index 204781b..4e60ad5 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -90,7 +90,7 @@ install -p -m644 clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/cl %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/clang # install scanbuild-py to python sitelib. -mv %{buildroot}%{_prefix}/%{_lib}/{libear,libscanbuild} %{buildroot}%{python3_sitelib} +mv %{buildroot}%{_prefix}/lib/{libear,libscanbuild} %{buildroot}%{python3_sitelib} # Cannot use {libear,libscanbuild} style expansion in py_byte_compile. %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/libear %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/libscanbuild From 53aa1f875045639b3cb7bb604eed04da1667d7c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 5 Sep 2024 08:51:24 +0200 Subject: [PATCH 204/205] Update to rc4 --- llvm.spec | 2 +- sources | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm.spec b/llvm.spec index de017c9..b677d72 100644 --- a/llvm.spec +++ b/llvm.spec @@ -16,7 +16,7 @@ fi') %global maj_ver 19 %global min_ver 1 %global patch_ver 0 -%global rc_ver 3 +%global rc_ver 4 %if %{with snapshot_build} %include %{_sourcedir}/version.spec.inc diff --git a/sources b/sources index be64176..e72da3f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (llvm-project-19.1.0-rc3.src.tar.xz) = 3ee4eab848e5e38c396e6f5addf5eb42570d451fc8e7cd77150dc5542f8f710f4a9db51836f7a799996dd1b8194defe4d58efe7c19e5d5e1c5f3dbdda94c0cf3 -SHA512 (llvm-project-19.1.0-rc3.src.tar.xz.sig) = ef0fd2e3e7069fbfd410cbcf71294d1b7182456330ff151348058b5cb0f292edaecb9dcbf613ee4fc979214a23bd3bb8077d71e674635359da36b938dc143266 +SHA512 (llvm-project-19.1.0-rc4.src.tar.xz) = 826978a596b26040124f2ceba858f91031f78faca22f32de2eea1a4d299a849dcb1fffdfb01601adc39d733dd0cdee43b21af05159d45dcebc842f6b6b540ba8 +SHA512 (llvm-project-19.1.0-rc4.src.tar.xz.sig) = 5b9dcbf232229fdd87824bc87d0ad4ebd54127c9288708fb3304166422d378b77a843d7c5d8258850a0de59310c24e65042d636a5314e2af8513627a43bdb6e8 From 8acb0895c6cf7d3a4984e1916a40021d661a598f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 6 Sep 2024 09:42:09 +0200 Subject: [PATCH 205/205] Remove distribution cmake files These files are unused, presumably left over from a previous experiment. --- DistributionFedora-stage2.cmake | 33 -------------------- DistributionFedora.cmake | 55 --------------------------------- 2 files changed, 88 deletions(-) delete mode 100644 DistributionFedora-stage2.cmake delete mode 100644 DistributionFedora.cmake diff --git a/DistributionFedora-stage2.cmake b/DistributionFedora-stage2.cmake deleted file mode 100644 index 99d5dc0..0000000 --- a/DistributionFedora-stage2.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# This file sets up a CMakeCache for the second stage of a simple distribution -# bootstrap build. - -set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "") -set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "") - -set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "") - -set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") -set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "") - -# setup toolchain -set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") -set(LLVM_TOOLCHAIN_TOOLS - dsymutil - llvm-cov - llvm-dwarfdump - llvm-profdata - llvm-objdump - llvm-nm - llvm-size - CACHE STRING "") - -set(LLVM_DISTRIBUTION_COMPONENTS - clang - LTO - clang-format - clang-resource-headers - builtins - runtimes - ${LLVM_TOOLCHAIN_TOOLS} - CACHE STRING "") diff --git a/DistributionFedora.cmake b/DistributionFedora.cmake deleted file mode 100644 index 992d207..0000000 --- a/DistributionFedora.cmake +++ /dev/null @@ -1,55 +0,0 @@ -# This file sets up a CMakeCache for a simple distribution bootstrap build. - -# For the Jira project entitled "LLVM" you can open -# https://issues.redhat.com/rest/api/2/project/LLVM to find its pid. "1" stands -# for the issue type "Bug". -set(BUG_REPORT_URL "https://issues.redhat.com/secure/CreateIssue.jspa?issuetype=1&pid=12339624" CACHE STRING "") - -#Enable LLVM projects and runtimes -set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "") -set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "") - -# Only build the native target in stage1 since it is a throwaway build. -set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "") - -# Optimize the stage1 compiler, but don't LTO it because that wastes time. -set(CMAKE_BUILD_TYPE Release CACHE STRING "") - -# Setup vendor-specific settings. -set(PACKAGE_VENDOR LLVM.org CACHE STRING "") - -# Setting up the stage2 LTO option needs to be done on the stage1 build so that -# the proper LTO library dependencies can be connected. -set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") - -if (NOT APPLE) - # Since LLVM_ENABLE_LTO is ON we need a LTO capable linker - set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") -endif() - -# Expose stage2 targets through the stage1 build configuration. -set(CLANG_BOOTSTRAP_TARGETS - check-all - check-llvm - check-clang - llvm-config - test-suite - test-depends - llvm-test-depends - clang-test-depends - distribution - install-distribution - clang CACHE STRING "") - -# Setup the bootstrap build. -set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "") - -if(STAGE2_CACHE_FILE) - set(CLANG_BOOTSTRAP_CMAKE_ARGS - -C ${STAGE2_CACHE_FILE} - CACHE STRING "") -else() - set(CLANG_BOOTSTRAP_CMAKE_ARGS - -C ${CMAKE_CURRENT_LIST_DIR}/DistributionFedora-stage2.cmake - CACHE STRING "") -endif()