From 449624359a9ac2921fb284bc4b050998eb9aaaae Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 11 Mar 2024 22:58:11 +0000 Subject: [PATCH] try dropping windows 32-bit 3 --- .github/workflows/build.yml | 2 +- README.md | 2 +- _build.sh | 36 +++++------------------------------- _ci-win-msys2.sh | 4 ++-- boringssl.sh | 5 ++--- openssl.sh | 3 +-- 6 files changed, 12 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77a28681d..2b9369753 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -606,7 +606,7 @@ jobs: # https://github.com/actions/upload-artifact - uses: actions/upload-artifact@v4 with: - name: 'curl-windows-gcc-noarm64' + name: 'curl-windows-gcc-x64' retention-days: 5 path: | *-*-mingw*.* diff --git a/README.md b/README.md index ff2535a0a..6ef5ade86 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0 - Standalone `curl` tool and `libcurl` DLL. Static libraries included. - Required: Windows Vista with [Universal CRT](https://support.microsoft.com/topic/update-for-universal-c-runtime-in-windows-322bf30f-4735-bb94-3949-49f5c49f4732) - (x64, ARM64 or x86), macOS 10.9 Mavericks (Intel or ARM), + (x64 or ARM64), macOS 10.9 Mavericks (Intel or ARM), any Linux (amd64, arm64 or experimental RISC-V) with [MUSL](https://en.wikipedia.org/wiki/Musl) builds. - [HTTP/3](https://en.wikipedia.org/wiki/HTTP/3), diff --git a/_build.sh b/_build.sh index 8c3a9f5bc..4b832db5f 100755 --- a/_build.sh +++ b/_build.sh @@ -62,7 +62,6 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p # r64 build riscv64 target only [EXPERIMENTAL] # a64 build arm64 target only # x64 build x86_64 target only -# x86 build i686 target only (for win target) # nounity build without CMake UNITY mode (slower builds for slightly smaller binaries) # nocurltool do not build the curl tool (requires cmake) # curldocs include curl Markdown manual pages in the package @@ -124,16 +123,6 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p # https://github.com/curl/curl-for-win/actions/runs/6868572571 # One last escape hatch is making custom wrappers around build tools and # make libtool use them, then pass any necessary options via those wrappers. -# - win: Drop x86 builds. -# https://data.firefox.com/dashboard/hardware -# https://gs.statcounter.com/windows-version-market-share -# A hidden aspect of x86: The Chocolatey package manager installs x86 -# binaries on ARM systems to run them in emulated mode. Windows as of ~2021 -# got the ability to run x64 in emulated mode, but tooling support is -# missing, just like support for native ARM binaries: -# https://github.com/chocolatey/choco/issues/1803 -# https://github.com/chocolatey/choco/issues/2172 -# winget and scoop both support native ARM64. # Resources: # - https://clang.llvm.org/docs/Toolchain.html @@ -569,11 +558,9 @@ build_single_target() { fi # GCC-specific machine selection option - [ "${_CPU}" = 'x86' ] && _OPTM='-m32' [ "${_CPU}" = 'x64' ] && _OPTM='-m64' [ "${_CPU}" = 'a64' ] && _OPTM='-marm64pe' - [ "${_CPU}" = 'x86' ] && _machine='i686' [ "${_CPU}" = 'x64' ] && _machine='x86_64' [ "${_CPU}" = 'a64' ] && _machine='aarch64' [ "${_CPU}" = 'r64' ] && _machine='riscv64' @@ -600,7 +587,6 @@ build_single_target() { fi if [ "${_OS}" = 'win' ]; then - [ "${_CPU}" = 'x86' ] && pkgcpu='win32' [ "${_CPU}" = 'x64' ] && pkgcpu='win64' [ "${_CPU}" = 'a64' ] && pkgcpu='win64a' else @@ -623,7 +609,6 @@ build_single_target() { if [ "${_TOOLCHAIN}" = 'llvm-mingw' ]; then PATH="${CW_LLVM_MINGW_PATH}/bin:${_ori_path}" else - [ "${_CPU}" = 'x86' ] && _MSYSROOT='/mingw32' [ "${_CPU}" = 'x64' ] && _MSYSROOT='/mingw64' [ "${_CPU}" = 'a64' ] && _MSYSROOT='/clangarm64' @@ -811,7 +796,6 @@ build_single_target() { _CMAKE_GLOBAL="-DCMAKE_SYSTEM_NAME=Windows ${_CMAKE_GLOBAL}" fi - [ "${_CPU}" = 'x86' ] && _RCFLAGS_GLOBAL+=' --target=pe-i386' [ "${_CPU}" = 'x64' ] && _RCFLAGS_GLOBAL+=' --target=pe-x86-64' [ "${_CPU}" = 'a64' ] && _RCFLAGS_GLOBAL+=" --target=${_TRIPLET}" # llvm-windres supports triplets here. https://github.com/llvm/llvm-project/blob/main/llvm/tools/llvm-rc/llvm-rc.cpp @@ -889,7 +873,6 @@ build_single_target() { # _CPPFLAGS_GLOBAL+=' -D_FORTIFY_SOURCE=3' if [ "${_CPU}" = 'x64' ] || \ - [ "${_CPU}" = 'x86' ] || \ [ "${_CC}" = 'gcc' ]; then _CFLAGS_GLOBAL+=' -fstack-clash-protection' _CXXFLAGS_GLOBAL+=' -fstack-clash-protection' @@ -914,8 +897,7 @@ build_single_target() { # https://fedoraproject.org/wiki/Security_Features_Matrix # RISC-V: https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html - if [ "${_CPU}" = 'x64' ] || \ - [ "${_CPU}" = 'x86' ]; then + if [ "${_CPU}" = 'x64' ]; then # https://maskray.me/blog/2022-12-18-control-flow-integrity _CFLAGS_GLOBAL+=' -fcf-protection=full' _CXXFLAGS_GLOBAL+=' -fcf-protection=full' @@ -1154,11 +1136,7 @@ build_single_target() { if [ "${_OS}" = 'win' ]; then _LDFLAGS_GLOBAL="${_OPTM} ${_LDFLAGS_GLOBAL}" # https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2015-September/179242.html - if [ "${_CPU}" = 'x86' ]; then - _LDFLAGS_BIN_GLOBAL+=' -Wl,--pic-executable,-e,_mainCRTStartup' - else - _LDFLAGS_BIN_GLOBAL+=' -Wl,--pic-executable,-e,mainCRTStartup' - fi + _LDFLAGS_BIN_GLOBAL+=' -Wl,--pic-executable,-e,mainCRTStartup' _CFLAGS_GLOBAL="${_OPTM} ${_CFLAGS_GLOBAL}" fi @@ -1230,8 +1208,7 @@ build_single_target() { # for boringssl export _STRIP_BINUTILS='' if [ "${_OS}" = 'win' ] && [ "${_CC}" = 'llvm' ]; then - if [ "${_CPU}" = 'x64' ] || \ - [ "${_CPU}" = 'x86' ]; then + if [ "${_CPU}" = 'x64' ]; then # Make sure to pick the prefixed binutils strip tool from an unmodified # PATH. This avoids picking the llvm-mingw copy using the same name. tmp="${_CCPREFIX}strip" @@ -1700,15 +1677,12 @@ EOF # Build binaries if [ "${_OS}" = 'win' ]; then - if [[ "${_CONFIG}" = *'x64'* || ! "${_CONFIG}" =~ (a64|x86) ]]; then + if [[ "${_CONFIG}" = *'x64'* || "${_CONFIG}" != *'a64'* ]]; then build_single_target x64 fi - if [[ "${_CONFIG}" = *'a64'* || ! "${_CONFIG}" =~ (x64|x86) ]]; then + if [[ "${_CONFIG}" = *'a64'* || "${_CONFIG}" != *'x64'* ]]; then build_single_target a64 fi - if [[ "${_CONFIG}" = *'x86'* || ! "${_CONFIG}" =~ (x64|a64) ]]; then - build_single_target x86 - fi elif [ "${_OS}" = 'mac' ]; then # TODO: This method is suboptimal. We might want to build pure C # projects in dual mode and only manual-merge libs that have diff --git a/_ci-win-msys2.sh b/_ci-win-msys2.sh index fb2d7134f..fd0770047 100755 --- a/_ci-win-msys2.sh +++ b/_ci-win-msys2.sh @@ -8,11 +8,11 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p pacman --noconfirm --ask 20 --noprogressbar --sync --refresh --sysupgrade --sysupgrade pacman --noconfirm --ask 20 --noprogressbar --sync --refresh --sysupgrade --sysupgrade pacman --noconfirm --ask 20 --noprogressbar --sync --needed \ - mingw-w64-{x86_64,i686}-{clang,cmake,jq,python-pefile,rsync,gettext,osslsigncode} \ + mingw-w64-x86_64-{clang,cmake,jq,python-pefile,rsync,gettext,osslsigncode} \ zip [[ "${CW_CONFIG:-}" = *'boringssl'* ]] && \ pacman --noconfirm --ask 20 --noprogressbar --sync --needed \ - mingw-w64-{x86_64,i686}-{go,nasm} + mingw-w64-x86_64-{go,nasm} ./_build.sh diff --git a/boringssl.sh b/boringssl.sh index f239abfa7..6392ef12e 100755 --- a/boringssl.sh +++ b/boringssl.sh @@ -50,13 +50,12 @@ _VER="$1" LIBS='-lpthread' # for tests options='' - [ "${_CPU}" = 'x86' ] && cpu='x86' [ "${_CPU}" = 'x64' ] && cpu='x86_64' [ "${_CPU}" = 'a64' ] && cpu='ARM64' [ "${_CPU}" = 'r64' ] && exit 1 # No support as of 2023-10 if [ "${_OS}" = 'win' ] && [ "${_CPU}" != 'a64' ]; then - # nasm is used for Windows x64 and x86 + # nasm is used for Windows x64 options+=' -DCMAKE_ASM_NASM_FLAGS=--reproducible' fi @@ -105,7 +104,7 @@ _VER="$1" # - fails to clear timestamps in NASM objects. # (fixed by --reproducible with nasm v2.15.05) # Work around them by running it through binutils strip. This works for - # x64 and x86, but not for ARM64. + # x64, but not for ARM64. # # Most combinations/orders running binutils/llvm strip over the output results # in different output, and except pure llvm-strip, all seem to be diff --git a/openssl.sh b/openssl.sh index 54b0b6162..e52e1dad6 100755 --- a/openssl.sh +++ b/openssl.sh @@ -31,7 +31,6 @@ _VER="$1" options='' if [ "${_OS}" = 'win' ]; then - [ "${_CPU}" = 'x86' ] && options+=' mingw' [ "${_CPU}" = 'x64' ] && options+=' mingw64' if [ "${_CPU}" = 'a64' ]; then # Sources: @@ -65,7 +64,7 @@ _VER="$1" if [ "${_OS}" = 'win' ]; then options+=' -DUSE_BCRYPTGENRANDOM -lbcrypt' fi - [ "${_CPU}" = 'x86' ] || options+=' enable-ec_nistp_64_gcc_128' + options+=' enable-ec_nistp_64_gcc_128' if false; then if [ -n "${_ZLIB}" ] && [ -d "../${_ZLIB}/${_PP}" ]; then