diff options
author | Bernard Spil <brnrd@FreeBSD.org> | 2021-11-23 18:44:13 +0000 |
---|---|---|
committer | Bernard Spil <brnrd@FreeBSD.org> | 2021-11-23 18:44:13 +0000 |
commit | e2d67bee9eb05d8c48a054edd5b52938b1c1d576 (patch) | |
tree | aab83934b971f7a3401d6b9b089591fef0eeabf7 /security/openssl/files/patch-D33061 | |
parent | devel/spread-sheet-widget: Update to 0.8 (diff) |
www/openssl: Fix detection of ARM CPU features
Upstream:
* https://github.com/openssl/openssl/pull/17082
* https://github.com/openssl/openssl/pull/17085
PR: 259937
Submitted by: allanjude
Differential Revision: https://reviews.freebsd.org/D33061
Diffstat (limited to 'security/openssl/files/patch-D33061')
-rw-r--r-- | security/openssl/files/patch-D33061 | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/security/openssl/files/patch-D33061 b/security/openssl/files/patch-D33061 new file mode 100644 index 000000000000..2a917ab079c9 --- /dev/null +++ b/security/openssl/files/patch-D33061 @@ -0,0 +1,53 @@ +Upstream: + * https://github.com/openssl/openssl/pull/17079 + * https://github.com/openssl/openssl/pull/17084 + + +--- Configurations/10-main.conf.orig 2021-08-24 13:38:47.000000000 +0000 ++++ Configurations/10-main.conf 2021-11-18 21:12:30.060493000 +0000 +@@ -988,6 +988,13 @@ + perlasm_scheme => "elf", + }, + ++ "BSD-aarch64" => { ++ inherit_from => [ "BSD-generic64", asm("aarch64_asm") ], ++ lib_cppflags => add("-DL_ENDIAN"), ++ bn_ops => "SIXTY_FOUR_BIT_LONG", ++ perlasm_scheme => "linux64", ++ }, ++ + "bsdi-elf-gcc" => { + inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], + CC => "gcc", +--- crypto/armcap.c.orig 2021-08-24 13:38:47 UTC ++++ crypto/armcap.c +@@ -106,20 +106,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 |