From 77df2a6206d2d630224041b47925e0bedee05bb2 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 7 Jun 2019 22:55:01 +0000 Subject: [PATCH 01/30] Pull llvm-test-suite tests from common repo --- tests/llvm-abi-test-suite/runtest.sh | 7 ------- tests/llvm-test-suite/runtest.sh | 6 ------ tests/tests.yml | 7 +++++-- 3 files changed, 5 insertions(+), 15 deletions(-) delete mode 100755 tests/llvm-abi-test-suite/runtest.sh delete mode 100755 tests/llvm-test-suite/runtest.sh diff --git a/tests/llvm-abi-test-suite/runtest.sh b/tests/llvm-abi-test-suite/runtest.sh deleted file mode 100755 index cef0859..0000000 --- a/tests/llvm-abi-test-suite/runtest.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -set -e -set -x - -cp -r /usr/share/llvm-test-suite/ABI-Testsuite . -cd ABI-Testsuite -python3 linux-x86.py clang test -v --path /usr/lib64/llvm/ -j 1 diff --git a/tests/llvm-test-suite/runtest.sh b/tests/llvm-test-suite/runtest.sh deleted file mode 100755 index dd65012..0000000 --- a/tests/llvm-test-suite/runtest.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -e -set -x - -cmake -G Ninja /usr/share/llvm-test-suite/ -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DTEST_SUITE_LIT_FLAGS="-svj1" -ninja -j 1 check diff --git a/tests/tests.yml b/tests/tests.yml index 04a1f8f..1ff0b4c 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -19,12 +19,15 @@ - libcxx-devel - glibc-devel - gcc + repositories: + - repo: "https://src.fedoraproject.org/tests/llvm-test-suite.git" + dest: "llvm-test-suite" tests: - rhbz#482491: dir: ./ run: echo "int main(){}" | clang -x c - - - llvm-test-suite - - llvm-abi-test-suite + - llvm-test-suite/test-suite + - llvm-test-suite/abi-test-suite - rhbz_1657544 - rhbz_1647130 - llvm-toolchain From 277bd76c83f8bc9847927bf6e7d279614e7ebf74 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 1 Aug 2019 18:19:20 +0000 Subject: [PATCH 02/30] Sync with clang8.0 compat --- clang.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index da718ff..34a40da 100644 --- a/clang.spec +++ b/clang.spec @@ -4,6 +4,7 @@ %global min_ver 0 %global patch_ver 0 #%%global rc_ver 4 +%global baserelease 4 %global clang_tools_binaries \ %{_bindir}/clangd \ @@ -61,7 +62,7 @@ Name: %pkg_name Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 4%{?rc_ver:.rc%{rc_ver}}%{?dist} +Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -270,7 +271,11 @@ cd _build %endif %endif \ +%if !0%{compat_build} -DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \ +%else + -DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen-%{maj_ver}.%{min_ver} \ +%endif -DCLANG_ENABLE_ARCMT:BOOL=ON \ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \ -DCLANG_INCLUDE_DOCS:BOOL=ON \ From 1ca49851e1fa083be8b1a036bcf88b121e400f81 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 7 Aug 2019 16:22:09 +0000 Subject: [PATCH 03/30] 9.0.0 Release candidate 3 --- .gitignore | 4 ++ ...ix-uninitialized-value-in-ABIArgInfo.patch | 25 +++++----- clang.spec | 47 ++++++++++++------- sources | 4 +- 4 files changed, 49 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index d6c9690..d0ca7b8 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,7 @@ /clang-tools-extra-8.0.0rc4.src.tar.xz /cfe-8.0.0.src.tar.xz /clang-tools-extra-8.0.0.src.tar.xz +/cfe-9.0.0rc2.src.tar.xz +/clang-tools-extra-9.0.0rc2.src.tar.xz +/cfe-9.0.0rc3.src.tar.xz +/clang-tools-extra-9.0.0rc3.src.tar.xz diff --git a/0001-Fix-uninitialized-value-in-ABIArgInfo.patch b/0001-Fix-uninitialized-value-in-ABIArgInfo.patch index 9755200..6291203 100644 --- a/0001-Fix-uninitialized-value-in-ABIArgInfo.patch +++ b/0001-Fix-uninitialized-value-in-ABIArgInfo.patch @@ -1,4 +1,4 @@ -From 565b9633ee68b311c1a954022869d9e99fee7286 Mon Sep 17 00:00:00 2001 +From bae24f2020f7dc9db372c7e3f38d77fc5fa320d0 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Fri, 1 Feb 2019 06:39:13 +0000 Subject: [PATCH] Fix uninitialized value in ABIArgInfo @@ -6,33 +6,32 @@ Subject: [PATCH] Fix uninitialized value in ABIArgInfo GCC-9 takes advantage of this uninitialized values to optimize stuff, which ends up in failing validation when compiling clang. --- - include/clang/CodeGen/CGFunctionInfo.h | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) + clang/include/clang/CodeGen/CGFunctionInfo.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -diff --git a/include/clang/CodeGen/CGFunctionInfo.h b/include/clang/CodeGen/CGFunctionInfo.h -index cf64e9f3ee..131eb38393 100644 ---- a/include/clang/CodeGen/CGFunctionInfo.h -+++ b/include/clang/CodeGen/CGFunctionInfo.h -@@ -112,14 +112,13 @@ private: +diff --git a/clang/include/clang/CodeGen/CGFunctionInfo.h b/clang/include/clang/CodeGen/CGFunctionInfo.h +index 1f81072..caf7105 100644 +--- a/clang/include/clang/CodeGen/CGFunctionInfo.h ++++ b/clang/include/clang/CodeGen/CGFunctionInfo.h +@@ -110,13 +110,13 @@ private: } ABIArgInfo(Kind K) -- : TheKind(K), PaddingInReg(false), InReg(false), SuppressSRet(false) { +- : TheKind(K), PaddingInReg(false), InReg(false) { - } + : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0), + TheKind(K), PaddingInReg(false), InAllocaSRet(false), IndirectByVal(false), + IndirectRealign(false), SRetAfterThis(false), InReg(false), -+ CanBeFlattened(false), SignExt(false), SuppressSRet(false) {} ++ CanBeFlattened(false), SignExt(false) {} public: - ABIArgInfo() - : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0), -- TheKind(Direct), PaddingInReg(false), InReg(false), -- SuppressSRet(false) {} +- TheKind(Direct), PaddingInReg(false), InReg(false) {} + ABIArgInfo() : ABIArgInfo(Direct) {} static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0, llvm::Type *Padding = nullptr, -- -2.19.2 +1.8.3.1 diff --git a/clang.spec b/clang.spec index 34a40da..19aa71a 100644 --- a/clang.spec +++ b/clang.spec @@ -1,15 +1,16 @@ %global compat_build 0 -%global maj_ver 8 +%global maj_ver 9 %global min_ver 0 %global patch_ver 0 -#%%global rc_ver 4 -%global baserelease 4 +%global rc_ver 3 +%global baserelease 0.1 %global clang_tools_binaries \ %{_bindir}/clangd \ %{_bindir}/clang-apply-replacements \ %{_bindir}/clang-change-namespace \ + %{_bindir}/clang-doc \ %{_bindir}/clang-include-fixer \ %{_bindir}/clang-query \ %{_bindir}/clang-refactor \ @@ -29,6 +30,7 @@ %{_bindir}/clang-format \ %{_bindir}/clang-import-test \ %{_bindir}/clang-offload-bundler \ + %{_bindir}/clang-scan-deps \ %{_bindir}/diagtool \ %{_bindir}/hmaptool @@ -57,6 +59,11 @@ %global build_install_prefix %{buildroot}%{install_prefix} +%ifarch ppc64le +# Too many threads on ppc64 systems causes OOM errors. +%global _smp_mflags -j8 +%endif + %global clang_srcdir cfe-%{version}%{?rc_ver:rc%{rc_ver}}.src %global clang_tools_srcdir clang-tools-extra-%{version}%{?rc_ver:rc%{rc_ver}}.src @@ -75,9 +82,7 @@ Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver} Patch4: 0002-gtest-reorg.patch Patch9: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch Patch11: 0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch -Patch12: 0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch -Patch13: 0002-Format-isInSystemMacro-after-D55782.patch -Patch14: 0003-Fix-isInSystemMacro-in-presence-of-macro-and-pasted-.patch +Patch12: 0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -213,16 +218,14 @@ Requires: python3 pathfix.py -i %{__python3} -pn \ clang-tidy/tool/*.py \ - include-fixer/find-all-symbols/tool/run-find-all-symbols.py + clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py %setup -q -n %{clang_srcdir} %patch4 -p1 -b .gtest -%patch9 -p1 -b .abi-arginfo +%patch9 -p2 -b .abi-arginfo %patch11 -p1 -b .libcxx-fix -%patch12 -p1 -b .double-promotion-0 -%patch13 -p1 -b .double-promotion-1 -%patch14 -p1 -b .double-promotion-2 +%patch12 -p2 -b .module-test-fix mv ../%{clang_tools_srcdir} tools/extra @@ -249,13 +252,20 @@ cd _build %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif +# -DCMAKE_INSTALL_RPATH=";" is a workaround for llvm manually setting the +# rpath of libraries and binaries. llvm will skip the manual setting +# if CAMKE_INSTALL_RPATH is set to a value, but cmake interprets this value +# as nothing, so it sets the rpath to "" when installing. %cmake .. -G Ninja \ -DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DPYTHON_EXECUTABLE=%{__python3} \ - -DCMAKE_SKIP_RPATH:BOOL=ON \ - -DCMAKE_INSTALL_RPATH:BOOL=OFF \ + -DCMAKE_INSTALL_RPATH:BOOL=";" \ +%ifarch s390 s390x %{arm} %ix86 + -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ +%endif %if 0%{?compat_build} -DLLVM_CONFIG:FILEPATH=%{_bindir}/llvm-config-%{maj_ver}.%{min_ver}-%{__isa_bits} \ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ @@ -285,15 +295,16 @@ cd _build -DLLVM_ENABLE_RTTI=ON \ -DLLVM_BUILD_DOCS=ON \ -DLLVM_ENABLE_SPHINX=ON \ + -DCLANG_LINK_CLANG_DYLIB=ON \ -DSPHINX_WARNINGS_AS_ERRORS=OFF \ \ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ -DCLANG_REPOSITORY_STRING="%{?fedora:Fedora}%{?rhel:Red Hat} %{version}-%{release}" -ninja -v +%ninja_build %install -DESTDIR=%{buildroot} ninja install -C _build +%ninja_install -C _build %if 0%{?compat_build} @@ -351,11 +362,12 @@ chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1* %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. LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %ifarch s390x i686 ppc64le %{arm} : %else -false +: %endif %endif @@ -429,6 +441,9 @@ false %endif %changelog +* Thu Aug 22 2019 Tom Stellard - 9.0.0-0.1.rc3 +- 9.0.0 Release candidate 3 + * Tue Aug 20 2019 sguelton@redhat.com - 8.0.0-4 - Rebuilt for Python 3.8 diff --git a/sources b/sources index 76f4e9b..cb02107 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (cfe-8.0.0.src.tar.xz) = 98e540222719716985e5d8439116e47469cb01201ea91d1da7e46cb6633da099688d9352c3b65e5c5f660cbbae353b3d79bb803fc66b3be663f2b04b1feed1c3 -SHA512 (clang-tools-extra-8.0.0.src.tar.xz) = 434e4cb7b76f89b0a0af25f05f32f2f2e8edb9e9f14547be845df75f5032c1d9dbf475be408bb989c476ec667c10af54a15d40e42559b05e52d24c5fd416b517 +SHA512 (cfe-9.0.0rc3.src.tar.xz) = cc217c6dd9ad9b0ba07dcfc0548c28c40ce68104b7d998cd783f76d0e39d356ff4fb6ec139e776965f7c461ccddcddf589d4a42ca433da62c5955244493926f6 +SHA512 (clang-tools-extra-9.0.0rc3.src.tar.xz) = f5d288ab07f19dfb0014134a40c5c615a5f160973b8410900828e20116bd01702a041adfd600dcffee5ad2a3679f72ef5410cde20e5611925aaa39fbfc9e2094 From e3a4c7d64ee7ea5bdaa431bdf28cedca2d37f147 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 11 Sep 2019 04:04:54 +0000 Subject: [PATCH 04/30] Add missing patch --- ...es.cpp-test-to-work-when-build-direc.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch diff --git a/0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch b/0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch new file mode 100644 index 0000000..c7c6d7f --- /dev/null +++ b/0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch @@ -0,0 +1,27 @@ +From 20ffd5bc4e45980dc804c5fa422e5182cbc975b7 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 13 Aug 2019 13:38:40 -0700 +Subject: [PATCH] Fix Driver/modules.cpp test to work when build directory name + contains '.s' + +--- + clang/test/Driver/modules.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/clang/test/Driver/modules.cpp b/clang/test/Driver/modules.cpp +index 7c549c1..9e06151 100644 +--- a/clang/test/Driver/modules.cpp ++++ b/clang/test/Driver/modules.cpp +@@ -15,7 +15,8 @@ + // RUN: %clang -std=c++2a %t/module.pcm -S -o %t/module.pcm.o -v 2>&1 | FileCheck %s --check-prefix=CHECK-COMPILE + // + // CHECK-COMPILE: -cc1 {{.*}} {{-emit-obj|-S}} +-// CHECK-COMPILE-SAME: -o {{.*}}.{{pcm.o|s}} ++// Check for extra space to avoid failures when the build directory contains '.s' in its path. ++// CHECK-COMPILE-SAME: -o {{.*}}.{{pcm.o|s}}{{ }} + // CHECK-COMPILE-SAME: -x pcm + // CHECK-COMPILE-SAME: {{.*}}.pcm + +-- +1.8.3.1 + From 69ca58540c6ad76b41faa08c5368515e20b37269 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 11 Sep 2019 19:58:15 +0000 Subject: [PATCH 05/30] Reduce debug info verbosity on ppc64le to avoid OOM errors in koji --- clang.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/clang.spec b/clang.spec index 19aa71a..124b1a2 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 %global rc_ver 3 -%global baserelease 0.1 +%global baserelease 0.2 %global clang_tools_binaries \ %{_bindir}/clangd \ @@ -247,7 +247,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py mkdir -p _build cd _build -%ifarch s390 s390x %{arm} %ix86 +%ifarch s390 s390x %{arm} %ix86 ppc64le # Decrease debuginfo verbosity to reduce memory consumption during final library linking %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif @@ -262,7 +262,7 @@ cd _build -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DPYTHON_EXECUTABLE=%{__python3} \ -DCMAKE_INSTALL_RPATH:BOOL=";" \ -%ifarch s390 s390x %{arm} %ix86 +%ifarch s390 s390x %{arm} %ix86 ppc64le -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ %endif @@ -441,6 +441,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Wed Sep 11 2019 Tom Stellard - 9.0.0-0.2.rc3 +- Reduce debug info verbosity on ppc64le to avoid OOM errors in koji + * Thu Aug 22 2019 Tom Stellard - 9.0.0-0.1.rc3 - 9.0.0 Release candidate 3 From d04c1c444aefb26fa715479d26d5c6520156a708 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 20 Sep 2019 01:03:04 +0000 Subject: [PATCH 06/30] 9.0.0 Release --- .gitignore | 2 ++ clang.spec | 7 +++++-- sources | 4 ++-- tests/testspocl.yml | 28 ++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 tests/testspocl.yml diff --git a/.gitignore b/.gitignore index d0ca7b8..707d1c8 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,5 @@ /clang-tools-extra-9.0.0rc2.src.tar.xz /cfe-9.0.0rc3.src.tar.xz /clang-tools-extra-9.0.0rc3.src.tar.xz +/cfe-9.0.0.src.tar.xz +/clang-tools-extra-9.0.0.src.tar.xz diff --git a/clang.spec b/clang.spec index 124b1a2..acd083c 100644 --- a/clang.spec +++ b/clang.spec @@ -3,8 +3,8 @@ %global maj_ver 9 %global min_ver 0 %global patch_ver 0 -%global rc_ver 3 -%global baserelease 0.2 +#%%global rc_ver 3 +%global baserelease 1 %global clang_tools_binaries \ %{_bindir}/clangd \ @@ -441,6 +441,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Thu Sep 19 2019 Tom Stellard - 9.0.0-1 +- 9.0.0 Release + * Wed Sep 11 2019 Tom Stellard - 9.0.0-0.2.rc3 - Reduce debug info verbosity on ppc64le to avoid OOM errors in koji diff --git a/sources b/sources index cb02107..72efbb6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (cfe-9.0.0rc3.src.tar.xz) = cc217c6dd9ad9b0ba07dcfc0548c28c40ce68104b7d998cd783f76d0e39d356ff4fb6ec139e776965f7c461ccddcddf589d4a42ca433da62c5955244493926f6 -SHA512 (clang-tools-extra-9.0.0rc3.src.tar.xz) = f5d288ab07f19dfb0014134a40c5c615a5f160973b8410900828e20116bd01702a041adfd600dcffee5ad2a3679f72ef5410cde20e5611925aaa39fbfc9e2094 +SHA512 (cfe-9.0.0.src.tar.xz) = 83fcca5499102b375e620cdac97d75e6111ebed4ef10240859ddd8a88bc5b022703739d2eae0d8693c91892ad11fc6b531c0dbee62fbce68d3be595b94f0b1fe +SHA512 (clang-tools-extra-9.0.0.src.tar.xz) = 70fd5cdeb8d371e5bbc369bdea3b94a1e3f450e1fdc109a2328d75b30a09c56fbed31678e211172e0a1fc1ff82c9ab4dfea4238be2cc0b82598f71ce9b7ab7d3 diff --git a/tests/testspocl.yml b/tests/testspocl.yml new file mode 100644 index 0000000..01bcd5b --- /dev/null +++ b/tests/testspocl.yml @@ -0,0 +1,28 @@ +# This is separate from tests.yml because we want to run the tests without +# clang installed. +# FIXME: Is there some way we can put this yaml definition in the tests/pocl +# repo? Right now we need to copy and paste this everywhere the test is run. +- hosts: localhost + pre_tasks: + # Programs linked against pocl should be able to run without clang installed, + # so when we run the test we want to make sure clang is not installed to + # verify we haven't introduced an implicit dependency on clang. + - name: Uninstall clang + package: + name: clang + state: absent + tags: classic + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/pocl.git" + dest: "pocl" + required_packages: + - ocl-icd-devel + - pocl + - gcc + tests: + # rhbz#1582884 + - pocl/simple-opencl-no-clang: From 73d4dd7e74d25946f82ed2a55f361b13585ebc90 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 25 Sep 2019 02:40:16 +0000 Subject: [PATCH 07/30] Pull tests from tests/clang repository --- tests/llvm-toolchain/runtest.sh | 29 ----------------------------- tests/rhbz_1647130/runtest.sh | 10 ---------- tests/rhbz_1657544/from_chars.cpp | 15 --------------- tests/rhbz_1657544/runtest.sh | 6 ------ tests/tests.yml | 8 +++++--- 5 files changed, 5 insertions(+), 63 deletions(-) delete mode 100755 tests/llvm-toolchain/runtest.sh delete mode 100755 tests/rhbz_1647130/runtest.sh delete mode 100644 tests/rhbz_1657544/from_chars.cpp delete mode 100755 tests/rhbz_1657544/runtest.sh diff --git a/tests/llvm-toolchain/runtest.sh b/tests/llvm-toolchain/runtest.sh deleted file mode 100755 index eeebda5..0000000 --- a/tests/llvm-toolchain/runtest.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Tests for using a full LLVM toolchain: clang + compiler-rt + libcxx + lld - -set -ex pipefail - -# Test compile a C program. -cat << EOF | \ - clang -fuse-ld=lld -rtlib=compiler-rt -x c - && \ - ./a.out | grep 'Hello World' - -#include -int main(int argc, char **argv) { - printf("Hello World\n"); - return 0; -} -EOF - -# Test compile a C++ program. -cat << EOF | \ - clang++ -x c++ -fuse-ld=lld -rtlib=compiler-rt -stdlib=libc++ - && \ - ./a.out | grep 'Hello World' - -#include -int main(int argc, char **argv) { - std::cout << "Hello World\n"; - return 0; -} -EOF diff --git a/tests/rhbz_1647130/runtest.sh b/tests/rhbz_1647130/runtest.sh deleted file mode 100755 index ab515c7..0000000 --- a/tests/rhbz_1647130/runtest.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -set -x - -tmp_cpp=`mktemp -t XXXXX.cpp` -tmp_dir=`mktemp -d` -echo 'int main(int argc, char*argv[]) { while(argc--) new int(); return 0; }' > $tmp_cpp -scan-build -o $tmp_dir clang++ -c $tmp_cpp -o /dev/null -(scan-view --no-browser $tmp_dir/* & WPID=$! && sleep 10s && kill $WPID) - diff --git a/tests/rhbz_1657544/from_chars.cpp b/tests/rhbz_1657544/from_chars.cpp deleted file mode 100644 index b76be22..0000000 --- a/tests/rhbz_1657544/from_chars.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include -#include - -using namespace std; - -int main(int argc, char **argv) -{ - size_t r=0; - const char *begin = argv[1]; - const char *end = begin + strlen(begin); - from_chars(begin, end, r); - cout << r << '\n'; - return 0; -} diff --git a/tests/rhbz_1657544/runtest.sh b/tests/rhbz_1657544/runtest.sh deleted file mode 100755 index 758de0b..0000000 --- a/tests/rhbz_1657544/runtest.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -e -set -x - -clang++ from_chars.cpp -./a.out 100 | grep 100 diff --git a/tests/tests.yml b/tests/tests.yml index 1ff0b4c..a413089 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -22,12 +22,14 @@ repositories: - repo: "https://src.fedoraproject.org/tests/llvm-test-suite.git" dest: "llvm-test-suite" + - repo: "https://src.fedoraproject.org/tests/clang.git" + dest: "clang" tests: - rhbz#482491: dir: ./ run: echo "int main(){}" | clang -x c - - llvm-test-suite/test-suite - llvm-test-suite/abi-test-suite - - rhbz_1657544 - - rhbz_1647130 - - llvm-toolchain + - clang/rhbz_1657544 + - clang/rhbz_1647130 + - clang/llvm-toolchain From 6ff40379f9a568773b7c58ef5fa5ac76ebbc3464 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 14 Feb 2019 16:06:09 +0000 Subject: [PATCH 08/30] Enable gating on the tests in dist-git --- gating.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..219cd2c --- /dev/null +++ b/gating.yaml @@ -0,0 +1,12 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_testing +rules: + - !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete} +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +rules: + - !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete} From 797f722f5facd5ea19ef5ad1418b71bed8cb27d7 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Tue, 10 Dec 2019 13:33:59 +0000 Subject: [PATCH 09/30] Activate -funwind-tables on all arches, see rhbz#1655546 --- ...ind-tables-the-default-for-all-archs.patch | 39 +++++++++++++++++++ clang.spec | 6 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 0001-Make-funwind-tables-the-default-for-all-archs.patch diff --git a/0001-Make-funwind-tables-the-default-for-all-archs.patch b/0001-Make-funwind-tables-the-default-for-all-archs.patch new file mode 100644 index 0000000..d9e9125 --- /dev/null +++ b/0001-Make-funwind-tables-the-default-for-all-archs.patch @@ -0,0 +1,39 @@ +From 690373af5a5d50cf115ed6e4d2849bb786f9dc8e Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Tue, 10 Dec 2019 09:18:03 +0000 +Subject: [PATCH] Make -funwind-tables the default for all archs + +--- + clang/lib/Driver/ToolChain.cpp | 2 +- + clang/lib/Driver/ToolChains/Gnu.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp +index b1fddb0af55..43af40ed0e8 100644 +--- a/clang/lib/Driver/ToolChain.cpp ++++ b/clang/lib/Driver/ToolChain.cpp +@@ -244,7 +244,7 @@ std::string ToolChain::getInputFilename(const InputInfo &Input) const { + } + + bool ToolChain::IsUnwindTablesDefault(const ArgList &Args) const { +- return false; ++ return true; + } + + Tool *ToolChain::getClang() const { +diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp +index 33cdd3585c2..15e82be8f3a 100644 +--- a/clang/lib/Driver/ToolChains/Gnu.cpp ++++ b/clang/lib/Driver/ToolChains/Gnu.cpp +@@ -2535,7 +2535,7 @@ void Generic_GCC::printVerboseInfo(raw_ostream &OS) const { + } + + bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const { +- return getArch() == llvm::Triple::x86_64; ++ return true; + } + + bool Generic_GCC::isPICDefault() const { +-- +2.20.1 + diff --git a/clang.spec b/clang.spec index acd083c..4035ed3 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 #%%global rc_ver 3 -%global baserelease 1 +%global baserelease 2 %global clang_tools_binaries \ %{_bindir}/clangd \ @@ -83,6 +83,7 @@ Patch4: 0002-gtest-reorg.patch Patch9: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch Patch11: 0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch Patch12: 0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch +Patch13: 0001-Make-funwind-tables-the-default-for-all-archs.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -441,6 +442,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Tue Dec 10 2019 sguelton@redhat.com - 9.0.0-2 +- Activate -funwind-tables on all arches, see rhbz#1655546. + * Thu Sep 19 2019 Tom Stellard - 9.0.0-1 - 9.0.0 Release From 4c28031fc041a0c2b53fbdf5f48d443b3238583f Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 14 Nov 2019 22:41:24 +0000 Subject: [PATCH 10/30] Add explicit requires for clang-libs to fix rpmdiff errors --- clang.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 4035ed3..37ceabf 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 #%%global rc_ver 3 -%global baserelease 2 +%global baserelease 3 %global clang_tools_binaries \ %{_bindir}/clangd \ @@ -160,6 +160,7 @@ Summary: Development header files for clang Requires: %{name}%{?_isa} = %{version}-%{release} # The clang CMake files reference tools from clang-tools-extra. Requires: %{name}-tools-extra%{?_isa} = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %endif %description devel @@ -442,6 +443,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Wed Dec 11 2019 Tom Stellard - 9.0.0-3 +- Add explicit requires for clang-libs to fix rpmdiff errors + * Tue Dec 10 2019 sguelton@redhat.com - 9.0.0-2 - Activate -funwind-tables on all arches, see rhbz#1655546. From 86a049a618fc25c13d00a21b690b094163e4ba10 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 20 Dec 2019 02:50:51 +0000 Subject: [PATCH 11/30] 9.0.1 Release --- .gitignore | 2 + ...es.cpp-test-to-work-when-build-direc.patch | 27 -------------- ...ix-uninitialized-value-in-ABIArgInfo.patch | 37 ------------------- clang.spec | 13 +++---- sources | 4 +- 5 files changed, 10 insertions(+), 73 deletions(-) delete mode 100644 0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch delete mode 100644 0001-Fix-uninitialized-value-in-ABIArgInfo.patch diff --git a/.gitignore b/.gitignore index 707d1c8..a367288 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,5 @@ /clang-tools-extra-9.0.0rc3.src.tar.xz /cfe-9.0.0.src.tar.xz /clang-tools-extra-9.0.0.src.tar.xz +/clang-9.0.1.src.tar.xz +/clang-tools-extra-9.0.1.src.tar.xz diff --git a/0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch b/0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch deleted file mode 100644 index c7c6d7f..0000000 --- a/0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 20ffd5bc4e45980dc804c5fa422e5182cbc975b7 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Tue, 13 Aug 2019 13:38:40 -0700 -Subject: [PATCH] Fix Driver/modules.cpp test to work when build directory name - contains '.s' - ---- - clang/test/Driver/modules.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/clang/test/Driver/modules.cpp b/clang/test/Driver/modules.cpp -index 7c549c1..9e06151 100644 ---- a/clang/test/Driver/modules.cpp -+++ b/clang/test/Driver/modules.cpp -@@ -15,7 +15,8 @@ - // RUN: %clang -std=c++2a %t/module.pcm -S -o %t/module.pcm.o -v 2>&1 | FileCheck %s --check-prefix=CHECK-COMPILE - // - // CHECK-COMPILE: -cc1 {{.*}} {{-emit-obj|-S}} --// CHECK-COMPILE-SAME: -o {{.*}}.{{pcm.o|s}} -+// Check for extra space to avoid failures when the build directory contains '.s' in its path. -+// CHECK-COMPILE-SAME: -o {{.*}}.{{pcm.o|s}}{{ }} - // CHECK-COMPILE-SAME: -x pcm - // CHECK-COMPILE-SAME: {{.*}}.pcm - --- -1.8.3.1 - diff --git a/0001-Fix-uninitialized-value-in-ABIArgInfo.patch b/0001-Fix-uninitialized-value-in-ABIArgInfo.patch deleted file mode 100644 index 6291203..0000000 --- a/0001-Fix-uninitialized-value-in-ABIArgInfo.patch +++ /dev/null @@ -1,37 +0,0 @@ -From bae24f2020f7dc9db372c7e3f38d77fc5fa320d0 Mon Sep 17 00:00:00 2001 -From: serge-sans-paille -Date: Fri, 1 Feb 2019 06:39:13 +0000 -Subject: [PATCH] Fix uninitialized value in ABIArgInfo - -GCC-9 takes advantage of this uninitialized values to optimize stuff, -which ends up in failing validation when compiling clang. ---- - clang/include/clang/CodeGen/CGFunctionInfo.h | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/clang/include/clang/CodeGen/CGFunctionInfo.h b/clang/include/clang/CodeGen/CGFunctionInfo.h -index 1f81072..caf7105 100644 ---- a/clang/include/clang/CodeGen/CGFunctionInfo.h -+++ b/clang/include/clang/CodeGen/CGFunctionInfo.h -@@ -110,13 +110,13 @@ private: - } - - ABIArgInfo(Kind K) -- : TheKind(K), PaddingInReg(false), InReg(false) { -- } -+ : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0), -+ TheKind(K), PaddingInReg(false), InAllocaSRet(false), IndirectByVal(false), -+ IndirectRealign(false), SRetAfterThis(false), InReg(false), -+ CanBeFlattened(false), SignExt(false) {} - - public: -- ABIArgInfo() -- : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0), -- TheKind(Direct), PaddingInReg(false), InReg(false) {} -+ ABIArgInfo() : ABIArgInfo(Direct) {} - - static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0, - llvm::Type *Padding = nullptr, --- -1.8.3.1 - diff --git a/clang.spec b/clang.spec index 37ceabf..d259461 100644 --- a/clang.spec +++ b/clang.spec @@ -2,9 +2,9 @@ %global maj_ver 9 %global min_ver 0 -%global patch_ver 0 +%global patch_ver 1 #%%global rc_ver 3 -%global baserelease 3 +%global baserelease 1 %global clang_tools_binaries \ %{_bindir}/clangd \ @@ -64,7 +64,7 @@ %global _smp_mflags -j8 %endif -%global clang_srcdir cfe-%{version}%{?rc_ver:rc%{rc_ver}}.src +%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 Name: %pkg_name @@ -80,9 +80,7 @@ Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver} %endif Patch4: 0002-gtest-reorg.patch -Patch9: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch Patch11: 0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch -Patch12: 0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch Patch13: 0001-Make-funwind-tables-the-default-for-all-archs.patch BuildRequires: gcc @@ -225,9 +223,7 @@ pathfix.py -i %{__python3} -pn \ %setup -q -n %{clang_srcdir} %patch4 -p1 -b .gtest -%patch9 -p2 -b .abi-arginfo %patch11 -p1 -b .libcxx-fix -%patch12 -p2 -b .module-test-fix mv ../%{clang_tools_srcdir} tools/extra @@ -443,6 +439,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Thu Dec 19 2019 Tom Stellard - 9.0.1-1 +- 9.0.1 Release + * Wed Dec 11 2019 Tom Stellard - 9.0.0-3 - Add explicit requires for clang-libs to fix rpmdiff errors diff --git a/sources b/sources index 72efbb6..6339267 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (cfe-9.0.0.src.tar.xz) = 83fcca5499102b375e620cdac97d75e6111ebed4ef10240859ddd8a88bc5b022703739d2eae0d8693c91892ad11fc6b531c0dbee62fbce68d3be595b94f0b1fe -SHA512 (clang-tools-extra-9.0.0.src.tar.xz) = 70fd5cdeb8d371e5bbc369bdea3b94a1e3f450e1fdc109a2328d75b30a09c56fbed31678e211172e0a1fc1ff82c9ab4dfea4238be2cc0b82598f71ce9b7ab7d3 +SHA512 (clang-9.0.1.src.tar.xz) = 3bcdcfd1ebb20a2cb15d57c608106b6e6e9c2eda4b781f573e84e0600b775bb7609f6df9edcf819ee5d91cc01a28ee089353c29fd57c23b867afbf6ad2f5cd13 +SHA512 (clang-tools-extra-9.0.1.src.tar.xz) = 4a671596460809f314ed96b0cc0be7f2498692275d0a7bd08266f9cdf4b85fb39cb4eea4131602e9a170a75eb5d9623449960f873e25b999e06c016387a1918d From 5baf5a3c1f1bd1a844baaf21b1551eb98a962f80 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 10 Jan 2020 01:45:35 +0000 Subject: [PATCH 12/30] Fix crash with kernel bpf self-tests --- ...ype-metadata-for-builtin-preseve_arr.patch | 204 ++++++++++++++++++ clang.spec | 8 +- 2 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch diff --git a/0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch b/0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch new file mode 100644 index 0000000..2062f00 --- /dev/null +++ b/0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch @@ -0,0 +1,204 @@ +From 5eb29c8b23b652b8dd8988621f5c91191b13ffe3 Mon Sep 17 00:00:00 2001 +From: Yonghong Song +Date: Fri, 2 Aug 2019 21:28:28 +0000 +Subject: [PATCH] [BPF] annotate DIType metadata for builtin + preseve_array_access_index() + +Previously, debuginfo types are annotated to +IR builtin preserve_struct_access_index() and +preserve_union_access_index(), but not +preserve_array_access_index(). The debug info +is useful to identify the root type name which +later will be used for type comparison. + +For user access without explicit type conversions, +the previous scheme works as we can ignore intermediate +compiler generated type conversions (e.g., from union types to +union members) and still generate correct access index string. + +The issue comes with user explicit type conversions, e.g., +converting an array to a structure like below: + struct t { int a; char b[40]; }; + struct p { int c; int d; }; + struct t *var = ...; + ... __builtin_preserve_access_index(&(((struct p *)&(var->b[0]))->d)) ... +Although BPF backend can derive the type of &(var->b[0]), +explicit type annotation make checking more consistent +and less error prone. + +Another benefit is for multiple dimension array handling. +For example, + struct p { int c; int d; } g[8][9][10]; + ... __builtin_preserve_access_index(&g[2][3][4].d) ... +It would be possible to calculate the number of "struct p"'s +before accessing its member "d" if array debug info is +available as it contains each dimension range. + +This patch enables to annotate IR builtin preserve_array_access_index() +with proper debuginfo type. The unit test case and language reference +is updated as well. + +Signed-off-by: Yonghong Song + +Differential Revision: https://reviews.llvm.org/D65664 + +llvm-svn: 367724 +(cherry picked from commit d0ea05d5eff475a27a5d3bbe4d9fd389935f9cb2) +--- + clang/lib/CodeGen/CGExpr.cpp | 12 ++++++++--- + .../CodeGen/builtin-preserve-access-index-array.c | 18 +++++++++++++++++ + clang/test/CodeGen/builtin-preserve-access-index.c | 23 +++++++++++----------- + llvm/docs/LangRef.rst | 4 ++++ + llvm/include/llvm/IR/IRBuilder.h | 10 +++++++--- + llvm/test/CodeGen/BPF/CORE/intrinsic-array.ll | 2 +- + 6 files changed, 51 insertions(+), 18 deletions(-) + create mode 100644 clang/test/CodeGen/builtin-preserve-access-index-array.c + +diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp +index b6c2567..21c4103 100644 +--- a/clang/lib/CodeGen/CGExpr.cpp ++++ b/clang/lib/CodeGen/CGExpr.cpp +@@ -3405,6 +3405,7 @@ static Address emitArraySubscriptGEP(CodeGenFunction &CGF, Address addr, + ArrayRef indices, + QualType eltType, bool inbounds, + bool signedIndices, SourceLocation loc, ++ QualType *arrayType = nullptr, + const llvm::Twine &name = "arrayidx") { + // All the indices except that last must be zero. + #ifndef NDEBUG +@@ -3433,9 +3434,12 @@ static Address emitArraySubscriptGEP(CodeGenFunction &CGF, Address addr, + } else { + // Remember the original array subscript for bpf target + unsigned idx = LastIndex->getZExtValue(); ++ llvm::DIType *DbgInfo = nullptr; ++ if (arrayType) ++ DbgInfo = CGF.getDebugInfo()->getOrCreateStandaloneType(*arrayType, loc); + eltPtr = CGF.Builder.CreatePreserveArrayAccessIndex(addr.getPointer(), + indices.size() - 1, +- idx); ++ idx, DbgInfo); + } + + return Address(eltPtr, eltAlign); +@@ -3572,19 +3576,21 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, + auto *Idx = EmitIdxAfterBase(/*Promote*/true); + + // Propagate the alignment from the array itself to the result. ++ QualType arrayType = Array->getType(); + Addr = emitArraySubscriptGEP( + *this, ArrayLV.getAddress(), {CGM.getSize(CharUnits::Zero()), Idx}, + E->getType(), !getLangOpts().isSignedOverflowDefined(), SignedIndices, +- E->getExprLoc()); ++ E->getExprLoc(), &arrayType); + EltBaseInfo = ArrayLV.getBaseInfo(); + EltTBAAInfo = CGM.getTBAAInfoForSubobject(ArrayLV, E->getType()); + } else { + // The base must be a pointer; emit it with an estimate of its alignment. + Addr = EmitPointerWithAlignment(E->getBase(), &EltBaseInfo, &EltTBAAInfo); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); ++ QualType ptrType = E->getBase()->getType(); + Addr = emitArraySubscriptGEP(*this, Addr, Idx, E->getType(), + !getLangOpts().isSignedOverflowDefined(), +- SignedIndices, E->getExprLoc()); ++ SignedIndices, E->getExprLoc(), &ptrType); + } + + LValue LV = MakeAddrLValue(Addr, E->getType(), EltBaseInfo, EltTBAAInfo); +diff --git a/clang/test/CodeGen/builtin-preserve-access-index-array.c b/clang/test/CodeGen/builtin-preserve-access-index-array.c +new file mode 100644 +index 0000000..a449b28 +--- /dev/null ++++ b/clang/test/CodeGen/builtin-preserve-access-index-array.c +@@ -0,0 +1,18 @@ ++// RUN: %clang -target x86_64 -emit-llvm -S -g %s -o - | FileCheck %s ++ ++#define _(x) (__builtin_preserve_access_index(x)) ++ ++struct s1 { ++ char a; ++ int b[4]; ++}; ++ ++const void *unit1(struct s1 *arg) { ++ return _(&arg->b[2]); ++} ++// CHECK: define dso_local i8* @unit1 ++// CHECK: call [4 x i32]* @llvm.preserve.struct.access.index.p0a4i32.p0s_struct.s1s(%struct.s1* %{{[0-9a-z]+}}, i32 1, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[STRUCT_S1:[0-9]+]] ++// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[ARRAY:[0-9]+]] ++// ++// CHECK: ![[ARRAY]] = !DICompositeType(tag: DW_TAG_array_type ++// CHECK: ![[STRUCT_S1]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s1" +diff --git a/clang/test/CodeGen/builtin-preserve-access-index.c b/clang/test/CodeGen/builtin-preserve-access-index.c +index 954a3b8..1084416 100644 +--- a/clang/test/CodeGen/builtin-preserve-access-index.c ++++ b/clang/test/CodeGen/builtin-preserve-access-index.c +@@ -31,16 +31,16 @@ const void *unit4(const int *arg) { + } + // CHECK: define dso_local i8* @unit4 + // CHECK-NOT: getelementptr +-// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* %{{[0-9a-z]+}}, i32 0, i32 1) ++// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* %{{[0-9a-z]+}}, i32 0, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[POINTER:[0-9]+]] + + const void *unit5(const int *arg[5]) { + return _(&arg[1][2]); + } + // CHECK: define dso_local i8* @unit5 + // CHECK-NOT: getelementptr +-// CHECK: call i32** @llvm.preserve.array.access.index.p0p0i32.p0p0i32(i32** %{{[0-9a-z]+}}, i32 0, i32 1) ++// CHECK: call i32** @llvm.preserve.array.access.index.p0p0i32.p0p0i32(i32** %{{[0-9a-z]+}}, i32 0, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} + // CHECK-NOT: getelementptr +-// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* %{{[0-9a-z]+}}, i32 0, i32 2) ++// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* %{{[0-9a-z]+}}, i32 0, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[POINTER:[0-9]+]] + + struct s1 { + char a; +@@ -141,7 +141,7 @@ const void *unit13(struct s4 *arg) { + // CHECK: define dso_local i8* @unit13 + // CHECK: call %union.u* @llvm.preserve.struct.access.index.p0s_union.us.p0s_struct.s4s(%struct.s4* %{{[0-9a-z]+}}, i32 1, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[STRUCT_S4:[0-9]+]] + // CHECK: call %union.u* @llvm.preserve.union.access.index.p0s_union.us.p0s_union.us(%union.u* %{{[0-9a-z]+}}, i32 0), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[UNION_I_U:[0-9]+]] +-// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2) ++// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} + + const void *unit14(union u3 *arg) { + return _(&arg->c.b[2]); +@@ -149,13 +149,13 @@ const void *unit14(union u3 *arg) { + // CHECK: define dso_local i8* @unit14 + // CHECK: call %union.u3* @llvm.preserve.union.access.index.p0s_union.u3s.p0s_union.u3s(%union.u3* %{{[0-9a-z]+}}, i32 0), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[UNION_U3:[0-9]+]] + // CHECK: call [4 x i32]* @llvm.preserve.struct.access.index.p0a4i32.p0s_struct.ss(%struct.s* %{{[0-9a-z]+}}, i32 0, i32 0), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[STRUCT_I_S:[0-9]+]] +-// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2) ++// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} + + const void *unit15(struct s4 *arg) { + return _(&arg[2].c.a); + } + // CHECK: define dso_local i8* @unit15 +-// CHECK: call %struct.s4* @llvm.preserve.array.access.index.p0s_struct.s4s.p0s_struct.s4s(%struct.s4* %{{[0-9a-z]+}}, i32 0, i32 2) ++// CHECK: call %struct.s4* @llvm.preserve.array.access.index.p0s_struct.s4s.p0s_struct.s4s(%struct.s4* %{{[0-9a-z]+}}, i32 0, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} + // CHECK: call %union.u* @llvm.preserve.struct.access.index.p0s_union.us.p0s_struct.s4s(%struct.s4* %{{[0-9a-z]+}}, i32 1, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[STRUCT_S4]] + // CHECK: call %union.u* @llvm.preserve.union.access.index.p0s_union.us.p0s_union.us(%union.u* %{{[0-9a-z]+}}, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[UNION_I_U]] + +@@ -163,15 +163,16 @@ const void *unit16(union u3 *arg) { + return _(&arg[2].a); + } + // CHECK: define dso_local i8* @unit16 +-// CHECK: call %union.u3* @llvm.preserve.array.access.index.p0s_union.u3s.p0s_union.u3s(%union.u3* %{{[0-9a-z]+}}, i32 0, i32 2) ++// CHECK: call %union.u3* @llvm.preserve.array.access.index.p0s_union.u3s.p0s_union.u3s(%union.u3* %{{[0-9a-z]+}}, i32 0, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} + // CHECK: call %union.u3* @llvm.preserve.union.access.index.p0s_union.u3s.p0s_union.u3s(%union.u3* %{{[0-9a-z]+}}, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[UNION_U3]] + ++// CHECK: ![[POINTER]] = !DIDerivedType(tag: DW_TAG_pointer_type ++// CHECK: ![[STRUCT_S4]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s4" ++// CHECK: ![[UNION_I_U]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u" ++// CHECK: ![[UNION_U3]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u3" ++// CHECK: ![[STRUCT_I_S]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s" + // CHECK: ![[STRUCT_S1]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s1" + // CHECK: ![[STRUCT_S2]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s2" + // CHECK: ![[STRUCT_S3]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s3" + // CHECK: ![[UNION_U1]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u1" + // CHECK: ![[UNION_U2]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u2" +-// CHECK: ![[STRUCT_S4]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s4" +-// CHECK: ![[UNION_I_U]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u" +-// CHECK: ![[UNION_U3]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u3" +-// CHECK: ![[STRUCT_I_S]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s" +-- +1.8.3.1 + diff --git a/clang.spec b/clang.spec index d259461..bbf443d 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 1 #%%global rc_ver 3 -%global baserelease 1 +%global baserelease 2 %global clang_tools_binaries \ %{_bindir}/clangd \ @@ -82,6 +82,8 @@ Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver} 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 BuildRequires: gcc BuildRequires: gcc-c++ @@ -224,6 +226,7 @@ pathfix.py -i %{__python3} -pn \ %patch4 -p1 -b .gtest %patch11 -p1 -b .libcxx-fix +%patch14 -p2 -b .bpf-fix mv ../%{clang_tools_srcdir} tools/extra @@ -439,6 +442,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Fri Jan 10 2020 Tom Stellard - 9.0.1-2 +- Fix crash with kernel bpf self-tests + * Thu Dec 19 2019 Tom Stellard - 9.0.1-1 - 9.0.1 Release From 51cb45dd23b3175f5a5f8a595af402a3d490fb8c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 14:07:59 +0000 Subject: [PATCH 13/30] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- clang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index bbf443d..6af31c0 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 1 #%%global rc_ver 3 -%global baserelease 2 +%global baserelease 3 %global clang_tools_binaries \ %{_bindir}/clangd \ @@ -442,6 +442,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 9.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Fri Jan 10 2020 Tom Stellard - 9.0.1-2 - Fix crash with kernel bpf self-tests From cf309ffb9adc7f5626142e2d61e2bd0830fdecb0 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Thu, 6 Feb 2020 10:41:16 +0000 Subject: [PATCH 14/30] 10.0.0rc1 --- .gitignore | 4 + ...ype-metadata-for-builtin-preseve_arr.patch | 204 ------------------ ...nSystemMacro-to-handle-pasted-macros.patch | 137 ------------ ...-Format-isInSystemMacro-after-D55782.patch | 39 ---- ...cro-in-presence-of-macro-and-pasted-.patch | 63 ------ clang.spec | 49 +++-- hans-gpg-key.asc | 52 +++++ sources | 4 +- 8 files changed, 87 insertions(+), 465 deletions(-) delete mode 100644 0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch delete mode 100644 0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch delete mode 100644 0002-Format-isInSystemMacro-after-D55782.patch delete mode 100644 0003-Fix-isInSystemMacro-in-presence-of-macro-and-pasted-.patch create mode 100644 hans-gpg-key.asc diff --git a/.gitignore b/.gitignore index a367288..74ca0fd 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,7 @@ /clang-tools-extra-9.0.0.src.tar.xz /clang-9.0.1.src.tar.xz /clang-tools-extra-9.0.1.src.tar.xz +/clang-10.0.0rc1.src.tar.xz +/clang-tools-extra-10.0.0rc1.src.tar.xz +/clang-10.0.0rc1.src.tar.xz.sig +/clang-tools-extra-10.0.0rc1.src.tar.xz.sig diff --git a/0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch b/0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch deleted file mode 100644 index 2062f00..0000000 --- a/0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch +++ /dev/null @@ -1,204 +0,0 @@ -From 5eb29c8b23b652b8dd8988621f5c91191b13ffe3 Mon Sep 17 00:00:00 2001 -From: Yonghong Song -Date: Fri, 2 Aug 2019 21:28:28 +0000 -Subject: [PATCH] [BPF] annotate DIType metadata for builtin - preseve_array_access_index() - -Previously, debuginfo types are annotated to -IR builtin preserve_struct_access_index() and -preserve_union_access_index(), but not -preserve_array_access_index(). The debug info -is useful to identify the root type name which -later will be used for type comparison. - -For user access without explicit type conversions, -the previous scheme works as we can ignore intermediate -compiler generated type conversions (e.g., from union types to -union members) and still generate correct access index string. - -The issue comes with user explicit type conversions, e.g., -converting an array to a structure like below: - struct t { int a; char b[40]; }; - struct p { int c; int d; }; - struct t *var = ...; - ... __builtin_preserve_access_index(&(((struct p *)&(var->b[0]))->d)) ... -Although BPF backend can derive the type of &(var->b[0]), -explicit type annotation make checking more consistent -and less error prone. - -Another benefit is for multiple dimension array handling. -For example, - struct p { int c; int d; } g[8][9][10]; - ... __builtin_preserve_access_index(&g[2][3][4].d) ... -It would be possible to calculate the number of "struct p"'s -before accessing its member "d" if array debug info is -available as it contains each dimension range. - -This patch enables to annotate IR builtin preserve_array_access_index() -with proper debuginfo type. The unit test case and language reference -is updated as well. - -Signed-off-by: Yonghong Song - -Differential Revision: https://reviews.llvm.org/D65664 - -llvm-svn: 367724 -(cherry picked from commit d0ea05d5eff475a27a5d3bbe4d9fd389935f9cb2) ---- - clang/lib/CodeGen/CGExpr.cpp | 12 ++++++++--- - .../CodeGen/builtin-preserve-access-index-array.c | 18 +++++++++++++++++ - clang/test/CodeGen/builtin-preserve-access-index.c | 23 +++++++++++----------- - llvm/docs/LangRef.rst | 4 ++++ - llvm/include/llvm/IR/IRBuilder.h | 10 +++++++--- - llvm/test/CodeGen/BPF/CORE/intrinsic-array.ll | 2 +- - 6 files changed, 51 insertions(+), 18 deletions(-) - create mode 100644 clang/test/CodeGen/builtin-preserve-access-index-array.c - -diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp -index b6c2567..21c4103 100644 ---- a/clang/lib/CodeGen/CGExpr.cpp -+++ b/clang/lib/CodeGen/CGExpr.cpp -@@ -3405,6 +3405,7 @@ static Address emitArraySubscriptGEP(CodeGenFunction &CGF, Address addr, - ArrayRef indices, - QualType eltType, bool inbounds, - bool signedIndices, SourceLocation loc, -+ QualType *arrayType = nullptr, - const llvm::Twine &name = "arrayidx") { - // All the indices except that last must be zero. - #ifndef NDEBUG -@@ -3433,9 +3434,12 @@ static Address emitArraySubscriptGEP(CodeGenFunction &CGF, Address addr, - } else { - // Remember the original array subscript for bpf target - unsigned idx = LastIndex->getZExtValue(); -+ llvm::DIType *DbgInfo = nullptr; -+ if (arrayType) -+ DbgInfo = CGF.getDebugInfo()->getOrCreateStandaloneType(*arrayType, loc); - eltPtr = CGF.Builder.CreatePreserveArrayAccessIndex(addr.getPointer(), - indices.size() - 1, -- idx); -+ idx, DbgInfo); - } - - return Address(eltPtr, eltAlign); -@@ -3572,19 +3576,21 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, - auto *Idx = EmitIdxAfterBase(/*Promote*/true); - - // Propagate the alignment from the array itself to the result. -+ QualType arrayType = Array->getType(); - Addr = emitArraySubscriptGEP( - *this, ArrayLV.getAddress(), {CGM.getSize(CharUnits::Zero()), Idx}, - E->getType(), !getLangOpts().isSignedOverflowDefined(), SignedIndices, -- E->getExprLoc()); -+ E->getExprLoc(), &arrayType); - EltBaseInfo = ArrayLV.getBaseInfo(); - EltTBAAInfo = CGM.getTBAAInfoForSubobject(ArrayLV, E->getType()); - } else { - // The base must be a pointer; emit it with an estimate of its alignment. - Addr = EmitPointerWithAlignment(E->getBase(), &EltBaseInfo, &EltTBAAInfo); - auto *Idx = EmitIdxAfterBase(/*Promote*/true); -+ QualType ptrType = E->getBase()->getType(); - Addr = emitArraySubscriptGEP(*this, Addr, Idx, E->getType(), - !getLangOpts().isSignedOverflowDefined(), -- SignedIndices, E->getExprLoc()); -+ SignedIndices, E->getExprLoc(), &ptrType); - } - - LValue LV = MakeAddrLValue(Addr, E->getType(), EltBaseInfo, EltTBAAInfo); -diff --git a/clang/test/CodeGen/builtin-preserve-access-index-array.c b/clang/test/CodeGen/builtin-preserve-access-index-array.c -new file mode 100644 -index 0000000..a449b28 ---- /dev/null -+++ b/clang/test/CodeGen/builtin-preserve-access-index-array.c -@@ -0,0 +1,18 @@ -+// RUN: %clang -target x86_64 -emit-llvm -S -g %s -o - | FileCheck %s -+ -+#define _(x) (__builtin_preserve_access_index(x)) -+ -+struct s1 { -+ char a; -+ int b[4]; -+}; -+ -+const void *unit1(struct s1 *arg) { -+ return _(&arg->b[2]); -+} -+// CHECK: define dso_local i8* @unit1 -+// CHECK: call [4 x i32]* @llvm.preserve.struct.access.index.p0a4i32.p0s_struct.s1s(%struct.s1* %{{[0-9a-z]+}}, i32 1, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[STRUCT_S1:[0-9]+]] -+// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[ARRAY:[0-9]+]] -+// -+// CHECK: ![[ARRAY]] = !DICompositeType(tag: DW_TAG_array_type -+// CHECK: ![[STRUCT_S1]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s1" -diff --git a/clang/test/CodeGen/builtin-preserve-access-index.c b/clang/test/CodeGen/builtin-preserve-access-index.c -index 954a3b8..1084416 100644 ---- a/clang/test/CodeGen/builtin-preserve-access-index.c -+++ b/clang/test/CodeGen/builtin-preserve-access-index.c -@@ -31,16 +31,16 @@ const void *unit4(const int *arg) { - } - // CHECK: define dso_local i8* @unit4 - // CHECK-NOT: getelementptr --// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* %{{[0-9a-z]+}}, i32 0, i32 1) -+// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* %{{[0-9a-z]+}}, i32 0, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[POINTER:[0-9]+]] - - const void *unit5(const int *arg[5]) { - return _(&arg[1][2]); - } - // CHECK: define dso_local i8* @unit5 - // CHECK-NOT: getelementptr --// CHECK: call i32** @llvm.preserve.array.access.index.p0p0i32.p0p0i32(i32** %{{[0-9a-z]+}}, i32 0, i32 1) -+// CHECK: call i32** @llvm.preserve.array.access.index.p0p0i32.p0p0i32(i32** %{{[0-9a-z]+}}, i32 0, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} - // CHECK-NOT: getelementptr --// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* %{{[0-9a-z]+}}, i32 0, i32 2) -+// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* %{{[0-9a-z]+}}, i32 0, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[POINTER:[0-9]+]] - - struct s1 { - char a; -@@ -141,7 +141,7 @@ const void *unit13(struct s4 *arg) { - // CHECK: define dso_local i8* @unit13 - // CHECK: call %union.u* @llvm.preserve.struct.access.index.p0s_union.us.p0s_struct.s4s(%struct.s4* %{{[0-9a-z]+}}, i32 1, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[STRUCT_S4:[0-9]+]] - // CHECK: call %union.u* @llvm.preserve.union.access.index.p0s_union.us.p0s_union.us(%union.u* %{{[0-9a-z]+}}, i32 0), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[UNION_I_U:[0-9]+]] --// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2) -+// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} - - const void *unit14(union u3 *arg) { - return _(&arg->c.b[2]); -@@ -149,13 +149,13 @@ const void *unit14(union u3 *arg) { - // CHECK: define dso_local i8* @unit14 - // CHECK: call %union.u3* @llvm.preserve.union.access.index.p0s_union.u3s.p0s_union.u3s(%union.u3* %{{[0-9a-z]+}}, i32 0), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[UNION_U3:[0-9]+]] - // CHECK: call [4 x i32]* @llvm.preserve.struct.access.index.p0a4i32.p0s_struct.ss(%struct.s* %{{[0-9a-z]+}}, i32 0, i32 0), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[STRUCT_I_S:[0-9]+]] --// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2) -+// CHECK: call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %{{[0-9a-z]+}}, i32 1, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} - - const void *unit15(struct s4 *arg) { - return _(&arg[2].c.a); - } - // CHECK: define dso_local i8* @unit15 --// CHECK: call %struct.s4* @llvm.preserve.array.access.index.p0s_struct.s4s.p0s_struct.s4s(%struct.s4* %{{[0-9a-z]+}}, i32 0, i32 2) -+// CHECK: call %struct.s4* @llvm.preserve.array.access.index.p0s_struct.s4s.p0s_struct.s4s(%struct.s4* %{{[0-9a-z]+}}, i32 0, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} - // CHECK: call %union.u* @llvm.preserve.struct.access.index.p0s_union.us.p0s_struct.s4s(%struct.s4* %{{[0-9a-z]+}}, i32 1, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[STRUCT_S4]] - // CHECK: call %union.u* @llvm.preserve.union.access.index.p0s_union.us.p0s_union.us(%union.u* %{{[0-9a-z]+}}, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[UNION_I_U]] - -@@ -163,15 +163,16 @@ const void *unit16(union u3 *arg) { - return _(&arg[2].a); - } - // CHECK: define dso_local i8* @unit16 --// CHECK: call %union.u3* @llvm.preserve.array.access.index.p0s_union.u3s.p0s_union.u3s(%union.u3* %{{[0-9a-z]+}}, i32 0, i32 2) -+// CHECK: call %union.u3* @llvm.preserve.array.access.index.p0s_union.u3s.p0s_union.u3s(%union.u3* %{{[0-9a-z]+}}, i32 0, i32 2), !dbg !{{[0-9]+}}, !llvm.preserve.access.index !{{[0-9]+}} - // CHECK: call %union.u3* @llvm.preserve.union.access.index.p0s_union.u3s.p0s_union.u3s(%union.u3* %{{[0-9a-z]+}}, i32 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[UNION_U3]] - -+// CHECK: ![[POINTER]] = !DIDerivedType(tag: DW_TAG_pointer_type -+// CHECK: ![[STRUCT_S4]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s4" -+// CHECK: ![[UNION_I_U]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u" -+// CHECK: ![[UNION_U3]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u3" -+// CHECK: ![[STRUCT_I_S]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s" - // CHECK: ![[STRUCT_S1]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s1" - // CHECK: ![[STRUCT_S2]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s2" - // CHECK: ![[STRUCT_S3]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s3" - // CHECK: ![[UNION_U1]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u1" - // CHECK: ![[UNION_U2]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u2" --// CHECK: ![[STRUCT_S4]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s4" --// CHECK: ![[UNION_I_U]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u" --// CHECK: ![[UNION_U3]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "u3" --// CHECK: ![[STRUCT_I_S]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s" --- -1.8.3.1 - diff --git a/0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch b/0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch deleted file mode 100644 index 9480f42..0000000 --- a/0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch +++ /dev/null @@ -1,137 +0,0 @@ -From cb7fd3caeee52fe94461b717294c4db4056853e3 Mon Sep 17 00:00:00 2001 -From: Serge Guelton -Date: Fri, 1 Feb 2019 06:11:44 +0000 -Subject: [PATCH 1/3] Fix isInSystemMacro to handle pasted macros - -Token pasted by the preprocessor (through ##) have a Spelling pointing to scratch buffer. -As a result they are not recognized at system macro, even though the pasting happened in -a system macro. Fix that by looking into the parent macro if the original lookup finds a -scratch buffer. - -Differential Revision: https://reviews.llvm.org/D55782 - -This effectively fixes https://bugs.llvm.org/show_bug.cgi?id=35268, - -git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352838 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - include/clang/Basic/SourceManager.h | 18 +++++++++++++++++- - test/Misc/no-warn-in-system-macro.c | 13 +++++++++++++ - test/Misc/no-warn-in-system-macro.c.inc | 9 +++++++++ - test/Misc/warn-in-system-macro-def.c | 21 +++++++++++++++++++++ - test/Misc/warn-in-system-macro-def.c.inc | 4 ++++ - 5 files changed, 64 insertions(+), 1 deletion(-) - create mode 100644 test/Misc/no-warn-in-system-macro.c - create mode 100644 test/Misc/no-warn-in-system-macro.c.inc - create mode 100644 test/Misc/warn-in-system-macro-def.c - create mode 100644 test/Misc/warn-in-system-macro-def.c.inc - -diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h -index dcc4a37e23..c6b92f9000 100644 ---- a/include/clang/Basic/SourceManager.h -+++ b/include/clang/Basic/SourceManager.h -@@ -1441,6 +1441,12 @@ public: - return Filename.equals(""); - } - -+ /// Returns whether \p Loc is located in a file. -+ bool isWrittenInScratchSpace(SourceLocation Loc) const { -+ StringRef Filename(getPresumedLoc(Loc).getFilename()); -+ return Filename.equals(""); -+ } -+ - /// Returns if a SourceLocation is in a system header. - bool isInSystemHeader(SourceLocation Loc) const { - return isSystem(getFileCharacteristic(Loc)); -@@ -1453,7 +1459,17 @@ public: - - /// Returns whether \p Loc is expanded from a macro in a system header. - bool isInSystemMacro(SourceLocation loc) const { -- return loc.isMacroID() && isInSystemHeader(getSpellingLoc(loc)); -+ if(!loc.isMacroID()) -+ return false; -+ -+ // This happens when the macro is the result of a paste, in that case -+ // its spelling is the scratch memory, so we take the parent context. -+ if (isWrittenInScratchSpace(getSpellingLoc(loc))) { -+ return isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc))); -+ } -+ else { -+ return isInSystemHeader(getSpellingLoc(loc)); -+ } - } - - /// The size of the SLocEntry that \p FID represents. -diff --git a/test/Misc/no-warn-in-system-macro.c b/test/Misc/no-warn-in-system-macro.c -new file mode 100644 -index 0000000000..a319b14c9c ---- /dev/null -+++ b/test/Misc/no-warn-in-system-macro.c -@@ -0,0 +1,13 @@ -+// RUN: %clang_cc1 -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s -+// CHECK-NOT: warning: -+ -+#include -+ -+int main(void) -+{ -+ double foo = 1.0; -+ -+ if (isnan(foo)) -+ return 1; -+ return 0; -+} -diff --git a/test/Misc/no-warn-in-system-macro.c.inc b/test/Misc/no-warn-in-system-macro.c.inc -new file mode 100644 -index 0000000000..3cbe7dfc16 ---- /dev/null -+++ b/test/Misc/no-warn-in-system-macro.c.inc -@@ -0,0 +1,9 @@ -+extern int __isnanf(float f); -+extern int __isnan(double f); -+extern int __isnanl(long double f); -+#define isnan(x) \ -+ (sizeof (x) == sizeof (float) \ -+ ? __isnanf (x) \ -+ : sizeof (x) == sizeof (double) \ -+ ? __isnan (x) : __isnanl (x)) -+ -diff --git a/test/Misc/warn-in-system-macro-def.c b/test/Misc/warn-in-system-macro-def.c -new file mode 100644 -index 0000000000..b295130702 ---- /dev/null -+++ b/test/Misc/warn-in-system-macro-def.c -@@ -0,0 +1,21 @@ -+// RUN: %clang_cc1 -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s -+// CHECK: warning: -+// CHECK: expanded from macro 'ISNAN' -+// CHECK: expanded from macro 'isnan' -+ -+#include -+ -+#define isnan(x) \ -+ (sizeof (x) == sizeof (float) \ -+ ? __isnanf (x) \ -+ : sizeof (x) == sizeof (double) \ -+ ? __isnan (x) : __isnanl (x)) -+ -+int main(void) -+{ -+ double foo = 1.0; -+ -+ if (ISNAN(foo)) -+ return 1; -+ return 0; -+} -diff --git a/test/Misc/warn-in-system-macro-def.c.inc b/test/Misc/warn-in-system-macro-def.c.inc -new file mode 100644 -index 0000000000..5c7e60275a ---- /dev/null -+++ b/test/Misc/warn-in-system-macro-def.c.inc -@@ -0,0 +1,4 @@ -+extern int __isnanf(float f); -+extern int __isnan(double f); -+extern int __isnanl(long double f); -+#define ISNAN isnan --- -2.20.1 - diff --git a/0002-Format-isInSystemMacro-after-D55782.patch b/0002-Format-isInSystemMacro-after-D55782.patch deleted file mode 100644 index e5004fb..0000000 --- a/0002-Format-isInSystemMacro-after-D55782.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 49b29ff9feafd8b9041e2a76cbe843115d263ced Mon Sep 17 00:00:00 2001 -From: Fangrui Song -Date: Mon, 11 Feb 2019 13:30:04 +0000 -Subject: [PATCH 2/3] Format isInSystemMacro after D55782 - -git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353697 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - include/clang/Basic/SourceManager.h | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h -index c6b92f9000..f44239d9ce 100644 ---- a/include/clang/Basic/SourceManager.h -+++ b/include/clang/Basic/SourceManager.h -@@ -1459,17 +1459,15 @@ public: - - /// Returns whether \p Loc is expanded from a macro in a system header. - bool isInSystemMacro(SourceLocation loc) const { -- if(!loc.isMacroID()) -+ if (!loc.isMacroID()) - return false; - - // This happens when the macro is the result of a paste, in that case - // its spelling is the scratch memory, so we take the parent context. -- if (isWrittenInScratchSpace(getSpellingLoc(loc))) { -+ if (isWrittenInScratchSpace(getSpellingLoc(loc))) - return isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc))); -- } -- else { -- return isInSystemHeader(getSpellingLoc(loc)); -- } -+ -+ return isInSystemHeader(getSpellingLoc(loc)); - } - - /// The size of the SLocEntry that \p FID represents. --- -2.20.1 - diff --git a/0003-Fix-isInSystemMacro-in-presence-of-macro-and-pasted-.patch b/0003-Fix-isInSystemMacro-in-presence-of-macro-and-pasted-.patch deleted file mode 100644 index c27dfd9..0000000 --- a/0003-Fix-isInSystemMacro-in-presence-of-macro-and-pasted-.patch +++ /dev/null @@ -1,63 +0,0 @@ -From a6b7f0946df82ca207b27f1931d4b430ab77e5e0 Mon Sep 17 00:00:00 2001 -From: Serge Guelton -Date: Thu, 16 May 2019 12:40:00 +0000 -Subject: [PATCH 3/3] Fix isInSystemMacro in presence of macro and pasted token - -When a warning is raised from the expansion of a system macro that -involves pasted token, there was still situations were they were not -skipped, as showcased by this issue: -https://bugzilla.redhat.com/show_bug.cgi?id=1472437 - -Differential Revision: https://reviews.llvm.org/D59413 - -git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360885 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - include/clang/Basic/SourceManager.h | 9 +++++++-- - test/Misc/no-warn-in-system-macro.c | 7 ++++++- - 2 files changed, 13 insertions(+), 3 deletions(-) - -diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h -index f44239d9ce..c964c64faf 100644 ---- a/include/clang/Basic/SourceManager.h -+++ b/include/clang/Basic/SourceManager.h -@@ -1464,8 +1464,13 @@ public: - - // This happens when the macro is the result of a paste, in that case - // its spelling is the scratch memory, so we take the parent context. -- if (isWrittenInScratchSpace(getSpellingLoc(loc))) -- return isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc))); -+ // There can be several level of token pasting. -+ if (isWrittenInScratchSpace(getSpellingLoc(loc))) { -+ do { -+ loc = getImmediateMacroCallerLoc(loc); -+ } while (isWrittenInScratchSpace(getSpellingLoc(loc))); -+ return isInSystemMacro(loc); -+ } - - return isInSystemHeader(getSpellingLoc(loc)); - } -diff --git a/test/Misc/no-warn-in-system-macro.c b/test/Misc/no-warn-in-system-macro.c -index a319b14c9c..a351b89256 100644 ---- a/test/Misc/no-warn-in-system-macro.c -+++ b/test/Misc/no-warn-in-system-macro.c -@@ -3,11 +3,16 @@ - - #include - -+#define MACRO(x) x -+ - int main(void) - { - double foo = 1.0; - - if (isnan(foo)) - return 1; -- return 0; -+ -+ MACRO(isnan(foo)); -+ -+ return 0; - } --- -2.20.1 - diff --git a/clang.spec b/clang.spec index 6af31c0..e88f8ca 100644 --- a/clang.spec +++ b/clang.spec @@ -1,38 +1,41 @@ %global compat_build 0 -%global maj_ver 9 +%global maj_ver 10 %global min_ver 0 -%global patch_ver 1 -#%%global rc_ver 3 -%global baserelease 3 +%global patch_ver 0 +%global rc_ver 1 +%global baserelease 0.1 %global clang_tools_binaries \ - %{_bindir}/clangd \ %{_bindir}/clang-apply-replacements \ %{_bindir}/clang-change-namespace \ + %{_bindir}/clang-check \ %{_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 \ + %{_bindir}/clang-offload-wrapper \ %{_bindir}/clang-query \ %{_bindir}/clang-refactor \ - %{_bindir}/clang-reorder-fields \ %{_bindir}/clang-rename \ - %{_bindir}/clang-tidy + %{_bindir}/clang-reorder-fields \ + %{_bindir}/clang-scan-deps \ + %{_bindir}/clang-tidy \ + %{_bindir}/clangd \ + %{_bindir}/diagtool \ + %{_bindir}/hmaptool \ + %{_bindir}/pp-trace %global clang_binaries \ %{_bindir}/clang \ %{_bindir}/clang++ \ %{_bindir}/clang-%{maj_ver} \ %{_bindir}/clang++-%{maj_ver} \ - %{_bindir}/clang-check \ %{_bindir}/clang-cl \ %{_bindir}/clang-cpp \ - %{_bindir}/clang-extdef-mapping \ - %{_bindir}/clang-format \ - %{_bindir}/clang-import-test \ - %{_bindir}/clang-offload-bundler \ - %{_bindir}/clang-scan-deps \ - %{_bindir}/diagtool \ - %{_bindir}/hmaptool %if 0%{?compat_build} %global pkg_name clang%{maj_ver}.%{min_ver} @@ -77,13 +80,14 @@ URL: http://llvm.org Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_srcdir}.tar.xz %if !0%{?compat_build} Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz +Source2: https://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig %endif +Source3: https://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_srcdir}.tar.xz.sig +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 -# Fix crash with kernel bpf self-tests -Patch14: 0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -226,7 +230,7 @@ pathfix.py -i %{__python3} -pn \ %patch4 -p1 -b .gtest %patch11 -p1 -b .libcxx-fix -%patch14 -p2 -b .bpf-fix +%patch13 -p2 -b .unwind-all mv ../%{clang_tools_srcdir} tools/extra @@ -264,8 +268,8 @@ cd _build -DPYTHON_EXECUTABLE=%{__python3} \ -DCMAKE_INSTALL_RPATH:BOOL=";" \ %ifarch s390 s390x %{arm} %ix86 ppc64le - -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ %endif %if 0%{?compat_build} -DLLVM_CONFIG:FILEPATH=%{_bindir}/llvm-config-%{maj_ver}.%{min_ver}-%{__isa_bits} \ @@ -341,6 +345,8 @@ rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py* # TODO: Package html docs rm -Rvf %{buildroot}%{_pkgdocdir} +rm -Rvf %{buildroot}%{install_prefix}/share/clang/clang-doc-default-stylesheet.css +rm -Rvf %{buildroot}%{install_prefix}/share/clang/index.js # TODO: What are the Fedora guidelines for packaging bash autocomplete files? rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh @@ -442,6 +448,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1 +- 10.0.0 rc1 + * Tue Jan 28 2020 Fedora Release Engineering - 9.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/hans-gpg-key.asc b/hans-gpg-key.asc new file mode 100644 index 0000000..4b3cdde --- /dev/null +++ b/hans-gpg-key.asc @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFS+1SABEACnmkESkY7eZq0GhDjbkWpKmURGk9+ycsfAhA44NqUvf4tk1GPM +5SkJ/fYedYZJaDVhIp98fHgucD0O+vjOzghtgwtITusYjiPHPFBd/MN+MQqSEAP+ +LUa/kjHLjgyXxKhFUIDGVaDWL5tKOA7/AQKl1TyJ8lz89NHQoUHFsF/hu10+qhJe +V65d32MXFehIUSvegh8DrPuExrliSiORO4HOhuc6151dWA4YBWVg4rX5kfKrGMMT +pTWnSSZtgoRhkKW2Ey8cmZUqPuUJIfWyeNVu1e4SFtAivLvu/Ymz2WBJcNA1ZlTr +RCOR5SIRgZ453pQnI/Bzna2nnJ/TV1gGJIGRahj/ini0cs2x1CILfS/YJQ3rWGGo +OxwG0BVmPk0cmLVtyTq8gUPwxcPUd6WcBKhot3TDMlrffZACnQwQjlVjk5S1dEEz +atUfpEuNitU9WOM4jr/gjv36ZNCOWm95YwLhsuci/NddBN8HXhyvs+zYTVZEXa2W +l/FqOdQsQqZBcJjjWckGKhESdd7934+cesGD3O8KaeSGxww7slJrS0+6QJ8oBoAB +P/WCn/y2AiY2syEKp3wYIGJyAbsm542zMZ4nc7pYfSu49mcyhQQICmqN5QvOyYUx +OSqwbAOUNtlOyeRLZNIKoXtTqWDEu5aEiDROTw6Rkq+dIcxPNgOLdeQ3HwARAQAB +tCFIYW5zIFdlbm5ib3JnIDxoYW5zQGNocm9taXVtLm9yZz6JAlUEEwECAD8CGwMG +CwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAFiEEtsj5goK5ROOw1cJTD8MELjRa0F0F +Alpd+i0FCQ8FJo0ACgkQD8MELjRa0F3X3A//dBQLm6GmXlQFjxZbukTw0lZsevFR +M/6ljZTxp7bsC+HFzYoaCKv6rikaWzytxk//SOaLKrB4Z9HjAlpBMtyLl2Hk7tcZ +bPpFafNmQ+4KgWNjLXCvt9se8BGrQvGQUrbE6YowbXa2YIgxIVEncFzIECAsp/+N +xbMcZN5/X1PJxKi/N22gP4nn47muN6L3pKez3CXgWnhGYSc7BuD5ALWYH7yMYUem +d4jlXfu5xkBIqirj1arIYC9wmF4ldbLNDPuracc8LmXcSqa5Rpao0s4iVzAD+tkX +vE/73m3rhepwBXxrfk0McXuI9aucf5h4/KkIBzZsaJ6JM1tzlrJzzjaBKJF9OI5T +jA0qTxdGzdPztS8gPaPcMkRFfh9ti0ZDx4VeF3s8sOtmMRHeGEWfxqUAbBUbwFsa +JDu/+8/VO4KijfcuUi8tqJ/JHeosCuGE7TM93LwJu6ZcqMYOPDROE/hsnGm0ZU92 +xedu+07/X1ESHkSFPoaSHD5/DCNa/tXIyJZ8X7gF3eoDP5mSmrJqIqsOBR9WOVYv +dI8i0GHTXbrZj8WXdoS+N8wlyMLLbAS2jvTe7M5RoqbLz4ABOUUnLVoEE0CiccVZ +bW75BPxOfaD0szbinAeX6HDPI7St0MbKrRPjuDXjD0JVkLqFINtZfYLGMLss4tgn +suefr0Bo9ISwG3u5Ag0EVL7VIAEQAOxBxrQesChjrCqKjY5PnSsSYpeb4froucrC +898AFw2DgN/Zz+W7wtSTbtz/GRcCurjzZvN7o2rCuNk0j0+s1sgZZm2BdldlabLy ++UF/kSW1rb5qhfXcGGubu48OMdtSfok9lOc0Q1L4HNlGE4lUBkZzmI7Ykqfl+Bwr +m9rpi54g4ua9PIiiHIAmMoZIcbtOG1KaDr6CoXRk/3g2ZiGUwhq3jFGroiBsKEap +2FJ1bh5NJk2Eg8pV7fMOF7hUQKBZrNOtIPu8hA5WEgku3U3VYjRSI3SDi6QXnDL+ +xHxajiWpKtF3JjZh8y/CCTD8PyP34YjfZuFmkdske5cdx6H0V2UCiH453ncgFVdQ +DXkY4n+0MTzhy2xu0IVVnBxYDYNhi+3MjTHJd9C4xMi9t+5IuEvDAPhgfZjDpQak +EPz6hVmgj0mlKIgRilBRK9/kOxky9utBpGk3jEJGru/hKNloFNspoYtY6zATAr8E +cOgoCFQE0nIktcg3wF9+OCEnV28/a7XZwUZ7Gl/qfOHtdr374wo8kd8R3V8d2G9q +5w0/uCV9NNQ0fGWZDPDoYt6wnPL6gZv/nJM8oZY+u0rC24WwScZIniaryC4JHDas +Ahr2S2CtgCvBgslK6f3gD16KHxPZMBpX73TzOYIhMEP/vXgVJbUD6dYht+U9c4Oh +EDJown0dABEBAAGJAjwEGAECACYCGwwWIQS2yPmCgrlE47DVwlMPwwQuNFrQXQUC +Wl36SwUJDwUmqwAKCRAPwwQuNFrQXT1/D/9YpRDNgaJl3YVDtVZoeQwh7BQ6ULZT +eXFPogYkF2j3VWg8s9UmAs4sg/4a+9KLSantXjX+JFsRv0lQe5Gr/Vl8VQ4LKEXB +fiGmSivjIZ7eopdd3YP2w6G5T3SA4d2CQfsg4rnJPnXIjzKNiSOi368ybnt9fL0Y +2r2aqLTmP6Y7issDUO+J1TW1XHm349JPR0Hl4cTuNnWm4JuX2m2CJEc5XBlDAha9 +pUVs+J5C2D0UFFkyeOzeJPwy6x5ApWHm84n8AjhQSpu1qRKxKXdwei6tkQWWMHui ++TgSY/zCkmD9/oY15Ei5avJ4WgIbTLJUoZMi70riPmU8ThjpzA7S+Nk0g7rMPq+X +l1whjKU/u0udlsrIJjzkh6ftqKUmIkbxYTpjhnEujNrEr5m2S6Z6x3y9E5QagBMR +dxRhfk+HbyACcP/p9rXOzl4M291DoKeAAH70GHniGxyNs9rAoMr/hD5XW/Wrz3dc +KMc2s555E6MZILE2ZiolcRn+bYOMPZtWlbx98t8uqMf49gY4FGQBZAwPglMrx7mr +m7HTIiXahThQGOJg6izJDAD5RwSEGlAcL28T8KAuM6CLLkhlBfQwiKsUBNnh9r8w +V3lB+pV0GhL+3i077gTYfZBRwLzjFdhm9xUKEaZ6rN1BX9lzix4eSNK5nln0jUq1 +67H2IH//2sf8dw== +=ADVe +-----END PGP PUBLIC KEY BLOCK----- diff --git a/sources b/sources index 6339267..2b412f4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (clang-9.0.1.src.tar.xz) = 3bcdcfd1ebb20a2cb15d57c608106b6e6e9c2eda4b781f573e84e0600b775bb7609f6df9edcf819ee5d91cc01a28ee089353c29fd57c23b867afbf6ad2f5cd13 -SHA512 (clang-tools-extra-9.0.1.src.tar.xz) = 4a671596460809f314ed96b0cc0be7f2498692275d0a7bd08266f9cdf4b85fb39cb4eea4131602e9a170a75eb5d9623449960f873e25b999e06c016387a1918d +SHA512 (clang-10.0.0rc1.src.tar.xz.sig) = 995562054873a948dbd44b812238f9799f6920c25075bc7c94419afde4fc5adf0b545f9201c38841f727137c2e50c1cb156bc394f9cc197dd8a1c5660f9673b1 +SHA512 (clang-tools-extra-10.0.0rc1.src.tar.xz.sig) = 51b4d5f4f314422418073e40f4848268e88994bafa6bb7d668384678fcc8bf92953c4de5a93a38c068a3e1426f70f0a9f4d5093a38be320755edf23ef55186c4 From 688e6aa50e918212a096983b6fa0e8050e91edf9 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Thu, 6 Feb 2020 15:21:14 +0000 Subject: [PATCH 15/30] Add missing sources entry --- sources | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources b/sources index 2b412f4..921d58e 100644 --- a/sources +++ b/sources @@ -1,2 +1,4 @@ -SHA512 (clang-10.0.0rc1.src.tar.xz.sig) = 995562054873a948dbd44b812238f9799f6920c25075bc7c94419afde4fc5adf0b545f9201c38841f727137c2e50c1cb156bc394f9cc197dd8a1c5660f9673b1 +SHA512 (clang-tools-extra-10.0.0rc1.src.tar.xz) = e2cabc449b31a8a46c05603dcffd377ce4bd7db6fd78ea961cefd02c9d56dc9bb9a82491647daca719c18d56fb45476b82b502d9a4790ac894141c1cdb5ae055 SHA512 (clang-tools-extra-10.0.0rc1.src.tar.xz.sig) = 51b4d5f4f314422418073e40f4848268e88994bafa6bb7d668384678fcc8bf92953c4de5a93a38c068a3e1426f70f0a9f4d5093a38be320755edf23ef55186c4 +SHA512 (clang-10.0.0rc1.src.tar.xz) = bf8ce67389d615f96ff2dc6d9b36f5177ae577a2aa4b08e965b05e2128e3204e8eab19dce2b1e0441f74758cd937f864b822db879730d00719955231fb993c93 +SHA512 (clang-10.0.0rc1.src.tar.xz.sig) = 995562054873a948dbd44b812238f9799f6920c25075bc7c94419afde4fc5adf0b545f9201c38841f727137c2e50c1cb156bc394f9cc197dd8a1c5660f9673b1 From 03d578532d4fb19e4e5ee0e89d484dba45b6c43c Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 31 Jan 2020 23:34:37 +0000 Subject: [PATCH 16/30] Stop shipping individual component libraries https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package --- ...clang-Don-t-install-static-libraries.patch | 25 +++++++++++++++++++ clang.spec | 11 +++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0001-clang-Don-t-install-static-libraries.patch diff --git a/0001-clang-Don-t-install-static-libraries.patch b/0001-clang-Don-t-install-static-libraries.patch new file mode 100644 index 0000000..4bf7d35 --- /dev/null +++ b/0001-clang-Don-t-install-static-libraries.patch @@ -0,0 +1,25 @@ +From 856b789b9de0895786ba23681c4337172676e01e 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 cbd618e..9cf076a 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}) + +- 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 +-- +1.8.3.1 + diff --git a/clang.spec b/clang.spec index e88f8ca..0993b85 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 \ @@ -89,6 +89,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 +# Not Upstream +Patch15: 0001-clang-Don-t-install-static-libraries.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake @@ -231,6 +234,7 @@ pathfix.py -i %{__python3} -pn \ %patch4 -p1 -b .gtest %patch11 -p1 -b .libcxx-fix %patch13 -p2 -b .unwind-all +%patch15 -p2 -b .no-install-static mv ../%{clang_tools_srcdir} tools/extra @@ -304,6 +308,7 @@ cd _build -DSPHINX_WARNINGS_AS_ERRORS=OFF \ \ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ + -DBUILD_SHARED_LIBS=OFF \ -DCLANG_REPOSITORY_STRING="%{?fedora:Fedora}%{?rhel:Red Hat} %{version}-%{release}" %ninja_build @@ -448,6 +453,10 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Fri Jan 31 2020 Tom Stellard - 10.0.0-0.1.rc1 +- Stop shipping individual component libraries +- https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package + * Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1 - 10.0.0 rc1 From b6fa739f4cd2388b8308fb644caef384577d78ca Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Tue, 11 Feb 2020 15:11:24 +0000 Subject: [PATCH 17/30] Prevent compiler-rt potential version conflicts --- clang.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clang.spec b/clang.spec index 0993b85..bc6d03f 100644 --- a/clang.spec +++ b/clang.spec @@ -143,6 +143,9 @@ Requires: emacs-filesystem Provides: clang(major) = %{maj_ver} +Conflicts: compiler-rt < %{version} +Conflicts: compiler-rt > %{version} + %description clang: noun 1. A loud, resonant, metallic sound. @@ -453,6 +456,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Tue Feb 11 2020 sguelton@redhat.com - 10.0.0-0.2.rc1 +- Explicitly conflicts with any different compiler-rt version, see rhbz#1800705 + * Fri Jan 31 2020 Tom Stellard - 10.0.0-0.1.rc1 - Stop shipping individual component libraries - https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package From 139b5a7e663ebc709af3f481e6b06a4beeb66cac Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Sat, 15 Feb 2020 22:52:09 +0000 Subject: [PATCH 18/30] 10.0.0 rc2 --- .gitignore | 4 ++++ clang.spec | 7 +++++-- sources | 8 ++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 74ca0fd..50b384a 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,7 @@ /clang-tools-extra-10.0.0rc1.src.tar.xz /clang-10.0.0rc1.src.tar.xz.sig /clang-tools-extra-10.0.0rc1.src.tar.xz.sig +/clang-10.0.0rc2.src.tar.xz +/clang-tools-extra-10.0.0rc2.src.tar.xz +/clang-tools-extra-10.0.0rc2.src.tar.xz.sig +/clang-10.0.0rc2.src.tar.xz.sig diff --git a/clang.spec b/clang.spec index bc6d03f..a15bc1d 100644 --- a/clang.spec +++ b/clang.spec @@ -3,8 +3,8 @@ %global maj_ver 10 %global min_ver 0 %global patch_ver 0 -%global rc_ver 1 -%global baserelease 0.2 +%global rc_ver 2 +%global baserelease 0.1 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -456,6 +456,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.1.rc2 +- 10.0.0 rc2 + * Tue Feb 11 2020 sguelton@redhat.com - 10.0.0-0.2.rc1 - Explicitly conflicts with any different compiler-rt version, see rhbz#1800705 diff --git a/sources b/sources index 921d58e..2abb96d 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-tools-extra-10.0.0rc1.src.tar.xz) = e2cabc449b31a8a46c05603dcffd377ce4bd7db6fd78ea961cefd02c9d56dc9bb9a82491647daca719c18d56fb45476b82b502d9a4790ac894141c1cdb5ae055 -SHA512 (clang-tools-extra-10.0.0rc1.src.tar.xz.sig) = 51b4d5f4f314422418073e40f4848268e88994bafa6bb7d668384678fcc8bf92953c4de5a93a38c068a3e1426f70f0a9f4d5093a38be320755edf23ef55186c4 -SHA512 (clang-10.0.0rc1.src.tar.xz) = bf8ce67389d615f96ff2dc6d9b36f5177ae577a2aa4b08e965b05e2128e3204e8eab19dce2b1e0441f74758cd937f864b822db879730d00719955231fb993c93 -SHA512 (clang-10.0.0rc1.src.tar.xz.sig) = 995562054873a948dbd44b812238f9799f6920c25075bc7c94419afde4fc5adf0b545f9201c38841f727137c2e50c1cb156bc394f9cc197dd8a1c5660f9673b1 +SHA512 (clang-10.0.0rc2.src.tar.xz) = dbd110309232725fdc1bf998f073b736abd7b5d9373d121b96a8d0027d1457afa183d2d7bdf45655fd1c056f8873ec34fd5e52e7effd248b47faf7d404954fa6 +SHA512 (clang-tools-extra-10.0.0rc2.src.tar.xz) = 95f1daed9ceed65172284c7f843cf74b6b207b10f337e0ec1f0f3be59e0ebd522bac2658b43929bbd9d3d207854a36ef0f1b0fc29d549354c2f2a6306f800b6d +SHA512 (clang-tools-extra-10.0.0rc2.src.tar.xz.sig) = d3e2be5848884c50aa5ab2d6060a8dfa367a087a173942f310261b7395b1f6fa3528b575d58eed242fa170013c5b218627db0c77717cb8a34280e728cc2a0bcc +SHA512 (clang-10.0.0rc2.src.tar.xz.sig) = c0f11b5423a05541f0dce2aacb3baefb9b2f8ea8310602ad91238517a13dc96c264023dadb81ca29a200e4dd343b415a5e587056948029b44979bc171757d6b5 From 28cdc9893f5124a4d58b68e9faa2e5834441e576 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Mon, 17 Feb 2020 15:49:10 +0000 Subject: [PATCH 19/30] Fix NVR --- clang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index a15bc1d..38b1492 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 %global rc_ver 2 -%global baserelease 0.1 +%global baserelease 0.3 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -456,6 +456,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Mon Feb 17 2020 sguelton@redhat.com - 10.0.0-0.3.rc2 +- Fix NVR + * Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.1.rc2 - 10.0.0 rc2 From b45d596d2f61e69dbe105cd4f030046fd681646c Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Tue, 25 Feb 2020 20:50:47 +0000 Subject: [PATCH 20/30] Apply -fdiscard-value-names patch --- ...mark-diagnostics-codegen-Fix-PR44896.patch | 99 +++++++++++++++++++ clang.spec | 7 +- 2 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 0001-remark-diagnostics-codegen-Fix-PR44896.patch diff --git a/0001-remark-diagnostics-codegen-Fix-PR44896.patch b/0001-remark-diagnostics-codegen-Fix-PR44896.patch new file mode 100644 index 0000000..6bac83e --- /dev/null +++ b/0001-remark-diagnostics-codegen-Fix-PR44896.patch @@ -0,0 +1,99 @@ +From 11857d49948b845dcfd7c7f78595095e3add012d Mon Sep 17 00:00:00 2001 +From: Rong Xu +Date: Tue, 25 Feb 2020 08:04:01 -0800 +Subject: [PATCH] [remark][diagnostics] [codegen] Fix PR44896 + +This patch fixes PR44896. For IR input files, option fdiscard-value-names +should be ignored as we need named values in loadModule(). +Commit 60d3947922 sets this option after loadModule() where valued names +already created. This creates an inconsistent state in setNameImpl() +that leads to a seg fault. +This patch forces fdiscard-value-names to be false for IR input files. + +This patch also emits a warning of "ignoring -fdiscard-value-names" if +option fdiscard-value-names is explictly enabled in the commandline for +IR input files. + +Differential Revision: https://reviews.llvm.org/D74878 +--- + clang/include/clang/Basic/DiagnosticDriverKinds.td | 3 +++ + clang/lib/CodeGen/CodeGenAction.cpp | 3 +++ + clang/lib/Driver/ToolChains/Clang.cpp | 10 +++++++++- + clang/test/CodeGen/PR44896.ll | 15 +++++++++++++++ + 4 files changed, 30 insertions(+), 1 deletion(-) + create mode 100644 clang/test/CodeGen/PR44896.ll + +diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td +index ecd871e..48ece91 100644 +--- a/clang/include/clang/Basic/DiagnosticDriverKinds.td ++++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td +@@ -271,6 +271,9 @@ def warn_drv_unsupported_debug_info_opt_for_target : Warning< + InGroup; + def warn_c_kext : Warning< + "ignoring -fapple-kext which is valid for C++ and Objective-C++ only">; ++def warn_ignoring_fdiscard_for_bitcode : Warning< ++ "ignoring -fdiscard-value-names for LLVM Bitcode">, ++ InGroup; + def warn_drv_input_file_unused : Warning< + "%0: '%1' input unused%select{ when '%3' is present|}2">, + InGroup; +diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp +index 5ebc34c..81946b1 100644 +--- a/clang/lib/CodeGen/CodeGenAction.cpp ++++ b/clang/lib/CodeGen/CodeGenAction.cpp +@@ -1146,6 +1146,9 @@ void CodeGenAction::ExecuteAction() { + CI.getTargetOpts(), CI.getLangOpts(), + CI.getFrontendOpts().ShowTimers, + std::move(LinkModules), *VMContext, nullptr); ++ // PR44896: Force DiscardValueNames as false. DiscardValueNames cannot be ++ // true here because the valued names are needed for reading textual IR. ++ Ctx.setDiscardValueNames(false); + Ctx.setDiagnosticHandler( + std::make_unique(CodeGenOpts, &Result)); + +diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp +index 19a23c9..d387a1d 100644 +--- a/clang/lib/Driver/ToolChains/Clang.cpp ++++ b/clang/lib/Driver/ToolChains/Clang.cpp +@@ -4332,8 +4332,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, + + // Discard value names in assert builds unless otherwise specified. + if (Args.hasFlag(options::OPT_fdiscard_value_names, +- options::OPT_fno_discard_value_names, !IsAssertBuild)) ++ options::OPT_fno_discard_value_names, !IsAssertBuild)) { ++ if (Args.hasArg(options::OPT_fdiscard_value_names) && ++ (std::any_of(Inputs.begin(), Inputs.end(), ++ [](const clang::driver::InputInfo &II) { ++ return types::isLLVMIR(II.getType()); ++ }))) { ++ D.Diag(diag::warn_ignoring_fdiscard_for_bitcode); ++ } + CmdArgs.push_back("-discard-value-names"); ++ } + + // Set the main file name, so that debug info works even with + // -save-temps. +diff --git a/clang/test/CodeGen/PR44896.ll b/clang/test/CodeGen/PR44896.ll +new file mode 100644 +index 0000000..a4d3445 +--- /dev/null ++++ b/clang/test/CodeGen/PR44896.ll +@@ -0,0 +1,15 @@ ++; RUN: %clang -fdiscard-value-names -S %s -o /dev/null 2>&1 | FileCheck --check-prefix=WARNING %s ++; RUN: %clang -S %s -o /dev/null 2>&1 | FileCheck --check-prefix=NOWARNING %s ++; RUN: %clang_cc1 -S -emit-llvm %s -discard-value-names -o /dev/null ++; PR 44896 ++ ++; WARNING: ignoring -fdiscard-value-names for LLVM Bitcode ++; NOWARNING-NOT: ignoring -fdiscard-value-names for LLVM Bitcode ++ ++target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" ++target triple = "x86_64--linux-gnu" ++ ++define linkonce i8* @b(i8* %a) { ++ ret i8* %a ++} ++ +-- +1.8.3.1 + diff --git a/clang.spec b/clang.spec index 38b1492..b7f5d24 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 %global rc_ver 2 -%global baserelease 0.3 +%global baserelease 0.4 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -88,6 +88,7 @@ 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 +Patch14: 0001-remark-diagnostics-codegen-Fix-PR44896.patch # Not Upstream Patch15: 0001-clang-Don-t-install-static-libraries.patch @@ -237,6 +238,7 @@ pathfix.py -i %{__python3} -pn \ %patch4 -p1 -b .gtest %patch11 -p1 -b .libcxx-fix %patch13 -p2 -b .unwind-all +%patch14 -p2 -b .discard-names %patch15 -p2 -b .no-install-static mv ../%{clang_tools_srcdir} tools/extra @@ -456,6 +458,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Tue Feb 25 2020 sguelton@redhat.com - 10.0.0-0.4.rc2 +- Apply -fdiscard-value-names patch. + * Mon Feb 17 2020 sguelton@redhat.com - 10.0.0-0.3.rc2 - Fix NVR From 9264afee32d3d1d6dd1e84c60d6e5ac4b711e273 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Thu, 5 Mar 2020 11:21:38 +0000 Subject: [PATCH 21/30] 10.0.0 rc3 --- .gitignore | 4 ++++ clang.spec | 9 +++++---- sources | 8 ++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 50b384a..73ba03c 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,7 @@ /clang-tools-extra-10.0.0rc2.src.tar.xz /clang-tools-extra-10.0.0rc2.src.tar.xz.sig /clang-10.0.0rc2.src.tar.xz.sig +/clang-10.0.0rc3.src.tar.xz +/clang-tools-extra-10.0.0rc3.src.tar.xz +/clang-tools-extra-10.0.0rc3.src.tar.xz.sig +/clang-10.0.0rc3.src.tar.xz.sig diff --git a/clang.spec b/clang.spec index b7f5d24..834b107 100644 --- a/clang.spec +++ b/clang.spec @@ -3,8 +3,8 @@ %global maj_ver 10 %global min_ver 0 %global patch_ver 0 -%global rc_ver 2 -%global baserelease 0.4 +%global rc_ver 3 +%global baserelease 0.5 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -88,7 +88,6 @@ 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 -Patch14: 0001-remark-diagnostics-codegen-Fix-PR44896.patch # Not Upstream Patch15: 0001-clang-Don-t-install-static-libraries.patch @@ -238,7 +237,6 @@ pathfix.py -i %{__python3} -pn \ %patch4 -p1 -b .gtest %patch11 -p1 -b .libcxx-fix %patch13 -p2 -b .unwind-all -%patch14 -p2 -b .discard-names %patch15 -p2 -b .no-install-static mv ../%{clang_tools_srcdir} tools/extra @@ -458,6 +456,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.5.rc3 +- 10.0.0 rc3 + * Tue Feb 25 2020 sguelton@redhat.com - 10.0.0-0.4.rc2 - Apply -fdiscard-value-names patch. diff --git a/sources b/sources index 2abb96d..730e93d 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-10.0.0rc2.src.tar.xz) = dbd110309232725fdc1bf998f073b736abd7b5d9373d121b96a8d0027d1457afa183d2d7bdf45655fd1c056f8873ec34fd5e52e7effd248b47faf7d404954fa6 -SHA512 (clang-tools-extra-10.0.0rc2.src.tar.xz) = 95f1daed9ceed65172284c7f843cf74b6b207b10f337e0ec1f0f3be59e0ebd522bac2658b43929bbd9d3d207854a36ef0f1b0fc29d549354c2f2a6306f800b6d -SHA512 (clang-tools-extra-10.0.0rc2.src.tar.xz.sig) = d3e2be5848884c50aa5ab2d6060a8dfa367a087a173942f310261b7395b1f6fa3528b575d58eed242fa170013c5b218627db0c77717cb8a34280e728cc2a0bcc -SHA512 (clang-10.0.0rc2.src.tar.xz.sig) = c0f11b5423a05541f0dce2aacb3baefb9b2f8ea8310602ad91238517a13dc96c264023dadb81ca29a200e4dd343b415a5e587056948029b44979bc171757d6b5 +SHA512 (clang-10.0.0rc3.src.tar.xz) = b24ab488ffd41490dbc76ab43d41111b5f17734dade5575de96e541cb403a81a3593d0e79938fa50e2307660ba9f587ca158d588c94acaa92ccc702bb011de14 +SHA512 (clang-tools-extra-10.0.0rc3.src.tar.xz) = 60d4a11693b8890c7f642a7e7939b7065c36f483cb623914ff4230334498ec33536222d008b9f383fd2a6b3585ccfc57561803a497df4ad8a034feb0832150d8 +SHA512 (clang-tools-extra-10.0.0rc3.src.tar.xz.sig) = 2a200bf864e9e5320633c9f360ad7206ef372d894da2ce509280628fbf625a68e0082725b6758ff3e9542be5da637b4762b338105ef49ca8fc2ac319ac4f3794 +SHA512 (clang-10.0.0rc3.src.tar.xz.sig) = 157c53b82bcbca6abeaafc987c5c3529a76e5c572bcf6d0ff28933e7277fd2b98551d6f2901d1bd657fc053d1f0f1bb8b05f2545a3662a13fdfdd84c465ae513 From 5e48b7c9be955227d39a64be12b42537a42c6c9a Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Wed, 11 Mar 2020 13:35:18 +0100 Subject: [PATCH 22/30] Move clang-format.el along with tools-extra (bz#1812487) With the current setup, if you only install clang-tools-extra, the package clang-format is not found by Emacs. A similar change was made for the Python scripts, although I did not run in the same situation myself. v2: Moved additional files at the suggestion of @sergesanspaille %{_mandir}/man1/diagtool.1.gz %{_bindir}/c-index-test Also restored trailing whitespaces in the .spec file --- clang.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clang.spec b/clang.spec index 834b107..10e2242 100644 --- a/clang.spec +++ b/clang.spec @@ -391,15 +391,10 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %if !0%{?compat_build} %files %{clang_binaries} -%{_bindir}/c-index-test %{_mandir}/man1/clang.1.gz %{_mandir}/man1/clang++.1.gz %{_mandir}/man1/clang-%{maj_ver}.1.gz %{_mandir}/man1/clang++-%{maj_ver}.1.gz -%{_mandir}/man1/diagtool.1.gz -%{_emacs_sitestartdir}/clang-format.el -%{_datadir}/clang/clang-format.py* -%{_datadir}/clang/clang-format-diff.py* %endif %files libs @@ -437,10 +432,15 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %files tools-extra %{clang_tools_binaries} +%{_bindir}/c-index-test %{_bindir}/find-all-symbols %{_bindir}/modularize +%{_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* %{_datadir}/clang/run-clang-tidy.py* From 8d37c48855cb5a9f3edadcda43a7dbfaa623d1ed Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Thu, 12 Mar 2020 08:24:26 +0000 Subject: [PATCH 23/30] Remove trailing whitespaces --- clang.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang.spec b/clang.spec index 10e2242..615e316 100644 --- a/clang.spec +++ b/clang.spec @@ -209,7 +209,7 @@ Requires: python3 %description -n git-clang-format clang-format integration for git. - + %package -n python3-clang Summary: Python3 bindings for clang Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -569,7 +569,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ - Ensure rpmlint passes on specfile * Fri Nov 30 2018 Tom Stellard - 7.0.0-7 -- Drop python2 dependency from clang-tools-extra +- Drop python2 dependency from clang-tools-extra * Wed Nov 21 2018 sguelton@redhat.com - 7.0.0-6 - Prune unneeded reference to llvm-test-suite sub-package From b73627486cf896f6770ae2f14523fe88ef74a2da Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Thu, 12 Mar 2020 08:29:38 +0000 Subject: [PATCH 24/30] Move a few files from clang to clang-tools-extra. --- clang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 615e316..6876935 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 %global rc_ver 3 -%global baserelease 0.5 +%global baserelease 0.6 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -456,6 +456,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Thu Mar 12 2020 sguelton@redhat.com - 10.0.0-0.6.rc3 +- Move a few files from clang to clang-tools-extra. + * Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.5.rc3 - 10.0.0 rc3 From dc1e065203757c199506a7c840d2c2bfd5b40391 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Sun, 15 Mar 2020 07:19:13 +0000 Subject: [PATCH 25/30] 10.0.0 rc4 --- .gitignore | 4 ++++ clang.spec | 7 +++++-- sources | 8 ++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 73ba03c..3ad658f 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,7 @@ /clang-tools-extra-10.0.0rc3.src.tar.xz /clang-tools-extra-10.0.0rc3.src.tar.xz.sig /clang-10.0.0rc3.src.tar.xz.sig +/clang-10.0.0rc4.src.tar.xz +/clang-tools-extra-10.0.0rc4.src.tar.xz +/clang-tools-extra-10.0.0rc4.src.tar.xz.sig +/clang-10.0.0rc4.src.tar.xz.sig diff --git a/clang.spec b/clang.spec index 6876935..2d625a0 100644 --- a/clang.spec +++ b/clang.spec @@ -3,8 +3,8 @@ %global maj_ver 10 %global min_ver 0 %global patch_ver 0 -%global rc_ver 3 -%global baserelease 0.6 +%global rc_ver 4 +%global baserelease 0.7 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -456,6 +456,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Sat Mar 14 2020 sguelton@redhat.com - 10.0.0-0.7.rc4 +- 10.0.0 rc4 + * Thu Mar 12 2020 sguelton@redhat.com - 10.0.0-0.6.rc3 - Move a few files from clang to clang-tools-extra. diff --git a/sources b/sources index 730e93d..831cef7 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-10.0.0rc3.src.tar.xz) = b24ab488ffd41490dbc76ab43d41111b5f17734dade5575de96e541cb403a81a3593d0e79938fa50e2307660ba9f587ca158d588c94acaa92ccc702bb011de14 -SHA512 (clang-tools-extra-10.0.0rc3.src.tar.xz) = 60d4a11693b8890c7f642a7e7939b7065c36f483cb623914ff4230334498ec33536222d008b9f383fd2a6b3585ccfc57561803a497df4ad8a034feb0832150d8 -SHA512 (clang-tools-extra-10.0.0rc3.src.tar.xz.sig) = 2a200bf864e9e5320633c9f360ad7206ef372d894da2ce509280628fbf625a68e0082725b6758ff3e9542be5da637b4762b338105ef49ca8fc2ac319ac4f3794 -SHA512 (clang-10.0.0rc3.src.tar.xz.sig) = 157c53b82bcbca6abeaafc987c5c3529a76e5c572bcf6d0ff28933e7277fd2b98551d6f2901d1bd657fc053d1f0f1bb8b05f2545a3662a13fdfdd84c465ae513 +SHA512 (clang-10.0.0rc4.src.tar.xz) = 1bd847ad3c0ea947af0e25e630adb7c0d7bbd48d6aa81d17e0294e75a2c733d82a97554cc6acc60727140e3e61a1c89e60b0cbd7930f6a16669ecd8f7577cb26 +SHA512 (clang-tools-extra-10.0.0rc4.src.tar.xz) = 9f29d25a1227776d8cb23cb09cdec79b8f350c5b0f4bd9a217030550e83538e819fc99c93e5bc60668b9d8a0cffc3a3fb459d3ad1f3bcd9a6c42ea25d0f95f2b +SHA512 (clang-tools-extra-10.0.0rc4.src.tar.xz.sig) = 2223e94194069020f39282766616b54bf6e1f8fde7b829d2e88c3cf9d586f023b25b1c7008853d94e06a56078d84ba9557d4261282be7ca974e523a9fec47082 +SHA512 (clang-10.0.0rc4.src.tar.xz.sig) = efa0faaceb9bf7ebae2299946c3222df0ce722cbf23632d28227ea77a13a4e1b33e012fa3119085f63f53da64983f4e6410d639e360650d35520cdf31d678fb0 From fd397b2953aef777213f503d5196f8214c68d97f Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Fri, 20 Mar 2020 12:36:28 +0000 Subject: [PATCH 26/30] 10.0.0 rc5 --- .gitignore | 4 ++++ clang.spec | 7 +++++-- sources | 8 ++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 3ad658f..34da080 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,7 @@ /clang-tools-extra-10.0.0rc4.src.tar.xz /clang-tools-extra-10.0.0rc4.src.tar.xz.sig /clang-10.0.0rc4.src.tar.xz.sig +/clang-10.0.0rc5.src.tar.xz +/clang-tools-extra-10.0.0rc5.src.tar.xz +/clang-tools-extra-10.0.0rc5.src.tar.xz.sig +/clang-10.0.0rc5.src.tar.xz.sig diff --git a/clang.spec b/clang.spec index 2d625a0..0ad526d 100644 --- a/clang.spec +++ b/clang.spec @@ -3,8 +3,8 @@ %global maj_ver 10 %global min_ver 0 %global patch_ver 0 -%global rc_ver 4 -%global baserelease 0.7 +%global rc_ver 5 +%global baserelease 0.8 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -456,6 +456,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.8.rc5 +- 10.0.0 rc5 + * Sat Mar 14 2020 sguelton@redhat.com - 10.0.0-0.7.rc4 - 10.0.0 rc4 diff --git a/sources b/sources index 831cef7..cef9145 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-10.0.0rc4.src.tar.xz) = 1bd847ad3c0ea947af0e25e630adb7c0d7bbd48d6aa81d17e0294e75a2c733d82a97554cc6acc60727140e3e61a1c89e60b0cbd7930f6a16669ecd8f7577cb26 -SHA512 (clang-tools-extra-10.0.0rc4.src.tar.xz) = 9f29d25a1227776d8cb23cb09cdec79b8f350c5b0f4bd9a217030550e83538e819fc99c93e5bc60668b9d8a0cffc3a3fb459d3ad1f3bcd9a6c42ea25d0f95f2b -SHA512 (clang-tools-extra-10.0.0rc4.src.tar.xz.sig) = 2223e94194069020f39282766616b54bf6e1f8fde7b829d2e88c3cf9d586f023b25b1c7008853d94e06a56078d84ba9557d4261282be7ca974e523a9fec47082 -SHA512 (clang-10.0.0rc4.src.tar.xz.sig) = efa0faaceb9bf7ebae2299946c3222df0ce722cbf23632d28227ea77a13a4e1b33e012fa3119085f63f53da64983f4e6410d639e360650d35520cdf31d678fb0 +SHA512 (clang-10.0.0rc5.src.tar.xz) = bbecc2d0825a0c7a05b06f718564ffe96c9a62a1e75a93fdcf9de419ce5dbceae30c3b0342113a86e5fbb102a3f7e12e9788a7fed216c8d2b58b0d02fe2080c9 +SHA512 (clang-tools-extra-10.0.0rc5.src.tar.xz) = f6c404670388cf013c06165a6e5bbd82065e5c4d07a7a86c1edf32e8afc1332987876b62af17c1c927b9568eb0dbacbdbc8f7b6a26654b79b0e2cfc37fedd85d +SHA512 (clang-tools-extra-10.0.0rc5.src.tar.xz.sig) = 3f5bb6c763b4f39feca05ddd74f92493e5c0a9ab7cf6c6e7a20cac146d62eef852b2748c391a0c1d0bdea03fb04958bb019b57cca1f030953fcf7d1f02d8f772 +SHA512 (clang-10.0.0rc5.src.tar.xz.sig) = 55adc874c400c507bb3de903c38569df2889b4f5af96e1018cfe98d1ebdc686ab4682727c2b80e4fbd9ffe1a2425690e1057b19f5349181bbb1db56d75c7f3ef From 7a3aee27c2571b2e678ce113fb16978a840893ef Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 20 Mar 2020 18:43:23 +0000 Subject: [PATCH 27/30] Add dependency on libomp-devel This fixes compiling with -fopenmp, because clang needs libomp-devel to be installed so it can find omp.h. --- clang.spec | 8 +++++++- tests/tests-libomp.yml | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/tests-libomp.yml diff --git a/clang.spec b/clang.spec index 0ad526d..d3a79ae 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 %global rc_ver 5 -%global baserelease 0.8 +%global baserelease 0.9 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -159,6 +159,9 @@ as libraries and designed to be loosely-coupled and extensible. %package libs Summary: Runtime library for clang Recommends: compiler-rt%{?_isa} = %{version} +# 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} %description libs @@ -456,6 +459,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Fri Mar 20 2020 Tom Stellard - 10.0.0-0.9.rc5 +- Add dependency on libomp-devel + * Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.8.rc5 - 10.0.0 rc5 diff --git a/tests/tests-libomp.yml b/tests/tests-libomp.yml new file mode 100644 index 0000000..b49702f --- /dev/null +++ b/tests/tests-libomp.yml @@ -0,0 +1,22 @@ +- hosts: localhost + pre_tasks: + # We want to make sure libomp is not already present on the system to ensure + # that clang pulls in the correct libomp dependencies when it is installed. + - name: Uninstall libomp + package: + name: "{{ item }}" + state: absent + with_items: + - libomp + - libomp-devel + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/clang.git" + dest: "clang" + required_packages: + - clang + tests: + - clang/libomp From dc3ceec8952bba872c405635cad4a88713123371 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Sun, 22 Mar 2020 19:46:01 +0000 Subject: [PATCH 28/30] Update git-clang-format dependency, see rhbz#1815913 --- clang.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clang.spec b/clang.spec index d3a79ae..88bf5bc 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 %global rc_ver 5 -%global baserelease 0.9 +%global baserelease 0.10 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -205,7 +205,7 @@ A set of extra tools built using Clang's tooling API. # just want clang. %package -n git-clang-format Summary: Integration of clang-format for git -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-tools-extra = %{version}-%{release} Requires: git Requires: python3 @@ -459,6 +459,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Sun Mar 22 2020 sguelton@redhat.com - 10.0.0-0.10.rc5 +- Update git-clang-format dependency, see rhbz#1815913 + * Fri Mar 20 2020 Tom Stellard - 10.0.0-0.9.rc5 - Add dependency on libomp-devel From 80c3a7cb7a7a56075175bcf44f7fe66107d36ab3 Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Tue, 24 Mar 2020 20:08:33 +0000 Subject: [PATCH 29/30] 10.0.0 rc6 --- .gitignore | 4 ++++ clang.spec | 7 +++++-- sources | 8 ++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 34da080..28feb3c 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,7 @@ /clang-tools-extra-10.0.0rc5.src.tar.xz /clang-tools-extra-10.0.0rc5.src.tar.xz.sig /clang-10.0.0rc5.src.tar.xz.sig +/clang-10.0.0rc6.src.tar.xz +/clang-tools-extra-10.0.0rc6.src.tar.xz +/clang-tools-extra-10.0.0rc6.src.tar.xz.sig +/clang-10.0.0rc6.src.tar.xz.sig diff --git a/clang.spec b/clang.spec index 88bf5bc..6e789c3 100644 --- a/clang.spec +++ b/clang.spec @@ -3,8 +3,8 @@ %global maj_ver 10 %global min_ver 0 %global patch_ver 0 -%global rc_ver 5 -%global baserelease 0.10 +%global rc_ver 6 +%global baserelease 0.11 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -459,6 +459,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Tue Mar 24 2020 sguelton@redhat.com - 10.0.0-0.11.rc6 +- 10.0.0 rc6 + * Sun Mar 22 2020 sguelton@redhat.com - 10.0.0-0.10.rc5 - Update git-clang-format dependency, see rhbz#1815913 diff --git a/sources b/sources index cef9145..e1d4d62 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-10.0.0rc5.src.tar.xz) = bbecc2d0825a0c7a05b06f718564ffe96c9a62a1e75a93fdcf9de419ce5dbceae30c3b0342113a86e5fbb102a3f7e12e9788a7fed216c8d2b58b0d02fe2080c9 -SHA512 (clang-tools-extra-10.0.0rc5.src.tar.xz) = f6c404670388cf013c06165a6e5bbd82065e5c4d07a7a86c1edf32e8afc1332987876b62af17c1c927b9568eb0dbacbdbc8f7b6a26654b79b0e2cfc37fedd85d -SHA512 (clang-tools-extra-10.0.0rc5.src.tar.xz.sig) = 3f5bb6c763b4f39feca05ddd74f92493e5c0a9ab7cf6c6e7a20cac146d62eef852b2748c391a0c1d0bdea03fb04958bb019b57cca1f030953fcf7d1f02d8f772 -SHA512 (clang-10.0.0rc5.src.tar.xz.sig) = 55adc874c400c507bb3de903c38569df2889b4f5af96e1018cfe98d1ebdc686ab4682727c2b80e4fbd9ffe1a2425690e1057b19f5349181bbb1db56d75c7f3ef +SHA512 (clang-10.0.0rc6.src.tar.xz) = 5edb2932f320a7086f986eeea73fa4cc0926eb352c0c9a9903dae638e992da98eb83e5abd6f70fbcf312170fcef02420cbc21f90ec862ec7cb5afa48ab776001 +SHA512 (clang-tools-extra-10.0.0rc6.src.tar.xz) = 550c536e9661b6436246388b6507b6609696aa40684c9f5dca7c0cb01ae8315a3ff9e869db8aa98945ef5c504876151be1ac5552ebef7bc62d5c102b8f9a362a +SHA512 (clang-tools-extra-10.0.0rc6.src.tar.xz.sig) = ede4d03d199fde31ca0537aae046cf98092d729fce163ad07cb6cb00a90cc448e806e4f69a705e0fbb963bb271b62de0cd20953da9f637b7a5bef405e2e4f172 +SHA512 (clang-10.0.0rc6.src.tar.xz.sig) = 6b829e8a9fe03ae0abfbae5bace0c19228bcd8431b1e9eecf806d3bfb31574aaf6d0e9d5a0434dd1f0cf81fda8f265538b96ceaa0c59d72db4318eb937d32040 From 0c8ce6b93d37f5108607d8d6ef22c2391597e8ee Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Thu, 26 Mar 2020 11:34:24 +0000 Subject: [PATCH 30/30] 10.0.0 final --- .gitignore | 4 ++++ clang.spec | 27 ++++++++++++++++++++------- sources | 8 ++++---- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 28feb3c..a858158 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,7 @@ /clang-tools-extra-10.0.0rc6.src.tar.xz /clang-tools-extra-10.0.0rc6.src.tar.xz.sig /clang-10.0.0rc6.src.tar.xz.sig +/clang-10.0.0.src.tar.xz.sig +/clang-tools-extra-10.0.0.src.tar.xz.sig +/clang-tools-extra-10.0.0.src.tar.xz +/clang-10.0.0.src.tar.xz diff --git a/clang.spec b/clang.spec index 6e789c3..b714a38 100644 --- a/clang.spec +++ b/clang.spec @@ -3,8 +3,8 @@ %global maj_ver 10 %global min_ver 0 %global patch_ver 0 -%global rc_ver 6 -%global baserelease 0.11 +#%%global rc_ver 6 +%global baserelease 1 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -77,12 +77,22 @@ Summary: A C language family front-end for LLVM License: NCSA URL: http://llvm.org -Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_srcdir}.tar.xz -%if !0%{?compat_build} -Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz -Source2: https://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig +%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 +%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 %endif -Source3: https://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_srcdir}.tar.xz.sig Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc Patch4: 0002-gtest-reorg.patch @@ -459,6 +469,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Thu Mar 26 2020 sguelton@redhat.com - 10.0.0-1 +- 10.0.0 final + * Tue Mar 24 2020 sguelton@redhat.com - 10.0.0-0.11.rc6 - 10.0.0 rc6 diff --git a/sources b/sources index e1d4d62..2f30f80 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-10.0.0rc6.src.tar.xz) = 5edb2932f320a7086f986eeea73fa4cc0926eb352c0c9a9903dae638e992da98eb83e5abd6f70fbcf312170fcef02420cbc21f90ec862ec7cb5afa48ab776001 -SHA512 (clang-tools-extra-10.0.0rc6.src.tar.xz) = 550c536e9661b6436246388b6507b6609696aa40684c9f5dca7c0cb01ae8315a3ff9e869db8aa98945ef5c504876151be1ac5552ebef7bc62d5c102b8f9a362a -SHA512 (clang-tools-extra-10.0.0rc6.src.tar.xz.sig) = ede4d03d199fde31ca0537aae046cf98092d729fce163ad07cb6cb00a90cc448e806e4f69a705e0fbb963bb271b62de0cd20953da9f637b7a5bef405e2e4f172 -SHA512 (clang-10.0.0rc6.src.tar.xz.sig) = 6b829e8a9fe03ae0abfbae5bace0c19228bcd8431b1e9eecf806d3bfb31574aaf6d0e9d5a0434dd1f0cf81fda8f265538b96ceaa0c59d72db4318eb937d32040 +SHA512 (clang-10.0.0.src.tar.xz.sig) = cb46d9c616de9ba6e11602269f93a003fc24951b75844d2d62ad7c435bd9ace0357bf396141b9a3e97034f617ad8f301a1a5556a3feb94b17647f8b76c0b6236 +SHA512 (clang-tools-extra-10.0.0.src.tar.xz.sig) = f0527b315ce9f2c86a19dabd462d0d466ac0843262f06d5f2b69333f77457ec9cb99f8ce9fdaa00048dfaec3de5613fb884c4259acd4a75463ba3c6714e35423 +SHA512 (clang-tools-extra-10.0.0.src.tar.xz) = 33b6019e64e9ac94bd7c000b77a4a927602a2705baa9b370e392a56b53fe09c8dad1ff7d583892729e9eb291440433ad7d71df768a96d927e4dbc1988fc01d99 +SHA512 (clang-10.0.0.src.tar.xz) = b1cccc13c46abcda3d689f51d486fa613ecec40c581c72d8b15951715100a2b8fb24370161601e6716cdba5a784337439e99ec2f0766f988e9cce92de6d775da