From nobody Sat Nov 20 14:10:24 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1DE2518515FF; Sat, 20 Nov 2021 14:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HxFmd0M7Sz3lJD; Sat, 20 Nov 2021 14:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0B3F1D487; Sat, 20 Nov 2021 14:10:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AKEAOdN026044; Sat, 20 Nov 2021 14:10:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKEAOdK026043; Sat, 20 Nov 2021 14:10:24 GMT (envelope-from git) Date: Sat, 20 Nov 2021 14:10:24 GMT Message-Id: <202111201410.1AKEAOdK026043@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Bernard Spil Subject: git: f5164ae6014c - main - security/openssl-devel: Fix detection of ARM CPU features List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brnrd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5164ae6014c9bbebcea3c573280cf6aa03d1178 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brnrd: URL: https://cgit.FreeBSD.org/ports/commit/?id=f5164ae6014c9bbebcea3c573280cf6aa03d1178 commit f5164ae6014c9bbebcea3c573280cf6aa03d1178 Author: Bernard Spil AuthorDate: 2021-11-20 14:07:29 +0000 Commit: Bernard Spil CommitDate: 2021-11-20 14:10:12 +0000 security/openssl-devel: Fix detection of ARM CPU features Upstream: * https://github.com/openssl/openssl/pull/17082 * https://github.com/openssl/openssl/pull/17084 PR: 259937 Submitted by: allanjude Differential Revision: https://reviews.freebsd.org/D33062 --- security/openssl-devel/Makefile | 2 +- security/openssl-devel/files/patch-D33062 | 65 +++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/security/openssl-devel/Makefile b/security/openssl-devel/Makefile index 79da508e23d4..804d8eb735c2 100644 --- a/security/openssl-devel/Makefile +++ b/security/openssl-devel/Makefile @@ -2,7 +2,7 @@ PORTNAME= openssl DISTVERSION= 3.0.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security devel MASTER_SITES= https://www.openssl.org/source/ \ ftp://ftp.cert.dfn.de/pub/tools/net/openssl/source/ diff --git a/security/openssl-devel/files/patch-D33062 b/security/openssl-devel/files/patch-D33062 new file mode 100644 index 000000000000..58dab2b86fef --- /dev/null +++ b/security/openssl-devel/files/patch-D33062 @@ -0,0 +1,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