From 59a913a078706bb2cbd7043f176df5a22b06ebad Mon Sep 17 00:00:00 2001 From: sergesanspaille Date: Fri, 1 Feb 2019 06:43:22 +0000 Subject: [PATCH] Fix gcc-9 build --- ...ix-uninitialized-value-in-ABIArgInfo.patch | 38 +++++++++++++++++++ clang.spec | 7 +++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-uninitialized-value-in-ABIArgInfo.patch 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.spec b/clang.spec index 56fc803..04887ff 100644 --- a/clang.spec +++ b/clang.spec @@ -58,7 +58,7 @@ Name: %pkg_name Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 2%{?rc_ver:.rc%{rc_ver}}%{?dist}.1 +Release: 3%{?rc_ver:.rc%{rc_ver}}%{?dist}.1 Summary: A C language family front-end for LLVM License: NCSA @@ -76,6 +76,7 @@ Patch6: 0001-Convert-clang-format-diff.py-to-python3-using-2to3.patch Patch7: 0001-Convert-scan-view-to-python3-using-2to3.patch #rhbz#1657544 Patch8: 0001-CodeGen-Handle-mixed-width-ops-in-mixed-sign-mul-wit.patch +Patch9: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch # clang-tools-extra patches Patch100: 0001-Convert-run-find-all-symbols.py-to-python3-using-2to.patch @@ -220,6 +221,7 @@ pathfix.py -i %{__python3} -pn \ %patch6 -p1 -b .clang-format-diff-py3 %patch7 -p1 -b .scan-view-py3 %patch8 -p1 -b .mul-overflow-fix +%patch9 -p1 -b .abi-arginfo mv ../%{clang_tools_srcdir} tools/extra @@ -419,6 +421,9 @@ false %endif %changelog +* Fri Feb 01 2019 sguelton@redhat.com - 7.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Thu Jan 31 2019 Fedora Release Engineering - 7.0.1-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild