From nobody Mon Dec 20 14:02:20 2021 X-Original-To: dev-commits-src-all@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 5AEFA18FCF03; Mon, 20 Dec 2021 14:02:23 +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 4JHh9T2Bpgz3GCT; Mon, 20 Dec 2021 14:02:20 +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 B282E17AC8; Mon, 20 Dec 2021 14:02:20 +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 1BKE2K17042927; Mon, 20 Dec 2021 14:02:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BKE2Kog042926; Mon, 20 Dec 2021 14:02:20 GMT (envelope-from git) Date: Mon, 20 Dec 2021 14:02:20 GMT Message-Id: <202112201402.1BKE2Kog042926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: a72050a86fff - stable/13 - Add an arm64 sha512 feature check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a72050a86fffef345f1afb4eeb54c11037d3edd9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640008941; 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=QPx/nNKGoOCNXhVVBLc5w+6g3ceDEWn2moQB+p7qoLo=; b=W9DJqED9WMUKBXvieu+lGIZUEBVibU0SPhU+11tmZsmc8e/tiN6CxoTPaRFwXcYXeRj2u+ 5eJoousqPD5PQPT4G+fWOB+6fBEUq8baRRgP7AbIVV9ZUOF9YjAMDa0c+lCguUf7P8Hh2t hAFimi/exxijLVGzA3TvpcD17lJagH3KuUkEg199x5Q/2qe09nFgt5KKohsrws10Mckpav tyPZRiWQHuMfeVJUoePAGYYArwNI5JAbGKR9gxHMiJHUsrQPm6UFuSZhbOensPOulyDUUH 9NIJ04dnUmvy02f3caqRhHWsf0H+ROaGlo9HGsAqmUokNnw3Z9uvL2h/hX3Xww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640008941; a=rsa-sha256; cv=none; b=DkVUl547fNCu8B6X/LDwqQJh+ox+O3443UzDd0WCk40PsPZ9qIeZjcr4y3tkRkfqtjS6xl 6xSyToclXUDQZQJrkVVETbo5U0lv4xErbDk1H5BJAyO/vAcEcvsSnGbgf4yYLqoTRG6TKc m9hPmEEVvQpzjR2IRnUr18gzMGIoESzfXvpWnob8zVbhIMZp1Qy6Ur9Z893e3hsspHfMQp 49eVxhx1H2F8UNT9TTZVKW4JhVGscjK3lXkOn+4F5nAGp0tWivxv4CVu2tjhIcAAHv4bKT sWQLMyBbEwormoBuYpvERHk0ojzGibaOUa6xTdw2rdB7vKxENuBUSuFGkHQrpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a72050a86fffef345f1afb4eeb54c11037d3edd9 commit a72050a86fffef345f1afb4eeb54c11037d3edd9 Author: Andrew Turner AuthorDate: 2021-11-29 17:21:31 +0000 Commit: Andrew Turner CommitDate: 2021-12-20 11:09:27 +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 (cherry picked from commit 629b5e87ed82aa428be1abbe51b80fa338fa839a) --- 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 4c14e3811f6e..71f0df70ad25 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 @@ -237,6 +238,13 @@ ${X_}COMPILER_FEATURES+= c++17 ${X_}COMPILER_FEATURES+= retpoline init-all .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}