> depends: Delay expansion of per-package vars
>
> 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
> depends: Pin clang search paths for darwin host
> depends: Remove -fuse-ld line
>
> 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.
> depends: Fully determine path for darwin_{CC,CXX}
>
> 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.
> depends: Fully determine path for darwin cctools
>
> See previous commit for description.
> depends: Add comment about cache invalidation
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19683 | core#19683]]
Depends on D13766
Most changes in depends/Makefile are not applicable (D7671)