fix mips/mips64 builds

This commit is contained in:
Brent Cook
2023-03-23 06:07:31 -05:00
parent 59261d04c5
commit 73d924f643
8 changed files with 327 additions and 44 deletions

View File

@@ -136,10 +136,6 @@ endif
libcrypto_la_CPPFLAGS = -I$(top_srcdir)/crypto/hidden ${AM_CPPFLAGS}
libcrypto_la_CPPFLAGS += -DLIBRESSL_INTERNAL
libcrypto_la_CPPFLAGS += -DOPENSSL_NO_HW_PADLOCK
if OPENSSL_NO_ASM
libcrypto_la_CPPFLAGS += -DOPENSSL_NO_ASM
else
endif
if OPENSSLDIR_DEFINED
libcrypto_la_CPPFLAGS += -DOPENSSLDIR=\"@OPENSSLDIR@\"
@@ -247,16 +243,21 @@ libcrypto_la_SOURCES =
EXTRA_libcrypto_la_SOURCES =
include Makefile.am.elf-arm
include Makefile.am.elf-mips
include Makefile.am.elf-mips64
include Makefile.am.elf-x86_64
include Makefile.am.macosx-x86_64
include Makefile.am.masm-x86_64
include Makefile.am.mingw64-x86_64
if !HOST_ASM_ELF_ARM
if !HOST_ASM_ELF_MIPS
if !HOST_ASM_ELF_MIPS64
if !HOST_ASM_ELF_X86_64
if !HOST_ASM_MACOSX_X86_64
if !HOST_ASM_MASM_X86_64
if !HOST_ASM_MINGW64_X86_64
libcrypto_la_CPPFLAGS += -DOPENSSL_NO_ASM
libcrypto_la_SOURCES += aes/aes_cbc.c
libcrypto_la_SOURCES += aes/aes_core.c
libcrypto_la_SOURCES += camellia/camellia.c
@@ -269,6 +270,8 @@ endif
endif
endif
endif
endif
endif
libcrypto_la_SOURCES += cpt_err.c
libcrypto_la_SOURCES += cryptlib.c
@@ -459,6 +462,11 @@ libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/i386/
endif
noinst_HEADERS += bn/arch/i386/bn_arch.h
if HOST_MIPS
libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips/
endif
noinst_HEADERS += bn/arch/mips/bn_arch.h
if HOST_MIPS64
libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips64/
endif

View File

@@ -0,0 +1,24 @@
ASM_MIPS_ELF = aes/aes-mips.S
ASM_MIPS_ELF += bn/bn-mips.S
ASM_MIPS_ELF += bn/mont-mips.S
ASM_MIPS_ELF += sha/sha1-mips.S
ASM_MIPS_ELF += sha/sha512-mips.S
ASM_MIPS_ELF += sha/sha256-mips.S
ASM_MIPS_ELF += aes/aes_cbc.c
ASM_MIPS_ELF += camellia/camellia.c
ASM_MIPS_ELF += camellia/cmll_cbc.c
ASM_MIPS_ELF += rc4/rc4_enc.c
ASM_MIPS_ELF += rc4/rc4_skey.c
ASM_MIPS_ELF += whrlpool/wp_block.c
EXTRA_DIST += $(ASM_MIPS_ELF)
if HOST_ASM_ELF_MIPS
libcrypto_la_CPPFLAGS += -DAES_ASM
libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT
libcrypto_la_CPPFLAGS += -DSHA1_ASM
libcrypto_la_CPPFLAGS += -DSHA256_ASM
libcrypto_la_CPPFLAGS += -DSHA512_ASM
libcrypto_la_SOURCES += $(ASM_MIPS_ELF)
endif

View File

@@ -0,0 +1,24 @@
ASM_MIPS64_ELF = aes/aes-mips.S
ASM_MIPS64_ELF += bn/bn-mips.S
ASM_MIPS64_ELF += bn/mont-mips.S
ASM_MIPS64_ELF += sha/sha1-mips.S
ASM_MIPS64_ELF += sha/sha512-mips.S
ASM_MIPS64_ELF += sha/sha256-mips.S
ASM_MIPS64_ELF += aes/aes_cbc.c
ASM_MIPS64_ELF += camellia/camellia.c
ASM_MIPS64_ELF += camellia/cmll_cbc.c
ASM_MIPS64_ELF += rc4/rc4_enc.c
ASM_MIPS64_ELF += rc4/rc4_skey.c
ASM_MIPS64_ELF += whrlpool/wp_block.c
EXTRA_DIST += $(ASM_MIPS64_ELF)
if HOST_ASM_ELF_MIPS64
libcrypto_la_CPPFLAGS += -DAES_ASM
libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT
libcrypto_la_CPPFLAGS += -DSHA1_ASM
libcrypto_la_CPPFLAGS += -DSHA256_ASM
libcrypto_la_CPPFLAGS += -DSHA512_ASM
libcrypto_la_SOURCES += $(ASM_MIPS64_ELF)
endif

View File

@@ -0,0 +1,24 @@
/* $OpenBSD: bn_arch.h,v 1.1 2023/01/20 10:04:34 jsing Exp $ */
/*
* Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef HEADER_BN_ARCH_H
#define HEADER_BN_ARCH_H
#ifndef OPENSSL_NO_ASM
#endif
#endif