From nobody Wed Dec 1 15:15:14 2021 X-Original-To: dev-commits-src-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 2EA7818AF34E; Wed, 1 Dec 2021 15:15:15 +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 4J42hL1wxSz3H38; Wed, 1 Dec 2021 15:15:14 +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 1B6834187; Wed, 1 Dec 2021 15:15:14 +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 1B1FFEJ6066161; Wed, 1 Dec 2021 15:15:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1FFEZU066160; Wed, 1 Dec 2021 15:15:14 GMT (envelope-from git) Date: Wed, 1 Dec 2021 15:15:14 GMT Message-Id: <202112011515.1B1FFEZU066160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 629b5e87ed82 - main - Add an arm64 sha512 feature check List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 629b5e87ed82aa428be1abbe51b80fa338fa839a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638371714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7WrEfWdzrpbubZCNDxlIkuBZbNso4UFPhkrCvC3Qc0=; b=Cdzf9J7kOKqy6QHIgZPooVA882tKdNoukxxJiWivWhypPHPpqZTWcKZNyx8XABU1Oc78du lQ9zxauwSaig6FJE+1H/qtTprT9R6YA7BIZOKMwo9ac7Q4/hGh/0+Kk/E8AZjnfg1GJ2Wr Q26cDOi+8h8oCU91HZoYtURt0KLpk+Fo5qPjkV/NS+kRi8DnVy0lpNepRi+WHVOeD3DmZb W9BELD7PURrfsL4EFh1FXjveDwzURooQjMUVasDjcCNWZW++qpDttVWstQfmRQtTlManKH qILKEYpuPGLe711foiJUeNxPb0H6PLwsOrVOlcvd0jqohZhd0xLzCYYqKaQU7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638371714; a=rsa-sha256; cv=none; b=LlnKY/Ay4X0qI7KCEufCnjr6WFA8YWKnfXyAbmcYwlIrWjJNf8tiES4IjRSUbPODw9zRqm 8SN6uB74u7pIldIsG3eJxYHFKPNKYngA/11SXJiIL8dt5BdNR7EbpCn2Zxt4jzEwQexo0s qd6oXktoDFECTuIFEWLbDpsbuQx4NHf7ES2CrZzu5fMPauq+PpHeHueqn96v1kc5BEEsJw n9tSnIRIRZlhtuavPG+gS2kElCm7RFf5OLA6yFKScQ/ds/HwRwUzc/bYmtXRd3J0C0CD1p /EgE4nPFpMEjlv65kDOw7Tl4iiKzbuNp1vG/LXPIjIzhHw6906Rv7q5CYcI6mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=629b5e87ed82aa428be1abbe51b80fa338fa839a commit 629b5e87ed82aa428be1abbe51b80fa338fa839a Author: Andrew Turner AuthorDate: 2021-11-29 17:21:31 +0000 Commit: Andrew Turner CommitDate: 2021-12-01 15:14:57 +0000 Add an arm64 sha512 feature check This is only available in recent toolchains. Check for it so we can use it in libmd. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33166 --- share/mk/bsd.compiler.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index c58eb114f4b8..4a1472c6bfab 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -25,6 +25,7 @@ # - retpoline: supports the retpoline speculative execution vulnerability # mitigation. # - init-all: supports stack variable initialization. +# - aarch64-sha512: supports the AArch64 sha512 intrinsic functions. # # When bootstrapping on macOS, 'apple-clang' will be set in COMPILER_FEATURES # to differentiate Apple's version of Clang. Apple Clang uses a different @@ -255,6 +256,13 @@ ${X_}COMPILER_FEATURES+= compressed-debug ${X_}COMPILER_FEATURES+= fileprefixmap .endif +.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 130000) || \ + (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 90000) +# AArch64 sha512 intrinsics are supported (and have been tested) in +# clang 13 and gcc 9. +${X_}COMPILER_FEATURES+= aarch64-sha512 +.endif + .else # Use CC's values X_COMPILER_TYPE= ${COMPILER_TYPE}