From 6cfca7d7d8a151c728738a6f97e37f51be0e431f Mon Sep 17 00:00:00 2001 From: lei_ju <983277505@qq.com> Date: Thu, 28 May 2020 18:05:29 +0800 Subject: [PATCH 1/5] add clang yaml --- ...ix-uninitialized-value-in-ABIArgInfo.patch | 38 +++++++++++++++++++ clang.yaml | 4 ++ 2 files changed, 42 insertions(+) create mode 100644 0001-Fix-uninitialized-value-in-ABIArgInfo.patch create mode 100644 clang.yaml diff --git a/0001-Fix-uninitialized-value-in-ABIArgInfo.patch b/0001-Fix-uninitialized-value-in-ABIArgInfo.patch new file mode 100644 index 0000000..9755200 --- /dev/null +++ b/0001-Fix-uninitialized-value-in-ABIArgInfo.patch @@ -0,0 +1,38 @@ +From 565b9633ee68b311c1a954022869d9e99fee7286 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. +--- + include/clang/CodeGen/CGFunctionInfo.h | 11 +++++------ + 1 file changed, 5 insertions(+), 6 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: + } + + ABIArgInfo(Kind K) +- : TheKind(K), PaddingInReg(false), InReg(false), SuppressSRet(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) {} + + public: +- ABIArgInfo() +- : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0), +- TheKind(Direct), PaddingInReg(false), InReg(false), +- SuppressSRet(false) {} ++ ABIArgInfo() : ABIArgInfo(Direct) {} + + static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0, + llvm::Type *Padding = nullptr, +-- +2.19.2 + diff --git a/clang.yaml b/clang.yaml new file mode 100644 index 0000000..7d98bd8 --- /dev/null +++ b/clang.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: llvm/llvm-project +tag_prefix: ^llvmorg- +seperator: . -- Gitee From 2bfb2a1a1dccd4dbb685b593f98df27f29d7ec5a Mon Sep 17 00:00:00 2001 From: lei_ju <983277505@qq.com> Date: Thu, 28 May 2020 18:48:43 +0800 Subject: [PATCH 2/5] add clang yaml --- clang.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/clang.spec b/clang.spec index ac434e9..69f9d0b 100644 --- a/clang.spec +++ b/clang.spec @@ -22,6 +22,7 @@ Patch4: 0001-gtest-reorg.patch Patch5: 0001-Don-t-prefer-python2.7.patch Patch6: 0001-Convert-clang-format-diff.py-to-python3-using-2to3.patch Patch7: 0001-Convert-scan-view-to-python3-using-2to3.patch +Patch8: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch BuildRequires: cmake gcc-c++ python-sphinx git BuildRequires: llvm-devel = %{version} -- Gitee From 5fb78f3a6e7b95c69a55115ed1ad01d3536e251a Mon Sep 17 00:00:00 2001 From: lei_ju <983277505@qq.com> Date: Thu, 28 May 2020 20:43:23 +0800 Subject: [PATCH 3/5] add clang yaml --- clang.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 69f9d0b..9a30440 100644 --- a/clang.spec +++ b/clang.spec @@ -7,7 +7,7 @@ Name: clang Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 6 +Release: 7 License: NCSA Summary: An "LLVM native" C/C++/Objective-C compiler URL: http://llvm.org @@ -250,6 +250,9 @@ false %{python2_sitelib}/clang/ %changelog +* Thu May 28 2020 leiju - 7.0.0-7 +- Fix uninitialized value in ABIArgInfo + * Fri Apr 03 2020 zhouyihang - 7.0.0-6 - Remove useless scriptlet -- Gitee From 0e64a6477abef85b73c9c37d8534ed0edac6bd89 Mon Sep 17 00:00:00 2001 From: lei_ju <983277505@qq.com> Date: Thu, 28 May 2020 20:45:23 +0800 Subject: [PATCH 4/5] add clang yaml --- clang.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 9a30440..d1aef4b 100644 --- a/clang.spec +++ b/clang.spec @@ -21,7 +21,7 @@ Patch2: 0001-Driver-Prefer-vendor-supplied-gcc-toolchain.patch Patch4: 0001-gtest-reorg.patch Patch5: 0001-Don-t-prefer-python2.7.patch Patch6: 0001-Convert-clang-format-diff.py-to-python3-using-2to3.patch -Patch7: 0001-Convert-scan-view-to-python3-using-2to3.patch +Patch7: 0001-Convert-scan-view-to-python3-using-2to3.patch Patch8: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch BuildRequires: cmake gcc-c++ python-sphinx git -- Gitee From a4e4fc0a14b8075b19723c845ce8053a77b4810a Mon Sep 17 00:00:00 2001 From: lei_ju <983277505@qq.com> Date: Thu, 28 May 2020 20:51:47 +0800 Subject: [PATCH 5/5] add clang yaml --- clang.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang.spec b/clang.spec index d1aef4b..994e9e6 100644 --- a/clang.spec +++ b/clang.spec @@ -21,8 +21,8 @@ Patch2: 0001-Driver-Prefer-vendor-supplied-gcc-toolchain.patch Patch4: 0001-gtest-reorg.patch Patch5: 0001-Don-t-prefer-python2.7.patch Patch6: 0001-Convert-clang-format-diff.py-to-python3-using-2to3.patch -Patch7: 0001-Convert-scan-view-to-python3-using-2to3.patch -Patch8: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch +Patch7: 0001-Convert-scan-view-to-python3-using-2to3.patch +Patch8: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch BuildRequires: cmake gcc-c++ python-sphinx git BuildRequires: llvm-devel = %{version} -- Gitee