generally disable asm for now

This commit is contained in:
Brent Cook 2023-02-21 01:13:29 -06:00
parent 5a695723ab
commit 4bcb537aa8
4 changed files with 32 additions and 3 deletions

View File

@ -308,6 +308,7 @@ endif()
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(aarch64|arm64)") if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(aarch64|arm64)")
set(HOST_AARCH64 true) set(HOST_AARCH64 true)
# disable for now (fails tests)
set(ENABLE_ASM false) set(ENABLE_ASM false)
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm") elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
set(HOST_ARM true) set(HOST_ARM true)
@ -344,7 +345,9 @@ if(ENABLE_ASM)
endif() endif()
add_definitions(-DHAVE_GNU_STACK) add_definitions(-DHAVE_GNU_STACK)
elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
set(HOST_ASM_MACOSX_X86_64 true) # disable for now (.section .rodata invalid)
# set(HOST_ASM_MACOSX_X86_64 true)
set(ENABLE_ASM false)
elseif(MSVC AND ("${CMAKE_GENERATOR}" MATCHES "Win64" OR "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")) elseif(MSVC AND ("${CMAKE_GENERATOR}" MATCHES "Win64" OR "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64"))
set(HOST_ASM_MASM_X86_64 true) set(HOST_ASM_MASM_X86_64 true)
ENABLE_LANGUAGE(ASM_MASM) ENABLE_LANGUAGE(ASM_MASM)

View File

@ -109,15 +109,17 @@ int main() {return 0;}
]) ])
AC_ARG_ENABLE([asm], AC_ARG_ENABLE([asm],
AS_HELP_STRING([--enable-asm], [Enable assembly])) AS_HELP_STRING([--disable-asm], [Disable assembly]))
# Disable below while updating to support upstream assembly changes # Disable below while updating to support upstream assembly changes
AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = xyes]) AM_CONDITIONAL([OPENSSL_NO_ASM], [true])
# AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"])
# Conditionally enable assembly by default # Conditionally enable assembly by default
AM_CONDITIONAL([HOST_ASM_ELF_ARM], AM_CONDITIONAL([HOST_ASM_ELF_ARM],
[test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "arm" -a "x$enable_asm" != "xno"]) [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "arm" -a "x$enable_asm" != "xno"])
AM_CONDITIONAL([HOST_ASM_ELF_X86_64], AM_CONDITIONAL([HOST_ASM_ELF_X86_64],
[test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"]) [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64], AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64],
[test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"]) [test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
AM_CONDITIONAL([HOST_ASM_MASM_X86_64], AM_CONDITIONAL([HOST_ASM_MASM_X86_64],

View File

@ -101,6 +101,18 @@ if(HOST_ASM_MACOSX_X86_64)
sha/sha512-macosx-x86_64.S sha/sha512-macosx-x86_64.S
whrlpool/wp-macosx-x86_64.S whrlpool/wp-macosx-x86_64.S
cpuid-macosx-x86_64.S cpuid-macosx-x86_64.S
bn/arch/amd64/bignum_add.S
bn/arch/amd64/bignum_cmadd.S
bn/arch/amd64/bignum_cmul.S
bn/arch/amd64/bignum_mul.S
bn/arch/amd64/bignum_mul_4_8_alt.S
bn/arch/amd64/bignum_mul_8_16_alt.S
bn/arch/amd64/bignum_sqr.S
bn/arch/amd64/bignum_sqr_4_8_alt.S
bn/arch/amd64/bignum_sqr_8_16_alt.S
bn/arch/amd64/bignum_sub.S
bn/arch/amd64/bn_arch.c
) )
add_definitions(-DAES_ASM) add_definitions(-DAES_ASM)
add_definitions(-DBSAES_ASM) add_definitions(-DBSAES_ASM)

View File

@ -19,6 +19,18 @@ ASM_X86_64_MACOSX += sha/sha512-macosx-x86_64.S
ASM_X86_64_MACOSX += whrlpool/wp-macosx-x86_64.S ASM_X86_64_MACOSX += whrlpool/wp-macosx-x86_64.S
ASM_X86_64_MACOSX += cpuid-macosx-x86_64.S ASM_X86_64_MACOSX += cpuid-macosx-x86_64.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_add.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmadd.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmul.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_4_8_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_8_16_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16_alt.S
ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sub.S
ASM_X86_64_MACOSX += bn/arch/amd64/bn_arch.c
EXTRA_DIST += $(ASM_X86_64_MACOSX) EXTRA_DIST += $(ASM_X86_64_MACOSX)
if HOST_ASM_MACOSX_X86_64 if HOST_ASM_MACOSX_X86_64