Skip to content

Commit

Permalink
Minor updates to openssl vcpkg overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
negrutiu committed Jul 10, 2024
1 parent fa5c180 commit 29336e6
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 2 deletions.
96 changes: 96 additions & 0 deletions vcpkg/overlay_ports/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
___

1 change: 1 addition & 0 deletions vcpkg/overlay_ports/openssl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ vcpkg_from_github(
cmake-config.patch
command-line-length.patch
script-prefix.patch
asm-armcap.patch
windows/install-layout.patch
windows/install-pdbs.patch
unix/android-cc.patch
Expand Down
3 changes: 1 addition & 2 deletions vcpkg/overlay_ports/openssl/unix/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ vcpkg_list(SET MAKEFILE_OPTIONS)
if(VCPKG_TARGET_IS_ANDROID)
set(ENV{ANDROID_NDK_ROOT} "${VCPKG_DETECTED_CMAKE_ANDROID_NDK}")
set(OPENSSL_ARCH "android-${VCPKG_DETECTED_CMAKE_ANDROID_ARCH}")
# asm on arm32 NEON is broken, https://github.com/openssl/openssl/pull/21583#issuecomment-1727057735
if(VCPKG_DETECTED_CMAKE_ANDROID_ARCH STREQUAL "arm" #[[AND NOT VCPKG_DETECTED_CMAKE_ANDROID_ARM_NEON]])
if(VCPKG_DETECTED_CMAKE_ANDROID_ARCH STREQUAL "arm" AND NOT VCPKG_DETECTED_CMAKE_ANDROID_ARM_NEON)
vcpkg_list(APPEND CONFIGURE_OPTIONS no-asm)
endif()
elseif(VCPKG_TARGET_IS_LINUX)
Expand Down
1 change: 1 addition & 0 deletions vcpkg/overlay_ports/openssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "openssl",
"version": "3.3.1",
"port-version": 1,
"description": "OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.",
"homepage": "https://www.openssl.org",
"license": "Apache-2.0",
Expand Down

0 comments on commit 29336e6

Please sign in to comment.