1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
Fix detection of ARM CPU features
See also:
* https://github.com/openssl/openssl/pull/17082
* https://github.com/openssl/openssl/pull/17084
--- Configurations/10-main.conf.orig 2021-11-19 18:20:18 UTC
+++ Configurations/10-main.conf
@@ -1061,6 +1061,14 @@ my %targets = (
perlasm_scheme => "elf",
},
+ "BSD-aarch64" => {
+ inherit_from => [ "BSD-generic64" ],
+ lib_cppflags => add("-DL_ENDIAN"),
+ bn_ops => "SIXTY_FOUR_BIT_LONG",
+ asm_arch => 'aarch64',
+ perlasm_scheme => "linux64",
+ },
+
"bsdi-elf-gcc" => {
inherit_from => [ "BASE_unix" ],
CC => "gcc",
--- util/perl/OpenSSL/config.pm.orig 2021-11-19 18:21:33 UTC
+++ util/perl/OpenSSL/config.pm
@@ -745,6 +745,7 @@ EOF
[ 'ia64-.*-.*bsd.*', { target => "BSD-ia64" } ],
[ 'x86_64-.*-dragonfly.*', { target => "BSD-x86_64" } ],
[ 'amd64-.*-.*bsd.*', { target => "BSD-x86_64" } ],
+ [ 'arm64-.*-.*bsd.*', { target => "BSD-aarch64" } ],
[ '.*86.*-.*-.*bsd.*',
sub {
# mimic ld behaviour when it's looking for libc...
--- crypto/armcap.c.orig 2021-09-07 11:46:32 UTC
+++ crypto/armcap.c
@@ -112,20 +112,23 @@ static unsigned long getauxval(unsigned long key)
* ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas
* AArch64 used AT_HWCAP.
*/
+# ifndef AT_HWCAP
+# define AT_HWCAP 16
+# endif
+# ifndef AT_HWCAP2
+# define AT_HWCAP2 26
+# endif
# if defined(__arm__) || defined (__arm)
-# define HWCAP 16
- /* AT_HWCAP */
+# define HWCAP AT_HWCAP
# define HWCAP_NEON (1 << 12)
-# define HWCAP_CE 26
- /* AT_HWCAP2 */
+# define HWCAP_CE AT_HWCAP2
# define HWCAP_CE_AES (1 << 0)
# define HWCAP_CE_PMULL (1 << 1)
# define HWCAP_CE_SHA1 (1 << 2)
# define HWCAP_CE_SHA256 (1 << 3)
# elif defined(__aarch64__)
-# define HWCAP 16
- /* AT_HWCAP */
+# define HWCAP AT_HWCAP
# define HWCAP_NEON (1 << 1)
# define HWCAP_CE HWCAP
|