Skip to content

Commit 1475c25

Browse files
committed
libressl.sh: disable ASM for ARM64 Windows [ci skip]
ASM has been enabled by default in LibreSSL 4.2.0: libressl/portable@1df6b52 libressl/portable#1177 This caused compiler warnings, and also broke using SSL, possibly due to using the ASM bignum implementation where the warnings are shown. This issue is masked by llvm-mingw 21 creating broken LibreSSL ARM64 binaries, crashing with 0xC0000409 (STATUS_STACK_BUFFER_OVERRUN). Ref: libressl/portable#1210
1 parent cb3f4c9 commit 1475c25

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

libressl.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55

66
# Caveats (as of 4.2.0):
77
# - Most ASM is implemented for x64 only.
8+
# - ASM implemented for ARM64 on Windows triggers -Wasm-operand-widths, 2300+ times.
9+
# It breaks connecting with TLS:
10+
# curl: (35) TLS connect error: error:04FFF077:rsa routines:CRYPTO_internal:wrong signature length
11+
# or cause a hang, depending on website.
12+
# https://github.com/libressl/portable/issues/1210
813
# - Not possible to hide most ASM symbols from shared lib exports in Linux, macOS.
914
# https://github.com/libressl/portable/issues/957
1015
# Local patch exists for this, or ASM can be disabled.
@@ -40,6 +45,10 @@ _VER="$1"
4045
CFLAGS=''
4146
CPPFLAGS='-DOPENSSL_NO_FILENAMES'
4247

48+
if [ "${_OS}" = 'win' ] && [ "${_CPU}" = 'a64' ]; then
49+
options+=' -DENABLE_ASM=OFF' # Pending: https://github.com/libressl/portable/issues/1210
50+
fi
51+
4352
if [[ "${_CONFIG}" != *'debug'* ]]; then
4453
CPPFLAGS+=' -DNDEBUG'
4554
fi

0 commit comments

Comments
 (0)