Rebase to Clang 9.0.0 RC2
Changes imported from: https://src.fedoraproject.org/rpms/clang/pull-request/39 Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
parent
7b4d800ffc
commit
1ffa649c13
|
@ -63,3 +63,5 @@
|
|||
/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
|
||||
|
|
|
@ -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 <sguelton@redhat.com>
|
||||
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
|
||||
|
||||
|
|
36
clang.spec
36
clang.spec
|
@ -1,14 +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 rc_ver 2
|
||||
%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 \
|
||||
|
@ -28,6 +30,7 @@
|
|||
%{_bindir}/clang-format \
|
||||
%{_bindir}/clang-import-test \
|
||||
%{_bindir}/clang-offload-bundler \
|
||||
%{_bindir}/clang-scan-deps \
|
||||
%{_bindir}/diagtool \
|
||||
%{_bindir}/hmaptool
|
||||
|
||||
|
@ -61,7 +64,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
|
||||
|
@ -74,9 +77,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++
|
||||
|
@ -212,16 +213,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
|
||||
|
||||
|
@ -248,13 +247,16 @@ 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=";" \
|
||||
%if 0%{?compat_build}
|
||||
-DLLVM_CONFIG:FILEPATH=%{_bindir}/llvm-config-%{maj_ver}.%{min_ver}-%{__isa_bits} \
|
||||
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
|
||||
|
@ -270,7 +272,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 \
|
||||
|
@ -280,6 +286,7 @@ 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 \
|
||||
|
@ -424,6 +431,9 @@ false
|
|||
|
||||
%endif
|
||||
%changelog
|
||||
* Thu Aug 22 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-0.1.rc2
|
||||
- 9.0.0 Release candidate 2
|
||||
|
||||
* Tue Aug 20 2019 sguelton@redhat.com - 8.0.0-4
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
|
|
4
sources
4
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.0rc2.src.tar.xz) = 1e09c924850353e17c4ae6e5fe521fcda01c01e3314edb852a92ccc739415b370999999af48680ab94b769f8495511fb6b9ad5e34ea733d3a1a6e6b5c963515f
|
||||
SHA512 (clang-tools-extra-9.0.0rc2.src.tar.xz) = 4f9ad3bcf0fa67dde37ef41132312d0cb0644e4820583881bc296daa5e86fb96d1066c305c0543f3d0f63eb2cecad60d3872b40c982941ec11a016128f67aa8d
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue