Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Set minimum required Windows version to Windows 7 #5204

Merged
merged 15 commits into from
Jun 5, 2021

Commits on Jun 5, 2021

  1. windows: Set _WIN32_WINNT to 0x0601 (Windows 7)

    Also remove all defines in many places and define it in configure stage to keep consistency.
    
    (cherry picked from commit 1bd9ffd)
    ken2812221 authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    4ea1f9c View commit details
    Browse the repository at this point in the history
  2. windows: Call SetProcessDEPPolicy directly

    (cherry picked from commit d8a2992)
    ken2812221 authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    abd0471 View commit details
    Browse the repository at this point in the history
  3. Drop defunct Windows compat fixes

    "The AI_ADDRCONFIG flag is defined on the Windows SDK for Windows Vista
    and later. The AI_ADDRCONFIG flag is supported on Windows Vista and
    later."
    https://docs.microsoft.com/en-us/windows/desktop/api/ws2tcpip/nf-ws2tcpip-getaddrinfo
    
    However, the version of MinGW we use on Travis is not current and does
    not carry the relevant definition, as such I defined it in compat.
    https://github.com/wine-mirror/wine/blob/master/include/ws2tcpip.h
    
    Testing confirms that the PROTECTION_LEVEL_UNRESTRICTED,
    IPV6_PROTECTION_LEVEL, PROCESS_DEP_ENABLE, AI_ADDRCONFIG, are now
    supported by the version of Windows that we test against, so can be
    removed.
    https://travis-ci.org/bitcoin/bitcoin/jobs/483255439
    https://travis-ci.org/Empact/bitcoin/jobs/484123087
    
    (cherry picked from commit d0522ec)
    Empact authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    89d322a View commit details
    Browse the repository at this point in the history
  4. build: Remove WINVER pre define in Makefile.leveldb.inlcude

    (cherry picked from commit 0164b0f)
    ken2812221 authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    42bdbc2 View commit details
    Browse the repository at this point in the history
  5. build: remove WINDOWS_BITS from build system

    We no longer build/ship 32 bit windows executables.
    
    (cherry picked from commit abc147d)
    fanquake authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    c77d14d View commit details
    Browse the repository at this point in the history
  6. build: remove configure checks for win libraries we don't link against

    While cross compiling, HOST=x86_64-w64-mingw32, none of these
    libs actually seem to be passed to the linker.
    
    (cherry picked from commit 2525c09)
    fanquake authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    9a4fb0e View commit details
    Browse the repository at this point in the history
  7. build: remove --large-address-aware linker flag

    This flag was used when building 32-bit Windows executables, which we no-longer
    do, and is not accepted by the linker for any of the hosts we currently build
    for. i.e:
    
    ```bash
    checking whether the linker accepts -Wl,--large-address-aware... no
    ```
    
    --large-address-aware
        If given, the appropriate bit in the "Characteristics" field of the COFF
        header is set to indicate that this executable supports virtual addresses
        greater than 2 gigabytes. This should be used in conjunction with the /3GB
        or /USERVA=value megabytes switch in the "[operating systems]" section of
        the BOOT .INI. Otherwise, this bit has no effect. [This option is specific
        to PE targeted ports of the linker]
    
    You can check that the appropriate bit in the COFF header of our current
    Windows binaries is still be set using dumpbin. i.e:
    
    ```powershell
    dumpbin /headers .\bitcoind.exe
    
    FILE HEADER VALUES
    <snip>
    26 characteristics
         Executable
         Line numbers stripped
         Application can handle large (>2GB) addresses
    ```
    
    (cherry picked from commit acd644b)
    fanquake authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    6ae6c9c View commit details
    Browse the repository at this point in the history
  8. build: don't pass -w when building for Windows

    This has been around since the introduction of autotools. However at
    this point I'm not sure we'd every want to suppress all warnings when
    performing a build, and given that CXX FLAGS will have been overriden
    when cross-compiling for Windows (using depends), this would rarely,
    if-ever be used anyways.
    
    From https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html:
    -w
    
        Inhibit all warning messages.
    
    (cherry picked from commit 89fea68)
    fanquake authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    865c64a View commit details
    Browse the repository at this point in the history
  9. 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.
    
    (cherry picked from commit e8a8cff)
    fanquake authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    7de8682 View commit details
    Browse the repository at this point in the history
  10. depends: Patch libevent build to fix IPv6 -rpcbind on Windows

    libevent uses getaddrinfo when available, and falls back to gethostbyname
    Windows has both, but gethostbyname only supports IPv4
    libevent fails to detect Windows's getaddrinfo due to not including the right headers
    This patches libevent's configure script to check it correctly
    
    (cherry picked from commit 03e056e)
    luke-jr authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    dc0d4bc View commit details
    Browse the repository at this point in the history
  11. build: pass _WIN32_WINNT=0x0601 when building libevent for Windows

    This enables of the use of AI_* definitions in the Windows headers,
    specifically AI_ADDRCONFIG, which fixes an issue with libevent and
    ipv6 on Windows.
    
    It also aligns with what we define in configure when building Core.
    
    (cherry picked from commit eb6b735)
    fanquake authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    182a9af View commit details
    Browse the repository at this point in the history
  12. Move Win32 defines to configure.ac to ensure they are globally defined

    common.vcxproj used for MSVC builds
    
    (cherry picked from commit 1ccb9f3)
    luke-jr authored and str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    5bac611 View commit details
    Browse the repository at this point in the history
  13. build: Link to libbcrypt on Windows

    This fixes a linker issue now that the minimum Windows version is
    Windows 7, and dependencies now try to use BCryptGenRandom.
    str4d committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    8943abd View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    997ca6e View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    8936cfe View commit details
    Browse the repository at this point in the history