Skip to content

Commit

Permalink
Merge pull request #251 from openziti/tsdk-1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything authored Oct 11, 2024
2 parents f4f7c0d + db96cd8 commit 69b39b0
Show file tree
Hide file tree
Showing 37 changed files with 1,166 additions and 75 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,21 @@ jobs:
with:
xcode-version: '15.2'

- name: macOS tools
if: runner.os == 'macOS'
shell: bash
run: brew install autoconf autoconf-archive automake pkg-config

- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 'fba75d09065fcc76a25dcf386b1d00d33f5175af'
vcpkgJsonGlob: './deps/ziti-tunnel-sdk-c/vcpkg.json'

- name: ${{ matrix.spec.name }}
env:
TOOLCHAIN: ${{ matrix.spec.toolchain && format('../../toolchains/{0}.cmake', matrix.spec.toolchain) || '' }}
run: |
(cd deps/ziti-tunnel-sdk-c && git fetch --tags)
cmake -DCMAKE_BUILD_TYPE=Release -DTLSUV_TLSLIB=mbedtls -DMBEDTLS_FATAL_WARNINGS:BOOL=OFF -DEXCLUDE_PROGRAMS=ON -DZITI_TUNNEL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -S ./deps/ziti-tunnel-sdk-c -B ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.name }}
cmake -DCMAKE_BUILD_TYPE=Release -DTLSUV_TLSLIB=openssl -DEXCLUDE_PROGRAMS=ON -DZITI_TUNNEL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -S ./deps/ziti-tunnel-sdk-c -B ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.name }}
cmake --build ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.name }}
tar -cvzf ${{ matrix.spec.name }}.tgz -C ./deps/ziti-tunnel-sdk-c ${{ matrix.spec.name }}
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@ jobs:
- name: Get Release
id: get_release
run: |
tag_name=$(gh release list --exclude-drafts -L1 --json tagName --jq '.[0].tagName')
echo "tag_name=${tag_name}" | tee -a $GITHUB_OUTPUT
tag_suffix=$(echo -n "${tag_name}" | cut -s -d '-' -f 2-)
dist_branch=$(echo -n ${tag_suffix:-main})
dist_branch=$(echo ${target_commitsh} | awk -F / '{print $NF}')
echo "dist_branch=${dist_branch}" | tee -a $GITHUB_OUTPUT
gh_pages_branch="gh-pages${tag_suffix:+-$tag_suffix}"
gh_pages_branch="gh-pages$([ "${dist_branch}" != "main" ] && echo "-${dist_branch}")"
echo "gh_pages_branch=${gh_pages_branch}" | tee -a $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ github.token }}
tag_name: ${{ github.event.release.tag_name }}
target_commitsh: ${{ github.event.release.target_commitish }}

- name: Download xcframework
run: gh release download -p CZiti.xcframework.zip
run: |
echo "VERS=${VERS}"
gh release download "${VERS}" -p CZiti.xcframework.zip
env:
VERS: ${{ steps.get_release.outputs.tag_name }}
GITHUB_TOKEN: ${{ github.token }}

- name: Compute Checksum
Expand Down
46 changes: 28 additions & 18 deletions CZiti.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@
5AA298BD2585961C001F7502 /* NetifDriver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AA298BB2585961C001F7502 /* NetifDriver.swift */; };
5AAAEDE62464D8AB00C56383 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AAAEDE52464D8AB00C56383 /* main.swift */; };
5AAAEDEA2464D8FB00C56383 /* libCZiti.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF68244B7C3C00F4B4E0 /* libCZiti.a */; };
5AB6DF7F244B8F2000F4B4E0 /* libmbedx509.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF78244B8F2000F4B4E0 /* libmbedx509.a */; };
5AB6DF80244B8F2000F4B4E0 /* libmbedcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF79244B8F2000F4B4E0 /* libmbedcrypto.a */; };
5AB6DF82244B8F2000F4B4E0 /* libmbedtls.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF7B244B8F2000F4B4E0 /* libmbedtls.a */; };
5AB6DF7F244B8F2000F4B4E0 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF78244B8F2000F4B4E0 /* libssl.a */; };
5AB6DF80244B8F2000F4B4E0 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF79244B8F2000F4B4E0 /* libcrypto.a */; };
5AB6DF83244B8F2000F4B4E0 /* libuv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF7C244B8F2000F4B4E0 /* libuv.a */; };
5AB6DFB9244BA63F00F4B4E0 /* libmbedcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF79244B8F2000F4B4E0 /* libmbedcrypto.a */; };
5AB6DFBA244BA64300F4B4E0 /* libmbedtls.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF7B244B8F2000F4B4E0 /* libmbedtls.a */; };
5AB6DFBB244BA64700F4B4E0 /* libmbedx509.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF78244B8F2000F4B4E0 /* libmbedx509.a */; };
5AB6DFB9244BA63F00F4B4E0 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF79244B8F2000F4B4E0 /* libcrypto.a */; };
5AB6DFBB244BA64700F4B4E0 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF78244B8F2000F4B4E0 /* libssl.a */; };
5AB6DFBC244BA64B00F4B4E0 /* libuv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AB6DF7C244B8F2000F4B4E0 /* libuv.a */; };
5AB8309E247432C40089AF93 /* ZitiError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8308F247432C40089AF93 /* ZitiError.swift */; };
5AB8309F247432C40089AF93 /* ZitiIntercept.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AB83090247432C40089AF93 /* ZitiIntercept.swift */; };
Expand Down Expand Up @@ -109,6 +107,10 @@
5AF0C4122489987500CD4DAE /* ZitiClaims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AF0C4102489987500CD4DAE /* ZitiClaims.swift */; };
AA039EE02A963C53004D3F78 /* libllhttp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA039EDF2A963C53004D3F78 /* libllhttp.a */; };
AA039EE22A963C9C004D3F78 /* libllhttp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA039EE12A963C9C004D3F78 /* libllhttp.a */; };
AACE00D42C2F4F5200C428AE /* libjson-c.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AACE00D22C2F4F5200C428AE /* libjson-c.a */; };
AACE00D52C2F4F5200C428AE /* libprotobuf-c.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AACE00D32C2F4F5200C428AE /* libprotobuf-c.a */; };
AACEF6272C2E0B1500C428AE /* libprotobuf-c.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AACEF6252C2E0B1500C428AE /* libprotobuf-c.a */; };
AACEF6282C2E0B1500C428AE /* libjson-c.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AACEF6262C2E0B1500C428AE /* libjson-c.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -211,9 +213,8 @@
5AAAEDE32464D8AB00C56383 /* ziti-mac-enroller */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ziti-mac-enroller"; sourceTree = BUILT_PRODUCTS_DIR; };
5AAAEDE52464D8AB00C56383 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
5AB6DF68244B7C3C00F4B4E0 /* libCZiti.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCZiti.a; sourceTree = BUILT_PRODUCTS_DIR; };
5AB6DF78244B8F2000F4B4E0 /* libmbedx509.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmbedx509.a; path = "deps/ziti-sdk-c/build-os-arch/deps/uv-mbed/deps/mbedtls/library/libmbedx509.a"; sourceTree = "<group>"; };
5AB6DF79244B8F2000F4B4E0 /* libmbedcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmbedcrypto.a; path = "deps/ziti-sdk-c/build-os-arch/deps/uv-mbed/deps/mbedtls/crypto/library/libmbedcrypto.a"; sourceTree = "<group>"; };
5AB6DF7B244B8F2000F4B4E0 /* libmbedtls.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmbedtls.a; path = "deps/ziti-sdk-c/build-os-arch/deps/uv-mbed/deps/mbedtls/library/libmbedtls.a"; sourceTree = "<group>"; };
5AB6DF78244B8F2000F4B4E0 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = "deps/ziti-tunnel-sdk-c/build-os-arch/vcpkg_installed/os-arch/lib/libssl.a"; sourceTree = "<group>"; };
5AB6DF79244B8F2000F4B4E0 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "deps/ziti-tunnel-sdk-c/build-os-arch/vcpkg_installed/os-arch/lib/libcrypto.a"; sourceTree = "<group>"; };
5AB6DF7C244B8F2000F4B4E0 /* libuv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuv.a; path = "deps/ziti-sdk-c/build-os-arch/deps/uv-mbed/deps/libuv/libuv.a"; sourceTree = "<group>"; };
5AB6DFAF244B990A00F4B4E0 /* libCZiti.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCZiti.a; sourceTree = BUILT_PRODUCTS_DIR; };
5AB8308E247432C40089AF93 /* Ziti-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Ziti-Bridging-Header.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -251,6 +252,10 @@
5AFE864327E3C62800D47A47 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
AA039EDF2A963C53004D3F78 /* libllhttp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libllhttp.a; path = "deps/ziti-tunnel-sdk-c/build-macosx-arm64/vcpkg_installed/arm64-osx/debug/lib/libllhttp.a"; sourceTree = "<group>"; };
AA039EE12A963C9C004D3F78 /* libllhttp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libllhttp.a; path = "deps/ziti-tunnel-sdk-c/build-iphoneos-arm64/vcpkg_installed/arm64-ios/debug/lib/libllhttp.a"; sourceTree = "<group>"; };
AACE00D22C2F4F5200C428AE /* libjson-c.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libjson-c.a"; path = "deps/ziti-tunnel-sdk-c/build-iphoneos-arm64/vcpkg_installed/arm64-ios/lib/libjson-c.a"; sourceTree = "<group>"; };
AACE00D32C2F4F5200C428AE /* libprotobuf-c.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libprotobuf-c.a"; path = "deps/ziti-tunnel-sdk-c/build-iphoneos-arm64/vcpkg_installed/arm64-ios/lib/libprotobuf-c.a"; sourceTree = "<group>"; };
AACEF6252C2E0B1500C428AE /* libprotobuf-c.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libprotobuf-c.a"; path = "deps/ziti-tunnel-sdk-c/build-macosx-arm64/vcpkg_installed/arm64-osx/lib/libprotobuf-c.a"; sourceTree = "<group>"; };
AACEF6262C2E0B1500C428AE /* libjson-c.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libjson-c.a"; path = "deps/ziti-tunnel-sdk-c/build-macosx-arm64/vcpkg_installed/arm64-osx/lib/libjson-c.a"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -276,16 +281,17 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACEF6272C2E0B1500C428AE /* libprotobuf-c.a in Frameworks */,
AACEF6282C2E0B1500C428AE /* libjson-c.a in Frameworks */,
5AA2988E25857758001F7502 /* libziti-tunnel-cbs-c.a in Frameworks */,
5AA2988F25857758001F7502 /* libziti-tunnel-sdk-c.a in Frameworks */,
5AA2989125857759001F7502 /* liblwipcore.a in Frameworks */,
5A0E4A8E24534DDE00C56DCF /* libsodium.a in Frameworks */,
5A0E4A8B24530E1E00C56DCF /* libziti.a in Frameworks */,
5A1D8AD629940BE500101BD7 /* libtlsuv.a in Frameworks */,
AA039EE02A963C53004D3F78 /* libllhttp.a in Frameworks */,
5AB6DF7F244B8F2000F4B4E0 /* libmbedx509.a in Frameworks */,
5AB6DF80244B8F2000F4B4E0 /* libmbedcrypto.a in Frameworks */,
5AB6DF82244B8F2000F4B4E0 /* libmbedtls.a in Frameworks */,
5AB6DF7F244B8F2000F4B4E0 /* libssl.a in Frameworks */,
5AB6DF80244B8F2000F4B4E0 /* libcrypto.a in Frameworks */,
5AB6DF83244B8F2000F4B4E0 /* libuv.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -294,15 +300,16 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACE00D42C2F4F5200C428AE /* libjson-c.a in Frameworks */,
AACE00D52C2F4F5200C428AE /* libprotobuf-c.a in Frameworks */,
5AA2989725857789001F7502 /* libziti-tunnel-sdk-c.a in Frameworks */,
5AA2989825857789001F7502 /* libziti-tunnel-cbs-c.a in Frameworks */,
5AA2989925857789001F7502 /* liblwipcore.a in Frameworks */,
5A1D8AD729940C3A00101BD7 /* libtlsuv.a in Frameworks */,
AA039EE22A963C9C004D3F78 /* libllhttp.a in Frameworks */,
5AB6DFBC244BA64B00F4B4E0 /* libuv.a in Frameworks */,
5AB6DFB9244BA63F00F4B4E0 /* libmbedcrypto.a in Frameworks */,
5AB6DFBB244BA64700F4B4E0 /* libmbedx509.a in Frameworks */,
5AB6DFBA244BA64300F4B4E0 /* libmbedtls.a in Frameworks */,
5AB6DFB9244BA63F00F4B4E0 /* libcrypto.a in Frameworks */,
5AB6DFBB244BA64700F4B4E0 /* libssl.a in Frameworks */,
5A0E4A8F24534DE500C56DCF /* libsodium.a in Frameworks */,
5A0E4A8C24530E2500C56DCF /* libziti.a in Frameworks */,
);
Expand Down Expand Up @@ -402,6 +409,10 @@
5AB6DF76244B8F2000F4B4E0 /* Frameworks */ = {
isa = PBXGroup;
children = (
AACEF6262C2E0B1500C428AE /* libjson-c.a */,
AACEF6252C2E0B1500C428AE /* libprotobuf-c.a */,
AACE00D22C2F4F5200C428AE /* libjson-c.a */,
AACE00D32C2F4F5200C428AE /* libprotobuf-c.a */,
AA039EDF2A963C53004D3F78 /* libllhttp.a */,
AA039EE12A963C9C004D3F78 /* libllhttp.a */,
5A1D8AD529940BE500101BD7 /* libtlsuv.a */,
Expand All @@ -418,9 +429,8 @@
5AA2989325857788001F7502 /* libziti-tunnel-sdk-c.a */,
5A0E4A8D24534DDE00C56DCF /* libsodium.a */,
5A0E4A8A24530E1E00C56DCF /* libziti.a */,
5AB6DF79244B8F2000F4B4E0 /* libmbedcrypto.a */,
5AB6DF7B244B8F2000F4B4E0 /* libmbedtls.a */,
5AB6DF78244B8F2000F4B4E0 /* libmbedx509.a */,
5AB6DF79244B8F2000F4B4E0 /* libcrypto.a */,
5AB6DF78244B8F2000F4B4E0 /* libssl.a */,
5AB6DF7C244B8F2000F4B4E0 /* libuv.a */,
);
name = Frameworks;
Expand Down
19 changes: 16 additions & 3 deletions build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,17 @@ function build_tsdk {
echo "Building TSDK for ${name}; toolchain:${toolchain}"
rm -rf ./deps/ziti-tunnel-sdk-c/${name}

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DTLSUV_TLSLIB=mbedtls \
-DMBEDTLS_FATAL_WARNINGS:BOOL=OFF -DEXCLUDE_PROGRAMS=ON \
cmake_build_type=RelWithDebInfo
if [ "${CONFIGURATION}" == "Debug" ]; then cmake_build_type="Debug"; fi

if [ -n "${ASAN_ENABLED}" ]; then
clang_asan_flags="-DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address"
fi

cmake -DCMAKE_BUILD_TYPE=${cmake_build_type} \
${clang_asan_flags} \
-DTLSUV_TLSLIB=openssl \
-DEXCLUDE_PROGRAMS=ON \
-DZITI_TUNNEL_BUILD_TESTS=OFF \
-DCMAKE_TOOLCHAIN_FILE="${toolchain}" \
-S ./deps/ziti-tunnel-sdk-c -B ./deps/ziti-tunnel-sdk-c/${name}
Expand All @@ -51,12 +59,17 @@ function build_cziti {
sdk=$2
arch_flags=$3

if [ -n "${ASAN_ENABLED}" ]; then
asan_flags="-enableAddressSanitizer YES"
fi

echo "Building ${scheme} ${sdk}"
set -o pipefail && xcodebuild build \
-derivedDataPath ./DerivedData/CZiti \
-configuration ${CONFIGURATION} \
-scheme ${scheme} \
${arch_flags} \
${asan_flags} \
-sdk ${sdk} \
| xcpretty

Expand Down
3 changes: 3 additions & 0 deletions deps/toolchains/iOS-Simulator-arm64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

# work around vcpkg's openssl port assuming simulator platform should only be used when building x86_64
set(ENV{VCPKG_OVERLAY_PORTS} ${PROJECT_SOURCE_DIR}/../vcpkg-overlays)

set(VCPKG_OVERLAY_TRIPLETS ${PROJECT_SOURCE_DIR}/../vcpkg-triplets)
set(VCPKG_TARGET_TRIPLET arm64-iphonesimulator)
include($ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
35 changes: 35 additions & 0 deletions deps/vcpkg-overlays/openssl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
This entire directory was copied from https://github.com/microsoft/vcpkg/tree/master/ports/openssl, and `unix/portfile.cmake` was modified to enable building arm64 binaries for the iphonesimulator platform:


```patch
index 98c5dcb54..a2c4daafe 100644
--- a/ports/openssl/unix/portfile.cmake
+++ b/ports/openssl/unix/portfile.cmake
@@ -61,15 +61,19 @@ elseif(VCPKG_TARGET_IS_LINUX)
set(OPENSSL_ARCH linux-generic32)
endif()
elseif(VCPKG_TARGET_IS_IOS)
- if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm64")
- set(OPENSSL_ARCH ios64-xcrun)
+ if(VCPKG_OSX_SYSROOT MATCHES "iphonesimulator")
+ set(OPENSSL_ARCH_VARIANT "simulator")
+ elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm64")
+ set(OPENSSL_ARCH_VARIANT 64)
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm")
- set(OPENSSL_ARCH ios-xcrun)
+ set(OPENSSL_ARCH_VARIANT "")
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" OR VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
- set(OPENSSL_ARCH iossimulator-xcrun)
+ set(OPENSSL_ARCH_VARIANT simulator)
else()
message(FATAL_ERROR "Unknown iOS target architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()
+ set(OPENSSL_ARCH "ios${OPENSSL_ARCH_VARIANT}-xcrun")
+ message("using openssl arch ${OPENSSL_ARCH}")
# disable that makes linkage error (e.g. require stderr usage)
list(APPEND CONFIGURE_OPTIONS no-ui no-asm)
elseif(VCPKG_TARGET_IS_OSX)
```

We should submit this change to the vcpkg project, and remove this port-overlay once it's adopted.
Note that the issue has already been reported: https://github.com/microsoft/vcpkg/issues/24468.
96 changes: 96 additions & 0 deletions deps/vcpkg-overlays/openssl/asm-armcap.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
diff --git a/crypto/armv4cpuid.pl b/crypto/armv4cpuid.pl
index 04b342551c..9b933c70c4 100644
--- a/crypto/armv4cpuid.pl
+++ b/crypto/armv4cpuid.pl
@@ -293,6 +293,7 @@ atomic_add_spinlock:
#endif

.extern OPENSSL_armcap_P
+.hidden OPENSSL_armcap_P
___

print $code;
diff --git a/crypto/bn/asm/armv4-gf2m.pl b/crypto/bn/asm/armv4-gf2m.pl
index 17af0e0774..5733a01746 100644
--- a/crypto/bn/asm/armv4-gf2m.pl
+++ b/crypto/bn/asm/armv4-gf2m.pl
@@ -326,6 +326,7 @@ $code.=<<___;

#if __ARM_MAX_ARCH__>=7
.extern OPENSSL_armcap_P
+.hidden OPENSSL_armcap_P
#endif
___

diff --git a/crypto/bn/asm/armv4-mont.pl b/crypto/bn/asm/armv4-mont.pl
index d85da92406..6e839d845c 100644
--- a/crypto/bn/asm/armv4-mont.pl
+++ b/crypto/bn/asm/armv4-mont.pl
@@ -750,6 +750,7 @@ $code.=<<___;
.align 2
#if __ARM_MAX_ARCH__>=7
.extern OPENSSL_armcap_P
+.hidden OPENSSL_armcap_P
#endif
___

diff --git a/crypto/chacha/asm/chacha-armv4.pl b/crypto/chacha/asm/chacha-armv4.pl
index ac32d5bda7..bb48b6eeb9 100755
--- a/crypto/chacha/asm/chacha-armv4.pl
+++ b/crypto/chacha/asm/chacha-armv4.pl
@@ -1155,6 +1155,7 @@ $code.=<<___;
ldmia sp!,{r4-r11,pc}
.size ChaCha20_neon,.-ChaCha20_neon
.extern OPENSSL_armcap_P
+.hidden OPENSSL_armcap_P
#endif
___
}}}
diff --git a/crypto/poly1305/asm/poly1305-armv4.pl b/crypto/poly1305/asm/poly1305-armv4.pl
index b98beefa18..673ea62ec3 100755
--- a/crypto/poly1305/asm/poly1305-armv4.pl
+++ b/crypto/poly1305/asm/poly1305-armv4.pl
@@ -1240,6 +1240,7 @@ $code.=<<___;
.align 2
#if __ARM_MAX_ARCH__>=7
.extern OPENSSL_armcap_P
+.hidden OPENSSL_armcap_P
#endif
___

diff --git a/crypto/sha/asm/sha1-armv4-large.pl b/crypto/sha/asm/sha1-armv4-large.pl
index 2832c5b530..b3a8ec6941 100644
--- a/crypto/sha/asm/sha1-armv4-large.pl
+++ b/crypto/sha/asm/sha1-armv4-large.pl
@@ -708,6 +708,7 @@ ___
$code.=<<___;
#if __ARM_MAX_ARCH__>=7
.extern OPENSSL_armcap_P
+.hidden OPENSSL_armcap_P
#endif
___

diff --git a/crypto/sha/asm/sha256-armv4.pl b/crypto/sha/asm/sha256-armv4.pl
index 8bac84b1a8..feb1f26109 100644
--- a/crypto/sha/asm/sha256-armv4.pl
+++ b/crypto/sha/asm/sha256-armv4.pl
@@ -694,6 +694,7 @@ $code.=<<___;
.align 2
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
.extern OPENSSL_armcap_P
+.hidden OPENSSL_armcap_P
#endif
___

diff --git a/crypto/sha/asm/sha512-armv4.pl b/crypto/sha/asm/sha512-armv4.pl
index c8b8110671..9aa310ffd0 100644
--- a/crypto/sha/asm/sha512-armv4.pl
+++ b/crypto/sha/asm/sha512-armv4.pl
@@ -661,6 +661,7 @@ $code.=<<___;
.align 2
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
.extern OPENSSL_armcap_P
+.hidden OPENSSL_armcap_P
#endif
___

Loading

0 comments on commit 69b39b0

Please sign in to comment.