This PR fixes cross compiling on systems with both enabled binfmt_misc
kernel feature and installed wine-binfmt
package:
0$ cat /proc/sys/fs/binfmt_misc/status
1enabled
2$ dpkg -l wine-binfmt
3Desired=Unknown/Install/Remove/Purge/Hold
4| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
5|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
6||/ Name Version Architecture Description
7+++-==============-============-============-========================================================
8ii wine-binfmt 5.0-3ubuntu1 all Register Wine as the interpreter for Windows executables
On master (f727d814bd8df5a5346c128dd4573e457c1970e1):
0$ CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure 2>&1 | grep -e 'checking whether we are cross compiling'
1checking whether we are cross compiling... no
2checking whether we are cross compiling... no
With this PR:
0$ CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure 2>&1 | grep -e 'checking whether we are cross compiling'
1checking whether we are cross compiling... yes
2checking whether we are cross compiling... yes
Guix build:
0$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
16b91e005fb0243f5b40470f6bee515b96ee7a05cf8a639a5caa8b967e80b0d25 guix-build-06c8fb66fbc2/output/dist-archive/bitcoin-06c8fb66fbc2.tar.gz
243759a18e2272ae77cbe268a938746070fa2870ab303ecf727a730f6cc01b580 guix-build-06c8fb66fbc2/output/x86_64-w64-mingw32/SHA256SUMS.part
37888ccdfc3753949d9a4c018b329dd9a48b62ece3188f428dde666e44319a381 guix-build-06c8fb66fbc2/output/x86_64-w64-mingw32/bitcoin-06c8fb66fbc2-win-unsigned.tar.gz
4921dae20148bce7ea3973cc034da8186e7a92c7ba6e42a233e62d986ecaac3fd guix-build-06c8fb66fbc2/output/x86_64-w64-mingw32/bitcoin-06c8fb66fbc2-win64-debug.zip
5501581fbd32d4fa8371aefa3a8d6610d2e1ac52f261b03e763f14af1d10410d0 guix-build-06c8fb66fbc2/output/x86_64-w64-mingw32/bitcoin-06c8fb66fbc2-win64-setup-unsigned.exe
65c2c8b53780689253f9de20d30b60dacc82c12ed8a81660ae112e53f675d749a guix-build-06c8fb66fbc2/output/x86_64-w64-mingw32/bitcoin-06c8fb66fbc2-win64.zip
Fixes bitcoin/bitcoin#22854.