-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport macOS PRs #6808
Draft
str4d
wants to merge
28
commits into
zcash:master
Choose a base branch
from
str4d:5884-macos-backports
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Backport macOS PRs #6808
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit bitcoin/bitcoin@d5f4683)
Zcash: Applies to 2015 for Zcash purposes. (cherry picked from commit bitcoin/bitcoin@1a6c67c)
(cherry picked from commit bitcoin/bitcoin@de619a3)
…e name This helps avoid accidental removal of upstream copyright names (cherry picked from commit bitcoin/bitcoin@917b1d0)
(cherry picked from commit bitcoin/bitcoin@3cae140)
Zcash: We don't have `share/setup.nsi.in` anymore, but this will ensure that any uses of `@PACKAGE_URL@` in future will be substituted. (cherry picked from commit bitcoin/bitcoin@29598e4)
…ons so it gets passed to extract-strings correctly (cherry picked from commit bitcoin/bitcoin@cddffaf)
…ctly (cherry picked from commit bitcoin/bitcoin@cc2095e)
…add a second line to copyrights in -version, About dialog, and splash screen (cherry picked from commit bitcoin/bitcoin@027fdb8)
(cherry picked from commit bitcoin/bitcoin@bb077fa)
Currently these test failures are not caught by travis leading to bugs like: bitcoin/bitcoin#10506 Zcash: Only the changes to the depends build system. (cherry picked from commit bitcoin/bitcoin@4f92b5f)
(cherry picked from commit bitcoin/bitcoin@0d00fd5)
(cherry picked from commit bitcoin/bitcoin@0e519fe)
Previously, if ./configure was invoked with: ``` $ env CONFIG_SITE=depends/x86_64-pc-linux-gnu/share/config.site ./configure ``` Where $CONFIG_SITE was a relative path, ./configure would fail with the following misleading output: ``` checking for boostlib >= 1.58.0 (105800)... yes checking whether the Boost::System library is available... yes configure: error: Could not find a version of the Boost::System library! ``` Fully resolving depends_prefix in config.site.in fixes this. To make sure that there are no other side effects I ran a diff on the config.status generated by: 1. The scripts prior to this change with CONFIG_SITE set to a full path: env CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure 2. The scripts after this change with CONFIG_SITE set to a relative path: env CONFIG_SITE=depends/x86_64-pc-linux-gnu/share/config.site ./configure And it looks good! Diff: https://paste.sr.ht/~dongcarl/95b469fbc555c128046e85723d87a9082a754f6b (cherry picked from commit bitcoin/bitcoin@6c7e8f0)
Files like config.site.in are not referenced by any other script in our tree, so we need to mark it manually with a "shellcheck shell=" directive and make sure that shellcheck is run on them. (cherry picked from commit bitcoin/bitcoin@618cbd2)
Previously, when running ./configure: 1. With CONFIG_SITE pointed to our depends config.site.in, and 2. PYTHONPATH was not set either in the environment or by the user The configure would output something like: PYTHONPATH='depends/x86_64-pc-linux-gnu/share/../native/lib/python3/dist-packages:' When we really mean: PYTHONPATH='depends/x86_64-pc-linux-gnu/share/../native/lib/python3/dist-packages' ...without the colon This change makes sure that: 1. There's no trailing colon, and 2. We use the $PATH_SEPARATOR variable instead of a colon (cherry picked from commit bitcoin/bitcoin@46756a6)
(cherry picked from commit bitcoin/bitcoin@63c74d2)
Catalina SDK clang stopped automatically searching the SDK include paths when invoked without --sysroot: bitcoin/bitcoin#16367 (comment) Homebrew/homebrew-core#45061 This hasn't been a problem for current native depends packages because are passing their own --sysroot values, and hasn't been a problem for current host packages because they use `darwin_` commands instead of `build_darwin_` commands. But the current `build_darwin_CC` and `build_darwin_CXX` commands are still unnecessarily fragile, and incompatible with new native depends packages added in bitcoin/bitcoin#18677. Cory Fields <cory-nospam-@coryfields.com> suggested in bitcoin/bitcoin#16367 (comment) switching compiler from SDK clang to native clang (from $PATH) to avoid this problem. This is easy and makes a certain amount of sense for building native packages, as opposed to host packages. But fanquake <fanquake@gmail.com> pointed out in bitcoin/bitcoin#18677 (comment) that it would be inconsistent use switch to non-SDK compilers while still using other SDK tools like ranlib and install_name_tool. So simplest, minimal fix seems to be just adding the missing --sysroot option. (cherry picked from commit bitcoin/bitcoin@1e94a2b)
Prior to this commit, when int_vars was called for packages, it would immediately expand the "single-dollar variables", which may be defined in terms of variables which are not yet determined (e.g. variables defined in package/*.mk, which are included after int_vars is called). This is required for the next commit as after that commit, for darwin cross-builds: 0. int_vars is defined in terms of $(1)_cc 1. $(1)_cc is defined in terms of darwin_CC 2. ... which is defined in terms of clang_resource_dir 3. ... which is defined in terms of native_cctools_clang_version 4. which is undetermined at the time when int_vars is being expanded and evaluated (cherry picked from commit bitcoin/bitcoin@107f33d)
Zcash: Excludes `FORCE_USE_SYSTEM_CLANG` changes. (cherry picked from commit bitcoin/bitcoin@3007339)
clang warns when a command line option is unused, and some of our tests use Werror, so unfortunately we cannot use this flag to pin our linker for now. Leaving this commit in for future reference, as it would be great if there's more granularity to Werror and we can be explicit about what linker we want to use. (cherry picked from commit bitcoin/bitcoin@77b1ef8)
SC2086 is disabled in our linter script so this wasn't caught. (cherry picked from commit bitcoin/bitcoin@8033110)
Instead of doing the awkward /bin path prepending at config.site creation time, set darwin_{CC,CXX} in a way that fully determines the program's path (clang/clang++) similar to how AC_PATH_{TOOL,PROG} would do. Also see the added comment block in depends/Makefile for more context on determining $PATH for our config.site. Zcash: - `default_host_{CC,CXX}` are adjusted to be absolute paths to the pinned binaries. - Excludes `FORCE_USE_SYSTEM_CLANG` changes. (cherry picked from commit bitcoin/bitcoin@880660a)
See previous commit for description. Zcash: `default_host_*` are adjusted to be absolute paths to the pinned binaries. (cherry picked from commit bitcoin/bitcoin@949c480)
Zcash: Merged into our existing `native_clang` pinning. (cherry picked from commit bitcoin/bitcoin@765e0be)
(cherry picked from commit bitcoin/bitcoin@cf971c9)
(cherry picked from commit bitcoin/bitcoin@9b193cd)
(cherry picked from commit bitcoin/bitcoin@9ed2f19)
str4d
added
A-build
Area: Build system
C-upstream-port
Category: Changes that are ported from the Bitcoin Core codebase.
labels
Dec 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-build
Area: Build system
C-upstream-port
Category: Changes that are ported from the Bitcoin Core codebase.
O-macos
Operating system: macOS
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft PR opened for testing these changes in CI. This PR will likely be broken into several separate PRs.
Closes #5884.