Date: Tue, 26 Jul 2022 15:57:26 GMT From: "Sergey A. Osokin" <osa@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 8f5d3084280d - main - security/boringssl: fix build on armv7 Message-ID: <202207261557.26QFvQ6s033303@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/ports/commit/?id=8f5d3084280d550de4eeedddaf47ac4a9d33e6b7 commit 8f5d3084280d550de4eeedddaf47ac4a9d33e6b7 Author: Sergey A. Osokin <osa@FreeBSD.org> AuthorDate: 2022-07-26 15:56:17 +0000 Commit: Sergey A. Osokin <osa@FreeBSD.org> CommitDate: 2022-07-26 15:57:20 +0000 security/boringssl: fix build on armv7 Bump PORTREVISION. PR: 265440 --- security/boringssl/Makefile | 2 +- .../boringssl/files/patch-crypto_CMakeLists.txt | 14 ++++-- .../files/patch-crypto_cpu__arm__freebsd.c | 55 ++++++++++++++++++++++ 3 files changed, 67 insertions(+), 4 deletions(-) diff --git a/security/boringssl/Makefile b/security/boringssl/Makefile index 1a7f69d7f80e..45ccb2abe6b6 100644 --- a/security/boringssl/Makefile +++ b/security/boringssl/Makefile @@ -1,6 +1,6 @@ PORTNAME= boringssl PORTVERSION= 0.0.0.0.2022.07.25.01 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MAINTAINER= osa@FreeBSD.org diff --git a/security/boringssl/files/patch-crypto_CMakeLists.txt b/security/boringssl/files/patch-crypto_CMakeLists.txt index b32c3e7389fb..6755b7553615 100644 --- a/security/boringssl/files/patch-crypto_CMakeLists.txt +++ b/security/boringssl/files/patch-crypto_CMakeLists.txt @@ -1,6 +1,14 @@ ---- crypto/CMakeLists.txt.orig 2022-01-21 15:36:31 UTC -+++ crypto/CMakeLists.txt -@@ -462,6 +462,7 @@ if(FIPS_DELOCATE OR FIPS_SHARED) +--- crypto/CMakeLists.txt.orig 2022-07-25 14:53:51.000000000 -0400 ++++ crypto/CMakeLists.txt 2022-07-26 11:40:36.847197000 -0400 +@@ -267,6 +267,7 @@ + cpu_aarch64_fuchsia.c + cpu_aarch64_linux.c + cpu_aarch64_win.c ++ cpu_arm_freebsd.c + cpu_arm_linux.c + cpu_arm.c + cpu_intel.c +@@ -464,6 +465,7 @@ endif() SET_TARGET_PROPERTIES(crypto PROPERTIES LINKER_LANGUAGE C) diff --git a/security/boringssl/files/patch-crypto_cpu__arm__freebsd.c b/security/boringssl/files/patch-crypto_cpu__arm__freebsd.c new file mode 100644 index 000000000000..eab921b971a7 --- /dev/null +++ b/security/boringssl/files/patch-crypto_cpu__arm__freebsd.c @@ -0,0 +1,55 @@ +--- crypto/cpu_arm_freebsd.c.orig 2022-07-24 00:49:45 UTC ++++ crypto/cpu_arm_freebsd.c +@@ -0,0 +1,52 @@ ++/* Copyright (c) 2016, Google Inc. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY ++ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION ++ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ++ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ ++ ++#include "internal.h" ++ ++#if defined(OPENSSL_ARM) && defined(OPENSSL_FREEBSD) && \ ++ !defined(OPENSSL_STATIC_ARMCAP) ++#include <sys/types.h> ++#include <sys/auxv.h> ++ ++#include <openssl/arm_arch.h> ++#include <openssl/mem.h> ++ ++extern uint32_t OPENSSL_armcap_P; ++ ++void OPENSSL_cpuid_setup(void) { ++ unsigned long hwcap = 0, hwcap2 = 0; ++ ++ elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap); ++ elf_aux_info(AT_HWCAP2, &hwcap2, sizeof hwcap2); ++ ++ // Matching OpenSSL, only report other features if NEON is present. ++ if (hwcap & HWCAP_NEON) { ++ OPENSSL_armcap_P |= ARMV7_NEON; ++ ++ if (hwcap2 & HWCAP2_AES) { ++ OPENSSL_armcap_P |= ARMV8_AES; ++ } ++ if (hwcap2 & HWCAP2_PMULL) { ++ OPENSSL_armcap_P |= ARMV8_PMULL; ++ } ++ if (hwcap2 & HWCAP2_SHA1) { ++ OPENSSL_armcap_P |= ARMV8_SHA1; ++ } ++ if (hwcap2 & HWCAP2_SHA2) { ++ OPENSSL_armcap_P |= ARMV8_SHA256; ++ } ++ } ++} ++ ++#endif // OPENSSL_ARM && OPENSSL_OPENBSD && !OPENSSL_STATIC_ARMCAP
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207261557.26QFvQ6s033303>