add arm asm support via autoconf/make

This commit is contained in:
Brent Cook 2018-11-11 02:08:55 -06:00
parent 9c6e9f0995
commit 8f32297dce
2 changed files with 7 additions and 2 deletions

View File

@ -80,12 +80,12 @@ CFLAGS="$old_cflags"
AS_CASE([$host_cpu], AS_CASE([$host_cpu],
[*sparc*], [CPPFLAGS="$CPPFLAGS -D__STRICT_ALIGNMENT"], [*sparc*], [CPPFLAGS="$CPPFLAGS -D__STRICT_ALIGNMENT"],
[*arm*], AS_IF([test "x$BSWAP4" = "xyes"],, [*arm*], [host_cpu=arm],
CPPFLAGS="$CPPFLAGS -D__STRICT_ALIGNMENT"),
[*amd64*], [host_cpu=x86_64 HOSTARCH=intel], [*amd64*], [host_cpu=x86_64 HOSTARCH=intel],
[i?86], [HOSTARCH=intel], [i?86], [HOSTARCH=intel],
[x86_64], [HOSTARCH=intel] [x86_64], [HOSTARCH=intel]
) )
AS_IF([test "x$BSWAP4" = "xyes" -a "$host_cpu" = "arm" ],,CPPFLAGS="$CPPFLAGS -D__STRICT_ALIGNMENT")
AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"]) AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"])
AC_MSG_CHECKING([if .gnu.warning accepts long strings]) AC_MSG_CHECKING([if .gnu.warning accepts long strings])
@ -105,6 +105,8 @@ AC_ARG_ENABLE([asm],
AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) 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],
[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],

View File

@ -192,9 +192,11 @@ include Makefile.am.arc4random
libcrypto_la_SOURCES = libcrypto_la_SOURCES =
EXTRA_libcrypto_la_SOURCES = EXTRA_libcrypto_la_SOURCES =
include Makefile.am.elf-arm
include Makefile.am.elf-x86_64 include Makefile.am.elf-x86_64
include Makefile.am.macosx-x86_64 include Makefile.am.macosx-x86_64
if !HOST_ASM_ELF_ARM
if !HOST_ASM_ELF_X86_64 if !HOST_ASM_ELF_X86_64
if !HOST_ASM_MACOSX_X86_64 if !HOST_ASM_MACOSX_X86_64
libcrypto_la_SOURCES += aes/aes_cbc.c libcrypto_la_SOURCES += aes/aes_cbc.c
@ -206,6 +208,7 @@ libcrypto_la_SOURCES += rc4/rc4_skey.c
libcrypto_la_SOURCES += whrlpool/wp_block.c libcrypto_la_SOURCES += whrlpool/wp_block.c
endif endif
endif endif
endif
libcrypto_la_SOURCES += cpt_err.c libcrypto_la_SOURCES += cpt_err.c
libcrypto_la_SOURCES += cryptlib.c libcrypto_la_SOURCES += cryptlib.c