diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-12-17 21:31:07 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-12-17 21:34:35 +0100 |
commit | 816314ef0f7bdf50a6596ef893ac1a1d2d8723bf (patch) | |
tree | 1bfa349bf6f658b468c9529ebc21b38e864bb0f7 /depends/packages | |
parent | b7136c11ab6448142cfcc617babe866e428eeeb4 (diff) | |
parent | a4118c6e200e02e7560f8bc213697aa2909d95b1 (diff) | |
download | bitcoin-816314ef0f7bdf50a6596ef893ac1a1d2d8723bf.tar.xz |
Merge #20644: Add patch to make codesign_allocate compatible with Apple's
a4118c6e200e02e7560f8bc213697aa2909d95b1 Add patch to make codesign_allocate compatible with Apple's (Pieter Wuille)
Pull request description:
This is an alternative to #20638.
The problem is that Apple's codesign(_allocate) apparently rounds the "vmsize" attribute on the __LINKEDIT section to a multiple of 0x2000 on x86_64 rather than 0x1000 (as their published source code does). This divergence means that the binary signed by codesign is slightly different from the one recreated by our reattach-sig-to-gitian-output process, and the signature being invalid.
This fixes it by patching our codesign_allocate source code to also use 0x2000. In tests, this appears to result in matching binaries.
ACKs for top commit:
jonasschnelli:
Tested ACK a4118c6e200e02e7560f8bc213697aa2909d95b1 - removed the osx cache, built commit a4118c6e200e02e7560f8bc213697aa2909d95b1 for osx in gitian (dependency where built, patch was applied), signed on my signing mac (detach-sig-create), ran gitian osx signer with the produces signature and the a4118c6e200e02e7560f8bc213697aa2909d95b1 build (detach-sig-apply), signature then was successful verified on my Mac (codesign -v /Volumes/Bitcoin-Core/Bitcoin-Qt.app)
MarcoFalke:
Concept ACK a4118c6e200e02e7560f8bc213697aa2909d95b1
Tree-SHA512: 07b8cdf8216249ddfe4bd38b39f2b48b2e190d4002b84d8981e62197bbbc9f25ac5c137bcc32057b23fbf38cbb2889ef95101ce008edfbf608cd170b88b3acbc
Diffstat (limited to 'depends/packages')
-rw-r--r-- | depends/packages/native_cctools.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index d56b636695..33f69375cc 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -4,7 +4,7 @@ $(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=e51995a843533a3dac155dd0c71362dd471597a2d23f13dff194c6285362f875 $(package)_build_subdir=cctools -$(package)_patches=ld64_disable_threading.patch +$(package)_patches=ld64_disable_threading.patch segalign.patch ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) $(package)_clang_version=8.0.0 @@ -80,7 +80,8 @@ endef define $(package)_preprocess_cmds CC=$($(package)_cc) CXX=$($(package)_cxx) INSTALLPREFIX=$($(package)_extract_dir) ./libtapi/build.sh && \ CC=$($(package)_cc) CXX=$($(package)_cxx) INSTALLPREFIX=$($(package)_extract_dir) ./libtapi/install.sh && \ - patch -p1 < $($(package)_patch_dir)/ld64_disable_threading.patch + patch -p1 < $($(package)_patch_dir)/ld64_disable_threading.patch && \ + patch -p1 < $($(package)_patch_dir)/segalign.patch endef define $(package)_config_cmds |