Skip to content

Commit

Permalink
Merge remote-tracking branch 'bitcoin/0.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasher- committed Jun 18, 2018
2 parents 514e068 + dac5d68 commit 4c20019
Show file tree
Hide file tree
Showing 123 changed files with 10,617 additions and 6,134 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 16)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2018)
Expand Down
2 changes: 1 addition & 1 deletion contrib/devtools/lint-whitespace.sh
Expand Up @@ -16,7 +16,7 @@ if [ -z "${TRAVIS_COMMIT_RANGE}" ]; then
fi

showdiff() {
if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- "." ":(exclude)src/leveldb/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/"; then
if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- "." ":(exclude)depends/patches/" ":(exclude)src/leveldb/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/"; then
echo "Failed to get a diff"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion contrib/verify-commits/trusted-git-root
@@ -1 +1 @@
82bcf405f6db1d55b684a1f63a4aabad376cdad7
11049f4fe62606d1b0380a9ef800ac130f0fbadf
1 change: 0 additions & 1 deletion depends/Makefile
Expand Up @@ -21,7 +21,6 @@ BUILD_ID_SALT ?= salt
host:=$(BUILD)
ifneq ($(HOST),)
host:=$(HOST)
host_toolchain:=$(HOST)-
endif

ifneq ($(DEBUG),)
Expand Down
4 changes: 4 additions & 0 deletions depends/hosts/default.mk
@@ -1,3 +1,7 @@
ifneq ($(host),$(build))
host_toolchain:=$(host)-
endif

default_host_CC = $(host_toolchain)gcc
default_host_CXX = $(host_toolchain)g++
default_host_AR = $(host_toolchain)ar
Expand Down
2 changes: 1 addition & 1 deletion depends/packages/expat.mk
@@ -1,6 +1,6 @@
package=expat
$(package)_version=2.2.1
$(package)_download_path=https://downloads.sourceforge.net/project/expat/expat/$($(package)_version)
$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_1/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=1868cadae4c82a018e361e2b2091de103cd820aaacb0d6cfa49bd2cd83978885

Expand Down
1 change: 1 addition & 0 deletions depends/packages/openssl.mk
Expand Up @@ -47,6 +47,7 @@ $(package)_config_opts_linux=-fPIC -Wa,--noexecstack
$(package)_config_opts_x86_64_linux=linux-x86_64
$(package)_config_opts_i686_linux=linux-generic32
$(package)_config_opts_arm_linux=linux-generic32
$(package)_config_opts_armv7l_linux=linux-generic32
$(package)_config_opts_aarch64_linux=linux-generic64
$(package)_config_opts_mipsel_linux=linux-generic32
$(package)_config_opts_mips_linux=linux-generic32
Expand Down
5 changes: 4 additions & 1 deletion depends/packages/qt.mk
Expand Up @@ -8,7 +8,8 @@ $(package)_dependencies=openssl zlib
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_patches=mac-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch fix_qt_pkgconfig.patch
$(package)_patches=mac-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch
$(package)_patches+=fix_qt_pkgconfig.patch fix-cocoahelpers-macos.patch qfixed-coretext.patch

$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
Expand Down Expand Up @@ -140,6 +141,8 @@ define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/pidlist_absolute.patch && \
patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
patch -p1 < $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
patch -p1 < $($(package)_patch_dir)/fix-cocoahelpers-macos.patch && \
patch -p1 < $($(package)_patch_dir)/qfixed-coretext.patch && \
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
Expand Down
70 changes: 70 additions & 0 deletions depends/patches/qt/fix-cocoahelpers-macos.patch
@@ -0,0 +1,70 @@
From 0707260a4f8e64dfadf1df5f935e74cabb7c7d27 Mon Sep 17 00:00:00 2001
From: Jake Petroules <jake.petroules@qt.io>
Date: Sun, 1 Oct 2017 21:48:17 -0700
Subject: [PATCH] Fix build error with macOS 10.13 SDK
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Several of these variables/macros are no longer defined. We didn't
validate the preconditions on iOS, tvOS, or watchOS, so no
need to bother validating them on macOS either. Nor did we check the
OSStatus result on any platform anyways.

Task-number: QTBUG-63401
Change-Id: Ife64dff767cf6d3f4b839fc53ec486181c176bf3
(cherry-picked from 861544583511d4e6f7745d2339b26ff1cd44132b)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
---
src/plugins/platforms/cocoa/qcocoahelpers.h | 2 +-
src/plugins/platforms/cocoa/qcocoahelpers.mm | 13 +------------
2 files changed, 2 insertions(+), 13 deletions(-)

diff --git old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
index bbb3793..74371d5 100644
--- old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
+++ new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
@@ -80,7 +80,7 @@ QColor qt_mac_toQColor(CGColorRef color);
// Creates a mutable shape, it's the caller's responsibility to release.
HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion &region);

-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);

NSDragOperation qt_mac_mapDropAction(Qt::DropAction action);
NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions);
diff --git old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
index cd73148..3f8429e 100644
--- old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
+++ new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
@@ -544,15 +544,8 @@ NSRect qt_mac_flipRect(const QRect &rect)
return NSMakeRect(rect.x(), flippedY, rect.width(), rect.height());
}

-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
{
- // Verbatim copy if HIViewDrawCGImage (as shown on Carbon-Dev)
- OSStatus err = noErr;
-
- require_action(inContext != NULL, InvalidContext, err = paramErr);
- require_action(inBounds != NULL, InvalidBounds, err = paramErr);
- require_action(inImage != NULL, InvalidImage, err = paramErr);
-
CGContextSaveGState( inContext );
CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds));
CGContextScaleCTM(inContext, 1, -1);
@@ -560,10 +553,6 @@ OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGIm
CGContextDrawImage(inContext, *inBounds, inImage);

CGContextRestoreGState(inContext);
-InvalidImage:
-InvalidBounds:
-InvalidContext:
- return err;
}

Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
--
2.7.4
34 changes: 34 additions & 0 deletions depends/patches/qt/qfixed-coretext.patch
@@ -0,0 +1,34 @@
From dbdd5f0ffbce52c8b789ed09f1aa3f1da6c02e23 Mon Sep 17 00:00:00 2001
From: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Date: Fri, 30 Mar 2018 11:58:16 -0700
Subject: [PATCH] QCoreTextFontEngine: Fix build with Xcode 9.3

Apple LLVM version 9.1.0 (clang-902.0.39.1)

Error message:

.../qfontengine_coretext.mm:827:20: error: qualified reference to
'QFixed' is a constructor name rather than a type in this context
return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));

Change-Id: Iebe26b3b087a16b10664208fc8851cbddb47f043
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
---
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index 25ff69d877d..98b753eff96 100644
--- old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -824,7 +824,7 @@ void QCoreTextFontEngine::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, gl

QFixed QCoreTextFontEngine::emSquareSize() const
{
- return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
+ return QFixed(int(CTFontGetUnitsPerEm(ctfont)));
}

QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const
--
2.16.3
3 changes: 2 additions & 1 deletion doc/bips.md
@@ -1,4 +1,4 @@
BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.13.0**):
BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.16.0**):

* [`BIP 9`](https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki): The changes allowing multiple soft-forks to be deployed in parallel have been implemented since **v0.12.1** ([PR #7575](https://github.com/bitcoin/bitcoin/pull/7575))
* [`BIP 11`](https://github.com/bitcoin/bips/blob/master/bip-0011.mediawiki): Multisig outputs are standard since **v0.6.0** ([PR #669](https://github.com/bitcoin/bitcoin/pull/669)).
Expand Down Expand Up @@ -34,4 +34,5 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.13.0**):
* [`BIP 147`](https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki): NULLDUMMY softfork as of **v0.13.1** ([PR 8636](https://github.com/bitcoin/bitcoin/pull/8636) and [PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)).
* [`BIP 152`](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki): Compact block transfer and related optimizations are used as of **v0.13.0** ([PR 8068](https://github.com/bitcoin/bitcoin/pull/8068)).
* [`BIP 159`](https://github.com/bitcoin/bips/blob/master/bip-0159.mediawiki): NODE_NETWORK_LIMITED service bit [signaling only] is supported as of **v0.16.0** ([PR 11740](https://github.com/bitcoin/bitcoin/pull/11740)).
* [`BIP 173`](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki): Bech32 addresses for native Segregated Witness outputs are supported as of **v0.16.0** ([PR 11167](https://github.com/bitcoin/bitcoin/pull/11167)).
* [`BIP 176`](https://github.com/bitcoin/bips/blob/master/bip-0176.mediawiki): Bits Denomination [QT only] is supported as of **v0.16.0** ([PR 12035](https://github.com/bitcoin/bitcoin/pull/12035)).
43 changes: 8 additions & 35 deletions doc/build-windows.md
Expand Up @@ -5,8 +5,8 @@ Below are some notes on how to build Litecoin Core for Windows.

The options known to work for building Litecoin Core on Windows are:

* On Linux using the [Mingw-w64](https://mingw-w64.org/doku.php) cross compiler tool chain. Ubuntu Trusty 14.04 is recommended
and is the platform used to build the Litecoin Core Windows release binaries.
* On Linux using the [Mingw-w64](https://mingw-w64.org/doku.php) cross compiler tool chain. Ubuntu Bionic 18.04 is required
and is the platform used to build the Bitcoin Core Windows release binaries.
* On Windows using [Windows
Subsystem for Linux (WSL)](https://msdn.microsoft.com/commandline/wsl/about) and the Mingw-w64 cross compiler tool chain.

Expand Down Expand Up @@ -39,10 +39,10 @@ To install WSL on Windows 10 with Fall Creators Update installed (version >= 162
* Click OK
* Restart if necessary
2. Install Ubuntu
* Open Microsoft Store and search for Ubuntu or use [this link](https://www.microsoft.com/store/productId/9NBLGGH4MSV6)
* Open Microsoft Store and search for "Ubuntu 18.04" or use [this link](https://www.microsoft.com/store/productId/9N9TNGVNDL3Q)
* Click Install
3. Complete Installation
* Open a cmd prompt and type "Ubuntu"
* Open a cmd prompt and type "Ubuntu1804"
* Create a new UNIX user account (this is a separate account from your Windows account)

After the bash shell is active, you can follow the instructions below, starting
Expand All @@ -52,11 +52,6 @@ recommended but it is possible to compile the 32-bit version.
Cross-compilation for Ubuntu and Windows Subsystem for Linux
------------------------------------------------------------

At the time of writing the Windows Subsystem for Linux installs Ubuntu Xenial 16.04. The Mingw-w64 package
for Ubuntu Xenial does not produce working executables for some of the Litecoin Core applications.
It is possible to build on Ubuntu Xenial by installing the cross compiler packages from Ubuntu Zesty, see the steps below.
Building on Ubuntu Zesty 17.04 up to 17.10 has been verified to work.

The steps below can be performed on Ubuntu (including in a VM) or WSL. The depends system
will also work on other Linux distributions, however the commands for
installing the toolchain will be different.
Expand All @@ -73,26 +68,11 @@ See also: [dependencies.md](dependencies.md).

## Building for 64-bit Windows

The first step is to install the mingw-w64 cross-compilation tool chain. Due to different Ubuntu
packages for each distribution and problems with the Xenial packages the steps for each are different.

Common steps to install mingw32 cross compiler tool chain:
The first step is to install the mingw-w64 cross-compilation tool chain.

sudo apt install g++-mingw-w64-x86-64

Ubuntu Trusty 14.04:

No further steps required

Ubuntu Xenial 16.04 and Windows Subsystem for Linux <sup>[1](#footnote1),[2](#footnote2)</sup>:

sudo apt install software-properties-common
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu zesty universe"
sudo apt update
sudo apt upgrade
sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.

Ubuntu Zesty 17.04 <sup>[2](#footnote2)</sup>:
Ubuntu Bionic 18.04 <sup>[1](#footnote1)</sup>:

sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.

Expand Down Expand Up @@ -124,7 +104,7 @@ To build executables for Windows 32-bit, install the following dependencies:

sudo apt install g++-mingw-w64-i686 mingw-w64-i686-dev

For Ubuntu Xenial 16.04, Ubuntu Zesty 17.04 and Windows Subsystem for Linux <sup>[2](#footnote2)</sup>:
For Ubuntu Bionic 18.04 and Windows Subsystem for Linux <sup>[1](#footnote1)</sup>:

sudo update-alternatives --config i686-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.

Expand Down Expand Up @@ -165,14 +145,7 @@ way. This will install to `c:\workspace\litecoin`, for example:
Footnotes
---------

<a name="footnote1">1</a>: There is currently a bug in the 64 bit Mingw-w64 cross compiler packaged for WSL/Ubuntu Xenial 16.04 that
causes two of the litecoin executables to crash shortly after start up. The bug is related to the
-fstack-protector-all g++ compiler flag which is used to mitigate buffer overflows.
Installing the Mingw-w64 packages from the Ubuntu 17 distribution solves the issue, however, this is not
an officially supported approach and it's only recommended if you are prepared to reinstall WSL/Ubuntu should
something break.

<a name="footnote2">2</a>: Starting from Ubuntu Xenial 16.04 both the 32 and 64 bit Mingw-w64 packages install two different
<a name="footnote1">1</a>: Starting from Ubuntu Xenial 16.04 both the 32 and 64 bit Mingw-w64 packages install two different
compiler options to allow a choice between either posix or win32 threads. The default option is win32 threads which is the more
efficient since it will result in binary code that links directly with the Windows kernel32.lib. Unfortunately, the headers
required to support win32 threads conflict with some of the classes in the C++11 standard library in particular std::mutex.
Expand Down

0 comments on commit 4c20019

Please sign in to comment.