!10 Add clang yaml and fix clang build failed on x86_64

Merge pull request !10 from 雷炬/master
This commit is contained in:
openeuler-ci-bot 2020-05-28 23:08:30 +08:00 committed by Gitee
commit 56a593fb5d
3 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From 565b9633ee68b311c1a954022869d9e99fee7286 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
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

View File

@ -7,7 +7,7 @@
Name: clang Name: clang
Version: %{maj_ver}.%{min_ver}.%{patch_ver} Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: 6 Release: 7
License: NCSA License: NCSA
Summary: An "LLVM native" C/C++/Objective-C compiler Summary: An "LLVM native" C/C++/Objective-C compiler
URL: http://llvm.org URL: http://llvm.org
@ -22,6 +22,7 @@ Patch4: 0001-gtest-reorg.patch
Patch5: 0001-Don-t-prefer-python2.7.patch Patch5: 0001-Don-t-prefer-python2.7.patch
Patch6: 0001-Convert-clang-format-diff.py-to-python3-using-2to3.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 BuildRequires: cmake gcc-c++ python-sphinx git
BuildRequires: llvm-devel = %{version} BuildRequires: llvm-devel = %{version}
@ -249,6 +250,9 @@ false
%{python2_sitelib}/clang/ %{python2_sitelib}/clang/
%changelog %changelog
* Thu May 28 2020 leiju <leiju4@huawei.com> - 7.0.0-7
- Fix uninitialized value in ABIArgInfo
* Fri Apr 03 2020 zhouyihang <zhouyihang1@huawei.com> - 7.0.0-6 * Fri Apr 03 2020 zhouyihang <zhouyihang1@huawei.com> - 7.0.0-6
- Remove useless scriptlet - Remove useless scriptlet

4
clang.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: llvm/llvm-project
tag_prefix: ^llvmorg-
seperator: .