From d14157780834b6cc595ebe40827dc222991ed91c Mon Sep 17 00:00:00 2001 From: Travis Lee Date: Wed, 14 Feb 2024 13:58:44 +0800 Subject: [PATCH] link with glibc and musl --- curl-static-cross.sh | 11 +---------- curl-static-mac.sh | 8 +++----- curl-static-win.sh | 11 +---------- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/curl-static-cross.sh b/curl-static-cross.sh index 8aab6ca..41bf1ab 100644 --- a/curl-static-cross.sh +++ b/curl-static-cross.sh @@ -201,15 +201,6 @@ arch_variants() { echo "Setting up the ARCH and OpenSSL arch, Arch: ${ARCH}" local qemu_arch - [ -z "${ARCH}" ] && ARCH="${ARCH_HOST}" - case "${ARCH}" in - x86_64) arch="amd64" ;; - aarch64) arch="arm64" ;; - armv7l|armv7) arch="armv7" ;; - i686) arch="i686" ;; - *) arch="${ARCH}" ;; - esac - EC_NISTP_64_GCC_128="" OPENSSL_ARCH="" @@ -770,7 +761,7 @@ install_curl() { mkdir -p "${RELEASE_DIR}/release/bin/" ls -l src/curl - cp -pf src/curl "${RELEASE_DIR}/release/bin/curl-linux-${arch}${libc_flag}" + cp -pf src/curl "${RELEASE_DIR}/release/bin/curl-linux-${ARCH}${libc_flag}" if [ ! -f "${RELEASE_DIR}/release/version.txt" ]; then echo "${CURL_VERSION}" > "${RELEASE_DIR}/release/version.txt" diff --git a/curl-static-mac.sh b/curl-static-mac.sh index 64901ce..fb180f4 100644 --- a/curl-static-mac.sh +++ b/curl-static-mac.sh @@ -73,15 +73,13 @@ arch_variants() { _clang_path; [ -z "${ARCH}" ] && ARCH="$(uname -m)" case "${ARCH}" in - x86_64) arch="amd64" - ARCHFLAGS="-arch x86_64" + x86_64) ARCHFLAGS="-arch x86_64" OPENSSL_ARCH="darwin64-x86_64" TARGET="x86_64-apple-darwin" export CC="${clang_path} -target x86_64-apple-macos11" export CXX="${clang_pp_path} -target x86_64-apple-macos11" ;; - arm64) arch="arm64" - ARCHFLAGS="-arch arm64" + arm64) ARCHFLAGS="-arch arm64" OPENSSL_ARCH="darwin64-arm64" TARGET="aarch64-apple-darwin" export CC="${clang_path} -target arm64-apple-macos11" @@ -554,7 +552,7 @@ install_curl() { sha256sum src/curl src/curl -V || true - cp -f src/curl "${RELEASE_DIR}/release/bin/curl-macos-${arch}" + cp -f src/curl "${RELEASE_DIR}/release/bin/curl-macos-${ARCH}" if [ ! -f "${RELEASE_DIR}/version.txt" ]; then echo "${CURL_VERSION}" > "${RELEASE_DIR}/version.txt" diff --git a/curl-static-win.sh b/curl-static-win.sh index 305e682..f2a4f79 100644 --- a/curl-static-win.sh +++ b/curl-static-win.sh @@ -107,16 +107,7 @@ configure_toolchain() { arch_variants() { echo "Setting up the ARCH and OpenSSL arch, Arch: ${ARCH}" - [ -z "${ARCH}" ] && ARCH="${ARCH_HOST}" - case "${ARCH}" in - x86_64) arch="amd64" ;; - armv7) arch="armv7" ;; - i686) arch="i686" ;; - *) arch="${ARCH}" ;; - esac - TARGET="${ARCH}-w64-mingw32" - unset LD STRIP LDFLAGS export LDFLAGS="-L${PREFIX}/lib -L${PREFIX}/lib64" ; @@ -683,7 +674,7 @@ install_curl() { mkdir -p "${RELEASE_DIR}/release/bin/" ls -l src/curl.exe - cp -pf src/curl.exe "${RELEASE_DIR}/release/bin/curl-windows-${arch}.exe" + cp -pf src/curl.exe "${RELEASE_DIR}/release/bin/curl-windows-${ARCH}.exe" if [ ! -f "${RELEASE_DIR}/release/version.txt" ]; then echo "${CURL_VERSION}" > "${RELEASE_DIR}/release/version.txt"