aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2025-04-12 18:19:54 +0200
committerTheo Buehler <tb@openbsd.org>2025-04-12 18:19:54 +0200
commit1e824a0d12df308df6995faf01616054a7a383b0 (patch)
treeb61cb73d1f6952eb4c73d59d65fd23c643505604
parent33537646812ce13f5c6c257a6d44adeae259ef6e (diff)
parent1087da12fc815a84592454980cdcd5d34b07285b (diff)
downloadportable-1e824a0d12df308df6995faf01616054a7a383b0.tar.gz
portable-1e824a0d12df308df6995faf01616054a7a383b0.tar.bz2
portable-1e824a0d12df308df6995faf01616054a7a383b0.zip
Land 1147 - reenable mips32
-rw-r--r--.github/workflows/linux.yml2
-rw-r--r--.gitignore2
-rw-r--r--crypto/CMakeLists.txt2
-rw-r--r--crypto/Makefile.am3
-rw-r--r--crypto/arch/mips/crypto_arch.h21
-rw-r--r--include/arch/mips/opensslconf.h22
-rw-r--r--ssl/CMakeLists.txt2
-rw-r--r--ssl/Makefile.am3
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/Makefile.am2
10 files changed, 43 insertions, 18 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 88dd15e..8334ae6 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -23,7 +23,7 @@ jobs:
23 fail-fast: false 23 fail-fast: false
24 matrix: 24 matrix:
25 os: ["ubuntu-22.04", "ubuntu-24.04"] 25 os: ["ubuntu-22.04", "ubuntu-24.04"]
26 arch: ["native", "arm32", "arm64", "mingw32", "mingw64", "mips64"] 26 arch: ["native", "arm32", "arm64", "mingw32", "mingw64", "mips32", "mips64"]
27 compiler: ["gcc"] 27 compiler: ["gcc"]
28 include: 28 include:
29 - os: "ubuntu-22.04" 29 - os: "ubuntu-22.04"
diff --git a/.gitignore b/.gitignore
index 14917f9..7aff24f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -239,6 +239,8 @@ include/openssl/*.h
239 239
240/crypto/* 240/crypto/*
241!/crypto/Makefile.am.* 241!/crypto/Makefile.am.*
242!/crypto/arch/
243!/crypto/arch/mips/*
242!/crypto/compat/ 244!/crypto/compat/
243/crypto/compat/* 245/crypto/compat/*
244!/crypto/compat/arc4random.h 246!/crypto/compat/arc4random.h
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index a714059..64bccd8 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -781,7 +781,7 @@ elseif(HOST_MIPS64)
781 target_include_directories(crypto_obj PRIVATE arch/mips64) 781 target_include_directories(crypto_obj PRIVATE arch/mips64)
782 target_include_directories(crypto_obj PRIVATE bn/arch/mips64) 782 target_include_directories(crypto_obj PRIVATE bn/arch/mips64)
783elseif(HOST_MIPS) 783elseif(HOST_MIPS)
784 # XXX - can this go away? the directory doesn't exist... 784 target_include_directories(crypto_obj PRIVATE arch/mips)
785 target_include_directories(crypto_obj PRIVATE bn/arch/mips) 785 target_include_directories(crypto_obj PRIVATE bn/arch/mips)
786elseif(HOST_POWERPC) 786elseif(HOST_POWERPC)
787 target_include_directories(crypto_obj PRIVATE arch/powerpc) 787 target_include_directories(crypto_obj PRIVATE arch/powerpc)
diff --git a/crypto/Makefile.am b/crypto/Makefile.am
index 0952494..d1c5b76 100644
--- a/crypto/Makefile.am
+++ b/crypto/Makefile.am
@@ -403,10 +403,11 @@ endif
403noinst_HEADERS += arch/loongarch64/crypto_arch.h 403noinst_HEADERS += arch/loongarch64/crypto_arch.h
404noinst_HEADERS += bn/arch/loongarch64/bn_arch.h 404noinst_HEADERS += bn/arch/loongarch64/bn_arch.h
405 405
406# XXX - do we still need this?
407if HOST_MIPS 406if HOST_MIPS
407libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/
408libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips/ 408libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips/
409endif 409endif
410noinst_HEADERS += arch/mips/crypto_arch.h
410noinst_HEADERS += bn/arch/mips/bn_arch.h 411noinst_HEADERS += bn/arch/mips/bn_arch.h
411 412
412if HOST_MIPS64 413if HOST_MIPS64
diff --git a/crypto/arch/mips/crypto_arch.h b/crypto/arch/mips/crypto_arch.h
new file mode 100644
index 0000000..274879c
--- /dev/null
+++ b/crypto/arch/mips/crypto_arch.h
@@ -0,0 +1,21 @@
1/* $OpenBSD$ */
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/include/arch/mips/opensslconf.h b/include/arch/mips/opensslconf.h
index f17d3d2..a5d26b6 100644
--- a/include/arch/mips/opensslconf.h
+++ b/include/arch/mips/opensslconf.h
@@ -1,15 +1,22 @@
1#include <openssl/opensslfeatures.h> 1#include <openssl/opensslfeatures.h>
2/* crypto/opensslconf.h.in */ 2/* crypto/opensslconf.h.in */
3 3
4#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) 4#if defined(HEADER_CRYPTO_LOCAL_H) && !defined(OPENSSLDIR)
5#define OPENSSLDIR "/etc/ssl" 5#define OPENSSLDIR "/etc/ssl"
6#endif 6#endif
7 7
8#undef OPENSSL_UNISTD
9#define OPENSSL_UNISTD <unistd.h>
10
11#undef OPENSSL_EXPORT_VAR_AS_FUNCTION 8#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
12 9
10#ifndef OPENSSL_FILE
11#ifdef OPENSSL_NO_FILENAMES
12#define OPENSSL_FILE ""
13#define OPENSSL_LINE 0
14#else
15#define OPENSSL_FILE __FILE__
16#define OPENSSL_LINE __LINE__
17#endif
18#endif
19
13#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) 20#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
14#define IDEA_INT unsigned int 21#define IDEA_INT unsigned int
15#endif 22#endif
@@ -68,13 +75,6 @@
68#undef EIGHT_BIT 75#undef EIGHT_BIT
69#endif 76#endif
70 77
71#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
72#define CONFIG_HEADER_RC4_LOCL_H
73/* if this is defined data[i] is used instead of *data, this is a %20
74 * speedup on x86 */
75#define RC4_INDEX
76#endif
77
78#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 78#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
79#define CONFIG_HEADER_BF_LOCL_H 79#define CONFIG_HEADER_BF_LOCL_H
80#undef BF_PTR 80#undef BF_PTR
diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt
index 5baa5bc..cd7e335 100644
--- a/ssl/CMakeLists.txt
+++ b/ssl/CMakeLists.txt
@@ -122,7 +122,7 @@ elseif(HOST_LOONGARCH64)
122elseif(HOST_MIPS64) 122elseif(HOST_MIPS64)
123 target_include_directories(ssl_obj PRIVATE ../crypto/arch/mips64) 123 target_include_directories(ssl_obj PRIVATE ../crypto/arch/mips64)
124elseif(HOST_MIPS) 124elseif(HOST_MIPS)
125 # XXX - can this go away? the directory doesn't exist... 125 target_include_directories(ssl_obj PRIVATE ../crypto/arch/mips)
126elseif(HOST_POWERPC) 126elseif(HOST_POWERPC)
127 target_include_directories(ssl_obj PRIVATE ../crypto/arch/powerpc) 127 target_include_directories(ssl_obj PRIVATE ../crypto/arch/powerpc)
128elseif(HOST_POWERPC64) 128elseif(HOST_POWERPC64)
diff --git a/ssl/Makefile.am b/ssl/Makefile.am
index 8beb65a..2c84bff 100644
--- a/ssl/Makefile.am
+++ b/ssl/Makefile.am
@@ -136,9 +136,10 @@ libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/loongarch64/
136endif 136endif
137noinst_HEADERS += $(top_srcdir)/crypto/arch/loongarch64/crypto_arch.h 137noinst_HEADERS += $(top_srcdir)/crypto/arch/loongarch64/crypto_arch.h
138 138
139# XXX - do we still need this?
140if HOST_MIPS 139if HOST_MIPS
140libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/
141endif 141endif
142noinst_HEADERS += $(top_srcdir)/crypto/arch/mips/crypto_arch.h
142 143
143if HOST_MIPS64 144if HOST_MIPS64
144libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips64/ 145libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips64/
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 72e36d4..d7cc499 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -33,7 +33,7 @@ elseif(HOST_LOONGARCH64)
33elseif(HOST_MIPS64) 33elseif(HOST_MIPS64)
34 include_directories(../crypto/arch/mips64) 34 include_directories(../crypto/arch/mips64)
35elseif(HOST_MIPS) 35elseif(HOST_MIPS)
36 # XXX - can this go away? the directory doesn't exist... 36 include_directories(../crypto/arch/mips)
37elseif(HOST_POWERPC) 37elseif(HOST_POWERPC)
38 include_directories(../crypto/arch/powerpc) 38 include_directories(../crypto/arch/powerpc)
39elseif(HOST_POWERPC64) 39elseif(HOST_POWERPC64)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 217f445..b58de21 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -40,8 +40,8 @@ if HOST_LOONGARCH64
40AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/loongarch64/ 40AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/loongarch64/
41endif 41endif
42 42
43# XXX - do we still need this?
44if HOST_MIPS 43if HOST_MIPS
44AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/
45endif 45endif
46 46
47if HOST_MIPS64 47if HOST_MIPS64