* update llvm/clang/lld/compiler-rt to 8.0.1

This commit is contained in:
Alexander Baldeck 2019-07-22 17:21:17 +00:00
parent 439f1bdef1
commit f1e51bb096
6 changed files with 94 additions and 54 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

@ -3,8 +3,8 @@
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=clang
pkgver=8.0.0
pkgrel=4
pkgver=8.0.1
pkgrel=1
pkgdesc="C language family frontend for LLVM"
arch=(x86_64 powerpc64le)
url="https://clang.llvm.org/"
@ -17,34 +17,41 @@ optdepends=('openmp: OpenMP support in clang with -fopenmp'
provides=("clang-analyzer=$pkgver" "clang-tools-extra=$pkgver")
conflicts=('clang-analyzer' 'clang-tools-extra')
replaces=('clang-analyzer' 'clang-tools-extra')
source=(https://releases.llvm.org/$pkgver/cfe-$pkgver.src.tar.xz{,.sig}
https://releases.llvm.org/$pkgver/clang-tools-extra-$pkgver.src.tar.xz{,.sig}
https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/cfe-$pkgver.src.tar.xz{,.sig}
https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/clang-tools-extra-$pkgver.src.tar.xz{,.sig}
https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
0001-OpenCL-Change-type-of-block-pointer-for-OpenCL.patch
0002-OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch
0003-OpenCL-Fix-assertion-due-to-blocks.patch
enable-SSP-and-PIE-by-default.patch
clang-doc-build-as-clang_tool.patch)
sha256sums=('084c115aab0084e63b23eee8c233abb6739c399e29966eaeccfc6e088e0b736b'
clang-doc-build-as-clang_tool.patch
0001-Fix-uninitialized-value-in-ABIArgInfo.patch
enable-SSP-and-PIE-by-default.patch)
sha256sums=('70effd69f7a8ab249f66b0a68aba8b08af52aa2ab710dfb8a0fba102685b1646'
'SKIP'
'4f00122be408a7482f2004bcf215720d2b88cf8dc78b824abb225da8ad359d4b'
'187179b617e4f07bb605cc215da0527e64990b4a7dd5cbcc452a16b64e02c3e1'
'SKIP'
'8872be1b12c61450cacc82b3d153eab02be2546ef34fa3580ed14137bb26224c'
'44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7'
'SKIP'
'fbb6d3c8135942e458bcad8882605a623bcd09bdec488eb0800e3afee0061e3a'
'91c49139e02c6d29f6201aa394868939b991b39b84215c082392ea96fbd8c334'
'191434810b5298331908ea1e193203e8441693da900238344e946ee6a79dad31'
'58f86da25eb230ed6d423b5b61870cbf3bef88f38103ca676a2c7f34b2372171'
'1dfa5f93c0c084b8a25ca79ef9e2fe63a476826629e8ef366e0a6eaf5fa10625')
'1dfa5f93c0c084b8a25ca79ef9e2fe63a476826629e8ef366e0a6eaf5fa10625'
'b7f31bcf03255f6a9b51b02935648e015ea538a0eef0b0c6d9c052fc5accb0c4'
'58f86da25eb230ed6d423b5b61870cbf3bef88f38103ca676a2c7f34b2372171')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
prepare() {
cd "$srcdir/cfe-$pkgver.src"
mkdir -p build
mkdir build
mv "$srcdir/clang-tools-extra-$pkgver.src" tools/extra
patch -Np1 -i ../enable-SSP-and-PIE-by-default.patch
# The following patch was reverted upstream because it triggered an ICE with
# GCC 7; however, we need it to pass the test suite when building with GCC 9
# https://bugs.llvm.org/show_bug.cgi?id=40547
patch -Np1 -i ../0001-Fix-uninitialized-value-in-ABIArgInfo.patch
# Backported patches for intel-opencl-clang and intel-compute-runtime
patch -Np1 -i ../0001-OpenCL-Change-type-of-block-pointer-for-OpenCL.patch
patch -Np1 -i ../0002-OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch
@ -70,15 +77,8 @@ build() {
-DLLVM_ENABLE_SPHINX=ON \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
-DLLVM_EXTERNAL_LIT=/usr/bin/lit \
-DLLVM_CMAKE_PATH="$srcdir/llvm-$pkgver.src/cmake/modules" \
-DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
RAM_TOTAL=$(free --giga | grep Mem | awk '{print $2}')
if [ ${RAM_TOTAL} -lt 16 ]; then
warning "Limiting to 2 parallel job due to RAM constrains"
NINJA_ARGS="-j2"
fi
ninja $NINJA_ARGS
ninja
}
check() {

View File

@ -3,8 +3,8 @@
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=compiler-rt
pkgver=8.0.0
pkgrel=2
pkgver=8.0.1
pkgrel=1
pkgdesc="Compiler runtime libraries for clang"
arch=(x86_64 powerpc64le)
url="https://compiler-rt.llvm.org/"
@ -14,8 +14,8 @@ makedepends=('llvm' 'cmake' 'ninja' 'python')
# Build 32-bit compiler-rt libraries on x86_64 (FS#41911)
makedepends_x86_64=('lib32-gcc-libs')
options=('staticlibs')
source=(https://releases.llvm.org/$pkgver/$pkgname-$pkgver.src.tar.xz{,.sig})
sha256sums=('b435c7474f459e71b2831f1a4e3f1d21203cb9c0172e94e9d9b69f50354f21b1'
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/$pkgname-$pkgver.src.tar.xz{,.sig})
sha256sums=('11828fb4823387d820c6715b25f6b2405e60837d12a7469e7a8882911c721837'
'SKIP')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>

View File

@ -3,7 +3,7 @@
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=lld
pkgver=8.0.0
pkgver=8.0.1
pkgrel=1
pkgdesc="Linker from the LLVM project"
arch=(x86_64 powerpc64le)
@ -11,18 +11,23 @@ url="https://lld.llvm.org/"
license=('custom:University of Illinois/NCSA Open Source License')
depends=('llvm-libs')
makedepends=('llvm' 'cmake' 'ninja' 'python-sphinx')
source=(https://releases.llvm.org/$pkgver/$pkgname-$pkgver.src.tar.xz{,.sig}
https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz{,.sig})
sha256sums=('9caec8ec922e32ffa130f0fb08e4c5a242d7e68ce757631e425e9eba2e1a6e37'
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/$pkgname-$pkgver.src.tar.xz{,.sig}
https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
sphinx2.patch)
sha256sums=('9fba1e94249bd7913e8a6c3aadcb308b76c8c3d83c5ce36c99c3f34d73873d88'
'SKIP'
'8872be1b12c61450cacc82b3d153eab02be2546ef34fa3580ed14137bb26224c'
'SKIP')
'44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7'
'SKIP'
'7f7cca66a16c5a4aca132bfa1d86a7a2ff33612ec47d3422dc91ad4cc1810646')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
prepare() {
cd "$srcdir/$pkgname-$pkgver.src"
mkdir build
# https://bugs.llvm.org/show_bug.cgi?id=41789
patch -Np1 -i ../sphinx2.patch
}
build() {
@ -40,22 +45,11 @@ build() {
-DLLVM_ENABLE_SPHINX=ON \
-DLLVM_EXTERNAL_LIT=/usr/bin/lit \
-DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
RAM_TOTAL=$(free --giga | grep Mem | awk '{print $2}')
if [ ${RAM_TOTAL} -lt 16 ]; then
warning "Limiting to 2 parallel job due to RAM constrains"
NINJA_ARGS="-j2"
fi
ninja ${NINJA_ARGS}
ninja
}
check() {
cd "$srcdir/$pkgname-$pkgver.src/build"
if [[ -e /usr/bin/lld ]]; then
# TODO(foutrelis): tests use system lld if it exists; check if it's fixable
error "Cannot run the tests while lld is installed to the system"
return 1
fi
ninja check-lld
}

13
lld/sphinx2.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/docs/conf.py b/docs/conf.py
index 62404b275..b5a3cdc68 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -134,7 +134,7 @@ html_last_updated_fmt = '%Y-%m-%d'
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
-html_sidebars = {'index': 'indexsidebar.html'}
+html_sidebars = {'index': ['localtoc.html', 'relations.html', 'sourcelink.html', 'indexsidebar.html', 'searchbox.html']}
# Additional templates that should be rendered to pages, maps page names to
# template names.

View File

@ -3,8 +3,8 @@
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=('llvm' 'llvm-libs' 'llvm-ocaml')
pkgver=8.0.0
pkgrel=3
pkgver=8.0.1
pkgrel=1
_ocaml_ver=4.07.1
arch=(x86_64 powerpc64le)
url="https://llvm.org/"
@ -13,22 +13,17 @@ makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
"ocaml=$_ocaml_ver" 'ocaml-ctypes' 'ocaml-findlib'
'python-sphinx' 'python-recommonmark')
options=('staticlibs')
source=(https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
llvm-config.h
0001-Fix-the-buildbot-issue-introduced-by-r351421.patch)
sha256sums=('8872be1b12c61450cacc82b3d153eab02be2546ef34fa3580ed14137bb26224c'
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/$pkgname-$pkgver.src.tar.xz{,.sig}
llvm-config.h)
sha256sums=('44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7'
'SKIP'
'597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48'
'9b519940a1f8e18df54128c00eeb22528b3c449a9cd1320c0959cdb74ea72d16')
'597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
prepare() {
cd "$srcdir/llvm-$pkgver.src"
mkdir build
# Fix a test failure in CodeGen/AArch64/wineh4.mir
patch -Np1 -i ../0001-Fix-the-buildbot-issue-introduced-by-r351421.patch
}
build() {