aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2025-04-12 15:02:41 +0200
committerTheo Buehler <tb@openbsd.org>2025-04-12 15:02:41 +0200
commit34480a7eba9b3af01bf5ccbd844dc749147c9341 (patch)
treeae7680622519077af36d2fa49696b8d120f35b69 /crypto
parentf625098f8b64b917b239afd72d1317139bef1e3b (diff)
parent031c2f1722f9af10299de3d22ff3c1467d541241 (diff)
downloadportable-34480a7eba9b3af01bf5ccbd844dc749147c9341.tar.gz
portable-34480a7eba9b3af01bf5ccbd844dc749147c9341.tar.bz2
portable-34480a7eba9b3af01bf5ccbd844dc749147c9341.zip
Land #1146 - Basic longarch64 support
Diffstat (limited to 'crypto')
-rw-r--r--crypto/CMakeLists.txt3
-rw-r--r--crypto/Makefile.am7
-rw-r--r--crypto/arch/loongarch64/crypto_arch.h21
-rw-r--r--crypto/bn/arch/loongarch64/bn_arch.h23
4 files changed, 54 insertions, 0 deletions
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index e642b01..a714059 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -774,6 +774,9 @@ elseif(HOST_ARM)
774elseif(HOST_I386) 774elseif(HOST_I386)
775 target_include_directories(crypto_obj PRIVATE arch/i386/) 775 target_include_directories(crypto_obj PRIVATE arch/i386/)
776 target_include_directories(crypto_obj PRIVATE bn/arch/i386/) 776 target_include_directories(crypto_obj PRIVATE bn/arch/i386/)
777elseif(HOST_LOONGARCH64)
778 target_include_directories(crypto_obj PRIVATE arch/loongarch64)
779 target_include_directories(crypto_obj PRIVATE bn/arch/loongarch64)
777elseif(HOST_MIPS64) 780elseif(HOST_MIPS64)
778 target_include_directories(crypto_obj PRIVATE arch/mips64) 781 target_include_directories(crypto_obj PRIVATE arch/mips64)
779 target_include_directories(crypto_obj PRIVATE bn/arch/mips64) 782 target_include_directories(crypto_obj PRIVATE bn/arch/mips64)
diff --git a/crypto/Makefile.am b/crypto/Makefile.am
index 438da8b..0952494 100644
--- a/crypto/Makefile.am
+++ b/crypto/Makefile.am
@@ -396,6 +396,13 @@ endif
396noinst_HEADERS += arch/i386/crypto_arch.h 396noinst_HEADERS += arch/i386/crypto_arch.h
397noinst_HEADERS += bn/arch/i386/bn_arch.h 397noinst_HEADERS += bn/arch/i386/bn_arch.h
398 398
399if HOST_LOONGARCH64
400libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/loongarch64/
401libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/loongarch64/
402endif
403noinst_HEADERS += arch/loongarch64/crypto_arch.h
404noinst_HEADERS += bn/arch/loongarch64/bn_arch.h
405
399# XXX - do we still need this? 406# XXX - do we still need this?
400if HOST_MIPS 407if HOST_MIPS
401libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips/ 408libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips/
diff --git a/crypto/arch/loongarch64/crypto_arch.h b/crypto/arch/loongarch64/crypto_arch.h
new file mode 100644
index 0000000..a3dd98d
--- /dev/null
+++ b/crypto/arch/loongarch64/crypto_arch.h
@@ -0,0 +1,21 @@
1/* $OpenBSD: crypto_arch.h,v 1.1 2024/08/11 13:02:39 jsing Exp $ */
2/*
3 * Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#ifndef HEADER_CRYPTO_ARCH_H
19#define HEADER_CRYPTO_ARCH_H
20
21#endif
diff --git a/crypto/bn/arch/loongarch64/bn_arch.h b/crypto/bn/arch/loongarch64/bn_arch.h
new file mode 100644
index 0000000..672ac12
--- /dev/null
+++ b/crypto/bn/arch/loongarch64/bn_arch.h
@@ -0,0 +1,23 @@
1/* $OpenBSD: bn_arch.h,v 1.7 2023/07/09 10:37:32 jsing Exp $ */
2/*
3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#include <openssl/bn.h>
19
20#ifndef HEADER_BN_ARCH_H
21#define HEADER_BN_ARCH_H
22
23#endif