aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-11-23 00:24:34 +0200
committerfanquake <fanquake@gmail.com>2021-05-01 13:39:44 +0800
commitf48f187cce7fa43646fb0d796c244e1515e763ec (patch)
tree91120b63dd9b119a149aff45e124b3ea2062c037 /depends
parent9b193cd2a3ca20917611fbed56dfbcd8a39aeab8 (diff)
downloadbitcoin-f48f187cce7fa43646fb0d796c244e1515e763ec.tar.xz
build: Clang 10.0.1
LLVM 8 has inherent nondeterminism in the compiler, fixed in LLVM 9+.
Diffstat (limited to 'depends')
-rw-r--r--depends/packages/native_clang.mk10
-rw-r--r--depends/packages/qt.mk3
-rw-r--r--depends/patches/qt/fix_qpainter_non_determinism.patch63
3 files changed, 6 insertions, 70 deletions
diff --git a/depends/packages/native_clang.mk b/depends/packages/native_clang.mk
index 741ddacf09..36adeb196d 100644
--- a/depends/packages/native_clang.mk
+++ b/depends/packages/native_clang.mk
@@ -1,9 +1,9 @@
package=native_clang
-$(package)_version=8.0.0
-$(package)_download_path=https://releases.llvm.org/$($(package)_version)
-$(package)_download_file=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz
-$(package)_file_name=clang-llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz
-$(package)_sha256_hash=9ef854b71949f825362a119bf2597f744836cb571131ae6b721cd102ffea8cd0
+$(package)_version=10.0.1
+$(package)_download_path=https://github.com/llvm/llvm-project/releases/download/llvmorg-$($(package)_version)
+$(package)_download_file=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz
+$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz
+$(package)_sha256_hash=48b83ef827ac2c213d5b64f5ad7ed082c8bcb712b46644e0dc5045c6f462c231
define $(package)_preprocess_cmds
rm -f $($(package)_extract_dir)/lib/libc++abi.so*
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 0133eee920..8b5bfa6895 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -9,7 +9,7 @@ $(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
$(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch
-$(package)_patches+= fix_qpainter_non_determinism.patch fix_lib_paths.patch fix_android_pch.patch
+$(package)_patches+= fix_lib_paths.patch fix_android_pch.patch
$(package)_patches+= fix_bigsur_drawing.patch qtbase-moc-ignore-gcc-macro.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
@@ -227,7 +227,6 @@ define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_android_pch.patch && \
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
- patch -p1 -i $($(package)_patch_dir)/fix_qpainter_non_determinism.patch &&\
patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_bigsur_drawing.patch && \
diff --git a/depends/patches/qt/fix_qpainter_non_determinism.patch b/depends/patches/qt/fix_qpainter_non_determinism.patch
deleted file mode 100644
index 44c45187c5..0000000000
--- a/depends/patches/qt/fix_qpainter_non_determinism.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-commit 2a8f7dc6ddfc414a66491522501c1574a1343ee1
-Author: Andrew Chow <achow101-github@achow101.com>
-Date: Sat Nov 21 01:11:04 2020 -0500
-
- build: Fix determinism issue when building with Clang 8
-
- When building Qt with LLVM/Clang 8 under -O3 (the default), we run into
- a determinism issue in `qt_interset_spans`. The issue has been fixed for
- LLVM/Clang 9, see
- https://github.com/llvm/llvm-project/commit/db101864bdc938deb1d63fe4f7da761bd38e5cae
- and https://reviews.llvm.org/D64601, however this fix was not backported
- to 8.x. Once LLVM/Clang 9 is used, this patch can be dropped.
-
- The particular issue appears to be an optimization done by -O3 which
- adds a temporary variable for `spans->y` in `qt_intersect_spans`. When
- it does this, sometimes it chooses to use a 32-bit movs instruction
- (movswl), and other times it chooses a 64-bit movs instruction (movswq).
- By patching `qt_intersect_spans` to always make a temporary variable for
- `spans->y`, we are able to sidestep this problem.
-
-diff --git a/qtbase/src/gui/painting/qpaintengine_raster.cpp b/qtbase/src/gui/painting/qpaintengine_raster.cpp
-index 92ab6e8375..f018009e0b 100644
---- a/qtbase/src/gui/painting/qpaintengine_raster.cpp
-+++ b/qtbase/src/gui/painting/qpaintengine_raster.cpp
-@@ -4128,22 +4128,23 @@ static const QSpan *qt_intersect_spans(const QClipData *clip, int *currentClip,
- const QSpan *clipEnd = clip->m_spans + clip->count;
-
- while (available && spans < end ) {
-+ const short spans_y = spans->y;
- if (clipSpans >= clipEnd) {
- spans = end;
- break;
- }
-- if (clipSpans->y > spans->y) {
-+ if (clipSpans->y > spans_y) {
- ++spans;
- continue;
- }
-- if (spans->y != clipSpans->y) {
-- if (spans->y < clip->count && clip->m_clipLines[spans->y].spans)
-- clipSpans = clip->m_clipLines[spans->y].spans;
-+ if (spans_y != clipSpans->y) {
-+ if (spans_y < clip->count && clip->m_clipLines[spans_y].spans)
-+ clipSpans = clip->m_clipLines[spans_y].spans;
- else
- ++clipSpans;
- continue;
- }
-- Q_ASSERT(spans->y == clipSpans->y);
-+ Q_ASSERT(spans_y == clipSpans->y);
-
- int sx1 = spans->x;
- int sx2 = sx1 + spans->len;
-@@ -4162,7 +4163,7 @@ static const QSpan *qt_intersect_spans(const QClipData *clip, int *currentClip,
- if (len) {
- out->x = qMax(sx1, cx1);
- out->len = qMin(sx2, cx2) - out->x;
-- out->y = spans->y;
-+ out->y = spans_y;
- out->coverage = qt_div_255(spans->coverage * clipSpans->coverage);
- ++out;
- --available;
-