merge bitcoin#19817: macOS toolchain bump

This commit is contained in:
Kittywhiskers Van Gogh 2021-10-05 08:04:26 +05:30
parent cbf81a7dc8
commit 091477d853
9 changed files with 27 additions and 63 deletions

View File

@ -37,8 +37,8 @@ builder-image:
image: $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG image: $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG
variables: variables:
SDK_URL: https://bitcoincore.org/depends-sources/sdks SDK_URL: https://bitcoincore.org/depends-sources/sdks
XCODE_VERSION: 11.3.1 XCODE_VERSION: "12.1"
XCODE_BUILD_ID: 11C505 XCODE_BUILD_ID: 12A7403
MAKEJOBS: -j4 MAKEJOBS: -j4
before_script: before_script:
- echo HOST=$HOST - echo HOST=$HOST

View File

@ -71,8 +71,8 @@ def build():
if args.macos: if args.macos:
print('\nCompiling ' + args.version + ' MacOS') print('\nCompiling ' + args.version + ' MacOS')
subprocess.check_call(['wget', '-N', '-P', 'inputs', 'https://bitcoincore.org/depends-sources/sdks/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz']) subprocess.check_call(['wget', '-N', '-P', 'inputs', 'https://bitcoincore.org/depends-sources/sdks/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz'])
subprocess.check_output(["echo '436df6dfc7073365d12f8ef6c1fdb060777c720602cc67c2dcf9a59d94290e38 inputs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz' | sha256sum -c"], shell=True) subprocess.check_output(["echo 'be17f48fd0b08fb4dcd229f55a6ae48d9f781d210839b4ea313ef17dd12d6ea5 inputs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz' | sha256sum -c"], shell=True)
subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'dash='+args.commit, '--url', 'dash='+args.url, '../dash/contrib/gitian-descriptors/gitian-osx.yml']) subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'dash='+args.commit, '--url', 'dash='+args.url, '../dash/contrib/gitian-descriptors/gitian-osx.yml'])
subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-osx-unsigned', '--destination', '../gitian.sigs/', '../dash/contrib/gitian-descriptors/gitian-osx.yml']) subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-osx-unsigned', '--destination', '../gitian.sigs/', '../dash/contrib/gitian-descriptors/gitian-osx.yml'])
subprocess.check_call('mv build/out/dashcore-*-osx-unsigned.tar.gz inputs/', shell=True) subprocess.check_call('mv build/out/dashcore-*-osx-unsigned.tar.gz inputs/', shell=True)

View File

@ -33,7 +33,7 @@ remotes:
- "url": "https://github.com/dashpay/dash.git" - "url": "https://github.com/dashpay/dash.git"
"dir": "dash" "dir": "dash"
files: files:
- "Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz" - "Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz"
script: | script: |
set -e -o pipefail set -e -o pipefail
@ -109,7 +109,7 @@ script: |
BASEPREFIX="${PWD}/depends" BASEPREFIX="${PWD}/depends"
mkdir -p ${BASEPREFIX}/SDKs mkdir -p ${BASEPREFIX}/SDKs
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz
# Build dependencies for each host # Build dependencies for each host
for i in $HOSTS; do for i in $HOSTS; do

View File

@ -17,9 +17,9 @@ When complete, it will have produced `Dash-Qt.dmg`.
### Step 1: Obtaining `Xcode.app` ### Step 1: Obtaining `Xcode.app`
Our current macOS SDK Our current macOS SDK
(`Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`) can be (`Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz`) can be
extracted from extracted from
[Xcode_11.3.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip). [Xcode_12.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_12.1/Xcode_12.1.xip).
An Apple ID is needed to download this. An Apple ID is needed to download this.
After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip` After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip`
@ -31,25 +31,25 @@ approach (tested on Debian Buster) is outlined below:
apt install cpio apt install cpio
git clone https://github.com/bitcoin-core/apple-sdk-tools.git git clone https://github.com/bitcoin-core/apple-sdk-tools.git
# Unpack Xcode_11.3.1.xip and place the resulting Xcode.app in your current # Unpack Xcode_12.1.xip and place the resulting Xcode.app in your current
# working directory # working directory
python3 apple-sdk-tools/extract_xcode.py -f Xcode_11.3.1.xip | cpio -d -i python3 apple-sdk-tools/extract_xcode.py -f Xcode_12.1.xip | cpio -d -i
``` ```
On macOS the process is more straightforward: On macOS the process is more straightforward:
```bash ```bash
xip -x Xcode_11.3.1.xip xip -x Xcode_12.1.xip
``` ```
### Step 2: Generating `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app` ### Step 2: Generating `Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app`
To generate `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`, run To generate `Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz`, run
the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the
previous stage) as the first argument. previous stage) as the first argument.
```bash ```bash
# Generate a Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz from # Generate a Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz from
# the supplied Xcode.app # the supplied Xcode.app
./contrib/macdeploy/gen-sdk '/path/to/Xcode.app' ./contrib/macdeploy/gen-sdk '/path/to/Xcode.app'
``` ```

View File

@ -1,8 +1,8 @@
OSX_MIN_VERSION=10.14 OSX_MIN_VERSION=10.14
OSX_SDK_VERSION=10.15.1 OSX_SDK_VERSION=10.15.6
XCODE_VERSION=11.3.1 XCODE_VERSION=12.1
XCODE_BUILD_ID=11C505 XCODE_BUILD_ID=12A7403
LD64_VERSION=530 LD64_VERSION=609
OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers
@ -60,16 +60,11 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(
# Explicitly point to our binaries (e.g. cctools) so that they are # Explicitly point to our binaries (e.g. cctools) so that they are
# ensured to be found and preferred over other possibilities. # ensured to be found and preferred over other possibilities.
# #
# -stdlib=libc++ -nostdinc++ -Xclang -cxx-isystem$(OSX_SDK)/usr/include/c++/v1 # -stdlib=libc++ -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1
# #
# Forces clang to use the libc++ headers from our SDK and completely # Forces clang to use the libc++ headers from our SDK and completely
# forget about the libc++ headers from the standard directories # forget about the libc++ headers from the standard directories
# #
# TODO: Once we start requiring a clang version that has the
# -stdlib++-isystem<directory> flag first introduced here:
# https://reviews.llvm.org/D64089, we should use that instead. Read the
# differential summary there for more details.
#
# -Xclang -*system<path_a> \ # -Xclang -*system<path_a> \
# -Xclang -*system<path_b> \ # -Xclang -*system<path_b> \
# -Xclang -*system<path_c> ... # -Xclang -*system<path_c> ...
@ -109,8 +104,8 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
$(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ $(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
-isysroot$(OSX_SDK) \ -isysroot$(OSX_SDK) \
-stdlib=libc++ -nostdinc++ \ -stdlib=libc++ \
-Xclang -cxx-isystem$(OSX_SDK)/usr/include/c++/v1 \ -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 \
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \ -Xclang -internal-externc-isystem$(clang_resource_dir)/include \
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include

View File

@ -1,10 +1,9 @@
package=native_cctools package=native_cctools
$(package)_version=55562e4073dea0fbfd0b20e0bf69ffe6390c7f97 $(package)_version=2ef2e931cf641547eb8a68cfebde61003587c9fd
$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive $(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive
$(package)_file_name=$($(package)_version).tar.gz $(package)_file_name=$($(package)_version).tar.gz
$(package)_sha256_hash=e51995a843533a3dac155dd0c71362dd471597a2d23f13dff194c6285362f875 $(package)_sha256_hash=6b73269efdf5c58a070e7357b66ee760501388549d6a12b423723f45888b074b
$(package)_build_subdir=cctools $(package)_build_subdir=cctools
$(package)_patches=ld64_disable_threading.patch
$(package)_dependencies=native_libtapi $(package)_dependencies=native_libtapi
define $(package)_set_vars define $(package)_set_vars
@ -17,10 +16,6 @@ define $(package)_set_vars
$(package)_cxx=$(clangxx_prog) $(package)_cxx=$(clangxx_prog)
endef endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/ld64_disable_threading.patch
endef
define $(package)_config_cmds define $(package)_config_cmds
$($(package)_autoconf) $($(package)_autoconf)
endef endef

View File

@ -1,9 +1,9 @@
package=native_libtapi package=native_libtapi
$(package)_version=3efb201881e7a76a21e0554906cf306432539cef $(package)_version=664b8414f89612f2dfd35a9b679c345aa5389026
$(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive $(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive
$(package)_download_file=$($(package)_version).tar.gz $(package)_download_file=$($(package)_version).tar.gz
$(package)_file_name=$($(package)_version).tar.gz $(package)_file_name=$($(package)_version).tar.gz
$(package)_sha256_hash=380c1ca37cfa04a8699d0887a8d3ee1ad27f3d08baba78887c73b09485c0fbd3 $(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
$(package)_dependencies=native_clang $(package)_dependencies=native_clang

View File

@ -1,26 +0,0 @@
commit 584668415039adeed073decee7e04de28248afd3
Author: fanquake <fanquake@gmail.com>
Date: Tue Aug 18 01:20:24 2020 +0000
Disable threading to fix non-determinism
A bug in the file parser can cause dependencies to be calculated
differently based on which files have already been parsed. This is more
likely to occur on systems with more CPUs.
Just disable threading for now. There is no noticable slowdown.
See #9891.
diff --git a/cctools/ld64/src/ld/InputFiles.h b/cctools/ld64/src/ld/InputFiles.h
index ef9c756..90a70b6 100644
--- a/cctools/ld64/src/ld/InputFiles.h
+++ b/cctools/ld64/src/ld/InputFiles.h
@@ -25,7 +25,6 @@
#ifndef __INPUT_FILES_H__
#define __INPUT_FILES_H__
-#define HAVE_PTHREADS 1
#include <stdlib.h>
#include <sys/types.h>

View File

@ -19,8 +19,8 @@ Additionally, the Mac OSX SDK must be downloaded and extracted manually:
```bash ```bash
$ mkdir -p depends/sdk-sources $ mkdir -p depends/sdk-sources
$ mkdir -p depends/SDKs $ mkdir -p depends/SDKs
$ curl https://bitcoincore.org/depends-sources/sdks/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz -o depends/sdk-sources/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz $ curl https://bitcoincore.org/depends-sources/sdks/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz -o depends/sdk-sources/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz
$ tar -C depends/SDKs -xf depends/sdk-sources/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz $ tar -C depends/SDKs -xf depends/sdk-sources/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz
``` ```
When building the dependencies, as described in [build-generic](build-generic.md), use When building the dependencies, as described in [build-generic](build-generic.md), use