From ##bitcoin-core-gui
IRC channel:
<fanquake> hebasto: I think I might have solved the darkmode issue, or at least some of the macOS qt problems. Will PR shortly <hebasto> was I on the right way? <fanquake> Yes I think it’s related to how the SDK is being setup <hebasto> fanquake: expecting of adding
-Wl,-sdk_version
to linker flags :) <fanquake> hebasto: heh. That may be added at some point, however I think the solution here will be even simpler
Assuming, that fanquake’s solution does not involve linker flags, I’m suggesting an alternative one that does use them.
When doing static builds, for some reasons, SDK version is not handled correctly when Darwin Driver passes it to a linker via the
-platform_version
option.
With this PR we pass the -platform_version
option to a linker explicitly.
Fix #21771.
This change causes harmless warnings:
0ld: warning: passed two min versions (10.14.0, 10.14) for platform macOS. Using 10.14.
Building with depends on macOS Big Sur 11.2.3 (20D91):
0% ld -v
1@(#)PROGRAM:ld PROJECT:ld64-609.8
2BUILD 15:07:46 Dec 18 2020
3configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
4LTO support using: LLVM version 12.0.0, (clang-1200.0.32.29) (static support for 27, runtime is 27)
5TAPI support using: Apple TAPI version 12.0.0 (tapi-1200.0.23.5)
- on master (683dda2a70e7a210996fa34be23bd0c563971ba9)
0% otool -l src/qt/bitcoin-qt | grep -A 7 -B 1 BUILD_VERSION
1Load command 9
2 cmd LC_BUILD_VERSION
3 cmdsize 32
4 platform 1
5 minos 10.14
6 sdk n/a
7 ntools 1
8 tool 3
9 version 609.8
- with this PR
0% otool -l src/qt/bitcoin-qt | grep -A 7 -B 1 BUILD_VERSION
1Load command 9
2 cmd LC_BUILD_VERSION
3 cmdsize 32
4 platform 1
5 minos 10.14
6 sdk 11.1
7 ntools 1
8 tool 3
9 version 609.8