diff options
author | fanquake <fanquake@gmail.com> | 2020-05-12 15:44:52 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-05-14 09:46:18 +0800 |
commit | e8a8cff07c409c7eecd478d3df36c7ba92c59730 (patch) | |
tree | 9b70a1ea2b99dd4c994f8fa995a1d7a16cc663c9 /configure.ac | |
parent | 04c09553d89809cf6328679d7535ecaa0070485d (diff) | |
download | bitcoin-e8a8cff07c409c7eecd478d3df36c7ba92c59730.tar.xz |
build: enforce minimum required Windows version (7)
Instruct the linker to set the major & minor subsystem versions in the PE
header to 6 & 1 (NT 6.1 which corresponds to Windows 7). Similar to
macOS, the binary will now refuse to run on unsupported versions of
Windows.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index dc7d34e55e..58f464a73a 100644 --- a/configure.ac +++ b/configure.ac @@ -595,6 +595,8 @@ case $host in archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib" postdeps_CXX= + dnl We require Windows 7 (NT 6.1) or later + AX_CHECK_LINK_FLAG([[-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1]],[LDFLAGS="$LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"],,[[$LDFLAG_WERROR]]) ;; *darwin*) TARGET_OS=darwin |