summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Arthaud2020-12-12 21:38:19 -0800
committerMaxime Arthaud2020-12-12 21:38:19 -0800
commit2673402e7a0abefd143f836552816a479eda83f1 (patch)
tree3ad17ab80f79033c70094234f8afe57f67cc30b4
parenta12cd9de8fb79c7780612a2106184fa80add36eb (diff)
downloadaur-2673402e7a0abefd143f836552816a479eda83f1.tar.gz
Fix various build errors
-rw-r--r--.SRCINFO4
-rw-r--r--0003-Fix-narrowing-conversion.patch37
-rw-r--r--0004-Fix-lambda-parameter-already-captured.patch31
-rw-r--r--PKGBUILD11
4 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d6fda4c8dcf3..97c8cb8ec23e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -18,6 +18,8 @@ pkgbase = llvm40
source = https://releases.llvm.org/4.0.1/compiler-rt-4.0.1.src.tar.xz.sig
source = 0001-GCC-compatibility-Ignore-the-fno-plt-flag.patch
source = 0002-Enable-SSP-and-PIE-by-default.patch
+ source = 0003-Fix-narrowing-conversion.patch
+ source = 0004-Fix-lambda-parameter-already-captured.patch
source = PR31870-Disable-llvm-symbolizer-test.patch
source = D35246-Fix-sanitizer-build-against-latest-glibc.patch
source = PR37486-Fix-lli-fails-to-build-with-gcc-8.patch
@@ -34,6 +36,8 @@ pkgbase = llvm40
sha256sums = SKIP
sha256sums = ed4a1c3c73b31421caa0ba50d14cabc16de676a88f045d06b207bbb3006963ac
sha256sums = 79f1a409700a83d983d7237a907aeddf342c28aa810b87b28ee27b8c5560644a
+ sha256sums = 163f3b1352b9f3194f12a8c96ab3433f9ed6b524b03081919904d5d55148092e
+ sha256sums = 0c4c74f339895e4ff88b8294dcce81b3e72810f788f4aaac5ca54acc31ee3d09
sha256sums = 6fff47ab5ede79d45fe64bb4903b7dfc27212a38e6cd5d01e60ebd24b7557359
sha256sums = 0afff7e5cf0f6df596517f63a9a9f085eab3b53f42a1eb14bbd83861c36c9fd7
sha256sums = 080e90dabbd386fb8c4771ab7537acff157b72bb0f2591609805cacf684cceed
diff --git a/0003-Fix-narrowing-conversion.patch b/0003-Fix-narrowing-conversion.patch
new file mode 100644
index 000000000000..61ed1a8b9917
--- /dev/null
+++ b/0003-Fix-narrowing-conversion.patch
@@ -0,0 +1,37 @@
+Index: lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+===================================================================
+--- lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1147,8 +1158,9 @@
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
+-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
+-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */
++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
++ on many architectures. */
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
+ #endif
+
+Index: lib/sanitizer_common/sanitizer_platform_limits_posix.h
+===================================================================
+--- lib/sanitizer_common/sanitizer_platform_limits_posix.h
++++ lib/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -218,15 +218,8 @@
+ unsigned short __seq;
+ unsigned long long __unused1;
+ unsigned long long __unused2;
+-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__)
+- unsigned int mode;
+- unsigned short __seq;
+- unsigned short __pad1;
+- unsigned long __unused1;
+- unsigned long __unused2;
+ #else
+- unsigned short mode;
+- unsigned short __pad1;
++ unsigned int mode;
+ unsigned short __seq;
+ unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
diff --git a/0004-Fix-lambda-parameter-already-captured.patch b/0004-Fix-lambda-parameter-already-captured.patch
new file mode 100644
index 000000000000..e23a53bcc33f
--- /dev/null
+++ b/0004-Fix-lambda-parameter-already-captured.patch
@@ -0,0 +1,31 @@
+Index: lib/CodeGen/CGOpenMPRuntime.cpp
+===================================================================
+--- lib/CodeGen/CGOpenMPRuntime.cpp
++++ lib/CodeGen/CGOpenMPRuntime.cpp
+@@ -6271,7 +6271,7 @@
+ // Generate the code for the opening of the data environment. Capture all the
+ // arguments of the runtime call by reference because they are used in the
+ // closing of the region.
+- auto &&BeginThenGen = [&D, &CGF, Device, &Info, &CodeGen, &NoPrivAction](
++ auto &&BeginThenGen = [&D, Device, &Info, &CodeGen, &NoPrivAction](
+ CodeGenFunction &CGF, PrePostActionTy &) {
+ // Fill up the arrays with all the mapped variables.
+ MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
+@@ -6318,7 +6318,7 @@
+ };
+
+ // Generate code for the closing of the data region.
+- auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF,
++ auto &&EndThenGen = [Device, &Info](CodeGenFunction &CGF,
+ PrePostActionTy &) {
+ assert(Info.isValid() && "Invalid data environment closing arguments.");
+
+@@ -6397,7 +6397,7 @@
+ "Expecting either target enter, exit data, or update directives.");
+
+ // Generate the code for the opening of the data environment.
+- auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
++ auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) {
+ // Fill up the arrays with all the mapped variables.
+ MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
+ MappableExprsHandler::MapValuesArrayTy Pointers;
diff --git a/PKGBUILD b/PKGBUILD
index 64ede94da426..8838da6078af 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -23,6 +23,8 @@ source=(https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
https://releases.llvm.org/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig}
0001-GCC-compatibility-Ignore-the-fno-plt-flag.patch
0002-Enable-SSP-and-PIE-by-default.patch
+ 0003-Fix-narrowing-conversion.patch
+ 0004-Fix-lambda-parameter-already-captured.patch
PR31870-Disable-llvm-symbolizer-test.patch
D35246-Fix-sanitizer-build-against-latest-glibc.patch
PR37486-Fix-lli-fails-to-build-with-gcc-8.patch
@@ -38,6 +40,8 @@ sha256sums=('da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51'
'SKIP'
'ed4a1c3c73b31421caa0ba50d14cabc16de676a88f045d06b207bbb3006963ac'
'79f1a409700a83d983d7237a907aeddf342c28aa810b87b28ee27b8c5560644a'
+ '163f3b1352b9f3194f12a8c96ab3433f9ed6b524b03081919904d5d55148092e'
+ '0c4c74f339895e4ff88b8294dcce81b3e72810f788f4aaac5ca54acc31ee3d09'
'6fff47ab5ede79d45fe64bb4903b7dfc27212a38e6cd5d01e60ebd24b7557359'
'0afff7e5cf0f6df596517f63a9a9f085eab3b53f42a1eb14bbd83861c36c9fd7'
'080e90dabbd386fb8c4771ab7537acff157b72bb0f2591609805cacf684cceed'
@@ -87,6 +91,13 @@ prepare() {
# Use pre-computed size of struct ustat for Linux
# https://reviews.llvm.org/D47281
patch -Np0 -d projects/compiler-rt < ../D47281-Use-pre-computed-size-of-struct-ustat.patch
+
+ # Fix narrowing conversion errors
+ # https://bugs.gentoo.org/708430
+ patch -Np0 -d projects/compiler-rt < ../0003-Fix-narrowing-conversion.patch
+
+ # Fix lambda parameter already captured errors
+ patch -Np0 -d tools/clang < ../0004-Fix-lambda-parameter-already-captured.patch
}
build() {