diff --git a/.clang.metadata b/.clang.metadata index ea84b60..664bea5 100644 --- a/.clang.metadata +++ b/.clang.metadata @@ -1,3 +1,3 @@ -0e61e92b22a620fe7f833fa8b2a56f2db96f7335 SOURCES/clang-10.0.1.src.tar.xz -26c996da082677aca1016bcf2141dbff01dc7300 SOURCES/clang-tools-extra-10.0.1.src.tar.xz +79ccca001aa5727d954a2b5970b9c11ef750411e SOURCES/clang-11.0.0rc2.src.tar.xz +3f7c23287becbfd781b1657e04654ce38b496e32 SOURCES/clang-tools-extra-11.0.0rc2.src.tar.xz 32fa4b0193960f05064f2ab31b5a89c7cf48a0b9 SOURCES/hans-gpg-key.asc diff --git a/.gitignore b/.gitignore index a673a19..c302376 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -SOURCES/clang-10.0.1.src.tar.xz -SOURCES/clang-tools-extra-10.0.1.src.tar.xz +SOURCES/clang-11.0.0rc2.src.tar.xz +SOURCES/clang-tools-extra-11.0.0rc2.src.tar.xz SOURCES/hans-gpg-key.asc diff --git a/SOURCES/0001-clang-Don-t-install-static-libraries.patch b/SOURCES/0001-clang-Don-t-install-static-libraries.patch index 4bf7d35..8c80dd3 100644 --- a/SOURCES/0001-clang-Don-t-install-static-libraries.patch +++ b/SOURCES/0001-clang-Don-t-install-static-libraries.patch @@ -1,4 +1,4 @@ -From 856b789b9de0895786ba23681c4337172676e01e Mon Sep 17 00:00:00 2001 +From 8097a9d4295dbc39cbd541ccace7bc5884852366 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 @@ -8,18 +8,18 @@ Subject: [PATCH] clang: Don't install static libraries 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake -index cbd618e..9cf076a 100644 +index 704278a0e93..1737b24a2bc 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake -@@ -97,7 +97,7 @@ macro(add_clang_library name) - if(TARGET ${name}) - target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS}) +@@ -111,7 +111,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)) - set(export_to_clangtargets) - if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR - "clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR +- 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)) + set(export_to_clangtargets) + if(${lib} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR + "clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR -- -1.8.3.1 +2.18.1 diff --git a/SOURCES/0001-clang-Fix-spurious-test-failure.patch b/SOURCES/0001-clang-Fix-spurious-test-failure.patch new file mode 100644 index 0000000..07c45b6 --- /dev/null +++ b/SOURCES/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/SOURCES/clang-10.0.1.src.tar.xz.sig b/SOURCES/clang-10.0.1.src.tar.xz.sig deleted file mode 100644 index 26c50da..0000000 Binary files a/SOURCES/clang-10.0.1.src.tar.xz.sig and /dev/null differ diff --git a/SOURCES/clang-11.0.0rc2.src.tar.xz.sig b/SOURCES/clang-11.0.0rc2.src.tar.xz.sig new file mode 100644 index 0000000..71526a8 Binary files /dev/null and b/SOURCES/clang-11.0.0rc2.src.tar.xz.sig differ diff --git a/SOURCES/clang-tools-extra-10.0.1.src.tar.xz.sig b/SOURCES/clang-tools-extra-10.0.1.src.tar.xz.sig deleted file mode 100644 index dc5cf4b..0000000 Binary files a/SOURCES/clang-tools-extra-10.0.1.src.tar.xz.sig and /dev/null differ diff --git a/SOURCES/clang-tools-extra-11.0.0rc2.src.tar.xz.sig b/SOURCES/clang-tools-extra-11.0.0rc2.src.tar.xz.sig new file mode 100644 index 0000000..19cc2e1 Binary files /dev/null and b/SOURCES/clang-tools-extra-11.0.0rc2.src.tar.xz.sig differ diff --git a/SPECS/clang.spec b/SPECS/clang.spec index c1e2b66..94bb55b 100644 --- a/SPECS/clang.spec +++ b/SPECS/clang.spec @@ -1,10 +1,10 @@ %global compat_build 0 -%global maj_ver 10 +%global maj_ver 11 %global min_ver 0 -%global patch_ver 1 -#%%global rc_ver 6 -%global baserelease 1 +%global patch_ver 0 +%global rc_ver 2 +%global baserelease 0.2 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -13,7 +13,6 @@ %{_bindir}/clang-doc \ %{_bindir}/clang-extdef-mapping \ %{_bindir}/clang-format \ - %{_bindir}/clang-import-test \ %{_bindir}/clang-include-fixer \ %{_bindir}/clang-move \ %{_bindir}/clang-offload-bundler \ @@ -62,10 +61,8 @@ %global build_install_prefix %{buildroot}%{install_prefix} -%ifarch ppc64le -# Too many threads on ppc64 systems causes OOM errors. +# Too many threads causes OOM errors. %global _smp_mflags -j8 -%endif %global clang_srcdir clang-%{version}%{?rc_ver:rc%{rc_ver}}.src %global clang_tools_srcdir clang-tools-extra-%{version}%{?rc_ver:rc%{rc_ver}}.src @@ -77,21 +74,11 @@ Summary: A C language family front-end for LLVM License: NCSA URL: http://llvm.org -%if 0%{?rc_ver:1} -Source0: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_srcdir}.tar.xz -Source3: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_srcdir}.tar.xz.sig -%else -Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_srcdir}.tar.xz -Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_srcdir}.tar.xz.sig -%endif +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{clang_srcdir}.tar.xz +Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{clang_srcdir}.tar.xz.sig %if !0%{?compat_build} -%if 0%{?rc_ver:1} -Source1: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_tools_srcdir}.tar.xz -Source2: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_tools_srcdir}.tar.xz.sig -%else -Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_tools_srcdir}.tar.xz -Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_tools_srcdir}.tar.xz.sig -%endif +Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz +Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig %endif Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc @@ -99,11 +86,9 @@ 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 -### Fix crash with kernel bpf self-tests -##Patch14: 0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.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++ @@ -144,7 +129,23 @@ BuildRequires: python3-devel # Needed for %%multilib_fix_c_header BuildRequires: multilib-rpm-config -BuildRequires: chrpath + +# 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} @@ -154,8 +155,6 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: libstdc++-devel Requires: gcc-c++ -Requires: emacs-filesystem - Provides: clang(major) = %{maj_ver} Conflicts: compiler-rt < %{version} @@ -256,9 +255,7 @@ pathfix.py -i %{__python3} -pn \ %patch11 -p1 -b .libcxx-fix %patch13 -p2 -b .unwind-all %patch15 -p2 -b .no-install-static - - -#%patch14 -p2 -b .bpf-fix +%patch16 -p2 -b .test-fix2 mv ../%{clang_tools_srcdir} tools/extra @@ -392,8 +389,20 @@ ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver} # Fix permission chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* +# create a link to clang's resource directory that is "constant" across minor +# version bumps +# this is required for packages like ccls that hardcode the link to clang's +# resource directory to not require rebuilds on minor version bumps +# Fix for bugs like rhbz#1807574 +pushd %{buildroot}%{_libdir}/clang/ +ln -s %{version} %{maj_ver} +popd + %endif +# Remove clang-tidy headers. We don't ship the libraries for these. +rm -Rvf %{buildroot}%{_includedir}/clang-tidy/ + %check %if !0%{?compat_build} # requires lit.py from LLVM utilities @@ -413,6 +422,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %if !0%{?compat_build} %files +%license LICENSE.TXT %{clang_binaries} %{_mandir}/man1/clang.1.gz %{_mandir}/man1/clang++.1.gz @@ -476,8 +486,12 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %files -n python3-clang %{python3_sitelib}/clang/ + %endif %changelog +* Thu Sep 17 2020 sguelton@redhat.com - 11.0.0-0.1.rc2 +- 11.0.0-rc2 Release + * Fri Jul 24 2020 sguelton@redhat.com - 10.0.1-1 - 10.0.1 release