From 35b898c47f8af6807c4a5f404af165c663c81a99 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 28 Oct 2024 11:23:18 +0000 Subject: [PATCH] release: target Windows 10 or later While we will only outwardly support Windows 10+, due to an issue in mingw-w64, we can't set the *-subsystem-version values higher than to target Windows 8, so do that as a best effort. --- CMakeLists.txt | 10 ++++++---- contrib/devtools/symbol-check.py | 2 +- contrib/devtools/test-symbol-check.py | 4 ++-- doc/release-notes-empty-template.md | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a02a0ee5d..e6b65c2e02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -253,8 +253,8 @@ if(WIN32) ]=] target_compile_definitions(core_interface INTERFACE - _WIN32_WINNT=0x0601 - _WIN32_IE=0x0501 + _WIN32_WINNT=0x0A00 + _WIN32_IE=0x0A00 WIN32_LEAN_AND_MEAN NOMINMAX ) @@ -292,9 +292,11 @@ if(WIN32) # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412. try_append_cxx_flags("-Wa,-muse-unaligned-vector-move" TARGET core_interface SKIP_LINK) try_append_linker_flag("-static" TARGET core_interface) - # We require Windows 7 (NT 6.1) or later. + # We support Windows 10+, however it's not possible to set these values accordingly, + # due to a bug in mingw-w64. See https://sourceforge.net/p/mingw-w64/bugs/968/. + # As a best effort, target Windows 8. try_append_linker_flag("-Wl,--major-subsystem-version,6" TARGET core_interface) - try_append_linker_flag("-Wl,--minor-subsystem-version,1" TARGET core_interface) + try_append_linker_flag("-Wl,--minor-subsystem-version,2" TARGET core_interface) endif() endif() diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index 3f6010280a..564f1db5ac 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -260,7 +260,7 @@ def check_PE_libraries(binary) -> bool: def check_PE_subsystem_version(binary) -> bool: major: int = binary.optional_header.major_subsystem_version minor: int = binary.optional_header.minor_subsystem_version - if major == 6 and minor == 1: + if major == 6 and minor == 2: return True return False diff --git a/contrib/devtools/test-symbol-check.py b/contrib/devtools/test-symbol-check.py index c75a5e1546..b4b524dac0 100755 --- a/contrib/devtools/test-symbol-check.py +++ b/contrib/devtools/test-symbol-check.py @@ -135,7 +135,7 @@ class TestSymbolChecks(unittest.TestCase): } ''') - self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']), + self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']), (1, 'pdh.dll is not in ALLOWED_LIBRARIES!\n' + executable + ': failed DYNAMIC_LIBRARIES')) @@ -166,7 +166,7 @@ class TestSymbolChecks(unittest.TestCase): } ''') - self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']), + self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']), (0, '')) diff --git a/doc/release-notes-empty-template.md b/doc/release-notes-empty-template.md index 1ff55b5ccc..bd4600b395 100644 --- a/doc/release-notes-empty-template.md +++ b/doc/release-notes-empty-template.md @@ -42,8 +42,8 @@ codesign -s - bitcoin-cli bitcoin-qt bitcoin-tx bitcoin-util bitcoin-wallet bitc Compatibility ============== -Bitcoin Core is supported and extensively tested on operating systems -using the Linux Kernel 3.17+, macOS 13.0+, and Windows 7 and newer. Bitcoin +Bitcoin Core is supported and tested on operating systems using the +Linux Kernel 3.17+, macOS 13.0+, and Windows 10 and newer. Bitcoin Core should also work on most other Unix-like systems but is not as frequently tested on them. It is not recommended to use Bitcoin Core on unsupported systems.