Also adds a patch to Qts internal libpng, to fix compilation using Clang 18, when targetting macOS. I’d like to get this patched, so we can continue working on removing FORCE_USE_SYSTEM_CLANG (#30201); otherwise builds will be broken using the default Clang (18) on the current Ubuntu LTS (24.04).
With this PR, anyone using Ubuntu 24.04 should be able to apt install clang llvm lld, and then cross-compile for macOS using:
0# clang --version
1Ubuntu clang version 18.1.3 (1)
2make -C depends HOST=arm64-apple-darwin FORCE_USE_SYSTEM_CLANG=1
3./autogen.sh
4CONFIG_SITE=/path/to/depends/arm64-apple-darwin/share/config.site ./configure
5make
6# file src/qt/bitcoin-qt
7src/qt/bitcoin-qt: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE|HAS_TLV_DESCRIPTORS>