diff --git a/0001-analyzer-Fix-out-of-tree-only-clang-build-by-not-rel.patch b/0001-analyzer-Fix-out-of-tree-only-clang-build-by-not-rel.patch new file mode 100644 index 0000000..a51b3e8 --- /dev/null +++ b/0001-analyzer-Fix-out-of-tree-only-clang-build-by-not-rel.patch @@ -0,0 +1,41 @@ +From 903c872b169dc88f434cf84c0aee32e429e1cc56 Mon Sep 17 00:00:00 2001 +From: Balazs Benics +Date: Fri, 31 Jul 2020 10:28:14 +0200 +Subject: [PATCH] [analyzer] Fix out-of-tree only clang build by not relaying + on private header + +It turned out that the D78704 included a private LLVM header, which is excluded +from the LLVM install target. +I'm substituting that `#include` with the public one by moving the necessary +`#define` into that. There was a discussion about this at D78704 and on the +cfe-dev mailing list. + +I'm also placing a note to remind others of this pitfall. + +Reviewed By: mgorny + +Differential Revision: https://reviews.llvm.org/D84929 + +(cherry picked from commit 63d3aeb529a7b0fb95c2092ca38ad21c1f5cfd74) +--- + .../StaticAnalyzer/FalsePositiveRefutationBRVisitorTest.cpp | 2 +- + llvm/include/llvm/Config/config.h.cmake | 6 +++--- + llvm/include/llvm/Config/llvm-config.h.cmake | 3 +++ + 3 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/clang/unittests/StaticAnalyzer/FalsePositiveRefutationBRVisitorTest.cpp b/clang/unittests/StaticAnalyzer/FalsePositiveRefutationBRVisitorTest.cpp +index 7c151c18211..e67dcacca0a 100644 +--- a/clang/unittests/StaticAnalyzer/FalsePositiveRefutationBRVisitorTest.cpp ++++ b/clang/unittests/StaticAnalyzer/FalsePositiveRefutationBRVisitorTest.cpp +@@ -16,7 +16,7 @@ + #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" + #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h" + #include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h" +-#include "llvm/Config/config.h" ++#include "llvm/Config/llvm-config.h" + #include "gtest/gtest.h" + + // FIXME: Use GTEST_SKIP() instead if GTest is updated to version 1.10.0 +-- +2.18.1 + diff --git a/0001-clang-Fix-spurious-test-failure.patch b/0001-clang-Fix-spurious-test-failure.patch new file mode 100644 index 0000000..07c45b6 --- /dev/null +++ b/0001-clang-Fix-spurious-test-failure.patch @@ -0,0 +1,25 @@ +From 5bfce60443b1c3f4066f506e47cbdc7c4263bb10 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 11 Aug 2020 18:32:08 -0700 +Subject: [PATCH] clang: Fix spurious test failure + +--- + clang/test/Driver/crash-report-modules.m | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clang/test/Driver/crash-report-modules.m b/clang/test/Driver/crash-report-modules.m +index e6d03353379..9519adf6f4b 100644 +--- a/clang/test/Driver/crash-report-modules.m ++++ b/clang/test/Driver/crash-report-modules.m +@@ -19,7 +19,7 @@ + @import simple; + const int x = MODULE_MACRO; + +-// CHECK: PLEASE submit a bug report to {{.*}} and include the crash backtrace, preprocessed source, and associated run script. ++// CHECK: PLEASE submit a bug report to {{.*}}and include the crash backtrace, preprocessed source, and associated run script. + // CHECK: Preprocessed source(s) and associated run script(s) are located at: + // CHECK-NEXT: note: diagnostic msg: {{.*}}.m + // CHECK-NEXT: note: diagnostic msg: {{.*}}.cache +-- +2.18.1 + diff --git a/clang.spec b/clang.spec index 4e37672..f5f70e7 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 %global rc_ver 1 -%global baserelease 0.1 +%global baserelease 0.2 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -97,9 +97,12 @@ Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc Patch4: 0002-gtest-reorg.patch Patch11: 0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch Patch13: 0001-Make-funwind-tables-the-default-for-all-archs.patch +# This is already in the release/11.x branch and will be included in -rc2. +Patch14: 0001-analyzer-Fix-out-of-tree-only-clang-build-by-not-rel.patch # Not Upstream Patch15: 0001-clang-Don-t-install-static-libraries.patch +Patch16: 0001-clang-Fix-spurious-test-failure.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -142,6 +145,20 @@ BuildRequires: multilib-rpm-config # For origin certification BuildRequires: gnupg2 +# 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: %{name}-libs%{?_isa} = %{version}-%{release} # clang requires gcc, clang++ requires libstdc++-devel @@ -253,7 +270,9 @@ pathfix.py -i %{__python3} -pn \ %patch4 -p1 -b .gtest %patch11 -p1 -b .libcxx-fix %patch13 -p2 -b .unwind-all +%patch14 -p2 -b .test-fix %patch15 -p2 -b .no-install-static +%patch16 -p2 -b .test-fix2 mv ../%{clang_tools_srcdir} tools/extra @@ -407,13 +426,12 @@ rm -Rvf %{buildroot}%{_includedir}/clang-tidy/ %check %if !0%{?compat_build} # requires lit.py from LLVM utilities -# FIXME: Fix failing ARM tests, s390x i686 and ppc64le tests -# FIXME: Ignore test failures until rhbz#1715016 is fixed. +# FIXME: Fix failing ARM tests LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %cmake_build --target check-all || \ -%ifarch s390x i686 ppc64le %{arm} +%ifarch %{arm} : %else -: +false %endif %endif @@ -487,6 +505,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %cmake_build --target check-all || \ %endif %changelog +* Tue Aug 11 2020 Tom Stellard - 11.0.0-0.2.rc1 +- Fix test failures + * Mon Aug 10 2020 Tom Stellard - 11.0.0-0.1.rc1 - 11.0.0-rc1 Release