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