1 |
commit: 934709b268c66b5600591f1e5bbe44c3d1b1e076 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 20 06:11:16 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 20 07:34:42 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=934709b2 |
7 |
|
8 |
sys-devel/clang: Backport gcc-9 build fix to 9.0.0* |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-devel/clang/clang-9.0.0.9999.ebuild | 3 ++ |
13 |
.../0002-Initialize-all-fields-in-ABIArgInfo.patch | 43 ++++++++++++++++++++++ |
14 |
2 files changed, 46 insertions(+) |
15 |
|
16 |
diff --git a/sys-devel/clang/clang-9.0.0.9999.ebuild b/sys-devel/clang/clang-9.0.0.9999.ebuild |
17 |
index 2322c115940..16f86d8d2b9 100644 |
18 |
--- a/sys-devel/clang/clang-9.0.0.9999.ebuild |
19 |
+++ b/sys-devel/clang/clang-9.0.0.9999.ebuild |
20 |
@@ -68,6 +68,9 @@ PATCHES=( |
21 |
# fix linking in non-native build (without tools-extra) |
22 |
# https://bugs.llvm.org/show_bug.cgi?id=43281 |
23 |
"${FILESDIR}"/9.0.0/0001-clang-unittest-Import-LLVMTestingSupport-if-necessar.patch |
24 |
+ # fix build with gcc-9.0.0 |
25 |
+ # https://bugs.llvm.org/show_bug.cgi?id=40547 |
26 |
+ "${FILESDIR}"/9.0.0/0002-Initialize-all-fields-in-ABIArgInfo.patch |
27 |
) |
28 |
|
29 |
# Multilib notes: |
30 |
|
31 |
diff --git a/sys-devel/clang/files/9.0.0/0002-Initialize-all-fields-in-ABIArgInfo.patch b/sys-devel/clang/files/9.0.0/0002-Initialize-all-fields-in-ABIArgInfo.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..cc397f7c078 |
34 |
--- /dev/null |
35 |
+++ b/sys-devel/clang/files/9.0.0/0002-Initialize-all-fields-in-ABIArgInfo.patch |
36 |
@@ -0,0 +1,43 @@ |
37 |
+From 3398b3f937dd025c81d75a7322a6b7b2205ca8da Mon Sep 17 00:00:00 2001 |
38 |
+From: Serge Guelton <sguelton@××××××.com> |
39 |
+Date: Thu, 19 Sep 2019 00:54:40 +0000 |
40 |
+Subject: [PATCH] Initialize all fields in ABIArgInfo. |
41 |
+ |
42 |
+Due to usage of an uninitialized fields, we end up with |
43 |
+a Conditional jump or move depends on uninitialised value |
44 |
+ |
45 |
+Fixes https://bugs.llvm.org/show_bug.cgi?id=40547 |
46 |
+ |
47 |
+Commited on behalf of Martin Liska <mliska@××××.cz> |
48 |
+ |
49 |
+llvm-svn: 372281 |
50 |
+--- |
51 |
+ clang/include/clang/CodeGen/CGFunctionInfo.h | 10 ++++------ |
52 |
+ 1 file changed, 4 insertions(+), 6 deletions(-) |
53 |
+ |
54 |
+diff --git a/clang/include/clang/CodeGen/CGFunctionInfo.h b/clang/include/clang/CodeGen/CGFunctionInfo.h |
55 |
+index 1f81072e23d..5069d9af42a 100644 |
56 |
+--- a/include/clang/CodeGen/CGFunctionInfo.h |
57 |
++++ b/include/clang/CodeGen/CGFunctionInfo.h |
58 |
+@@ -109,14 +109,12 @@ private: |
59 |
+ UnpaddedCoerceAndExpandType = T; |
60 |
+ } |
61 |
+ |
62 |
+- ABIArgInfo(Kind K) |
63 |
+- : TheKind(K), PaddingInReg(false), InReg(false) { |
64 |
+- } |
65 |
+- |
66 |
+ public: |
67 |
+- ABIArgInfo() |
68 |
++ ABIArgInfo(Kind K = Direct) |
69 |
+ : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0), |
70 |
+- TheKind(Direct), PaddingInReg(false), InReg(false) {} |
71 |
++ TheKind(K), PaddingInReg(false), InAllocaSRet(false), |
72 |
++ IndirectByVal(false), IndirectRealign(false), SRetAfterThis(false), |
73 |
++ InReg(false), CanBeFlattened(false), SignExt(false) {} |
74 |
+ |
75 |
+ static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0, |
76 |
+ llvm::Type *Padding = nullptr, |
77 |
+-- |
78 |
+2.23.0 |
79 |
+ |